Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] do u know which is which in cases like `OnUnitEnterCombat(Unit *unit, Unit *victim)` ? if player att

[DiscordArchive] do u know which is which in cases like `OnUnitEnterCombat(Unit *unit, Unit *victim)` ? if player att

[DiscordArchive] do u know which is which in cases like `OnUnitEnterCombat(Unit *unit, Unit *victim)` ? if player att

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
12-21-2022, 09:08 PM
#1
Archived author: Rymercyble • Posted: 2022-12-21T21:08:01.514000+00:00
Original source

do u know which is which in cases like `OnUnitEnterCombat(Unit *unit, Unit *victim)` ? if player attacks npc unit is player and victim is npc and if player is near npc and it agroes to player then unit is npc and victim is player ?
rektbyfaith
12-21-2022, 09:08 PM #1

Archived author: Rymercyble • Posted: 2022-12-21T21:08:01.514000+00:00
Original source

do u know which is which in cases like `OnUnitEnterCombat(Unit *unit, Unit *victim)` ? if player attacks npc unit is player and victim is npc and if player is near npc and it agroes to player then unit is npc and victim is player ?

rektbyfaith
Administrator
0
12-21-2022, 09:08 PM
#2
Archived author: Anchy • Posted: 2022-12-21T21:08:20.407000+00:00
Original source

not sure
rektbyfaith
12-21-2022, 09:08 PM #2

Archived author: Anchy • Posted: 2022-12-21T21:08:20.407000+00:00
Original source

not sure

rektbyfaith
Administrator
0
12-21-2022, 09:08 PM
#3
Archived author: Anchy • Posted: 2022-12-21T21:08:24.938000+00:00
Original source

but I was just looking at the ThreatContainer
rektbyfaith
12-21-2022, 09:08 PM #3

Archived author: Anchy • Posted: 2022-12-21T21:08:24.938000+00:00
Original source

but I was just looking at the ThreatContainer

rektbyfaith
Administrator
0
12-21-2022, 09:08 PM
#4
Archived author: Anchy • Posted: 2022-12-21T21:08:51.532000+00:00
Original source

```cpp
void remove(HostileReference* hostileRef)
{
iThreatList.remove(hostileRef);
}

void addReference(HostileReference* hostileRef)
{
iThreatList.push_back(hostileRef);
}```
rektbyfaith
12-21-2022, 09:08 PM #4

Archived author: Anchy • Posted: 2022-12-21T21:08:51.532000+00:00
Original source

```cpp
void remove(HostileReference* hostileRef)
{
iThreatList.remove(hostileRef);
}

void addReference(HostileReference* hostileRef)
{
iThreatList.push_back(hostileRef);
}```

rektbyfaith
Administrator
0
12-21-2022, 09:08 PM
#5
Archived author: Anchy • Posted: 2022-12-21T21:08:59.098000+00:00
Original source

you could try add hooks for both of these methods
rektbyfaith
12-21-2022, 09:08 PM #5

Archived author: Anchy • Posted: 2022-12-21T21:08:59.098000+00:00
Original source

you could try add hooks for both of these methods

rektbyfaith
Administrator
0
12-21-2022, 09:09 PM
#6
Archived author: Anchy • Posted: 2022-12-21T21:09:08.543000+00:00
Original source

these are only called when adding or removing threat
rektbyfaith
12-21-2022, 09:09 PM #6

Archived author: Anchy • Posted: 2022-12-21T21:09:08.543000+00:00
Original source

these are only called when adding or removing threat

rektbyfaith
Administrator
0
12-21-2022, 09:09 PM
#7
Archived author: Anchy • Posted: 2022-12-21T21:09:11.766000+00:00
Original source

not changing threat
rektbyfaith
12-21-2022, 09:09 PM #7

Archived author: Anchy • Posted: 2022-12-21T21:09:11.766000+00:00
Original source

not changing threat

rektbyfaith
Administrator
0
12-21-2022, 09:10 PM
#8
Archived author: Rymercyble • Posted: 2022-12-21T21:10:02.148000+00:00
Original source

rektbyfaith
12-21-2022, 09:10 PM #8

Archived author: Rymercyble • Posted: 2022-12-21T21:10:02.148000+00:00
Original source

rektbyfaith
Administrator
0
12-21-2022, 09:10 PM
#9
Archived author: Anchy • Posted: 2022-12-21T21:10:15.202000+00:00
Original source

L180, ThreatMgr.h
rektbyfaith
12-21-2022, 09:10 PM #9

Archived author: Anchy • Posted: 2022-12-21T21:10:15.202000+00:00
Original source

L180, ThreatMgr.h

rektbyfaith
Administrator
0
12-21-2022, 09:11 PM
#10
Archived author: Anchy • Posted: 2022-12-21T21:11:18.002000+00:00
Original source

the HostileReference holds both the owner of the threat and the victim too
rektbyfaith
12-21-2022, 09:11 PM #10

Archived author: Anchy • Posted: 2022-12-21T21:11:18.002000+00:00
Original source

the HostileReference holds both the owner of the threat and the victim too

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)