Script/Pit of Saron: Fix logic in spell_tyrannus_overlord_brand
should fix #6247
This commit is contained in:
@@ -387,8 +387,7 @@ class player_overlord_brandAI : public PlayerAI
|
|||||||
void SetGUID(uint64 guid, int32 /*type*/)
|
void SetGUID(uint64 guid, int32 /*type*/)
|
||||||
{
|
{
|
||||||
tyrannus = ObjectAccessor::GetCreature(*me, guid);
|
tyrannus = ObjectAccessor::GetCreature(*me, guid);
|
||||||
if (!tyrannus)
|
me->IsAIEnabled = tyrannus != NULL;
|
||||||
me->IsAIEnabled = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageDealt(Unit* /*victim*/, uint32& damage, DamageEffectType /*damageType*/)
|
void DamageDealt(Unit* /*victim*/, uint32& damage, DamageEffectType /*damageType*/)
|
||||||
@@ -423,10 +422,9 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
oldAI = GetTarget()->GetAI();
|
oldAI = GetTarget()->GetAI();
|
||||||
|
oldAIState = GetTarget()->IsAIEnabled;
|
||||||
GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer()));
|
GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer()));
|
||||||
GetTarget()->GetAI()->SetGUID(GetCasterGUID());
|
GetTarget()->GetAI()->SetGUID(GetCasterGUID());
|
||||||
oldAIState = GetTarget()->IsAIEnabled;
|
|
||||||
GetTarget()->IsAIEnabled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
|||||||
Reference in New Issue
Block a user