mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Backport TrinityCore2 r4137.
--HG-- branch : trunk
This commit is contained in:
@@ -230,10 +230,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if(!pInstance)
|
||||
{
|
||||
error_log(ERROR_INST_DATA);
|
||||
return;
|
||||
}
|
||||
|
||||
pInstance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete!
|
||||
|
||||
|
||||
@@ -50,12 +50,13 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
||||
{
|
||||
boss_pathaleon_the_calculatorAI(Creature *c) : ScriptedAI(c)
|
||||
boss_pathaleon_the_calculatorAI(Creature *c) : ScriptedAI(c), summons(m_creature)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
uint32 Summon_Timer;
|
||||
SummonList summons;
|
||||
uint32 ManaTap_Timer;
|
||||
uint32 ArcaneTorrent_Timer;
|
||||
uint32 Domination_Timer;
|
||||
@@ -76,7 +77,7 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
||||
Enraged = false;
|
||||
|
||||
Counter = 0;
|
||||
|
||||
summons.DespawnAll();
|
||||
}
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
@@ -95,8 +96,13 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon) { summons.Summon(summon); }
|
||||
void SummonedCreatureDespawn(Creature *summon) { summons.Despawn(summon); }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
@@ -107,8 +113,7 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
||||
{
|
||||
for(int i = 0; i < 3;i++)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Wraith = m_creature->SummonCreature(21062,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
if (target && Wraith)
|
||||
Wraith->AI()->AttackStart(target);
|
||||
|
||||
Reference in New Issue
Block a user