AI: Resolve errors with combat timers

Refactored existing use of enterevademode
Split reset of timer between just respawned - all timers
evade - ooc/combat timers

Closes https://github.com/cmangos/mangos-tbc/pull/676
pull/588/merge
killerwife 1 month ago
parent 762f49f34f
commit 537d728073

@ -44,7 +44,7 @@ CreatureAI::CreatureAI(Creature* creature, uint32 combatActions) :
void CreatureAI::Reset()
{
ResetTimersOnEvade();
m_currentRangedMode = m_rangedMode;
m_attackDistance = m_chaseDistance;
}

@ -104,6 +104,7 @@ void FollowerAI::CorpseRemoved(uint32& /*respawnDelay*/)
void FollowerAI::EnterEvadeMode()
{
ResetTimersOnEvade();
m_creature->RemoveAllAurasOnEvade();
m_creature->CombatStopWithPets(true);

@ -54,12 +54,14 @@ void ScriptedAI::EnterEvadeMode()
{
UnitAI::EnterEvadeMode();
ResetTimersOnEvade();
Reset();
}
/// This function calls Reset() to reset variables as expected
void ScriptedAI::JustRespawned()
{
ResetAllTimers();
Reset();
}

@ -134,7 +134,7 @@ struct boss_felblood_kaelthasAI : public CombatAI
AddCustomAction(KAEL_GRAVITY_LAPSE_SCRIPT, true, [&]()
{
HandleGravityLapse();
});
}, TIMER_COMBAT_COMBAT);
AddCustomAction(KAEL_OUTRO, true, [&]()
{
HandleOutro();

@ -164,18 +164,8 @@ struct boss_gothikAI : public ScriptedAI
if (m_instance)
m_instance->SetData(TYPE_GOTHIK, FAIL);
m_creature->SetRespawnDelay(30, true);
m_creature->ForcedDespawn();
m_creature->Respawn();
ScriptedAI::EnterEvadeMode();
}
void JustReachedHome() override
{
if (m_instance)
m_instance->SetData(TYPE_GOTHIK, FAIL);
SetCombatMovement(false);
}
void UpdateAI(const uint32 diff) override

@ -90,10 +90,10 @@ struct boss_heiganAI : public CombatAI
AddCombatAction(HEIGAN_TELEPORT_PLAYERS, 35u * IN_MILLISECONDS, 45u * IN_MILLISECONDS);
AddCombatAction(HEIGAN_TAUNT, 25u * IN_MILLISECONDS, 90u * IN_MILLISECONDS);
AddCustomAction(HEIGAN_ERUPTION, true, [&]() { StartEruptions(m_phase == PHASE_GROUND ? SPELL_PLAGUE_WAVE_SLOW : SPELL_PLAGUE_WAVE_FAST); });
AddCustomAction(HEIGAN_GROUND_PHASE, true, [&]() { HandleGroundPhase(); });
AddCustomAction(HEIGAN_PLATFORM_PHASE, true, [&]() { HandlePlatformPhase(); });
AddCustomAction(HEIGAN_GROUND_PHASE, true, [&]() { HandleGroundPhase(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(HEIGAN_PLATFORM_PHASE, true, [&]() { HandlePlatformPhase(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(HEIGAN_DOOR, true, [&]() { CloseEntrance(); });
AddCustomAction(HEIGAN_CHANNELING, true, [&]() { HandleChanneling(); });
AddCustomAction(HEIGAN_CHANNELING, true, [&]() { HandleChanneling(); }, TIMER_COMBAT_COMBAT);
}
ScriptedInstance* m_instance;
@ -159,12 +159,12 @@ struct boss_heiganAI : public CombatAI
void EnterEvadeMode() override
{
ScriptedAI::EnterEvadeMode();
if (m_instance)
m_instance->SetData(TYPE_HEIGAN, FAIL);
StopEruptions();
ScriptedAI::EnterEvadeMode();
}
void HandleGroundPhase()

@ -574,7 +574,7 @@ struct npc_icecrown_guardianAI : public ScriptedAI
void EnterEvadeMode() override
{
m_creature->RemoveAurasDueToSpell(SPELL_BLOOD_TAP);
m_creature->RemoveAurasDueToSpell(SPELL_BLOOD_TAP);
ScriptedAI::EnterEvadeMode();
}

@ -121,8 +121,8 @@ struct boss_nothAI : public CombatAI
AddCombatAction(NOTH_BLINK, 25u * IN_MILLISECONDS);
AddCombatAction(NOTH_CURSE, 4u * IN_MILLISECONDS);
AddCombatAction(NOTH_SUMMON, 12u * IN_MILLISECONDS);
AddCustomAction(NOTH_BALCONY_PHASE, true, [&]() { HandleBalconyPhase(); });
AddCustomAction(NOTH_GROUND_PHASE, true, [&]() { HandleGroundPhase(); });
AddCustomAction(NOTH_BALCONY_PHASE, true, [&]() { HandleBalconyPhase(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(NOTH_GROUND_PHASE, true, [&]() { HandleGroundPhase(); }, TIMER_COMBAT_COMBAT);
AddOnKillText(SAY_SLAY1, SAY_SLAY1);
}

@ -94,9 +94,9 @@ struct boss_sapphironAI : public CombatAI
AddCombatAction(SAPPHIRON_FROST_BREATH, true);
AddCombatAction(SAPPHIRON_ICEBOLT, true);
AddCombatAction(SAPPHIRON_BERSERK, 15u * MINUTE * IN_MILLISECONDS);
AddCustomAction(SAPPHIRON_AIR_PHASE, true, [&]() { HandleAirPhase(); });
AddCustomAction(SAPPHIRON_LANDING_PHASE, true, [&]() { HandleLandingPhase(); });
AddCustomAction(SAPPHIRON_GROUND_PHASE, true, [&]() { HandleGroundPhase(); });
AddCustomAction(SAPPHIRON_AIR_PHASE, true, [&]() { HandleAirPhase(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(SAPPHIRON_LANDING_PHASE, true, [&]() { HandleLandingPhase(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(SAPPHIRON_GROUND_PHASE, true, [&]() { HandleGroundPhase(); }, TIMER_COMBAT_COMBAT);
}
ScriptedInstance* m_instance;

@ -87,7 +87,7 @@ struct boss_scarlet_commander_mograineAI : public CombatAI
AddCustomAction(MOGRAINE_ACTION_LAY_ON_HANDS, false, [&]()
{
HandleLayOnHandsTimer();
});
}, TIMER_COMBAT_COMBAT);
AddCustomAction(MOGRAINE_ACTION_REVIVED, true, [&]()
{
HandleRevivedTimer();

@ -125,7 +125,7 @@ struct boss_alythessAI : public CombatAI
AddCombatAction(ALYTHESS_CONFLAGRATION, 15000u);
AddCombatAction(ALYTHESS_BLAZE, 1000u);
AddCombatAction(ALYTHESS_FLAME_SEAR, 10000u);
AddCustomAction(ALYTHESS_DELAY, true, [&]() { HandleEmpowerDelay(); });
AddCustomAction(ALYTHESS_DELAY, true, [&]() { HandleEmpowerDelay(); }, TIMER_COMBAT_COMBAT);
AddOnKillText(SAY_ALYTHESS_KILL_1, SAY_ALYTHESS_KILL_2);
}
@ -311,7 +311,7 @@ struct boss_sacrolashAI : public CombatAI
AddCombatAction(SACROLASH_CONFOUNDING_BLOW, 25000, 27000);
AddCombatAction(SACROLASH_SHADOW_BLADES, 10000, 11000);
AddCombatAction(SACROLASH_SUMMON_SHADOW_IMAGE, 10000u);
AddCustomAction(ALYTHESS_DELAY, true, [&]() { HandleEmpowerDelay(); });
AddCustomAction(ALYTHESS_DELAY, true, [&]() { HandleEmpowerDelay(); }, TIMER_COMBAT_COMBAT);
AddOnKillText(SAY_SACROLASH_KILL_1, SAY_SACROLASH_KILL_2);
m_creature->GetCombatManager().SetLeashingCheck([](Unit*, float x, float y, float) -> bool
{

@ -116,8 +116,8 @@ struct boss_muruAI : public CombatAI
AddTimerlessCombatAction(MURU_TRANSITION, false);
AddCombatAction(MURU_DARK_FIENDS, true);
AddCombatAction(MURU_HUMANOIDS, 15000u);
AddCustomAction(MURU_SPAWN_ENTROPIUS, true, [&]() { HandleSpawnEntropius(); });
AddCustomAction(MURU_ATTACK_SPAWNS, true, [&]() { HandleSpawnAttack(); });
AddCustomAction(MURU_SPAWN_ENTROPIUS, true, [&]() { HandleSpawnEntropius(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(MURU_ATTACK_SPAWNS, true, [&]() { HandleSpawnAttack(); }, TIMER_COMBAT_COMBAT);
SetDeathPrevention(true);
}

@ -158,12 +158,12 @@ struct boss_zuljinAI : public CombatAI
AddCustomAction(ZULJIN_SPIRIT_ACQUIRED, true, [&]()
{
SpiritAcquired();
});
}, TIMER_COMBAT_COMBAT);
AddCustomAction(ZULJIN_FIRE_WALL_DELAY, true, [&]()
{
if (m_creature->IsInCombat() && !m_creature->GetCombatManager().IsEvadingHome())
m_instance->DoUseDoorOrButton(GO_FIRE_DOOR);
});
}, TIMER_COMBAT_COMBAT);
m_creature->SetWalk(true);
m_creature->GetCombatManager().SetLeashingCheck([&](Unit*, float /*x*/, float y, float /*z*/)
{
@ -221,8 +221,6 @@ struct boss_zuljinAI : public CombatAI
if (Creature* spirit = m_instance->GetSingleCreatureFromStorage(aZuljinPhase.spiritId))
spirit->RemoveAurasDueToSpell(SPELL_SPIRIT_DRAINED);
m_creature->SetHealthPercent(100.f); // TODO: Remove this hack once evade issues are resolved
CombatAI::EnterEvadeMode();
}

@ -82,6 +82,7 @@ void hyjalAI::Reset()
void hyjalAI::EnterEvadeMode()
{
ResetTimersOnEvade();
m_creature->RemoveAllAurasOnEvade();
m_creature->CombatStop(true);

@ -158,8 +158,8 @@ struct boss_onyxiaAI : public CombatAI
AddCombatAction(ONYXIA_KNOCK_AWAY, 20000, 30000);
AddCombatAction(ONYXIA_FIREBALL, true);
AddCombatAction(ONYXIA_MOVEMENT, true);
AddCustomAction(ONYXIA_SUMMON_WHELPS, true, [&]() { SummonWhelps(); });
AddCustomAction(ONYXIA_PHASE_TRANSITIONS, true, [&]() { PhaseTransition(); });
AddCustomAction(ONYXIA_SUMMON_WHELPS, true, [&]() { SummonWhelps(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(ONYXIA_PHASE_TRANSITIONS, true, [&]() { PhaseTransition(); }, TIMER_COMBAT_COMBAT);
m_creature->SetWalk(false); // onyxia should run when flying
AddOnKillText(SAY_KILL);
}

@ -78,7 +78,7 @@ struct boss_buruAI : public CombatAI
AddCombatAction(BURU_CREEPING_PLAGUE, true);
AddCombatAction(BURU_GATHERING_SPEED, 9000u);
AddCombatAction(BURU_FULL_SPEED, 60000u);
AddCustomAction(BURU_PHASE_2_TRANSITION_STEP, true, [&]() { HandlePhaseTwo(); });
AddCustomAction(BURU_PHASE_2_TRANSITION_STEP, true, [&]() { HandlePhaseTwo(); }, TIMER_COMBAT_COMBAT);
}
uint8 m_uiPhase;

@ -260,8 +260,8 @@ struct boss_cthunAI : public CombatAI
// There are 30 seconds offset between Giant Eye and Giant Claw Tentacles which are both on a 60 seconds period handled by periodic spells
AddCombatAction(CTHUN_CLAWTENTACLEDELAY, 10000u);
AddCombatAction(CTHUN_EYETENTACLEDELAY, 40000u);
AddCustomAction(CTHUN_EMERGE, true, [&]() { HandleEmerge(); });
AddCustomAction(CTHUN_WEAKENED_END, true, [&]() { HandleEndWeaken(); });
AddCustomAction(CTHUN_EMERGE, true, [&]() { HandleEmerge(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(CTHUN_WEAKENED_END, true, [&]() { HandleEndWeaken(); }, TIMER_COMBAT_COMBAT);
// Set active in order to be used during the instance progress
m_creature->SetActiveObjectState(true);
}

@ -71,7 +71,7 @@ struct boss_skeramAI : public CombatAI
AddCombatAction(SKERAM_ARCANE_EXPLOSION, 6000, 12000);
AddCombatAction(SKERAM_TRUE_FULFILMENT, uint32(15) * IN_MILLISECONDS);
AddCombatAction(SKERAM_EARTH_SHOCK, 1200u);
AddCustomAction(SKERAM_BLINK_DELAY, true, [&]() { HandleBlinkDelay(); });
AddCustomAction(SKERAM_BLINK_DELAY, true, [&]() { HandleBlinkDelay(); }, TIMER_COMBAT_COMBAT);
AddOnKillText(SAY_SLAY);
}

@ -85,7 +85,7 @@ struct boss_twin_emperorsAI : public CombatAI
{
AddCombatAction(EMPEROR_BERSERK, 15u * MINUTE * IN_MILLISECONDS);
AddCombatAction(EMPEROR_BUG_ABILITY, urand(7000, 14000));
AddCustomAction(EMPEROR_TELEPORT_DELAY, true, [&]() { HandleDelayedAttack(); });
AddCustomAction(EMPEROR_TELEPORT_DELAY, true, [&]() { HandleDelayedAttack(); }, TIMER_COMBAT_COMBAT);
}
instance_temple_of_ahnqiraj* m_instance;

@ -125,8 +125,8 @@ struct boss_viscidusAI : public CombatAI
AddCombatAction(VISCIDUS_TOXIN, 30000u);
AddCombatAction(VISCIDUS_POISON_SHOCK, 7000, 12000);
AddCombatAction(VISCIDUS_POISON_BOLT_VOLLEY, 10000, 15000);
AddCustomAction(VISCIDUS_EXPLODE, true, [&]() { HandleExplode(); });
AddCustomAction(VISCIDUS_REJOIN, true, [&]() { HandleRejoin(); });
AddCustomAction(VISCIDUS_EXPLODE, true, [&]() { HandleExplode(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(VISCIDUS_REJOIN, true, [&]() { HandleRejoin(); }, TIMER_COMBAT_COMBAT);
m_creature->GetCombatManager().SetLeashingCheck([&](Unit* /*unit*/, float /*x*/, float /*y*/, float /*z*/) -> bool
{
return m_creature->GetDistance(resetPoint.m_fX, resetPoint.m_fY, resetPoint.m_fZ, DIST_CALC_COMBAT_REACH) < 10.0f;

@ -57,8 +57,8 @@ struct boss_murmurAI : public CombatAI
boss_murmurAI(Creature* creature) : CombatAI(creature, MURMUR_ACTION_MAX),
m_instance(static_cast<ScriptedInstance*>(creature->GetInstanceData())), m_bIsRegularMode(creature->GetMap()->IsRegularDifficulty())
{
AddCustomAction(MURMUR_OOC_RP_ATTACK, true, [&]() { HandleOocAttack(); });
AddCustomAction(MURMUR_OOC_CASTER_ATTACK, true, [&]() { HandleOocCasterAttack(); });
AddCustomAction(MURMUR_OOC_RP_ATTACK, true, [&]() { HandleOocAttack(); }, TIMER_COMBAT_OOC);
AddCustomAction(MURMUR_OOC_CASTER_ATTACK, true, [&]() { HandleOocCasterAttack(); }, TIMER_COMBAT_OOC);
}
ScriptedInstance* m_instance;

@ -1850,6 +1850,7 @@ struct boss_maievAI : public CombatAI, private DialogueHelper
// Custom evade - don't allow her to return to home position
void EnterEvadeMode() override
{
ResetTimersOnEvade();
m_creature->RemoveAllAurasOnEvade();
m_creature->CombatStop(true);
m_creature->LoadCreatureAddon(true);

@ -146,7 +146,7 @@ struct boss_teron_gorefiendAI : public CombatAI
m_instance->SetData(TYPE_GOREFIEND, FAIL);
DespawnSummons();
DoCastSpellIfCan(nullptr, SPELL_DESTROY_ALL_SPIRITS);
ScriptedAI::EnterEvadeMode();
CombatAI::EnterEvadeMode();
}
void Aggro(Unit* /*pWho*/) override

@ -107,7 +107,7 @@ struct boss_terokkAI : public CombatAI
Creature* target = GetClosestCreatureWithEntry(m_creature, NPC_SKYGUARD_TARGET, 70.f);
if (Creature* ace = m_creature->GetMap()->GetCreature(m_aces[1]))
ace->AI()->DoCastSpellIfCan(target, SPELL_ANCIENT_FLAMES);
});
}, TIMER_COMBAT_COMBAT);
AddTimerlessCombatAction(TEROKK_COMBAT_ACTION_SPAWN_ACE, true);
AddTimerlessCombatAction(TEROKK_COMBAT_ACTION_PHASE_2, true);
AddCombatAction(TEROKK_COMBAT_ACTION_DIVINE_SHIELD, GetInitialActionTimer(TEROKK_COMBAT_ACTION_DIVINE_SHIELD));

@ -157,12 +157,12 @@ struct boss_lady_vashjAI : public CombatAI
AddCombatAction(VASHJ_ACTION_SHOOT, 2000u);
AddCombatAction(VASHJ_ACTION_FORKED_LIGHTNING, true);
AddTimerlessCombatAction(VASHJ_ACTION_MELEE_MODE, true);
AddCustomAction(VASHJ_INTRO, true, [&]() { HandleIntroText(); });
AddCustomAction(VASHJ_COILFANG_ELITE, true, [&]() { HandleCoilfangElite(); });
AddCustomAction(VASHJ_COILFANG_STRIDER, true, [&]() { HandleCoilfangStrider(); });
AddCustomAction(VASHJ_SPOREBAT, true, [&]() { HandleSporebat(); });
AddCustomAction(VASHJ_ENCHANTED_ELEMENTAL, true, [&]() { HandleEnchantedElemental(); });
AddCustomAction(VASHJ_TAINTED_ELEMENTAL, true, [&]() { HandleTaintedElemental(); });
AddCustomAction(VASHJ_INTRO, true, [&]() { HandleIntroText(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(VASHJ_COILFANG_ELITE, true, [&]() { HandleCoilfangElite(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(VASHJ_COILFANG_STRIDER, true, [&]() { HandleCoilfangStrider(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(VASHJ_SPOREBAT, true, [&]() { HandleSporebat(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(VASHJ_ENCHANTED_ELEMENTAL, true, [&]() { HandleEnchantedElemental(); }, TIMER_COMBAT_COMBAT);
AddCustomAction(VASHJ_TAINTED_ELEMENTAL, true, [&]() { HandleTaintedElemental(); }, TIMER_COMBAT_COMBAT);
SetRangedMode(true, 40.f, TYPE_PROXIMITY);
AddMainSpell(SPELL_SHOOT);
AddDistanceSpell(SPELL_ENTANGLE);

@ -100,7 +100,7 @@ struct boss_ahuneAI : public CombatAI
boss_ahuneAI(Creature* creature) : CombatAI(creature, AHUNE_ACTION_MAX)
{
AddCustomAction(AHUNE_ATTACK, 3000u, [&]() { HandleAttackDelay(); });
AddCustomAction(AHUNE_EMERGE, true, [&]() { HandleEmerge(); });
AddCustomAction(AHUNE_EMERGE, true, [&]() { HandleEmerge(); }, TIMER_COMBAT_COMBAT);
AddCombatAction(AHUNE_SUBMERGE, 90000u);
AddCombatAction(AHUNE_COLD_SLAP, 2000u);
AddCombatAction(AHUNE_HAILSTONE, 1000u);

@ -68,7 +68,7 @@ struct boss_omor_the_unscarredAI : public CombatAI
AddCombatAction(OMOR_TREACHERY, 12300, 23300);
AddCombatAction(OMOR_ORBITAL_STRIKE, 25000u);
AddCombatAction(OMOR_SHADOW_BOLT, 0u);
AddCustomAction(OMOR_PULL_BACK, true, [&]() {HandlePullBack(); });
AddCustomAction(OMOR_PULL_BACK, true, [&]() { HandlePullBack(); }, TIMER_COMBAT_COMBAT);
SetCombatMovement(false);
SetRangedMode(true, 100.f, TYPE_PROXIMITY);
AddOnKillText(SAY_KILL_1, SAY_KILL_2);

@ -85,9 +85,9 @@ struct boss_grand_warlock_nethekurseAI : public CombatAI
m_instance(static_cast<ScriptedInstance*>(creature->GetInstanceData())), m_isRegularMode(creature->GetMap()->IsRegularDifficulty()),
m_introOnce(false), m_peonRPCD(false)
{
AddCustomAction(NETHEKURSE_TAUNT_PEONS, true, [&]() { DoTauntPeons(); });
AddCustomAction(NETHEKURSE_START_FIGHT, true, [&]() { DoStartFight(); });
AddCustomAction(NETHEKURSE_PEON_RP_CD, true, [&]() { DoPeonCD(); });
AddCustomAction(NETHEKURSE_TAUNT_PEONS, true, [&]() { DoTauntPeons(); }, TIMER_COMBAT_OOC);
AddCustomAction(NETHEKURSE_START_FIGHT, true, [&]() { DoStartFight(); }, TIMER_COMBAT_OOC);
AddCustomAction(NETHEKURSE_PEON_RP_CD, true, [&]() { DoPeonCD(); }, TIMER_COMBAT_OOC);
AddOnKillText(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4);
SetReactState(REACT_DEFENSIVE);
}

@ -162,11 +162,6 @@ struct npc_shivan_assassinAI : public CombatAI
m_instance->SetData(TYPE_SHARTUUL, EVENT_FAIL);
}
void EnterEvadeMode() override
{
CombatAI::EnterEvadeMode();
}
void JustReachedHome() override
{
if (m_instance)

@ -79,6 +79,8 @@ struct boss_dalliahAI : public CombatAI
if (m_instance)
m_instance->SetData(TYPE_DALLIAH, IN_PROGRESS);
m_creature->SetCombatStartPosition(Position(aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]));
}
void JustDied(Unit* /*who*/) override
@ -91,20 +93,10 @@ struct boss_dalliahAI : public CombatAI
void EnterEvadeMode() override
{
m_creature->RemoveAllAurasOnEvade();
m_creature->CombatStop(true);
m_creature->LoadCreatureAddon(true);
// should evade to the attack position
if (m_creature->IsAlive())
m_creature->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]);
CombatAI::EnterEvadeMode();
if (m_instance)
m_instance->SetData(TYPE_DALLIAH, FAIL);
m_creature->SetLootRecipient(nullptr);
Reset();
}
void MovementInform(uint32 moveType, uint32 pointId) override

@ -119,6 +119,8 @@ struct boss_soccothratesAI : public CombatAI, private DialogueHelper
if (m_instance)
m_instance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS);
m_creature->SetCombatStartPosition(Position(aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]));
}
void MoveInLineOfSight(Unit* who) override
@ -142,20 +144,10 @@ struct boss_soccothratesAI : public CombatAI, private DialogueHelper
void EnterEvadeMode() override
{
m_creature->RemoveAllAurasOnEvade();
m_creature->CombatStop(true);
m_creature->LoadCreatureAddon(true);
// should evade to the attack position
if (m_creature->IsAlive())
m_creature->GetMotionMaster()->MovePoint(1, aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]);
CombatAI::EnterEvadeMode();
if (m_instance)
m_instance->SetData(TYPE_SOCCOTHRATES, FAIL);
m_creature->SetLootRecipient(nullptr);
Reset();
}
void MovementInform(uint32 moveType, uint32 pointId) override

@ -99,7 +99,7 @@ struct boss_warp_splinterAI : public CombatAI
void EnterEvadeMode() override
{
ScriptedAI::EnterEvadeMode();
CombatAI::EnterEvadeMode();
DespawnGuids(m_saplings);
}

@ -235,7 +235,7 @@ struct boss_alarAI : public CombatAI
if (m_creature->HasAura(SPELL_EMBER_BLAST))
return;
ScriptedAI::EnterEvadeMode();
CombatAI::EnterEvadeMode();
}
void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) override

Loading…
Cancel
Save