refactor some code to prevent possible crashes and bugs

This commit is contained in:
mq1n
2025-09-02 19:03:54 +03:00
parent 3de9fb33b5
commit 4ebc19a261
7 changed files with 86 additions and 64 deletions

View File

@@ -3195,7 +3195,7 @@ LPCHARACTER CHARACTER::GetNearestVictim(LPCHARACTER pkChr)
LPCHARACTER pAttacker = CHARACTER_MANAGER::instance().Find(c_VID);
if (!pAttacker)
if (!pAttacker || pAttacker->IsDead())
continue;
if (pAttacker->IsAffectFlag(AFF_EUNHYUNG) ||