From 6de869d8f62464742ea18d34753f1898728d9f53 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 28 Jan 2009 00:01:52 -0600 Subject: *Fix the bug that event ai mobs sometimes chase victims even when polymorphed. --HG-- branch : trunk --- src/game/Unit.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 9d9b1fdc101..0296f7ceb4d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12904,6 +12904,7 @@ void Unit::SetFeared(bool apply) Unit::AuraList const& fearAuras = GetAurasByType(SPELL_AURA_MOD_FEAR); if(!fearAuras.empty()) caster = ObjectAccessor::GetUnit(*this, fearAuras.front()->GetCasterGUID()); + if(!caster) caster = getVictim(); GetMotionMaster()->MoveFleeing(caster); // caster==NULL processed in MoveFleeing } else -- cgit v1.2.3