- properly reset Shada of Akama after wipe
- despawn summons if Shade is killed, so Akama can complete the event --HG-- branch : trunk
This commit is contained in:
@@ -107,11 +107,11 @@ const uint32 spawnEntries[4]= { 23523, 23318, 23524 };
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI
|
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;
|
uint64 ShadeGUID;
|
||||||
|
|
||||||
void Reset() { ShadeGUID = 0; }
|
void Reset() {}
|
||||||
void JustDied(Unit* killer);
|
void JustDied(Unit* killer);
|
||||||
void Aggro(Unit* who) {}
|
void Aggro(Unit* who) {}
|
||||||
void AttackStart(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
|
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;
|
uint64 ShadeGUID;
|
||||||
uint32 CheckTimer;
|
uint32 CheckTimer;
|
||||||
@@ -131,7 +131,6 @@ struct TRINITY_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
StartBanishing = false;
|
StartBanishing = false;
|
||||||
CheckTimer = 5000;
|
CheckTimer = 5000;
|
||||||
ShadeGUID = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer);
|
void JustDied(Unit* killer);
|
||||||
@@ -237,8 +236,20 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
|
|
||||||
reseting = false;
|
reseting = false;
|
||||||
}
|
}
|
||||||
void JustSummoned(Creature *summon) {summons.Summon(summon);}
|
void JustDied(Unit* killer)
|
||||||
void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
|
{
|
||||||
|
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)
|
void MoveInLineOfSight(Unit *who)
|
||||||
{
|
{
|
||||||
@@ -505,7 +516,7 @@ void mob_ashtongue_sorcererAI::JustDied(Unit* killer)
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
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;
|
ShadeHasDied = false;
|
||||||
StartCombat = false;
|
StartCombat = false;
|
||||||
@@ -543,6 +554,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
bool ShadeHasDied;
|
bool ShadeHasDied;
|
||||||
bool StartCombat;
|
bool StartCombat;
|
||||||
bool HasYelledOnce;
|
bool HasYelledOnce;
|
||||||
|
SummonList summons;
|
||||||
|
|
||||||
void Reset()
|
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->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has very very strange values
|
||||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
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) {}
|
void Aggro(Unit* who) {}
|
||||||
@@ -624,6 +648,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
||||||
if(Shade && Shade->isAlive())
|
if(Shade && Shade->isAlive())
|
||||||
((boss_shade_of_akamaAI*)Shade->AI())->HasKilledAkama = true;
|
((boss_shade_of_akamaAI*)Shade->AI())->HasKilledAkama = true;
|
||||||
|
summons.DespawnAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
|
|||||||
Reference in New Issue
Block a user