Clear auto XTargets on WipeHateList

This commit is contained in:
Michael Cook (mackal) 2015-08-12 23:36:59 -04:00
parent f46b88bbde
commit 1fc23beb78

View File

@ -67,8 +67,10 @@ void HateList::WipeHateList()
{ {
parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), m, "0", 0); parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), m, "0", 0);
if (m->IsClient()) if (m->IsClient()) {
m->CastToClient()->DecrementAggroCount(); m->CastToClient()->DecrementAggroCount();
m->CastToClient()->RemoveXTarget(hate_owner, true);
}
} }
delete (*iterator); delete (*iterator);
iterator = list.erase(iterator); iterator = list.erase(iterator);