[Fix] Fix zone crash when attempting to add a disappearing client to hate list. (#4782)

This commit is contained in:
zimp-wow
2025-03-19 16:26:54 -05:00
committed by GitHub
parent 9528c1e7fc
commit ef945e6e99
3 changed files with 12 additions and 1 deletions
+6
View File
@@ -3041,9 +3041,15 @@ void Mob::AddToHateList(Mob* other, int64 hate /*= 0*/, int64 damage /*= 0*/, bo
if (!other)
return;
if (other->IsDestroying())
return;
if (other == this)
return;
if (other->IsClient() && (other->CastToClient()->IsZoning() || other->CastToClient()->Connected() == false))
return;
if (other->IsTrap())
return;