mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 19:32:24 +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
|
//removes "targ" from all hate lists, including feigned, in the zone
|
||||||
void EntityList::ClearAggro(Mob* targ)
|
void EntityList::ClearAggro(Mob* targ)
|
||||||
{
|
{
|
||||||
|
Client *c = nullptr;
|
||||||
|
if (targ->IsClient())
|
||||||
|
c = targ->CastToClient();
|
||||||
auto it = npc_list.begin();
|
auto it = npc_list.begin();
|
||||||
while (it != npc_list.end()) {
|
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->RemoveFromHateList(targ);
|
||||||
|
}
|
||||||
it->second->RemoveFromFeignMemory(targ->CastToClient()); //just in case we feigned
|
it->second->RemoveFromFeignMemory(targ->CastToClient()); //just in case we feigned
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user