Scripts/Pit of Saron: Fix a crash at Scourgelord Tyrannus.

Closes issue #4601

--HG--
branch : trunk
This commit is contained in:
Liberate
2010-12-04 02:20:32 +01:00
parent 418f704e92
commit 526c15336d
@@ -328,6 +328,9 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraApplication const* aurApp, AuraEffectHandleModes /*mode*/)
{
if (aurApp->GetTarget()->GetTypeId() != TYPEID_PLAYER)
return;
delete aurApp->GetTarget()->GetAI();
aurApp->GetTarget()->SetAI(oldAI);
aurApp->GetTarget()->IsAIEnabled = oldAIState;