[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
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 ?
Archived author: Anchy • Posted: 2022-12-21T21:08:20.407000+00:00
Original source
not sure
Archived author: Anchy • Posted: 2022-12-21T21:08:24.938000+00:00
Original source
but I was just looking at the ThreatContainer
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);
}```
Archived author: Anchy • Posted: 2022-12-21T21:08:59.098000+00:00
Original source
you could try add hooks for both of these methods
Archived author: Anchy • Posted: 2022-12-21T21:09:08.543000+00:00
Original source
these are only called when adding or removing threat
Archived author: Anchy • Posted: 2022-12-21T21:09:11.766000+00:00
Original source
not changing threat
Archived author: Rymercyble • Posted: 2022-12-21T21:10:02.148000+00:00
Original source
Archived author: Anchy • Posted: 2022-12-21T21:10:15.202000+00:00
Original source
L180, ThreatMgr.h
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