Skip to content

Commit a1b9d04

Browse files
Peter Camastralxfurry
authored andcommitted
[z2713] Add enrage to Garr when a Firesworn dies
Signed-off-by: Xfurry <xfurry@scriptdev2.com> (based on commit SD2[Add enrage to Garr when a Firesworn dies] - 501185d) Signed-off-by: Xfurry <xfurry@scriptdev2.com> (based on commit SD2-TBC[s2812] - 937329a) Signed-off-by: Xfurry <xfurry@scriptdev2.com>
1 parent a2257fb commit a1b9d04

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

scripts/eastern_kingdoms/molten_core/boss_garr.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
/* ScriptData
1818
SDName: Boss_Garr
19-
SD%Complete: 50
20-
SDComment: Garr's enrage is missing
19+
SD%Complete: 80
20+
SDComment: Firesworn erruption needs to be revisited
2121
SDCategory: Molten Core
2222
EndScriptData */
2323

@@ -29,13 +29,13 @@ enum
2929
// Garr spells
3030
SPELL_ANTIMAGICPULSE = 19492,
3131
SPELL_MAGMASHACKLES = 19496,
32-
SPELL_ENRAGE = 19516, // TODO Stacking enrage (stacks to 10 times)
32+
SPELL_ENRAGE = 19516,
3333

3434
// Add spells
3535
SPELL_ERUPTION = 19497,
3636
SPELL_MASSIVE_ERUPTION = 20483, // TODO possible on death
3737
SPELL_IMMOLATE = 20294,
38-
SPELL_SEPARATION_ANXIETY = 23492, // Used if separated too far from Garr, 21095 use unknown.
38+
SPELL_SEPARATION_ANXIETY = 23492, // Used if separated too far from Garr
3939
};
4040

4141
struct boss_garrAI : public ScriptedAI
@@ -121,6 +121,15 @@ struct mob_fireswornAI : public ScriptedAI
121121
m_uiSeparationCheckTimer = 5000;
122122
}
123123

124+
void JustDied(Unit* /*pKiller*/) override
125+
{
126+
if (m_pInstance)
127+
{
128+
if (Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR))
129+
pGarr->CastSpell(pGarr, SPELL_ENRAGE, true, NULL, NULL, m_creature->GetObjectGuid());
130+
}
131+
}
132+
124133
void UpdateAI(const uint32 uiDiff) override
125134
{
126135
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
@@ -139,6 +148,9 @@ struct mob_fireswornAI : public ScriptedAI
139148

140149
if (m_uiSeparationCheckTimer < uiDiff)
141150
{
151+
if (!m_pInstance)
152+
return;
153+
142154
// Distance guesswork, but should be ok
143155
Creature* pGarr = m_pInstance->GetSingleCreatureFromStorage(NPC_GARR);
144156
if (pGarr && pGarr->isAlive() && !m_creature->IsWithinDist2d(pGarr->GetPositionX(), pGarr->GetPositionY(), 50.0f))

sd2_revision_nr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __SD2_REVISION_NR_H__
22
#define __SD2_REVISION_NR_H__
3-
#define SD2_REVISION_NR "z2712"
3+
#define SD2_REVISION_NR "z2713"
44
#endif // __SD2_REVISION_NR_H__

0 commit comments

Comments
 (0)