mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
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*/)
|
||||
{
|
||||
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*/)
|
||||
|
||||
Reference in New Issue
Block a user