From 8467c6f193b936f3604fdb806364d830d0ebcf6a Mon Sep 17 00:00:00 2001 From: stormrage-project Date: Sat, 5 Sep 2015 09:31:47 +0200 Subject: [PATCH] [SD2] Garr - Improved firesworn on death exploding and added enrage ability --- .../molten_core/boss_garr.cpp | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/modules/SD2/scripts/eastern_kingdoms/blackrock_mountain/molten_core/boss_garr.cpp b/src/modules/SD2/scripts/eastern_kingdoms/blackrock_mountain/molten_core/boss_garr.cpp index 723d8213..40643009 100644 --- a/src/modules/SD2/scripts/eastern_kingdoms/blackrock_mountain/molten_core/boss_garr.cpp +++ b/src/modules/SD2/scripts/eastern_kingdoms/blackrock_mountain/molten_core/boss_garr.cpp @@ -183,6 +183,7 @@ struct mob_firesworn : public CreatureScript uint32 m_uiImmolateTimer; uint32 m_uiSeparationCheckTimer; + bool m_bExploding; void Reset() override { @@ -191,6 +192,15 @@ struct mob_firesworn : public CreatureScript m_bExploding = false; } + void JustDied(Unit* /*pKiller*/) override + { + if (m_pInstance) + { + if (Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR)) + pGarr->CastSpell(pGarr, SPELL_ENRAGE, true, NULL, NULL, m_creature->GetObjectGuid()); + } + } + void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override { if (!m_bExploding && m_creature->HealthBelowPctDamaged(10, uiDamage)) @@ -204,8 +214,9 @@ struct mob_firesworn : public CreatureScript { if (type == AI_EVENT_CUSTOM_A && pInvoker == m_creature) { - m_creature->CastSpell(m_creature, uiData, true); + m_creature->CastSpell(m_creature, SPELL_ERUPTION, true); m_creature->ForcedDespawn(100); + uiDamage = 0; // just for more convenient GM testing by .damage m_bExploding = true; } } @@ -217,19 +228,6 @@ struct mob_firesworn : public CreatureScript return; } - if (m_uiSeparationCheckTimer < uiDiff) - { - // Distance guesswork, but should be ok - Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR); - if (pGarr && pGarr->IsAlive() && !m_creature->IsWithinDist2d(pGarr->GetPositionX(), pGarr->GetPositionY(), 50.0f)) - { - DoCastSpellIfCan(m_creature, SPELL_SEPARATION_ANXIETY, CAST_TRIGGERED); - } - - m_uiSeparationCheckTimer = 5000; - } - else m_uiSeparationCheckTimer -= uiDiff; - // Immolate_Timer if (m_uiImmolateTimer < uiDiff) {