Skip to content

Commit 6380204

Browse files
committed
[c3140] Update Lord Marrowgar - ICC
This implements the Bone Spike event and updates the Cold Flame behavior Also set power to 0 for Saurfang on Reset() (based on commit [3140] - 23ba944) Signed-off-by: Xfurry <[email protected]>
1 parent 9a43278 commit 6380204

File tree

5 files changed

+108
-9
lines changed

5 files changed

+108
-9
lines changed

scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ struct boss_deathbringer_saurfangAI : public ScriptedAI
150150
m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS;
151151

152152
m_bIsFrenzied = false;
153+
154+
m_creature->SetPower(m_creature->GetPowerType(), 0);
153155
}
154156

155157
void Aggro(Unit* /*pWho*/) override

scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp

+101-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616

1717
/* ScriptData
1818
SDName: boss_lord_marrowgar
19-
SD%Complete: 75%
20-
SDComment: Bone Spike Spell requires vehicle support
19+
SD%Complete: 90%
20+
SDComment: Achiev NYI.
2121
SDCategory: Icecrown Citadel
2222
EndScriptData */
2323

2424
#include "precompiled.h"
2525
#include "icecrown_citadel.h"
26+
#include "TemporarySummon.h"
2627

2728
enum
2829
{
@@ -42,15 +43,17 @@ enum
4243
SPELL_BONE_STORM = 69076,
4344
SPELL_COLDFLAME = 69140,
4445
SPELL_COLDFLAME_STORM = 72705,
45-
SPELL_BONE_SPIKE = 69057,
46-
SPELL_BONE_SPIKE_STORM = 73142,
46+
SPELL_BONE_SPIKE = 69057, // triggers spell 69062
47+
SPELL_BONE_SPIKE_STORM = 73142, // triggers spell 69062 / 72669 / 72670
4748

4849
// summoned spells
4950
SPELL_COLDFLAME_AURA = 69145,
5051
SPELL_IMPALED = 69065,
5152

5253
// npcs
53-
NPC_BONE_SPIKE = 38711,
54+
NPC_BONE_SPIKE_1 = 36619, // summoned by spell 69062
55+
NPC_BONE_SPIKE_2 = 38711, // summoned by spell 72670
56+
NPC_BONE_SPIKE_3 = 38712, // summoned by spell 72669
5457
NPC_COLDFLAME = 36672,
5558

5659
// phases and max cold flame charges
@@ -256,8 +259,7 @@ struct boss_lord_marrowgarAI : public ScriptedAI
256259
}
257260

258261
// Bone spike - different spells for the normal phase or storm phase
259-
// ToDo: uncommnet this when vehicles and the Bone spike spells are properly supported by core
260-
/*if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_uiPhase == PHASE_NORMAL))
262+
if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_uiPhase == PHASE_NORMAL))
261263
{
262264
if (m_uiBoneSpikeTimer < uiDiff)
263265
{
@@ -274,7 +276,7 @@ struct boss_lord_marrowgarAI : public ScriptedAI
274276
}
275277
else
276278
m_uiBoneSpikeTimer -= uiDiff;
277-
}*/
279+
}
278280

279281
// Berserk
280282
if (m_uiBerserkTimer)
@@ -298,6 +300,87 @@ CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature)
298300
return new boss_lord_marrowgarAI(pCreature);
299301
}
300302

303+
/*######
304+
## npc_bone_spike
305+
######*/
306+
307+
struct npc_bone_spikeAI : public Scripted_NoMovementAI
308+
{
309+
npc_bone_spikeAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature)
310+
{
311+
m_bHasImpaled = false;
312+
Reset();
313+
}
314+
315+
bool m_bHasImpaled;
316+
317+
void Reset() override { }
318+
319+
void AttackStart(Unit* /*pWho*/) override { }
320+
void MoveInLineOfSight(Unit* /*pWho*/) override { }
321+
322+
void KilledUnit(Unit* pVictim) override
323+
{
324+
// remove the aura as it's death persistent (I wonder why...)
325+
pVictim->RemoveAurasDueToSpell(SPELL_IMPALED);
326+
m_creature->ForcedDespawn();
327+
}
328+
329+
void JustDied(Unit* /*pKiller*/) override
330+
{
331+
if (m_creature->IsTemporarySummon())
332+
{
333+
TemporarySummon* pTemporary = (TemporarySummon*)m_creature;
334+
335+
// remove impale on death
336+
if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid()))
337+
pSummoner->RemoveAurasDueToSpell(SPELL_IMPALED);
338+
}
339+
}
340+
341+
void UpdateAI(const uint32 /*uiDiff*/) override
342+
{
343+
if (!m_bHasImpaled)
344+
{
345+
if (m_creature->IsTemporarySummon())
346+
{
347+
TemporarySummon* pTemporary = (TemporarySummon*)m_creature;
348+
349+
// Impale player
350+
if (Player* pSummoner = m_creature->GetMap()->GetPlayer(pTemporary->GetSummonerGuid()))
351+
DoCastSpellIfCan(pSummoner, SPELL_IMPALED);
352+
}
353+
354+
m_bHasImpaled = true;
355+
}
356+
}
357+
};
358+
359+
CreatureAI* GetAI_npc_bone_spike(Creature* pCreature)
360+
{
361+
return new npc_bone_spikeAI(pCreature);
362+
}
363+
364+
/*######
365+
## npc_coldflame
366+
######*/
367+
368+
// TODO Remove this 'script' when combat can be proper prevented from core-side
369+
struct npc_coldflameAI : public ScriptedAI
370+
{
371+
npc_coldflameAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); }
372+
373+
void Reset() override { }
374+
void AttackStart(Unit* /*pWho*/) override { }
375+
void MoveInLineOfSight(Unit* /*pWho*/) override { }
376+
void UpdateAI(const uint32 /*uiDiff*/) override { }
377+
};
378+
379+
CreatureAI* GetAI_npc_coldflame(Creature* pCreature)
380+
{
381+
return new npc_coldflameAI(pCreature);
382+
}
383+
301384
void AddSC_boss_lord_marrowgar()
302385
{
303386
Script* pNewScript;
@@ -306,4 +389,14 @@ void AddSC_boss_lord_marrowgar()
306389
pNewScript->Name = "boss_lord_marrowgar";
307390
pNewScript->GetAI = &GetAI_boss_lord_marrowgar;
308391
pNewScript->RegisterSelf();
392+
393+
pNewScript = new Script;
394+
pNewScript->Name = "npc_bone_spike";
395+
pNewScript->GetAI = &GetAI_npc_bone_spike;
396+
pNewScript->RegisterSelf();
397+
398+
pNewScript = new Script;
399+
pNewScript->Name = "npc_coldflame";
400+
pNewScript->GetAI = &GetAI_npc_coldflame;
401+
pNewScript->RegisterSelf();
309402
}

sd2_revision_nr.h

+1-1
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 "3139"
3+
#define SD2_REVISION_NR "3140"
44
#endif // __SD2_REVISION_NR_H__

sql/mangos_scriptname_full.sql

+2
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ UPDATE creature_template SET ScriptName='npc_scalawag_frog' WHERE entry=26503;
756756
/* ICECROWN CITADEL */
757757
UPDATE instance_template SET ScriptName='instance_icecrown_citadel' WHERE map=631;
758758
UPDATE creature_template SET ScriptName='boss_lord_marrowgar' WHERE entry=36612;
759+
UPDATE creature_template SET ScriptName='npc_bone_spike' WHERE entry IN (36619,38711,38712);
760+
UPDATE creature_template SET ScriptName='npc_coldflame' WHERE entry=36672;
759761
UPDATE creature_template SET ScriptName='boss_lady_deathwhisper' WHERE entry=36855;
760762
UPDATE creature_template SET ScriptName='boss_deathbringer_saurfang' WHERE entry=37813;
761763
UPDATE creature_template SET ScriptName='npc_queen_lanathel_intro' WHERE entry=38004;

sql/updates/r3140_mangos.sql

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
UPDATE creature_template SET ScriptName='npc_bone_spike' WHERE entry IN (36619,38711,38712);
2+
UPDATE creature_template SET ScriptName='npc_coldflame' WHERE entry=36672;

0 commit comments

Comments
 (0)