diff --git a/zone/attack.cpp b/zone/attack.cpp index e12f449e9..f8344e496 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1463,9 +1463,9 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo //SYNC WITH: tune.cpp, mob.h TuneClientAttack bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts) { - if (!other) { + if (!other || (other && other->IsCorpse())) { SetTarget(nullptr); - LogError("A null Mob object was passed for evaluation!"); + LogError("A null or invalid Mob object was passed for evaluation!"); return false; } @@ -6322,8 +6322,9 @@ void NPC::SetAttackTimer() void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell) { - if (!target) + if (!target || (target && target->IsCorpse())) { return; + } Attack(target, hand, false, false, IsFromSpell);