Script/Pit of Saron: Fix logic in spell_tyrannus_overlord_brand

should fix #6247
This commit is contained in:
kaelima
2012-04-17 22:33:45 +02:00
parent 5dd561dcac
commit a998554f8f

View File

@@ -387,8 +387,7 @@ class player_overlord_brandAI : public PlayerAI
void SetGUID(uint64 guid, int32 /*type*/)
{
tyrannus = ObjectAccessor::GetCreature(*me, guid);
if (!tyrannus)
me->IsAIEnabled = false;
me->IsAIEnabled = tyrannus != NULL;
}
void DamageDealt(Unit* /*victim*/, uint32& damage, DamageEffectType /*damageType*/)
@@ -423,10 +422,9 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
return;
oldAI = GetTarget()->GetAI();
oldAIState = GetTarget()->IsAIEnabled;
GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer()));
GetTarget()->GetAI()->SetGUID(GetCasterGUID());
oldAIState = GetTarget()->IsAIEnabled;
GetTarget()->IsAIEnabled = true;
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)