16
16
17
17
/* ScriptData
18
18
SDName: boss_lord_marrowgar
19
- SD%Complete: 75 %
20
- SDComment: Bone Spike Spell requires vehicle support
19
+ SD%Complete: 90 %
20
+ SDComment: Achiev NYI.
21
21
SDCategory: Icecrown Citadel
22
22
EndScriptData */
23
23
24
24
#include " precompiled.h"
25
25
#include " icecrown_citadel.h"
26
+ #include " TemporarySummon.h"
26
27
27
28
enum
28
29
{
42
43
SPELL_BONE_STORM = 69076 ,
43
44
SPELL_COLDFLAME = 69140 ,
44
45
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
47
48
48
49
// summoned spells
49
50
SPELL_COLDFLAME_AURA = 69145 ,
50
51
SPELL_IMPALED = 69065 ,
51
52
52
53
// 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
54
57
NPC_COLDFLAME = 36672 ,
55
58
56
59
// phases and max cold flame charges
@@ -256,8 +259,7 @@ struct boss_lord_marrowgarAI : public ScriptedAI
256
259
}
257
260
258
261
// 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))
261
263
{
262
264
if (m_uiBoneSpikeTimer < uiDiff)
263
265
{
@@ -274,7 +276,7 @@ struct boss_lord_marrowgarAI : public ScriptedAI
274
276
}
275
277
else
276
278
m_uiBoneSpikeTimer -= uiDiff;
277
- }*/
279
+ }
278
280
279
281
// Berserk
280
282
if (m_uiBerserkTimer)
@@ -298,6 +300,87 @@ CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature)
298
300
return new boss_lord_marrowgarAI (pCreature);
299
301
}
300
302
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
+
301
384
void AddSC_boss_lord_marrowgar ()
302
385
{
303
386
Script* pNewScript;
@@ -306,4 +389,14 @@ void AddSC_boss_lord_marrowgar()
306
389
pNewScript->Name = " boss_lord_marrowgar" ;
307
390
pNewScript->GetAI = &GetAI_boss_lord_marrowgar;
308
391
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 ();
309
402
}
0 commit comments