Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_hodir.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "SpellScript.h"
9#include "SpellAuraEffects.h"
10#include "Cell.h"
11#include "CellImpl.h"
12#include "GridNotifiers.h"
13#include "GridNotifiersImpl.h"
14#include "ulduar.h"
15
16/* @todo Achievements
17 Storm Cloud (Shaman ability)
18 Destroying of Toasty Fires
19*/
20
33
35{
36 // Hodir
41 SPELL_BITING_COLD_TRIGGERED = 62039, // Needed for Achievement Getting Cold In Here
43 SPELL_FREEZE = 62469,
44 SPELL_ICICLE = 62234,
46 SPELL_BLOCK_OF_ICE = 61969, // Player + Helper
48 SPELL_SUMMON_BLOCK_OF_ICE = 61970, // Player + Helper
49 SPELL_FLASH_FREEZE_HELPER = 61990, // Helper
57
59
60 // Druids
61 SPELL_WRATH = 62793,
63
64 // Shamans
67
68 // Mages
72 SPELL_SINGED = 62821,
73
74 // Priests
75 SPELL_SMITE = 61923,
78};
79
89
91{
93 GO_SNOWDRIFT = 194173,
94};
95
97{
98 // Hodir
106
107 // Priest
110
111 // Shaman
113
114 // Druid
116
117 // Mage
120};
121
127
128#define ACHIEVEMENT_CHEESE_THE_FREEZE RAID_MODE<uint8>(2961, 2962)
129#define ACHIEVEMENT_GETTING_COLD_IN_HERE RAID_MODE<uint8>(2967, 2968)
130#define ACHIEVEMENT_THIS_CACHE_WAS_RARE RAID_MODE<uint8>(3182, 3184)
131#define ACHIEVEMENT_COOLEST_FRIENDS RAID_MODE<uint8>(2963, 2965)
132#define FRIENDS_COUNT RAID_MODE<uint8>(4, 8)
133
135{
136 DATA_GETTING_COLD_IN_HERE = 29672968 // 2967, 2968 are achievement IDs
137};
138
140{
141 { 1983.75f, -243.36f, 432.767f, 1.57f }, // Field Medic Penny && Battle-Priest Eliza
142 { 1999.90f, -230.49f, 432.767f, 1.57f }, // Eivi Nightfeather && Tor Greycloud
143 { 2010.06f, -243.45f, 432.767f, 1.57f }, // Elementalist Mahfuun && Spiritwalker Tara
144 { 2021.12f, -236.65f, 432.767f, 1.57f }, // Missy Flamecuffs && Amira Blazeweaver
145 { 2028.10f, -244.66f, 432.767f, 1.57f }, // Field Medic Jessi && Battle-Priest Gina
146 { 2014.18f, -232.80f, 432.767f, 1.57f }, // Ellie Nightfeather && Kar Greycloud
147 { 1992.90f, -237.54f, 432.767f, 1.57f }, // Elementalist Avuun && Spiritwalker Yona
148 { 1976.60f, -233.53f, 432.767f, 1.57f }, // Sissy Flamecuffs && Veesha Blazeweaver
149};
150
162
164{
165 public:
166 npc_flash_freeze() : CreatureScript("npc_flash_freeze") { }
167
169 {
171 {
172 instance = me->GetInstanceScript();
173 me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
175 }
176
178
181
183 {
184 targetGUID = 0;
185 checkDespawnTimer = 1000;
186 }
187
189 {
190 if (!UpdateVictim() || me->GetVictim()->HasAura(SPELL_BLOCK_OF_ICE) || me->GetVictim()->HasAura(SPELL_FLASH_FREEZE_HELPER))
191 return;
192
193 if (me->GetVictim()->GetGUID() != targetGUID || instance->GetBossState(BOSS_HODIR) != IN_PROGRESS)
194 me->DespawnOrUnsummon();
195
196 if (checkDespawnTimer <= diff)
197 {
198 if (Unit* target = ObjectAccessor::GetUnit(*me, targetGUID))
199 if (!target->IsAlive())
200 me->DisappearAndDie();
201 checkDespawnTimer = 2500;
202 }
203 else
204 checkDespawnTimer -= diff;
205 }
206
207 void IsSummonedBy(Unit* summoner) OVERRIDE
208 {
209 targetGUID = summoner->GetGUID();
210 me->SetInCombatWith(summoner);
211 me->AddThreat(summoner, 250.0f);
212 if (Unit* target = ObjectAccessor::GetUnit(*me, targetGUID))
213 {
214 DoCast(target, SPELL_BLOCK_OF_ICE, true);
215 // Prevents to have Ice Block on other place than target is
216 me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation());
217 if (target->GetTypeId() == TypeID::TYPEID_PLAYER)
218 if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
219 Hodir->AI()->DoAction(ACTION_CHEESE_THE_FREEZE);
220 }
221 }
222 };
223
225 {
226 return new npc_flash_freezeAI(creature);
227 }
228};
229
231{
232 public:
233 npc_ice_block() : CreatureScript("npc_ice_block") { }
234
236 {
237 npc_ice_blockAI(Creature* creature) : ScriptedAI(creature)
238 {
239 instance = me->GetInstanceScript();
240 me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
242 targetGUID = 0;
243 }
244
246
248
249 void IsSummonedBy(Unit* summoner) OVERRIDE
250 {
251 targetGUID = summoner->GetGUID();
253 me->SetInCombatWith(summoner);
254 me->AddThreat(summoner, 250.0f);
255 summoner->AddThreat(me, 250.0f);
257 {
258 DoCast(target, SPELL_FLASH_FREEZE_HELPER, true);
259 // Prevents to have Ice Block on other place than target is
260 me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation());
261 }
262 }
263
264 void DamageTaken(Unit* who, uint32& /*damage*/) OVERRIDE
265 {
267 {
269
270 if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
271 {
272 if (!Hodir->IsInCombat())
273 {
274 Hodir->SetReactState(REACT_AGGRESSIVE);
275 Hodir->AI()->DoZoneInCombat();
276 Hodir->AI()->AttackStart(who);
277 }
278
279 Helper->AI()->AttackStart(Hodir);
280 }
281 }
282 }
283 };
284
286 {
287 return new npc_ice_blockAI(creature);
288 }
289};
290
292{
293 public:
294 boss_hodir() : CreatureScript("boss_hodir") { }
295
296 struct boss_hodirAI : public BossAI
297 {
298 boss_hodirAI(Creature* creature) : BossAI(creature, BOSS_HODIR)
299 {
300 me->SetReactState(REACT_PASSIVE);
301 }
302
304
309
311 {
312 _Reset();
313 me->SetReactState(REACT_PASSIVE);
314
315 for (uint8 n = 0; n < FRIENDS_COUNT; ++n)
316 if (Creature* FrozenHelper = me->SummonCreature(Entry[n], SummonPositions[n], TempSummonType::TEMPSUMMON_MANUAL_DESPAWN))
317 FrozenHelper->CastSpell(FrozenHelper, SPELL_SUMMON_FLASH_FREEZE_HELPER, true);
318 }
319
320 void EnterCombat(Unit* /*who*/) OVERRIDE
321 {
322 _EnterCombat();
325
327 gettingColdInHere = true;
328 cheeseTheFreeze = true;
331
332 events.ScheduleEvent(EVENT_ICICLE, 2000);
333 events.ScheduleEvent(EVENT_FREEZE, 25000);
334 events.ScheduleEvent(EVENT_BLOWS, std::rand() % 65000 + 60000);
335 events.ScheduleEvent(EVENT_FLASH_FREEZE, 45000);
336 events.ScheduleEvent(EVENT_RARE_CACHE, 180000);
337 events.ScheduleEvent(EVENT_BERSERK, 480000);
338 }
339
341 {
342 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)
343 Talk(SAY_SLAY);
344 }
345
346 void DamageTaken(Unit* /*who*/, uint32& damage) OVERRIDE
347 {
348 if (damage >= me->GetHealth())
349 {
350 damage = 0;
353 instance->SetData(DATA_HODIR_RARE_CACHE, 1);
354
355 me->RemoveAllAuras();
356 me->RemoveAllAttackers();
357 me->AttackStop();
358 me->SetReactState(REACT_PASSIVE);
360 me->InterruptNonMeleeSpells(true);
361 me->StopMoving();
362 me->GetMotionMaster()->Clear();
363 me->GetMotionMaster()->MoveIdle();
364 me->SetControlled(true, UNIT_STATE_STUNNED);
365 me->CombatStop(true);
366
367 me->setFaction(35);
368 me->DespawnOrUnsummon(10000);
369
371
372 _JustDied();
373 }
374 }
375
377 {
378 if (!UpdateVictim())
379 return;
380
381 events.Update(diff);
382
383 if (me->HasUnitState(UNIT_STATE_CASTING))
384 return;
385
386 while (uint32 eventId = events.ExecuteEvent())
387 {
388 switch (eventId)
389 {
390 case EVENT_FREEZE:
392 events.ScheduleEvent(EVENT_FREEZE, std::rand() % 45000 + 30000);
393 break;
394 case EVENT_ICICLE:
395 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
396 DoCast(target, SPELL_ICICLE);
397 events.ScheduleEvent(EVENT_ICICLE, RAID_MODE(5500, 3500));
398 break;
402 for (uint8 n = 0; n < RAID_MODE(2, 3); ++n)
403 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
404 target->CastSpell(target, SPELL_ICICLE_SNOWDRIFT, true);
406 events.ScheduleEvent(EVENT_FLASH_FREEZE_EFFECT, 500);
407 break;
409 {
410 std::list<Creature*> IcicleSnowdriftList;
411 GetCreatureListWithEntryInGrid(IcicleSnowdriftList, me, NPC_SNOWPACKED_ICICLE, 100.0f);
412 for (std::list<Creature*>::iterator itr = IcicleSnowdriftList.begin(); itr != IcicleSnowdriftList.end(); ++itr)
413 (*itr)->CastSpell(me, SPELL_FLASH_FREEZE_VISUAL, true);
414 FlashFreeze();
416 events.ScheduleEvent(EVENT_FLASH_FREEZE, std::rand() % 35000 + 25000);
417 break;
418 }
419 case EVENT_BLOWS:
423 events.ScheduleEvent(EVENT_BLOWS, std::rand() % 65000 + 60000);
424 break;
425 case EVENT_RARE_CACHE:
428 instance->SetData(DATA_HODIR_RARE_CACHE, 0);
429 events.CancelEvent(EVENT_RARE_CACHE);
430 break;
431 case EVENT_BERSERK:
433 DoCast(me, SPELL_BERSERK, true);
434 events.CancelEvent(EVENT_BERSERK);
435 break;
436 }
437 }
438
440 {
441 std::list<HostileReference*> ThreatList = me->getThreatManager().getThreatList();
442 for (std::list<HostileReference*>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
443 if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
444 if (Aura* BitingColdAura = target->GetAura(SPELL_BITING_COLD_TRIGGERED))
445 if ((target->GetTypeId() == TypeID::TYPEID_PLAYER) && (BitingColdAura->GetStackAmount() > 2))
446 me->AI()->SetData(DATA_GETTING_COLD_IN_HERE, 0);
448 }
449 else
451
453 }
454
456 {
457 switch (action)
458 {
461 break;
463 cheeseTheFreeze = false;
464 break;
465 default:
466 break;
467 }
468 }
469
471 {
472 std::list<Unit*> TargetList;
475 me->VisitNearbyObject(100.0f, searcher);
476 for (std::list<Unit*>::iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
477 {
478 Unit* target = *itr;
479 if (!target || !target->IsAlive() || GetClosestCreatureWithEntry(target, NPC_SNOWPACKED_ICICLE, 5.0f))
480 continue;
481
483 {
484 me->CastSpell(target, SPELL_FLASH_FREEZE_KILL, true);
485 continue;
486 }
487
488 target->CastSpell(target, SPELL_SUMMON_BLOCK_OF_ICE, true);
489 }
490 }
491 };
492
494 {
495 return GetUlduarAI<boss_hodirAI>(creature);
496 };
497};
498
500{
501 public:
502 npc_icicle() : CreatureScript("npc_icicle") { }
503
504 struct npc_icicleAI : public ScriptedAI
505 {
506 npc_icicleAI(Creature* creature) : ScriptedAI(creature)
507 {
508 me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
510 me->SetReactState(REACT_PASSIVE);
511 }
512
514
516 {
517 icicleTimer = 2500;
518 }
519
521 {
522 if (icicleTimer <= diff)
523 {
524 if (me->GetEntry() == NPC_ICICLE_SNOWDRIFT)
525 {
528 }
529 else if (me->GetEntry() == NPC_ICICLE)
530 {
533 }
534 icicleTimer = 10000;
535 }
536 else
537 icicleTimer -= diff;
538 }
539 };
540
542 {
543 return GetUlduarAI<npc_icicleAI>(creature);
544 };
545};
546
548{
549 public:
550 npc_snowpacked_icicle() : CreatureScript("npc_snowpacked_icicle") { }
551
553 {
555 {
556 me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
558 me->SetReactState(REACT_PASSIVE);
559 }
560
562
564 {
565 despawnTimer = 12000;
566 }
567
569 {
570 if (despawnTimer <= diff)
571 {
572 if (GameObject* Snowdrift = me->FindNearestGameObject(GO_SNOWDRIFT, 2.0f))
573 me->RemoveGameObject(Snowdrift, true);
574 me->DespawnOrUnsummon();
575 }
576 else
577 despawnTimer -= diff;
578 }
579 };
580
582 {
584 };
585};
586
588{
589 public:
590 npc_hodir_priest() : CreatureScript("npc_hodir_priest") { }
591
593 {
595 {
596 instance = me->GetInstanceScript();
597 }
598
600 {
601 events.Reset();
602 events.ScheduleEvent(EVENT_HEAL, std::rand() % 8000 + 4000);
603 events.ScheduleEvent(EVENT_DISPEL_MAGIC, std::rand() % 20000 + 15000);
604 }
605
607 {
608 if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
609 return;
610
611 events.Update(diff);
612
613 if (me->HasUnitState(UNIT_STATE_CASTING))
614 return;
615
616 if (HealthBelowPct(30))
618
619 while (uint32 eventId = events.ExecuteEvent())
620 {
621 switch (eventId)
622 {
623 case EVENT_HEAL:
625 events.ScheduleEvent(EVENT_HEAL, std::rand() % 10000 + 7500);
626 break;
628 {
629 std::list<Unit*> TargetList;
632 me->VisitNearbyObject(30.0f, searcher);
633 for (std::list<Unit*>::iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
634 if ((*itr)->HasAura(SPELL_FREEZE))
635 DoCast(*itr, SPELL_DISPEL_MAGIC, true);
636 events.ScheduleEvent(EVENT_DISPEL_MAGIC, std::rand() % 20000 + 15000);
637 break;
638 }
639 default:
640 break;
641 }
642 }
643
645 }
646
647 void JustDied(Unit* /*killer*/) OVERRIDE
648 {
649 if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
650 Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
651 }
652
653 private:
656 };
657
659 {
660 return GetUlduarAI<npc_hodir_priestAI>(creature);
661 };
662};
663
665{
666 public:
667 npc_hodir_shaman() : CreatureScript("npc_hodir_shaman") { }
668
670 {
672 {
673 instance = me->GetInstanceScript();
674 }
675
677 {
678 events.Reset();
679 events.ScheduleEvent(EVENT_STORM_CLOUD, std::rand() % 12500 + 10000);
680 }
681
683 {
684 if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
685 return;
686
687 events.Update(diff);
688
689 if (me->HasUnitState(UNIT_STATE_CASTING))
690 return;
691
692 while (uint32 eventId = events.ExecuteEvent())
693 {
694 switch (eventId)
695 {
697 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
698 DoCast(target, SPELL_STORM_CLOUD, true);
699 events.ScheduleEvent(EVENT_STORM_CLOUD, std::rand() % 20000 + 15000);
700 break;
701 default:
702 break;
703 }
704 }
705
707 }
708
709 void JustDied(Unit* /*killer*/) OVERRIDE
710 {
711 if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
712 Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
713 }
714
715 private:
718 };
719
721 {
722 return GetUlduarAI<npc_hodir_shamanAI>(creature);
723 };
724};
725
727{
728 public:
729 npc_hodir_druid() : CreatureScript("npc_hodir_druid") { }
730
732 {
733 npc_hodir_druidAI(Creature* creature) : ScriptedAI(creature)
734 {
735 instance = me->GetInstanceScript();
736 }
737
739 {
740 events.Reset();
741 events.ScheduleEvent(EVENT_STARLIGHT, std::rand() % 17500 + 15000);
742 }
743
745 {
746 if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
747 return;
748
749 events.Update(diff);
750
751 if (me->HasUnitState(UNIT_STATE_CASTING))
752 return;
753
754 while (uint32 eventId = events.ExecuteEvent())
755 {
756 switch (eventId)
757 {
758 case EVENT_STARLIGHT:
759 DoCast(me, SPELL_STARLIGHT, true);
760 events.ScheduleEvent(EVENT_STARLIGHT, std::rand() % 35000 + 25000);
761 break;
762 default:
763 break;
764 }
765 }
766
768 }
769
770 void JustDied(Unit* /*killer*/) OVERRIDE
771 {
772 if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
773 Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
774 }
775
776 private:
779 };
780
782 {
783 return GetUlduarAI<npc_hodir_druidAI>(creature);
784 };
785};
786
788{
789 public:
790 npc_hodir_mage() : CreatureScript("npc_hodir_mage") { }
791
793 {
795 {
796 instance = me->GetInstanceScript();
797 }
798
800 {
801 events.Reset();
802 summons.DespawnAll();
803 events.ScheduleEvent(EVENT_CONJURE_FIRE, std::rand() % 12500 + 10000);
804 events.ScheduleEvent(EVENT_MELT_ICE, 5000);
805 }
806
808 {
809 if (summoned->GetEntry() == NPC_TOASTY_FIRE)
810 summons.Summon(summoned);
811 }
812
814 {
815 if (summoned->GetEntry() == NPC_TOASTY_FIRE)
816 summons.Despawn(summoned);
817 }
818
820 {
821 if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
822 return;
823
824 events.Update(diff);
825
826 if (me->HasUnitState(UNIT_STATE_CASTING))
827 return;
828
829 while (uint32 eventId = events.ExecuteEvent())
830 {
831 switch (eventId)
832 {
834 if (summons.size() >= RAID_MODE<uint64>(2, 4))
835 break;
837 events.ScheduleEvent(EVENT_CONJURE_FIRE, std::rand() % 20000 + 15000);
838 break;
839 case EVENT_MELT_ICE:
840 if (Creature* FlashFreeze = me->FindNearestCreature(NPC_FLASH_FREEZE, 50.0f, true))
841 DoCast(FlashFreeze, SPELL_MELT_ICE, true);
842 events.ScheduleEvent(EVENT_MELT_ICE, std::rand() % 15000 + 10000);
843 break;
844 }
845 }
846
848 }
849
850 void JustDied(Unit* /*killer*/) OVERRIDE
851 {
852 if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
853 Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
854 }
855
856 private:
860 };
861
863 {
864 return GetUlduarAI<npc_hodir_mageAI>(creature);
865 };
866};
867
869{
870 public:
871 npc_toasty_fire() : CreatureScript("npc_toasty_fire") { }
872
874 {
875 npc_toasty_fireAI(Creature* creature) : ScriptedAI(creature)
876 {
877 me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
878 }
879
881 {
882 DoCast(me, SPELL_SINGED, true);
883 }
884
885 void SpellHit(Unit* /*who*/, const SpellInfo* spell) OVERRIDE
886 {
887 if (spell->Id == SPELL_BLOCK_OF_ICE || spell->Id == SPELL_ICE_SHARD || spell->Id == SPELL_ICE_SHARD_HIT)
888 {
889 if (GameObject* ToastyFire = me->FindNearestGameObject(GO_TOASTY_FIRE, 1.0f))
890 me->RemoveGameObject(ToastyFire, true);
891 me->DespawnOrUnsummon();
892 }
893 }
894 };
895
897 {
898 return GetUlduarAI<npc_toasty_fireAI>(creature);
899 };
900};
901
903{
904 public:
905 spell_biting_cold() : SpellScriptLoader("spell_biting_cold") { }
906
908 {
910
911 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
912 {
913 Unit* target = GetTarget();
914 bool found = false;
915
916 for (TargetList::iterator itr = listOfTargets.begin(); itr != listOfTargets.end(); ++itr)
917 {
918 if (itr->first != target->GetGUID())
919 continue;
920
921 if (itr->second >= 4)
922 {
923 target->CastSpell(target, SPELL_BITING_COLD_TRIGGERED, true);
924 itr->second = 1;
925 }
926 else
927 {
928 if (target->isMoving())
929 itr->second = 1;
930 else
931 itr->second++;
932 }
933
934 found = true;
935 break;
936 }
937
938 if (!found)
939 listOfTargets.push_back(std::make_pair(target->GetGUID(), 1));
940 }
941
946
947 private:
948 typedef std::list< std::pair<uint64, uint8> > TargetList;
950 };
951
953 {
954 return new spell_biting_cold_AuraScript();
955 }
956};
957
959{
960public:
961 spell_biting_cold_dot() : SpellScriptLoader("spell_biting_cold_dot") { }
962
964 {
966
967 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
968 {
969 Unit* caster = GetCaster();
970 if (!caster)
971 return;
972
973 int32 damage = int32(200 * pow(2.0f, GetStackAmount()));
974 caster->CastCustomSpell(caster, SPELL_BITING_COLD_DAMAGE, &damage, NULL, NULL, true);
975
976 if (caster->isMoving())
978 }
979
984 };
985
990};
991
993{
994 new boss_hodir();
995 new npc_icicle();
997 new npc_hodir_priest();
998 new npc_hodir_shaman();
999 new npc_hodir_druid();
1000 new npc_hodir_mage();
1001 new npc_toasty_fire();
1002 new npc_ice_block();
1003 new npc_flash_freeze();
1004 new spell_biting_cold();
1006}
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
@ IN_PROGRESS
@ TYPEID_PLAYER
Definition Object.h:55
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:75
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
@ EFFECT_0
@ SPELL_AURA_PERIODIC_DUMMY
#define AuraEffectPeriodicFn(F, I, N)
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ UNIT_STATE_STUNNED
Definition Unit.h:515
@ REACT_PASSIVE
Definition Unit.h:1156
@ REACT_AGGRESSIVE
Definition Unit.h:1158
@ UNIT_FLAG_STUNNED
Definition Unit.h:643
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FLAG_PACIFIED
Definition Unit.h:642
@ UNIT_FLAG_DISABLE_MOVE
Definition Unit.h:627
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ UNIT_FIELD_FLAGS
@ SAY_BERSERK
@ SAY_SLAY
@ SPELL_FIREBALL
#define SAY_DEATH
#define SAY_AGGRO
#define SPELL_BERSERK
@ SPELL_FREEZE
Definition boss_gyth.cpp:15
@ EVENT_FREEZE
Definition boss_gyth.cpp:30
HodirNPC
@ NPC_FLASH_FREEZE
@ NPC_ICICLE
@ NPC_TOASTY_FIRE
@ NPC_SNOWPACKED_ICICLE
@ NPC_ICE_BLOCK
@ NPC_ICICLE_SNOWDRIFT
HodirGameObjects
@ GO_SNOWDRIFT
@ GO_TOASTY_FIRE
@ DATA_GETTING_COLD_IN_HERE
HodirSpells
@ SPELL_FLASH_FREEZE_KILL
@ SPELL_FALL_SNOWDRIFT
@ SPELL_GREATER_HEAL
@ SPELL_MELT_ICE
@ SPELL_STARLIGHT
@ SPELL_SUMMON_BLOCK_OF_ICE
@ SPELL_SINGED
@ SPELL_ICICLE_SNOWDRIFT
@ SPELL_LAVA_BURST
@ SPELL_FREEZE
@ SPELL_ICICLE
@ SPELL_KILL_CREDIT
@ SPELL_ICE_SHARD
@ SPELL_FLASH_FREEZE
@ SPELL_SUMMON_FLASH_FREEZE_HELPER
@ SPELL_BITING_COLD
@ SPELL_DISPEL_MAGIC
@ SPELL_FALL_DAMAGE
@ SPELL_BLOCK_OF_ICE
@ SPELL_FIREBALL
@ SPELL_BITING_COLD_DAMAGE
@ SPELL_ICICLE_FALL
@ SPELL_FLASH_FREEZE_VISUAL
@ SPELL_SMITE
@ SPELL_FROZEN_BLOWS
@ SPELL_BITING_COLD_TRIGGERED
@ SPELL_WRATH
@ SPELL_STORM_CLOUD
@ SPELL_ICE_SHARD_HIT
@ SPELL_BERSERK
@ SPELL_FLASH_FREEZE_HELPER
@ SPELL_CONJURE_FIRE
HodirEvents
@ EVENT_CONJURE_FIRE
@ EVENT_MELT_ICE
@ EVENT_RARE_CACHE
@ EVENT_STORM_CLOUD
@ EVENT_STARLIGHT
@ EVENT_FLASH_FREEZE
@ EVENT_BLOWS
@ EVENT_BERSERK
@ EVENT_FREEZE
@ EVENT_ICICLE
@ EVENT_FLASH_FREEZE_EFFECT
@ EVENT_HEAL
@ EVENT_DISPEL_MAGIC
uint32 const Entry[8]
void AddSC_boss_hodir()
HodirYells
@ SAY_DEATH
@ SAY_HARD_MODE_FAILED
@ SAY_STALACTITE
@ EMOTE_BLOWS
@ SAY_AGGRO
@ EMOTE_FREEZE
@ SAY_FLASH_FREEZE
@ SAY_SLAY
@ SAY_BERSERK
Position const SummonPositions[8]
#define FRIENDS_COUNT
HodirActions
@ ACTION_CHEESE_THE_FREEZE
@ ACTION_I_HAVE_THE_COOLEST_FRIENDS
@ SPELL_KILL_CREDIT
@ EVENT_BERSERK
@ SPELL_LAVA_BURST
@ EMOTE_FREEZE
@ SPELL_WRATH
Definition chapter5.cpp:195
HookList< EffectPeriodicHandler > OnEffectPeriodic
Unit * GetCaster() const
Unit * GetTarget() const
uint8 GetStackAmount() const
InstanceScript *const instance
EventMap events
BossAI(Creature *creature, uint32 bossId)
void _EnterCombat()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
static Creature * GetCreature(WorldObject const &u, uint64 guid)
static Unit * GetUnit(WorldObject const &, uint64 guid)
uint64 GetGUID() const
Definition Object.h:119
SpellScriptLoader(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
bool DoSpellAttackIfReady(uint32 spell)
Definition UnitAI.cpp:48
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:176
Definition Unit.h:1367
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAuraFromStack(uint32 spellId, uint64 casterGUID=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool IsAlive() const
Definition Unit.h:2032
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
bool isMoving() const
Definition Unit.h:2771
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
std::list< std::pair< uint64, uint8 > > TargetList
PrepareAuraScript(spell_biting_cold_AuraScript)
PrepareAuraScript(spell_biting_cold_dot_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
#define SPELL_SMITE
Position const SummonPositions[10]
Creature * me
bool HealthBelowPct(uint32 pct) const
const T & RAID_MODE(const T &normal10, const T &normal25) const
ScriptedAI(Creature *creature)
void DoAction(int32 action) OVERRIDE
void DamageTaken(Unit *, uint32 &damage) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
boss_hodirAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void KilledUnit(Unit *who) OVERRIDE
void IsSummonedBy(Unit *summoner) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_hodir_druidAI(Creature *creature)
void JustSummoned(Creature *summoned) OVERRIDE
npc_hodir_mageAI(Creature *creature)
void SummonedCreatureDespawn(Creature *summoned) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void JustDied(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void IsSummonedBy(Unit *summoner) OVERRIDE
npc_ice_blockAI(Creature *creature)
void DamageTaken(Unit *who, uint32 &) OVERRIDE
npc_icicleAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE
npc_toasty_fireAI(Creature *creature)
@ BOSS_HODIR
Definition ulduar.h:28
@ DATA_HODIR_RARE_CACHE
Definition ulduar.h:281
AI * GetUlduarAI(T *obj)
Definition ulduar.h:336
@ NPC_FIELD_MEDIC_PENNY
Definition ulduar.h:95
@ NPC_SISSY_FLAMECUFFS
Definition ulduar.h:92
@ NPC_EIVI_NIGHTFEATHER
Definition ulduar.h:83
@ NPC_MISSY_FLAMECUFFS
Definition ulduar.h:91
@ NPC_ELEMENTALIST_MAHFUUN
Definition ulduar.h:87
@ NPC_ELLIE_NIGHTFEATHER
Definition ulduar.h:84
@ NPC_ELEMENTALIST_AVUUN
Definition ulduar.h:88
@ NPC_FIELD_MEDIC_JESSI
Definition ulduar.h:96