aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRat <none@none>2009-06-24 09:33:20 +0200
committerRat <none@none>2009-06-24 09:33:20 +0200
commit0319f6a269b8b605604f53219f355dae27edf8f2 (patch)
treedbb300ae74a703f9603e538e5a5b925ec1dec519 /src
parent51de1cd636959f0cd342359df94d70a279bd8ada (diff)
- properly reset Shada of Akama after wipe
- despawn summons if Shade is killed, so Akama can complete the event --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp41
1 files changed, 33 insertions, 8 deletions
diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
index 5d82affcacf..d6378809f52 100644
--- a/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
+++ b/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
@@ -107,11 +107,11 @@ const uint32 spawnEntries[4]= { 23523, 23318, 23524 };
struct TRINITY_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI
{
- mob_ashtongue_channelerAI(Creature* c) : ScriptedAI(c) {}
+ mob_ashtongue_channelerAI(Creature* c) : ScriptedAI(c) {ShadeGUID = 0;}
uint64 ShadeGUID;
- void Reset() { ShadeGUID = 0; }
+ void Reset() {}
void JustDied(Unit* killer);
void Aggro(Unit* who) {}
void AttackStart(Unit* who) {}
@@ -121,7 +121,7 @@ struct TRINITY_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI
struct TRINITY_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI
{
- mob_ashtongue_sorcererAI(Creature* c) : ScriptedAI(c) {}
+ mob_ashtongue_sorcererAI(Creature* c) : ScriptedAI(c) {ShadeGUID = 0;}
uint64 ShadeGUID;
uint32 CheckTimer;
@@ -130,8 +130,7 @@ struct TRINITY_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI
void Reset()
{
StartBanishing = false;
- CheckTimer = 5000;
- ShadeGUID = 0;
+ CheckTimer = 5000;
}
void JustDied(Unit* killer);
@@ -237,8 +236,20 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
reseting = false;
}
- void JustSummoned(Creature *summon) {summons.Summon(summon);}
- void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
+ void JustDied(Unit* killer)
+ {
+ summons.DespawnAll();
+ }
+ void JustSummoned(Creature *summon)
+ {
+ if(summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
+ summons.Summon(summon);
+ }
+ void SummonedCreatureDespawn(Creature *summon)
+ {
+ if(summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
+ summons.Despawn(summon);
+ }
void MoveInLineOfSight(Unit *who)
{
@@ -505,7 +516,7 @@ void mob_ashtongue_sorcererAI::JustDied(Unit* killer)
struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
{
- npc_akamaAI(Creature* c) : ScriptedAI(c)
+ npc_akamaAI(Creature* c) : ScriptedAI(c), summons(m_creature)
{
ShadeHasDied = false;
StartCombat = false;
@@ -543,6 +554,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
bool ShadeHasDied;
bool StartCombat;
bool HasYelledOnce;
+ SummonList summons;
void Reset()
{
@@ -555,6 +567,18 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has very very strange values
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
+ summons.DespawnAll();
+ }
+
+ void JustSummoned(Creature *summon)
+ {
+ if(summon->GetEntry() == CREATURE_BROKEN)
+ summons.Summon(summon);
+ }
+ void SummonedCreatureDespawn(Creature *summon)
+ {
+ if(summon->GetEntry() == CREATURE_BROKEN)
+ summons.Despawn(summon);
}
void Aggro(Unit* who) {}
@@ -624,6 +648,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
if(Shade && Shade->isAlive())
((boss_shade_of_akamaAI*)Shade->AI())->HasKilledAkama = true;
+ summons.DespawnAll();
}
void UpdateAI(const uint32 diff)