From 4a8a89e1db1f103020ffecbb570e1c570c2e0d21 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 1 Jul 2009 18:36:03 -0500 Subject: [8103] More wide use IsInWorld checks and delayed at teleport operations. Author: Ambal * IsInWorld used to prevent return unexpected not in world objects. * Delayed operations need to process its in world state. --HG-- branch : trunk --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index dfe7bfb0df9..df5334e3324 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8338,7 +8338,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack) return false; // dead units can neither attack nor be attacked - if(!isAlive() || !victim->isAlive()) + if(!isAlive() || !victim->IsInWorld() || !victim->isAlive()) return false; // player cannot attack in mount state -- cgit v1.2.3