mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-29 18:11:28 +00:00
Fix ClearAggro xtarget issue
This commit is contained in:
parent
2ab280bef0
commit
7d13475bac
@ -2980,10 +2980,16 @@ void EntityList::Evade(Mob *who)
|
||||
//removes "targ" from all hate lists, including feigned, in the zone
|
||||
void EntityList::ClearAggro(Mob* targ)
|
||||
{
|
||||
Client *c = nullptr;
|
||||
if (targ->IsClient())
|
||||
c = targ->CastToClient();
|
||||
auto it = npc_list.begin();
|
||||
while (it != npc_list.end()) {
|
||||
if (it->second->CheckAggro(targ))
|
||||
if (it->second->CheckAggro(targ)) {
|
||||
if (c)
|
||||
c->RemoveXTarget(it->second, false);
|
||||
it->second->RemoveFromHateList(targ);
|
||||
}
|
||||
it->second->RemoveFromFeignMemory(targ->CastToClient()); //just in case we feigned
|
||||
++it;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user