TrinityCore
boss_hodir.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "ScriptMgr.h"
19#include "CellImpl.h"
20#include "GridNotifiersImpl.h"
21#include "InstanceScript.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "ScriptedCreature.h"
25#include "SpellAuras.h"
26#include "SpellInfo.h"
27#include "SpellScript.h"
28#include "TemporarySummon.h"
29#include "ulduar.h"
30
31/* @todo Achievements
32 Storm Cloud (Shaman ability)
33 Destroying of Toasty Fires
34*/
35
36/* @todo Hodir aggro behavior is wonky. He gets set to _PASSIVE, but never to _AGGRESSIVE unless you kill an ice block which doesn't spawn unless you have*/
37
39{
48 EMOTE_BLOWS = 8
49};
50
52{
53 // Hodir
57 SPELL_BITING_COLD_TRIGGERED = 62039, // Needed for Achievement Getting Cold In Here
59 SPELL_FREEZE = 62469,
60 SPELL_ICICLE = 62234,
62 SPELL_BLOCK_OF_ICE = 61969, // Player + Helper
64 SPELL_SUMMON_BLOCK_OF_ICE = 61970, // Player + Helper
65 SPELL_FLASH_FREEZE_HELPER = 61990, // Helper
73
75
76 // Druids
77 SPELL_WRATH = 62793,
79
80 // Shamans
83
84 // Mages
88 SPELL_SINGED = 62821,
89
90 // Priests
91 SPELL_SMITE = 61923,
94};
95
96#define SPELL_FROZEN_BLOWS RAID_MODE<uint32>(62478,63512)
97
99{
103 NPC_ICICLE = 33169,
106};
107
109{
111 GO_SNOWDRIFT = 194173,
112};
113
115{
116 // Hodir
124
125 // Priest
128
129 // Shaman
131
132 // Druid
134
135 // Mage
138};
139
141{
144};
145
146#define ACHIEVEMENT_CHEESE_THE_FREEZE RAID_MODE<uint8>(2961, 2962)
147#define ACHIEVEMENT_GETTING_COLD_IN_HERE RAID_MODE<uint8>(2967, 2968)
148#define ACHIEVEMENT_THIS_CACHE_WAS_RARE RAID_MODE<uint8>(3182, 3184)
149#define ACHIEVEMENT_COOLEST_FRIENDS RAID_MODE<uint8>(2963, 2965)
150#define FRIENDS_COUNT RAID_MODE<uint8>(4, 8)
151
153{
154 DATA_GETTING_COLD_IN_HERE = 29672968 // 2967, 2968 are achievement IDs
156
158{
159 { 1983.75f, -243.36f, 432.767f, 1.57f }, // Field Medic Penny && Battle-Priest Eliza
160 { 1999.90f, -230.49f, 432.767f, 1.57f }, // Eivi Nightfeather && Tor Greycloud
161 { 2010.06f, -243.45f, 432.767f, 1.57f }, // Elementalist Mahfuun && Spiritwalker Tara
162 { 2021.12f, -236.65f, 432.767f, 1.57f }, // Missy Flamecuffs && Amira Blazeweaver
163 { 2028.10f, -244.66f, 432.767f, 1.57f }, // Field Medic Jessi && Battle-Priest Gina
164 { 2014.18f, -232.80f, 432.767f, 1.57f }, // Ellie Nightfeather && Kar Greycloud
165 { 1992.90f, -237.54f, 432.767f, 1.57f }, // Elementalist Avuun && Spiritwalker Yona
166 { 1976.60f, -233.53f, 432.767f, 1.57f }, // Sissy Flamecuffs && Veesha Blazeweaver
167};
168
169uint32 const Entry[8] =
170{
179};
180
182{
183 public:
184 npc_flash_freeze() : CreatureScript("npc_flash_freeze") { }
185
187 {
189 {
190 Initialize();
195 }
196
198 {
200 checkDespawnTimer = 1000;
201 }
202
204
207
208 void Reset() override
209 {
210 Initialize();
211 }
212
213 void UpdateAI(uint32 diff) override
214 {
215 if (!UpdateVictim()
216 || !me->GetVictim()
219 return;
220
223
224 if (checkDespawnTimer <= diff)
225 {
226 if (Unit* target = ObjectAccessor::GetUnit(*me, targetGUID))
227 if (!target->IsAlive())
229 checkDespawnTimer = 2500;
230 }
231 else
232 checkDespawnTimer -= diff;
233 }
234
235 void IsSummonedBy(WorldObject* summonerWO) override
236 {
237 Unit* summoner = summonerWO->ToUnit();
238 if (!summoner)
239 return;
240
241 targetGUID = summoner->GetGUID();
242 me->SetInCombatWith(summoner);
243 AddThreat(summoner, 250.0f);
244 if (Unit* target = ObjectAccessor::GetUnit(*me, targetGUID))
245 {
246 DoCast(target, SPELL_BLOCK_OF_ICE, true);
247 // Prevents to have Ice Block on other place than target is
248 me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation());
249 if (target->GetTypeId() == TYPEID_PLAYER)
251 hodir->AI()->DoAction(ACTION_CHEESE_THE_FREEZE);
252 }
253 }
254 };
255
256 CreatureAI* GetAI(Creature* creature) const override
257 {
258 return GetUlduarAI<npc_flash_freezeAI>(creature);
259 }
260};
261
263{
264 public:
265 npc_ice_block() : CreatureScript("npc_ice_block") { }
266
268 {
269 npc_ice_blockAI(Creature* creature) : ScriptedAI(creature)
270 {
275 }
276
278
280
281 void IsSummonedBy(WorldObject* summonerWO) override
282 {
283 Unit* summoner = summonerWO->ToUnit();
284 if (!summoner)
285 return;
286
287 targetGUID = summoner->GetGUID();
289 summoner->SetControlled(true, UNIT_STATE_ROOT);
290 me->SetInCombatWith(summoner);
291 AddThreat(summoner, 250.0f);
292 AddThreat(me, 250.0f, summoner);
294 {
295 DoCast(target, SPELL_FLASH_FREEZE_HELPER, true);
296 // Prevents to have Ice Block on other place than target is
297 me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation());
298 }
299 }
300
301 void DamageTaken(Unit* who, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
302 {
304 {
305 helper->RemoveUnitFlag(UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED);
306 helper->SetControlled(false, UNIT_STATE_ROOT);
307
309 {
310 if (!hodir->IsInCombat())
311 {
312 hodir->SetReactState(REACT_AGGRESSIVE);
313 hodir->AI()->DoZoneInCombat();
314 hodir->AI()->AttackStart(who);
315 }
316
317 helper->AI()->AttackStart(hodir);
318 }
319 }
320 }
321 };
322
323 CreatureAI* GetAI(Creature* creature) const override
324 {
325 return GetUlduarAI<npc_ice_blockAI>(creature);
326 }
327};
328
330{
331 public:
332 boss_hodir() : CreatureScript("boss_hodir") { }
333
334 struct boss_hodirAI : public BossAI
335 {
336 boss_hodirAI(Creature* creature) : BossAI(creature, DATA_HODIR)
337 {
338 Initialize();
340 }
341
343 {
345 gettingColdInHere = false;
346 cheeseTheFreeze = false;
349 }
350
352
357
358 void Reset() override
359 {
360 Initialize();
361
362 _Reset();
364
365 for (uint8 n = 0; n < FRIENDS_COUNT; ++n)
367 FrozenHelper->CastSpell(FrozenHelper, SPELL_SUMMON_FLASH_FREEZE_HELPER, true);
368 }
369
370 void JustEngagedWith(Unit* who) override
371 {
375
377 gettingColdInHere = true;
378 cheeseTheFreeze = true;
381
388 }
389
390 void KilledUnit(Unit* who) override
391 {
392 if (who->GetTypeId() == TYPEID_PLAYER)
393 Talk(SAY_SLAY);
394 }
395
396 void DamageTaken(Unit* who, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
397 {
398 if (damage >= me->GetHealth())
399 {
400 damage = 0;
404
407 me->AttackStop();
412 me->StopMoving();
416 me->CombatStop(true);
417
421 me->DespawnOrUnsummon(10s);
422
423 _JustDied();
424 }
425 else if (!me->IsInCombat())
426 {
428 me->AI()->DoZoneInCombat();
429 me->AI()->AttackStart(who);
430 }
431 }
432
433 void UpdateAI(uint32 diff) override
434 {
435 if (!UpdateVictim())
436 return;
437
438 events.Update(diff);
439
441 return;
442
443 while (uint32 eventId = events.ExecuteEvent())
444 {
445 switch (eventId)
446 {
447 case EVENT_FREEZE:
450 break;
451 case EVENT_ICICLE:
452 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
453 DoCast(target, SPELL_ICICLE);
454 events.ScheduleEvent(EVENT_ICICLE, RAID_MODE(5500ms, 3500ms));
455 break;
459 for (uint8 n = 0; n < RAID_MODE(2, 3); ++n)
460 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
461 target->CastSpell(target, SPELL_ICICLE_SNOWDRIFT, true);
464 break;
466 {
467 std::list<Creature*> IcicleSnowdriftList;
468 GetCreatureListWithEntryInGrid(IcicleSnowdriftList, me, NPC_SNOWPACKED_ICICLE, 100.0f);
469 for (std::list<Creature*>::iterator itr = IcicleSnowdriftList.begin(); itr != IcicleSnowdriftList.end(); ++itr)
470 (*itr)->CastSpell(me, SPELL_FLASH_FREEZE_VISUAL, true);
471 FlashFreeze();
474 break;
475 }
476 case EVENT_BLOWS:
481 break;
482 case EVENT_RARE_CACHE:
487 break;
488 case EVENT_BERSERK:
490 DoCast(me, SPELL_BERSERK, true);
492 break;
493 }
494
496 return;
497 }
498
500 {
501 for (auto const& pair : me->GetCombatManager().GetPvECombatRefs())
502 if (Player* target = pair.second->GetOther(me)->ToPlayer())
503 if (Aura* BitingColdAura = target->GetAura(SPELL_BITING_COLD_TRIGGERED))
504 if (BitingColdAura->GetStackAmount() > 2)
507 }
508 else
510 }
511
512 void DoAction(int32 action) override
513 {
514 switch (action)
515 {
518 break;
520 cheeseTheFreeze = false;
521 break;
522 default:
523 break;
524 }
525 }
526
528 {
529 std::list<Unit*> TargetList;
532 Cell::VisitAllObjects(me, searcher, 100.0f);
533 for (std::list<Unit*>::iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
534 {
535 Unit* target = *itr;
536 if (!target || !target->IsAlive() || GetClosestCreatureWithEntry(target, NPC_SNOWPACKED_ICICLE, 5.0f))
537 continue;
538
540 {
541 me->CastSpell(target, SPELL_FLASH_FREEZE_KILL, true);
542 continue;
543 }
544
545 target->CastSpell(target, SPELL_SUMMON_BLOCK_OF_ICE, true);
546 }
547 }
548 };
549
550 CreatureAI* GetAI(Creature* creature) const override
551 {
552 return GetUlduarAI<boss_hodirAI>(creature);
553 };
554};
555
557{
558 public:
559 npc_icicle() : CreatureScript("npc_icicle") { }
560
561 struct npc_icicleAI : public ScriptedAI
562 {
563 npc_icicleAI(Creature* creature) : ScriptedAI(creature)
564 {
565 Initialize();
568 }
569
571 {
572 icicleTimer = 2500;
573 }
574
576
577 void Reset() override
578 {
579 Initialize();
580 }
581
582 void UpdateAI(uint32 diff) override
583 {
584 if (icicleTimer <= diff)
585 {
587 {
590 }
591 else if (me->GetEntry() == NPC_ICICLE)
592 {
595 }
596 icicleTimer = 10000;
597 }
598 else
599 icicleTimer -= diff;
600 }
601 };
602
603 CreatureAI* GetAI(Creature* creature) const override
604 {
605 return GetUlduarAI<npc_icicleAI>(creature);
606 };
607};
608
610{
611 public:
612 npc_snowpacked_icicle() : CreatureScript("npc_snowpacked_icicle") { }
613
615 {
617 {
618 Initialize();
621 }
622
624 {
625 despawnTimer = 12000;
626 }
627
629
630 void Reset() override
631 {
632 Initialize();
633 }
634
635 void UpdateAI(uint32 diff) override
636 {
637 if (despawnTimer <= diff)
638 {
639 if (GameObject* Snowdrift = me->FindNearestGameObject(GO_SNOWDRIFT, 2.0f))
640 me->RemoveGameObject(Snowdrift, true);
642 }
643 else
644 despawnTimer -= diff;
645 }
646 };
647
648 CreatureAI* GetAI(Creature* creature) const override
649 {
650 return GetUlduarAI<npc_snowpacked_icicleAI>(creature);
651 };
652};
653
655{
656 public:
657 npc_hodir_priest() : CreatureScript("npc_hodir_priest") { }
658
660 {
662 {
664 me->SetCanMelee(false); // DoSpellAttackIfReady
665 }
666
667 void Reset() override
668 {
669 events.Reset();
672 }
673
674 void UpdateAI(uint32 diff) override
675 {
677 return;
678
679 events.Update(diff);
680
682 return;
683
684 if (HealthBelowPct(30))
686
688 return;
689
690 while (uint32 eventId = events.ExecuteEvent())
691 {
692 switch (eventId)
693 {
694 case EVENT_HEAL:
696 events.ScheduleEvent(EVENT_HEAL, 7500ms, 10s);
697 break;
699 {
700 std::list<Unit*> TargetList;
703 Cell::VisitAllObjects(me, searcher, 30.0f);
704 for (std::list<Unit*>::iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
705 if ((*itr)->HasAura(SPELL_FREEZE))
706 DoCast(*itr, SPELL_DISPEL_MAGIC, true);
708 break;
709 }
710 default:
711 break;
712 }
713
715 return;
716 }
717
719 }
720
721 void JustDied(Unit* /*killer*/) override
722 {
724 hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
725 }
726
727 private:
730 };
731
732 CreatureAI* GetAI(Creature* creature) const override
733 {
734 return GetUlduarAI<npc_hodir_priestAI>(creature);
735 };
736};
737
739{
740 public:
741 npc_hodir_shaman() : CreatureScript("npc_hodir_shaman") { }
742
744 {
746 {
748 me->SetCanMelee(false); // DoSpellAttackIfReady
749 }
750
751 void Reset() override
752 {
753 events.Reset();
755 }
756
757 void UpdateAI(uint32 diff) override
758 {
760 return;
761
762 events.Update(diff);
763
765 return;
766
767 while (uint32 eventId = events.ExecuteEvent())
768 {
769 switch (eventId)
770 {
772 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
773 DoCast(target, SPELL_STORM_CLOUD, true);
775 break;
776 default:
777 break;
778 }
779
781 return;
782 }
783
785 }
786
787 void JustDied(Unit* /*killer*/) override
788 {
790 hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
791 }
792
793 private:
796 };
797
798 CreatureAI* GetAI(Creature* creature) const override
799 {
800 return GetUlduarAI<npc_hodir_shamanAI>(creature);
801 };
802};
803
805{
806 public:
807 npc_hodir_druid() : CreatureScript("npc_hodir_druid") { }
808
810 {
811 npc_hodir_druidAI(Creature* creature) : ScriptedAI(creature)
812 {
814 me->SetCanMelee(false); // DoSpellAttackIfReady
815 }
816
817 void Reset() override
818 {
819 events.Reset();
820 events.ScheduleEvent(EVENT_STARLIGHT, 15s, 17500ms);
821 }
822
823 void UpdateAI(uint32 diff) override
824 {
826 return;
827
828 events.Update(diff);
829
831 return;
832
833 while (uint32 eventId = events.ExecuteEvent())
834 {
835 switch (eventId)
836 {
837 case EVENT_STARLIGHT:
838 DoCast(me, SPELL_STARLIGHT, true);
840 break;
841 default:
842 break;
843 }
844
846 return;
847 }
848
850 }
851
852 void JustDied(Unit* /*killer*/) override
853 {
855 hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
856 }
857
858 private:
861 };
862
863 CreatureAI* GetAI(Creature* creature) const override
864 {
865 return GetUlduarAI<npc_hodir_druidAI>(creature);
866 };
867};
868
870{
871 public:
872 npc_hodir_mage() : CreatureScript("npc_hodir_mage") { }
873
875 {
877 {
879 me->SetCanMelee(false); // DoSpellAttackIfReady
880 }
881
882 void Reset() override
883 {
884 events.Reset();
888 }
889
890 void JustSummoned(Creature* summoned) override
891 {
892 if (summoned->GetEntry() == NPC_TOASTY_FIRE)
893 summons.Summon(summoned);
894 }
895
896 void SummonedCreatureDespawn(Creature* summoned) override
897 {
898 if (summoned->GetEntry() == NPC_TOASTY_FIRE)
899 summons.Despawn(summoned);
900 }
901
902 void UpdateAI(uint32 diff) override
903 {
905 return;
906
907 events.Update(diff);
908
910 return;
911
912 while (uint32 eventId = events.ExecuteEvent())
913 {
914 switch (eventId)
915 {
917 if (summons.size() >= RAID_MODE<uint64>(2, 4))
918 break;
921 break;
922 case EVENT_MELT_ICE:
923 if (Creature* FlashFreeze = me->FindNearestCreature(NPC_FLASH_FREEZE, 50.0f, true))
924 DoCast(FlashFreeze, SPELL_MELT_ICE, true);
926 break;
927 }
928
930 return;
931 }
932
934 }
935
936 void JustDied(Unit* /*killer*/) override
937 {
939 hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
940 }
941
942 private:
946 };
947
948 CreatureAI* GetAI(Creature* creature) const override
949 {
950 return GetUlduarAI<npc_hodir_mageAI>(creature);
951 };
952};
953
955{
956 public:
957 npc_toasty_fire() : CreatureScript("npc_toasty_fire") { }
958
960 {
961 npc_toasty_fireAI(Creature* creature) : ScriptedAI(creature)
962 {
964 }
965
966 void Reset() override
967 {
968 DoCast(me, SPELL_SINGED, true);
969 }
970
971 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
972 {
973 if (spellInfo->Id == SPELL_BLOCK_OF_ICE || spellInfo->Id == SPELL_ICE_SHARD || spellInfo->Id == SPELL_ICE_SHARD_HIT)
974 {
975 if (GameObject* ToastyFire = me->FindNearestGameObject(GO_TOASTY_FIRE, 1.0f))
976 me->RemoveGameObject(ToastyFire, true);
978 }
979 }
980 };
981
982 CreatureAI* GetAI(Creature* creature) const override
983 {
984 return GetUlduarAI<npc_toasty_fireAI>(creature);
985 };
986};
987
988// 62038 - Biting Cold
990{
991 public:
992 spell_biting_cold() : SpellScriptLoader("spell_biting_cold") { }
993
995 {
996 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
997 {
998 Unit* target = GetTarget();
999 bool found = false;
1000
1001 for (TargetList::iterator itr = listOfTargets.begin(); itr != listOfTargets.end(); ++itr)
1002 {
1003 if (itr->first != target->GetGUID())
1004 continue;
1005
1006 if (itr->second >= 4)
1007 {
1008 target->CastSpell(target, SPELL_BITING_COLD_TRIGGERED, true);
1009 itr->second = 1;
1010 }
1011 else
1012 {
1013 if (target->isMoving())
1014 itr->second = 1;
1015 else
1016 itr->second++;
1017 }
1018
1019 found = true;
1020 break;
1021 }
1022
1023 if (!found)
1024 listOfTargets.push_back(std::make_pair(target->GetGUID(), 1));
1025 }
1026
1027 void Register() override
1028 {
1030 }
1031
1032 private:
1033 typedef std::list<std::pair<ObjectGuid, uint8>> TargetList;
1035 };
1036
1037 AuraScript* GetAuraScript() const override
1038 {
1039 return new spell_biting_cold_AuraScript();
1040 }
1041};
1042
1043// 62039 - Biting Cold
1045{
1046public:
1047 spell_biting_cold_dot() : SpellScriptLoader("spell_biting_cold_dot") { }
1048
1050 {
1051 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
1052 {
1053 Unit* caster = GetCaster();
1054 if (!caster)
1055 return;
1056
1057 int32 damage = int32(200 * std::pow(2.0f, GetStackAmount()));
1059 args.AddSpellBP0(damage);
1060 caster->CastSpell(caster, SPELL_BITING_COLD_DAMAGE, args);
1061
1062 if (caster->isMoving())
1064 }
1065
1066 void Register() override
1067 {
1069 }
1070 };
1071
1072 AuraScript* GetAuraScript() const override
1073 {
1075 }
1076};
1077
1079{
1080 new boss_hodir();
1081 new npc_icicle();
1083 new npc_hodir_priest();
1084 new npc_hodir_shaman();
1085 new npc_hodir_druid();
1086 new npc_hodir_mage();
1087 new npc_toasty_fire();
1088 new npc_ice_block();
1089 new npc_flash_freeze();
1090 new spell_biting_cold();
1092}
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ IN_PROGRESS
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
@ EFFECT_0
Definition: SharedDefines.h:30
@ FACTION_FRIENDLY
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
DamageEffectType
Definition: UnitDefines.h:131
@ UNIT_FLAG_STUNNED
Definition: UnitDefines.h:162
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ UNIT_FLAG_PACIFIED
Definition: UnitDefines.h:161
@ UNIT_STATE_ROOT
Definition: Unit.h:265
@ UNIT_STATE_CASTING
Definition: Unit.h:270
@ UNIT_STATE_STUNNED
Definition: Unit.h:258
HodirNPC
Definition: boss_hodir.cpp:99
@ NPC_FLASH_FREEZE
Definition: boss_hodir.cpp:101
@ NPC_ICICLE
Definition: boss_hodir.cpp:103
@ NPC_TOASTY_FIRE
Definition: boss_hodir.cpp:105
@ NPC_SNOWPACKED_ICICLE
Definition: boss_hodir.cpp:102
@ NPC_ICE_BLOCK
Definition: boss_hodir.cpp:100
@ NPC_ICICLE_SNOWDRIFT
Definition: boss_hodir.cpp:104
HodirGameObjects
Definition: boss_hodir.cpp:109
@ GO_SNOWDRIFT
Definition: boss_hodir.cpp:111
@ GO_TOASTY_FIRE
Definition: boss_hodir.cpp:110
@ DATA_GETTING_COLD_IN_HERE
Definition: boss_hodir.cpp:154
HodirSpells
Definition: boss_hodir.cpp:52
@ SPELL_FLASH_FREEZE_KILL
Definition: boss_hodir.cpp:66
@ SPELL_FALL_SNOWDRIFT
Definition: boss_hodir.cpp:69
@ SPELL_GREATER_HEAL
Definition: boss_hodir.cpp:92
@ SPELL_MELT_ICE
Definition: boss_hodir.cpp:87
@ SPELL_STARLIGHT
Definition: boss_hodir.cpp:78
@ SPELL_SUMMON_BLOCK_OF_ICE
Definition: boss_hodir.cpp:64
@ SPELL_SINGED
Definition: boss_hodir.cpp:88
@ SPELL_ICICLE_SNOWDRIFT
Definition: boss_hodir.cpp:61
@ SPELL_LAVA_BURST
Definition: boss_hodir.cpp:81
@ SPELL_FREEZE
Definition: boss_hodir.cpp:59
@ SPELL_ICICLE
Definition: boss_hodir.cpp:60
@ SPELL_KILL_CREDIT
Definition: boss_hodir.cpp:74
@ SPELL_ICE_SHARD
Definition: boss_hodir.cpp:71
@ SPELL_FLASH_FREEZE
Definition: boss_hodir.cpp:54
@ SPELL_SUMMON_FLASH_FREEZE_HELPER
Definition: boss_hodir.cpp:63
@ SPELL_BITING_COLD
Definition: boss_hodir.cpp:56
@ SPELL_DISPEL_MAGIC
Definition: boss_hodir.cpp:93
@ SPELL_FALL_DAMAGE
Definition: boss_hodir.cpp:68
@ SPELL_BLOCK_OF_ICE
Definition: boss_hodir.cpp:62
@ SPELL_FIREBALL
Definition: boss_hodir.cpp:85
@ SPELL_BITING_COLD_DAMAGE
Definition: boss_hodir.cpp:58
@ SPELL_ICICLE_FALL
Definition: boss_hodir.cpp:67
@ SPELL_FLASH_FREEZE_VISUAL
Definition: boss_hodir.cpp:55
@ SPELL_SMITE
Definition: boss_hodir.cpp:91
@ SPELL_BITING_COLD_TRIGGERED
Definition: boss_hodir.cpp:57
@ SPELL_WRATH
Definition: boss_hodir.cpp:77
@ SPELL_STORM_CLOUD
Definition: boss_hodir.cpp:82
@ SPELL_ICE_SHARD_HIT
Definition: boss_hodir.cpp:72
@ SPELL_BERSERK
Definition: boss_hodir.cpp:70
@ SPELL_FLASH_FREEZE_HELPER
Definition: boss_hodir.cpp:65
@ SPELL_CONJURE_FIRE
Definition: boss_hodir.cpp:86
HodirEvents
Definition: boss_hodir.cpp:115
@ EVENT_CONJURE_FIRE
Definition: boss_hodir.cpp:136
@ EVENT_MELT_ICE
Definition: boss_hodir.cpp:137
@ EVENT_RARE_CACHE
Definition: boss_hodir.cpp:122
@ EVENT_STORM_CLOUD
Definition: boss_hodir.cpp:130
@ EVENT_STARLIGHT
Definition: boss_hodir.cpp:133
@ EVENT_FLASH_FREEZE
Definition: boss_hodir.cpp:118
@ EVENT_BLOWS
Definition: boss_hodir.cpp:121
@ EVENT_BERSERK
Definition: boss_hodir.cpp:123
@ EVENT_FREEZE
Definition: boss_hodir.cpp:117
@ EVENT_ICICLE
Definition: boss_hodir.cpp:120
@ EVENT_FLASH_FREEZE_EFFECT
Definition: boss_hodir.cpp:119
@ EVENT_HEAL
Definition: boss_hodir.cpp:126
@ EVENT_DISPEL_MAGIC
Definition: boss_hodir.cpp:127
uint32 const Entry[8]
Definition: boss_hodir.cpp:169
#define SPELL_FROZEN_BLOWS
Definition: boss_hodir.cpp:96
void AddSC_boss_hodir()
HodirYells
Definition: boss_hodir.cpp:39
@ SAY_DEATH
Definition: boss_hodir.cpp:44
@ SAY_HARD_MODE_FAILED
Definition: boss_hodir.cpp:46
@ SAY_STALACTITE
Definition: boss_hodir.cpp:43
@ EMOTE_BLOWS
Definition: boss_hodir.cpp:48
@ SAY_AGGRO
Definition: boss_hodir.cpp:40
@ EMOTE_FREEZE
Definition: boss_hodir.cpp:47
@ SAY_FLASH_FREEZE
Definition: boss_hodir.cpp:42
@ SAY_SLAY
Definition: boss_hodir.cpp:41
@ SAY_BERSERK
Definition: boss_hodir.cpp:45
Position const SummonPositions[8]
Definition: boss_hodir.cpp:157
#define FRIENDS_COUNT
Definition: boss_hodir.cpp:150
HodirActions
Definition: boss_hodir.cpp:141
@ ACTION_CHEESE_THE_FREEZE
Definition: boss_hodir.cpp:143
@ ACTION_I_HAVE_THE_COOLEST_FRIENDS
Definition: boss_hodir.cpp:142
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
Unit * GetCaster() const
Unit * GetTarget() const
uint8 GetStackAmount() const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
EventMap events
void _JustDied()
std::unordered_map< ObjectGuid, CombatReference * > const & GetPvECombatRefs() const
void DoZoneInCombat()
Definition: CreatureAI.h:161
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Definition: CreatureAI.cpp:328
Creature *const me
Definition: CreatureAI.h:61
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
Definition: Creature.cpp:2822
void SetDisplayFromModel(uint32 modelIdx)
Definition: Creature.cpp:3413
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
CreatureAI * AI() const
Definition: Creature.h:214
void DisappearAndDie()
Definition: Creature.h:83
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:131
void Reset()
Definition: EventMap.cpp:21
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void Clear()
Definition: ObjectGuid.h:286
static Unit * ToUnit(Object *o)
Definition: Object.h:225
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static Player * ToPlayer(Object *o)
Definition: Object.h:213
uint32 const Id
Definition: SpellInfo.h:325
void Despawn(Creature const *summon)
void Summon(Creature const *summon)
size_type size() const
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:74
bool DoSpellAttackIfReady(uint32 spellId)
Definition: UnitAI.cpp:61
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void RemoveGameObject(GameObject *gameObj, bool del)
Definition: Unit.cpp:5238
void CombatStop(bool includingCast=false, bool mutualPvP=true, bool(*unitFilter)(Unit const *otherUnit)=nullptr)
Definition: Unit.cpp:5827
void SetInCombatWith(Unit *enemy, bool addSecondUnitSuppressed=false)
Definition: Unit.h:1045
void SetControlled(bool apply, UnitState state)
Definition: Unit.cpp:10911
void SetFaction(uint32 faction) override
Definition: Unit.h:859
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool HasUnitFlag(UnitFlags flags) const
Definition: Unit.h:832
bool IsAlive() const
Definition: Unit.h:1164
void StopMoving()
Definition: Unit.cpp:10049
Unit * EnsureVictim() const
Definition: Unit.h:717
uint64 GetHealth() const
Definition: Unit.h:776
bool isMoving() const
Definition: Unit.h:1732
void NearTeleportTo(Position const &pos, bool casting=false)
Definition: Unit.cpp:12327
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint16 num=1)
Definition: Unit.cpp:3847
Unit * GetVictim() const
Definition: Unit.h:715
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
void RemoveAllAttackers()
Definition: Unit.cpp:5881
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void RemoveAllAuras()
Definition: Unit.cpp:4242
CombatManager & GetCombatManager()
Definition: Unit.h:1023
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
bool AttackStop()
Definition: Unit.cpp:5781
bool IsInCombat() const
Definition: Unit.h:1043
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition: Object.cpp:2170
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:92
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:550
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:256
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:863
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:948
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:732
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:798
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:323
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:603
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:648
CreatureAI * GetAI(Creature *creature) const override
Definition: boss_hodir.cpp:982
std::list< std::pair< ObjectGuid, uint8 > > TargetList
AuraScript * GetAuraScript() const override
AuraScript * GetAuraScript() const override
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
CastSpellExtraArgs & AddSpellBP0(int32 val)
Definition: SpellDefines.h:475
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition: CellImpl.h:203
T const & RAID_MODE(T const &normal10, T const &normal25) const
bool HealthBelowPct(uint32 pct) const
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:433
void Reset() override
Definition: boss_hodir.cpp:358
void DamageTaken(Unit *who, uint32 &damage, DamageEffectType, SpellInfo const *) override
Definition: boss_hodir.cpp:396
boss_hodirAI(Creature *creature)
Definition: boss_hodir.cpp:336
void JustEngagedWith(Unit *who) override
Definition: boss_hodir.cpp:370
void DoAction(int32 action) override
Definition: boss_hodir.cpp:512
void KilledUnit(Unit *who) override
Definition: boss_hodir.cpp:390
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:213
npc_flash_freezeAI(Creature *creature)
Definition: boss_hodir.cpp:188
void IsSummonedBy(WorldObject *summonerWO) override
Definition: boss_hodir.cpp:235
void JustDied(Unit *) override
Definition: boss_hodir.cpp:852
npc_hodir_druidAI(Creature *creature)
Definition: boss_hodir.cpp:811
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:823
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:902
void JustDied(Unit *) override
Definition: boss_hodir.cpp:936
npc_hodir_mageAI(Creature *creature)
Definition: boss_hodir.cpp:876
void SummonedCreatureDespawn(Creature *summoned) override
Definition: boss_hodir.cpp:896
void JustSummoned(Creature *summoned) override
Definition: boss_hodir.cpp:890
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:674
npc_hodir_priestAI(Creature *creature)
Definition: boss_hodir.cpp:661
npc_hodir_shamanAI(Creature *creature)
Definition: boss_hodir.cpp:745
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:757
void DamageTaken(Unit *who, uint32 &, DamageEffectType, SpellInfo const *) override
Definition: boss_hodir.cpp:301
void IsSummonedBy(WorldObject *summonerWO) override
Definition: boss_hodir.cpp:281
npc_ice_blockAI(Creature *creature)
Definition: boss_hodir.cpp:269
npc_icicleAI(Creature *creature)
Definition: boss_hodir.cpp:563
void Reset() override
Definition: boss_hodir.cpp:577
void UpdateAI(uint32 diff) override
Definition: boss_hodir.cpp:582
npc_toasty_fireAI(Creature *creature)
Definition: boss_hodir.cpp:961
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
Definition: boss_hodir.cpp:971
@ DATA_HODIR
Definition: ulduar.h:44
@ DATA_HODIR_RARE_CACHE
Definition: ulduar.h:414
@ NPC_FIELD_MEDIC_PENNY
Definition: ulduar.h:156
@ NPC_SISSY_FLAMECUFFS
Definition: ulduar.h:153
@ NPC_EIVI_NIGHTFEATHER
Definition: ulduar.h:144
@ NPC_MISSY_FLAMECUFFS
Definition: ulduar.h:152
@ NPC_ELEMENTALIST_MAHFUUN
Definition: ulduar.h:148
@ NPC_ELLIE_NIGHTFEATHER
Definition: ulduar.h:145
@ NPC_ELEMENTALIST_AVUUN
Definition: ulduar.h:149
@ NPC_FIELD_MEDIC_JESSI
Definition: ulduar.h:157