*Backport TrinityCore2 r4137.

--HG--
branch : trunk
This commit is contained in:
Anubisss
2009-06-19 11:13:50 +02:00
parent 294c8a734e
commit b28a7eb406
2 changed files with 9 additions and 7 deletions

View File

@@ -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!

View File

@@ -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);