*hyjal update
- despawn Anetheron's summons if boss is dead / despawned (wiped) - same for Azgalor --HG-- branch : trunk
This commit is contained in:
@@ -225,15 +225,21 @@ struct TRINITY_DLL_DECL mob_towering_infernalAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_towering_infernalAI(Creature *c) : ScriptedAI(c)
|
mob_towering_infernalAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
Reset();
|
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||||
|
if(pInstance)
|
||||||
|
AnetheronGUID = pInstance->GetData64(DATA_ANETHERON);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 ImmolationTimer;
|
uint32 ImmolationTimer;
|
||||||
|
uint32 CheckTimer;
|
||||||
|
uint64 AnetheronGUID;
|
||||||
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_INFERNO_EFFECT);
|
DoCast(m_creature, SPELL_INFERNO_EFFECT);
|
||||||
ImmolationTimer = 5000;
|
ImmolationTimer = 5000;
|
||||||
|
CheckTimer = 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
@@ -262,6 +268,21 @@ struct TRINITY_DLL_DECL mob_towering_infernalAI : public ScriptedAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
if(CheckTimer < diff)
|
||||||
|
{
|
||||||
|
if(AnetheronGUID)
|
||||||
|
{
|
||||||
|
Creature* boss = Unit::GetCreature((*m_creature),AnetheronGUID);
|
||||||
|
if(!boss || (boss && boss->isDead()))
|
||||||
|
{
|
||||||
|
m_creature->setDeathState(JUST_DIED);
|
||||||
|
m_creature->RemoveCorpse();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CheckTimer = 5000;
|
||||||
|
}else CheckTimer -= diff;
|
||||||
|
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -188,17 +188,22 @@ struct TRINITY_DLL_DECL mob_lesser_doomguardAI : public hyjal_trashAI
|
|||||||
mob_lesser_doomguardAI(Creature *c) : hyjal_trashAI(c)
|
mob_lesser_doomguardAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||||
Reset();
|
if(pInstance)
|
||||||
|
AzgalorGUID = pInstance->GetData64(DATA_AZGALOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CrippleTimer;
|
uint32 CrippleTimer;
|
||||||
uint32 WarstompTimer;
|
uint32 WarstompTimer;
|
||||||
|
uint32 CheckTimer;
|
||||||
|
uint64 AzgalorGUID;
|
||||||
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
CrippleTimer = 50000;
|
CrippleTimer = 50000;
|
||||||
WarstompTimer = 10000;
|
WarstompTimer = 10000;
|
||||||
DoCast(m_creature, SPELL_THRASH);
|
DoCast(m_creature, SPELL_THRASH);
|
||||||
|
CheckTimer = 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
@@ -231,6 +236,21 @@ struct TRINITY_DLL_DECL mob_lesser_doomguardAI : public hyjal_trashAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
if(CheckTimer < diff)
|
||||||
|
{
|
||||||
|
if(AzgalorGUID)
|
||||||
|
{
|
||||||
|
Creature* boss = Unit::GetCreature((*m_creature),AzgalorGUID);
|
||||||
|
if(!boss || (boss && boss->isDead()))
|
||||||
|
{
|
||||||
|
m_creature->setDeathState(JUST_DIED);
|
||||||
|
m_creature->RemoveCorpse();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CheckTimer = 5000;
|
||||||
|
}else CheckTimer -= diff;
|
||||||
|
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim() )
|
if (!UpdateVictim() )
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user