bool UpdateDragonAI(const uint32 uiDiff) { // Timer to unbanish the boss if (m_uiShadesTimeoutTimer) { if (m_uiShadesTimeoutTimer <= uiDiff) DoUnbanishBoss(); else m_uiShadesTimeoutTimer -= uiDiff; // Prevent further spells or timer handling while banished return false; } // Arcane Blast Timer if (m_uiArcaneBlastTimer < uiDiff) { Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if (pTarget && DoCastSpellIfCan(pTarget, SPELL_ARCANE_BLAST) == CAST_OK) m_uiArcaneBlastTimer = urand(7000, 12000); } else m_uiArcaneBlastTimer -= uiDiff; // Bellowing Roar Timer if (m_uiBellowingRoarTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) m_uiBellowingRoarTimer = urand(20000, 30000); } else m_uiBellowingRoarTimer -= uiDiff; return true; }
void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SHADE_OF_TAERAR) { ++m_uiShadesDead; // If all shades are dead then unbanish the boss if (m_uiShadesDead == 3) DoUnbanishBoss(); } }