Add despawning adds for pathelon script
--HG-- branch : trunk
This commit is contained in:
@@ -227,10 +227,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!
|
||||
|
||||
|
||||
+9
-3
@@ -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;
|
||||
@@ -77,6 +78,7 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
||||
|
||||
Counter = 0;
|
||||
|
||||
summons.DespawnAll();
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
@@ -95,8 +97,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 +114,7 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
||||
{
|
||||
for(uint8 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