TrinityCore
Loading...
Searching...
No Matches
boss_sindragosa.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 "CommonHelpers.h"
19#include "icecrown_citadel.h"
20#include "Containers.h"
21#include "GridNotifiers.h"
22#include "InstanceScript.h"
23#include "Map.h"
24#include "MotionMaster.h"
25#include "ObjectAccessor.h"
26#include "ObjectMgr.h"
27#include "ScriptedCreature.h"
28#include "ScriptMgr.h"
29#include "Spell.h"
30#include "SpellAuraEffects.h"
31#include "SpellAuras.h"
32#include "SpellInfo.h"
33#include "SpellMgr.h"
34#include "SpellScript.h"
35#include "TemporarySummon.h"
36
38{
39 SAY_AGGRO = 0, // You are fools to have come to this place! The icy winds of Northrend will consume your souls!
40 SAY_UNCHAINED_MAGIC = 1, // Suffer, mortals, as your pathetic magic betrays you!
41 EMOTE_WARN_BLISTERING_COLD = 2, // %s prepares to unleash a wave of blistering cold!
42 SAY_BLISTERING_COLD = 3, // Can you feel the cold hand of death upon your heart?
43 SAY_RESPITE_FOR_A_TORMENTED_SOUL = 4, // Aaah! It burns! What sorcery is this?!
44 SAY_AIR_PHASE = 5, // Your incursion ends here! None shall survive!
45 SAY_PHASE_2 = 6, // Now feel my master's limitless power and despair!
46 EMOTE_WARN_FROZEN_ORB = 7, // %s fires a frozen orb towards $N!
47 SAY_KILL = 8, // Perish!
48 // A flaw of mortality...
49 SAY_BERSERK = 9, // Enough! I tire of these games!
50 SAY_DEATH = 10, // Free...at last...
52};
53
103
141
151
162
167
168Position const RimefangFlyPos = {4413.309f, 2456.421f, 233.3795f, 2.890186f};
169Position const RimefangLandPos = {4413.309f, 2456.421f, 203.3848f, 2.890186f};
170Position const SpinestalkerFlyPos = {4418.895f, 2514.233f, 230.4864f, 3.396045f};
171Position const SpinestalkerLandPos = {4418.895f, 2514.233f, 203.3848f, 3.396045f};
172Position const SindragosaSpawnPos = {4818.700f, 2483.710f, 287.0650f, 3.089233f};
173Position const SindragosaFlyPos = {4475.190f, 2484.570f, 234.8510f, 3.141593f};
174Position const SindragosaLandPos = {4419.190f, 2484.570f, 203.3848f, 3.141593f};
175Position const SindragosaAirPos = {4475.990f, 2484.430f, 247.9340f, 3.141593f};
176Position const SindragosaAirPosFar = {4525.600f, 2485.150f, 245.0820f, 3.141593f};
177Position const SindragosaFlyInPos = {4419.190f, 2484.360f, 232.5150f, 3.141593f};
178
180{
181 public:
182 FrostwyrmLandEvent(Creature& owner, Position const& dest) : _owner(owner), _dest(dest) { }
183
184 bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
185 {
187 return true;
188 }
189
190 private:
193};
194
196{
197 public:
198 FrostBombExplosion(Creature* owner, ObjectGuid sindragosaGUID) : _owner(owner), _sindragosaGUID(sindragosaGUID) { }
199
200 bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
201 {
202 _owner->CastSpell(nullptr, SPELL_FROST_BOMB, CastSpellExtraArgs().SetOriginalCaster(_sindragosaGUID));
204 return true;
205 }
206
207 private:
210};
211
213{
214 public:
215 FrostBeaconSelector(Unit* source) : NonTankTargetSelector(source, true) { }
216
217 bool operator()(WorldObject* target) const
218 {
219 if (Unit* unitTarget = target->ToUnit())
220 return !NonTankTargetSelector::operator()(unitTarget) ||
221 unitTarget->HasAura(SPELL_ICE_TOMB_UNTARGETABLE);
222
223 return false;
224 }
225};
226
227// 36853 - Sindragosa
228struct boss_sindragosa : public BossAI
229{
231 {
232 Initialize();
233 }
234
236 {
238 _isInAirPhase = false;
239 _isThirdPhase = false;
240 }
241
261
262 void JustDied(Unit* /* killer */) override
263 {
264 _JustDied();
266
269
270 }
271
290
291 void EnterEvadeMode(EvadeReason why) override
292 {
294 return;
296 }
297
306
307 void KilledUnit(Unit* victim) override
308 {
309 if (victim->GetTypeId() == TYPEID_PLAYER)
310 Talk(SAY_KILL);
311 }
312
313 void DoAction(int32 action) override
314 {
315 if (action == ACTION_START_FROSTWYRM)
316 {
317
319 if (TempSummon* summon = me->ToTempSummon())
320 summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
321
322 if (me->isDead())
323 return;
324
325 me->setActive(true);
326 me->SetFarVisible(true);
327 me->SetCanFly(true);
328 me->SetDisableGravity(true);
335 }
336 }
337
338 uint32 GetData(uint32 type) const override
339 {
340 switch (type)
341 {
343 return _mysticBuffetStack;
345 return _isThirdPhase;
346 default:
347 return 0xFFFFFFFF;
348 }
349 }
350
351 void MovementInform(uint32 type, uint32 point) override
352 {
353 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
354 return;
355
356 switch (point)
357 {
359 me->setActive(false);
360 me->SetFarVisible(false);
361 me->SetCanFly(false);
362 me->SetDisableGravity(false);
366
367 // Sindragosa enters combat as soon as she lands
369 break;
370 case POINT_TAKEOFF:
372 break;
373 case POINT_AIR_PHASE:
374 {
376 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 5, 2, 6));
377 me->CastSpell(nullptr, SPELL_ICE_TOMB_TARGET, args);
378 me->SetFacingTo(float(M_PI), true);
381 break;
382 }
384 me->SetFacingTo(float(M_PI), true);
386 break;
387 case POINT_LAND:
389 break;
391 {
392 me->SetCanFly(false);
393 me->SetDisableGravity(false);
395
396 _isInAirPhase = false;
397 // trigger Asphyxiation
400 break;
401 }
402 default:
403 break;
404 }
405 }
406
407 void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
408 {
409 if (!_isThirdPhase && !HealthAbovePct(35))
410 {
413 _isThirdPhase = true;
414 }
415 }
416
417 void JustSummoned(Creature* summon) override
418 {
419 summons.Summon(summon);
420 if (summon->GetEntry() == NPC_FROST_BOMB)
421 {
422 summon->CastSpell(summon, SPELL_FROST_BOMB_VISUAL, true);
423 summon->CastSpell(summon, SPELL_BIRTH_NO_VISUAL, true);
424 summon->m_Events.AddEvent(new FrostBombExplosion(summon, me->GetGUID()), summon->m_Events.CalculateTime(5500ms));
425 }
426 }
427
428 void SummonedCreatureDespawn(Creature* summon) override
429 {
431 if (summon->GetEntry() == NPC_ICE_TOMB)
432 summon->AI()->JustDied(summon);
433 }
434
435 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
436 {
437 Unit* unitTarget = target->ToUnit();
438 if (!unitTarget)
439 return;
440
441 if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(70127, me))
442 if (spellId == spellInfo->Id)
443 if (Aura const* mysticBuffet = unitTarget->GetAura(spellId))
444 _mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
445 }
446
447 void UpdateAI(uint32 diff) override
448 {
449 if (!UpdateVictim())
450 return;
451
452 events.Update(diff);
453
455 return;
456
457 while (uint32 eventId = events.ExecuteEvent())
458 {
459 switch (eventId)
460 {
461 case EVENT_BERSERK:
465 break;
466 case EVENT_CLEAVE:
469 break;
470 case EVENT_TAIL_SMASH:
473 break;
479 break;
484 break;
485 case EVENT_ICY_GRIP:
490 if (_isThirdPhase)
492 break;
497 break;
500 break;
501 case EVENT_AIR_PHASE:
502 {
503 _isInAirPhase = true;
505 me->SetCanFly(true);
506 me->SetDisableGravity(true);
508 me->AttackStop();
509 Position pos;
510 pos.Relocate(me);
511 pos.m_positionZ += 17.0f;
515 break;
516 }
519 break;
522 break;
523 case EVENT_ICE_TOMB:
524 {
527 me->CastSpell(nullptr, SPELL_ICE_TOMB_TARGET, args);
529 break;
530 }
531 case EVENT_FROST_BOMB:
532 {
533 float destX, destY, destZ;
534 destX = float(rand_norm()) * 75.0f + 4350.0f;
535 destY = float(rand_norm()) * 75.0f + 2450.0f;
536 destZ = 205.0f; // random number close to ground, get exact in next call
537 me->UpdateGroundPositionZ(destX, destY, destZ);
538 me->CastSpell(Position{ destX, destY, destZ }, SPELL_FROST_BOMB_TRIGGER, false);
540 break;
541 }
542 case EVENT_LAND:
543 {
546 break;
547 }
555 break;
557 {
558 if (!_isInAirPhase)
559 {
564 }
565 else
567 break;
568 }
569 default:
570 break;
571 }
572
574 return;
575 }
576
578 }
579
580private:
584};
585
586// 36980 - Ice Tomb
588{
589 npc_ice_tomb(Creature* creature) : ScriptedAI(creature)
590 {
592 SetCombatMovement(false);
593 }
594
595 void Reset() override
596 {
598 }
599
600 void SetGUID(ObjectGuid const& guid, int32 id) override
601 {
602 if (id == DATA_TRAPPED_PLAYER)
603 {
604 _trappedPlayerGUID = guid;
606 }
607 }
608
609 void DoAction(int32 action) override
610 {
611 if (action == ACTION_TRIGGER_ASPHYXIATION)
613 player->CastSpell(player, SPELL_ASPHYXIATION, true);
614 }
615
616 void JustDied(Unit* /*killer*/) override
617 {
619
621 {
623 player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE);
624 player->RemoveAurasDueToSpell(SPELL_ASPHYXIATION);
625 player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_UNTARGETABLE);
626 }
627 }
628
629 void UpdateAI(uint32 diff) override
630 {
632 return;
633
634 if (_existenceCheckTimer <= diff)
635 {
637 if (!player || player->isDead() || !player->HasAura(SPELL_ICE_TOMB_DAMAGE))
638 {
639 // Remove object
640 JustDied(me);
642 return;
643 }
645 }
646 else
647 _existenceCheckTimer -= diff;
648 }
649
650private:
653};
654
655// 37534 - Spinestalker
657{
658 npc_spinestalker(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false) { }
659
660 void InitializeAI() override
661 {
662 // Increase add count
663 if (!me->isDead())
664 {
665 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
666 Reset();
667 }
668 }
669
670 void Reset() override
671 {
672 _events.Reset();
676
677 if (!_summoned)
678 {
679 me->SetCanFly(true);
680 me->SetDisableGravity(true);
681 }
682 }
683
684 void JustAppeared() override
685 {
687 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
688 }
689
690 void JustDied(Unit* /*killer*/) override
691 {
692 _events.Reset();
693 }
694
695 void DoAction(int32 action) override
696 {
697 if (action == ACTION_START_FROSTWYRM)
698 {
699 if (_summoned)
700 return;
701
702 _summoned = true;
703 if (me->isDead())
704 return;
705
706 me->setActive(true);
707 me->SetFarVisible(true);
714 me->StopMoving();
717 }
718 }
719
720 void MovementInform(uint32 type, uint32 point) override
721 {
722 if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
723 return;
724
725 me->setActive(false);
726 me->SetFarVisible(false);
727 me->SetCanFly(false);
728 me->SetDisableGravity(false);
733 }
734
735 void UpdateAI(uint32 diff) override
736 {
737 if (!UpdateVictim())
738 return;
739
740 _events.Update(diff);
741
743 return;
744
745 while (uint32 eventId = _events.ExecuteEvent())
746 {
747 switch (eventId)
748 {
752 break;
756 break;
757 case EVENT_TAIL_SWEEP:
760 break;
761 default:
762 break;
763 }
764 }
765
767 }
768
769private:
773};
774
775// 37533 - Rimefang
777{
778 npc_rimefang_icc(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false)
779 {
780 Initialize();
781 }
782
784 {
786 }
787
788 void InitializeAI() override
789 {
790 // Increase add count
791 if (!me->isDead())
792 {
793 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
794 Reset();
795 }
796 }
797
798 void Reset() override
799 {
800 _events.Reset();
803 Initialize();
804
805 if (!_summoned)
806 {
807 me->SetCanFly(true);
808 me->SetDisableGravity(true);
809 }
810 }
811
812 void JustAppeared() override
813 {
815 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
816 }
817
818 void JustDied(Unit* /*killer*/) override
819 {
820 _events.Reset();
821 }
822
823 void DoAction(int32 action) override
824 {
825 if (action == ACTION_START_FROSTWYRM)
826 {
827 if (_summoned)
828 return;
829
830 _summoned = true;
831 if (me->isDead())
832 return;
833
834 me->setActive(true);
835 me->SetFarVisible(true);
837 me->SetImmuneToPC(true);
842 me->StopMoving();
845 }
846 }
847
848 void MovementInform(uint32 type, uint32 point) override
849 {
850 if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
851 return;
852
853 me->setActive(false);
854 me->SetFarVisible(false);
855 me->SetCanFly(false);
856 me->SetDisableGravity(false);
859 me->SetImmuneToPC(false);
861 }
862
863 void JustEngagedWith(Unit* /*victim*/) override
864 {
866 }
867
868 void UpdateAI(uint32 diff) override
869 {
870 if (!UpdateVictim())
871 return;
872
873 _events.Update(diff);
874
876 return;
877
878 while (uint32 eventId = _events.ExecuteEvent())
879 {
880 switch (eventId)
881 {
885 break;
886 case EVENT_ICY_BLAST:
887 {
888 _icyBlastCounter = RAID_MODE<uint8>(5, 7, 6, 8);
890 me->AttackStop();
891 me->SetCanFly(true);
894 _events.ScheduleEvent(EVENT_ICY_BLAST, moveTime + 60s, moveTime + 70s);
895 _events.ScheduleEvent(EVENT_ICY_BLAST_CAST, moveTime + 250ms);
896 break;
897 }
899 if (--_icyBlastCounter)
900 {
901 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
902 {
903 me->SetFacingToObject(target);
904 DoCast(target, SPELL_ICY_BLAST);
905 }
907 }
908 else if (Unit* victim = me->SelectVictim())
909 {
911 AttackStart(victim);
912 me->SetCanFly(false);
913 }
914 break;
915 default:
916 break;
917 }
918 }
919
921 }
922
923private:
928};
929
930// 37531 - Frostwarden Handler
931// 37532 - Frostwing Whelp
933{
935 {
936 Initialize();
937 _instance = creature->GetInstanceScript();
938 _frostwyrmId = 0;
939 }
940
942 {
943 _isTaunted = false;
944 }
945
946 void InitializeAI() override
947 {
948 _frostwyrmId = (me->GetHomePosition().GetPositionY() < 2484.35f) ? DATA_RIMEFANG : DATA_SPINESTALKER;
949 // Increase add count
950 if (!me->isDead())
951 {
953 _instance->SetData64(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
954 Reset();
955 }
956 }
957
958 void Reset() override
959 {
960 // This is shared AI for handler and whelps
962 {
965 }
966
967 Initialize();
968 }
969
970 void JustAppeared() override
971 {
973
974 // Increase add count
976 _instance->SetData64(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
977 }
978
979 void SetData(uint32 type, uint32 data) override
980 {
981 if (type == DATA_WHELP_MARKER)
982 _isTaunted = data != 0;
983 }
984
985 uint32 GetData(uint32 type) const override
986 {
987 if (type == DATA_FROSTWYRM_OWNER)
988 return _frostwyrmId;
989 else if (type == DATA_WHELP_MARKER)
990 return uint32(_isTaunted);
991 return 0;
992 }
993
994 void UpdateAI(uint32 diff) override
995 {
996 if (!UpdateVictim())
997 return;
998
999 _events.Update(diff);
1000
1002 return;
1003
1004 while (uint32 eventId = _events.ExecuteEvent())
1005 {
1006 switch (eventId)
1007 {
1011 break;
1015 break;
1016 default:
1017 break;
1018 }
1019 }
1020
1022 }
1023
1024private:
1028 bool _isTaunted; // Frostwing Whelp only
1029};
1030
1031// 70598 - Sindragosa's Fury
1033{
1035
1036 bool Load() override
1037 {
1038 // This script should execute only in Icecrown Citadel
1040 }
1041
1043 {
1044 if (Position* dest = const_cast<WorldLocation*>(GetExplTargetDest()))
1045 {
1046 float destX = float(rand_norm()) * 75.0f + 4350.0f;
1047 float destY = float(rand_norm()) * 75.0f + 2450.0f;
1048 float destZ = 205.0f; // random number close to ground, get exact in next call
1049 GetCaster()->UpdateGroundPositionZ(destX, destY, destZ);
1050 dest->Relocate(destX, destY, destZ);
1051 }
1052 }
1053
1054 void FilterTargets(std::list<WorldObject*>& targets)
1055 {
1056 targets.remove_if([](WorldObject* obj) -> bool
1057 {
1058 // remove GMs
1059 if (Player* player = obj->ToPlayer())
1060 return player->IsGameMaster();
1061
1062 // remove non-players too
1063 return true;
1064 });
1065
1066 _targetCount = targets.size();
1067 }
1068
1070 {
1071 PreventHitDefaultEffect(effIndex);
1072
1073 if (!GetHitUnit()->IsAlive() || !_targetCount)
1074 return;
1075
1076 if (GetHitUnit()->IsImmunedToDamage(GetSpellInfo()))
1077 {
1079 return;
1080 }
1081
1082 float resistance = float(GetHitUnit()->GetResistance(SpellSchoolMask(GetSpellInfo()->SchoolMask)));
1083 uint32 minResistFactor = uint32((resistance / (resistance + 510.0f)) * 10.0f) * 2;
1084 uint32 randomResist = urand(0, (9 - minResistFactor) * 100) / 100 + minResistFactor;
1085
1086 uint32 damage = (uint32(GetEffectValue() / _targetCount) * randomResist) / 10;
1087
1088 SpellNonMeleeDamage damageInfo(GetCaster(), GetHitUnit(), GetSpellInfo()->Id, GetSpellInfo()->SchoolMask);
1089 damageInfo.damage = damage;
1090 GetCaster()->SendSpellNonMeleeDamageLog(&damageInfo);
1091 GetCaster()->DealSpellDamage(&damageInfo, false);
1092 }
1093
1100
1102};
1103
1104// 69762 - Unchained Magic
1106{
1108
1109 void FilterTargets(std::list<WorldObject*>& targets)
1110 {
1111 std::vector<WorldObject*> healers;
1112 std::vector<WorldObject*> casters;
1113 for (WorldObject* target : targets)
1114 {
1115 Player* player = target->ToPlayer();
1116 if (!player)
1117 continue;
1118
1120 {
1121 healers.push_back(target);
1122 continue;
1123 }
1124
1125 switch (player->GetClass())
1126 {
1127 case CLASS_PRIEST:
1128 case CLASS_MAGE:
1129 case CLASS_WARLOCK:
1130 casters.push_back(target);
1131 break;
1132 case CLASS_SHAMAN:
1134 casters.push_back(target);
1135 break;
1136 case CLASS_DRUID:
1138 casters.push_back(target);
1139 break;
1140 default:
1141 break;
1142 }
1143 }
1144
1145 targets.clear();
1146
1147 bool const is25ManRaid = GetCaster()->GetMap()->Is25ManRaid();
1148 if (!healers.empty())
1149 {
1150 Trinity::Containers::RandomResize(healers, size_t(is25ManRaid ? 3 : 1));
1151 while (!healers.empty())
1152 {
1153 targets.push_back(healers.back());
1154 healers.pop_back();
1155 }
1156 }
1157 if (!casters.empty())
1158 {
1160 size_t const maxSize = is25ManRaid ? 6 : 2;
1161 while (!casters.empty() && targets.size() < maxSize)
1162 {
1163 targets.push_back(casters.back());
1164 casters.pop_back();
1165 }
1166 }
1167 }
1168
1173};
1174
1175// 69649, 71056, 71057, 71058 - Frost Breath
1176// 73061, 73062, 73063, 73064 - Frost Breath
1178{
1180
1182 {
1183 Player* target = GetHitPlayer();
1184 if (!target)
1185 return;
1186
1187 // Check difficulty and quest status
1189 return;
1190
1191 // Check if player has Shadow's Edge equipped and not ready for infusion
1193 return;
1194
1195 Aura* infusion = target->GetAura(SPELL_FROST_INFUSION, target->GetGUID());
1196 if (infusion && infusion->GetStackAmount() >= 3)
1197 {
1198 target->RemoveAura(infusion);
1200 }
1201 else
1203 }
1204
1209};
1210
1211// 69766 - Instability
1213{
1215
1216 bool Validate(SpellInfo const* /*spell*/) override
1217 {
1219 }
1220
1221 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
1222 {
1223 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
1224 {
1225 CastSpellExtraArgs args(aurEff);
1227 args.AddSpellBP0(aurEff->GetAmount());
1229 }
1230 }
1231
1236};
1237
1238// 70126 - Frost Beacon
1240{
1242
1243 bool Validate(SpellInfo const* /*spell*/) override
1244 {
1246 }
1247
1248 void PeriodicTick(AuraEffect const* /*aurEff*/)
1249 {
1251 if (Unit* caster = GetCaster())
1252 caster->CastSpell(GetTarget(), SPELL_ICE_TOMB_DAMAGE, true);
1253 }
1254
1259};
1260
1261// 70157 - Ice Tomb (Trap)
1263{
1265
1266 bool Validate(SpellInfo const* /*spell*/) override
1267 {
1268 if (!sObjectMgr->GetCreatureTemplate(NPC_ICE_TOMB))
1269 return false;
1270 if (!sObjectMgr->GetGameObjectTemplate(GO_ICE_BLOCK))
1271 return false;
1272 return true;
1273 }
1274
1275 void PeriodicTick(AuraEffect const* aurEff)
1276 {
1278
1279 if (aurEff->GetTickNumber() == 1)
1280 {
1281 if (Unit* caster = GetCaster())
1282 {
1283 Position pos = GetTarget()->GetPosition();
1284
1285 if (TempSummon* summon = caster->SummonCreature(NPC_ICE_TOMB, pos))
1286 {
1287 summon->AI()->SetGUID(GetTarget()->GetGUID(), DATA_TRAPPED_PLAYER);
1289 if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos, QuaternionData(), 0s))
1290 {
1291 go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
1292 summon->AddGameObject(go);
1293 }
1294 }
1295 }
1296 }
1297 }
1298
1303
1309};
1310
1312{
1313public:
1314 explicit SindragosaIcyGripTargetFilter(Unit* caster) : _caster(caster) { }
1315
1316 bool operator()(WorldObject* object) const
1317 {
1318 if (!object->ToUnit())
1319 return true;
1320 // No frost beaconed players
1321 if (object->ToUnit()->HasAura(SPELL_FROST_BEACON))
1322 return true;
1323 // Not current Victim
1324 if (object->ToUnit() == _caster->GetVictim())
1325 return true;
1326
1327 return false;
1328 }
1329
1330private:
1332};
1333
1334// 70117 - Icy Grip
1361
1363{
1364 public:
1365 explicit MysticBuffetTargetFilter(Unit* caster) : _caster(caster) { }
1366
1367 bool operator()(WorldObject* unit) const
1368 {
1369 return !unit->IsWithinLOSInMap(_caster);
1370 }
1371
1372 private:
1374};
1375
1376// 70127, 72528, 72529, 72530 - Mystic Buffet
1391
1392// 71376 - Icy Blast
1394{
1396
1397 bool Validate(SpellInfo const* /*spell*/) override
1398 {
1400 }
1401
1403 {
1404 PreventHitDefaultEffect(effIndex);
1405 if (Position const* pos = GetExplTargetDest())
1406 if (TempSummon* summon = GetCaster()->SummonCreature(NPC_ICY_BLAST, *pos, TEMPSUMMON_TIMED_DESPAWN, 40s))
1407 summon->CastSpell(summon, SPELL_ICY_BLAST_AREA, true);
1408 }
1409
1414};
1415
1417{
1418 public:
1419 explicit OrderWhelpTargetSelector(Creature* owner) : _owner(owner) { }
1420
1421 bool operator()(Creature* creature)
1422 {
1423 if (!creature->AI()->GetData(DATA_WHELP_MARKER) && creature->AI()->GetData(DATA_FROSTWYRM_OWNER) == _owner->AI()->GetData(DATA_FROSTWYRM_OWNER))
1424 return false;
1425 return true;
1426 }
1427
1428 private:
1430};
1431
1432// 71357 - Order Whelp
1434{
1436
1437 bool Validate(SpellInfo const* /*spell*/) override
1438 {
1440 }
1441
1442 void FilterTargets(std::list<WorldObject*>& targets)
1443 {
1444 targets.remove_if(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false));
1445 if (targets.empty())
1446 return;
1447
1449 targets.clear();
1450 targets.push_back(target);
1451 }
1452
1454 {
1455 // caster is Frostwarden Handler, target is player, caster of triggered is whelp
1456 PreventHitDefaultEffect(effIndex);
1457 std::list<Creature*> unitList;
1459 if (Creature* creature = GetCaster()->ToCreature())
1460 unitList.remove_if(OrderWhelpTargetSelector(creature));
1461
1462 if (unitList.empty())
1463 return;
1464
1466 }
1467
1473};
1474
1475// 71350 - Focus Fire
1492
1494{
1496
1497 void PeriodicTick(AuraEffect const* /*aurEff*/)
1498 {
1500 if (Unit* caster = GetCaster())
1501 {
1502 caster->GetThreatManager().AddThreat(GetTarget(), -float(GetEffectInfo(EFFECT_1).CalcValue()), GetSpellInfo(), true, true);
1503 caster->GetAI()->SetData(DATA_WHELP_MARKER, 0);
1504 }
1505 }
1506
1511};
1512
1513// 69712 - Ice Tomb (Target)
1515{
1517
1518 void FilterTargets(std::list<WorldObject*>& unitList)
1519 {
1520 Unit* caster = GetCaster();
1521 unitList.remove_if(FrostBeaconSelector(caster));
1522 }
1523
1525 {
1526 if (Creature* creatureCaster = GetCaster()->ToCreature())
1527 if (creatureCaster->GetAI()->GetData(DATA_IS_THIRD_PHASE))
1528 creatureCaster->AI()->Talk(EMOTE_WARN_FROZEN_ORB, GetHitUnit());
1529 }
1530
1536};
1537
1539{
1540 public:
1541 at_sindragosa_lair() : AreaTriggerScript("at_sindragosa_lair") { }
1542
1543 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1544 {
1545 if (InstanceScript* instance = player->GetInstanceScript())
1546 {
1547 if (!instance->GetData(DATA_SPINESTALKER))
1548 if (Creature* spinestalker = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SPINESTALKER)))
1549 spinestalker->AI()->DoAction(ACTION_START_FROSTWYRM);
1550
1551 if (!instance->GetData(DATA_RIMEFANG))
1552 if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG)))
1553 rimefang->AI()->DoAction(ACTION_START_FROSTWYRM);
1554
1555 if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && !instance->GetGuidData(DATA_SINDRAGOSA) && instance->GetBossState(DATA_SINDRAGOSA) != DONE)
1556 {
1557 if (player->GetMap()->IsHeroic() && !instance->GetData(DATA_HEROIC_ATTEMPTS))
1558 return true;
1559
1561 if (Creature* sindragosa = player->GetMap()->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos))
1562 sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
1563 }
1564 }
1565
1566 return true;
1567 }
1568};
1569
1571{
1572 public:
1573 achievement_all_you_can_eat() : AchievementCriteriaScript("achievement_all_you_can_eat") { }
1574
1575 bool OnCheck(Player* /*source*/, Unit* target) override
1576 {
1577 if (!target)
1578 return false;
1579 return target->GetAI()->GetData(DATA_MYSTIC_BUFFET_STACK) <= 5;
1580 }
1581};
1582
1584{
1585 // Creatures
1591
1592 // Spells
1607
1608 // AreaTriggers
1609 new at_sindragosa_lair();
1610
1611 // Achievements
1613}
#define M_PI
Definition Common.h:72
TC_GAME_API bool InstanceHasScript(WorldObject const *obj, char const *scriptName)
#define RAID_DIFFICULTY_MASK_25MAN
Definition DBCEnums.h:292
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint64_t uint64
Definition Define.h:132
uint32_t uint32
Definition Define.h:133
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
@ IN_PROGRESS
@ FAIL
@ DONE
@ IDLE_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
#define sObjectMgr
Definition ObjectMgr.h:1721
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:107
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
double rand_norm()
Definition Random.cpp:75
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition ScriptMgr.h:1130
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1127
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_TRIGGER_MISSILE
@ SPELL_EFFECT_FORCE_CAST
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ TARGET_UNIT_DEST_AREA_ENTRY
SpellSchoolMask
@ SPEC_DRUID_FERAL
@ SPEC_SHAMAN_ENHANCEMENT
@ CLASS_DRUID
@ CLASS_SHAMAN
@ CLASS_PRIEST
@ CLASS_WARLOCK
@ CLASS_MAGE
@ AURA_REMOVE_BY_EXPIRE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_IGNORE_SET_FACING
Will ignore interruptible aura's at cast.
@ SPELLVALUE_MAX_TARGETS
#define sSpellMgr
Definition SpellMgr.h:738
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellCastFn(F)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ REACT_DEFENSIVE
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ MOVE_FLIGHT
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
DamageEffectType
Definition Unit.h:352
SindragosaFrostwingData
@ DATA_LINKED_GAMEOBJECT
@ DATA_MYSTIC_BUFFET_STACK
@ DATA_WHELP_MARKER
@ DATA_FROSTWYRM_OWNER
@ DATA_IS_THIRD_PHASE
@ DATA_TRAPPED_PLAYER
Position const SindragosaFlyInPos
SindragosaTexts
@ SAY_DEATH
@ EMOTE_WARN_FROZEN_ORB
@ EMOTE_BERSERK_RAID
@ SAY_UNCHAINED_MAGIC
@ SAY_AGGRO
@ EMOTE_WARN_BLISTERING_COLD
@ SAY_PHASE_2
@ SAY_KILL
@ SAY_BLISTERING_COLD
@ SAY_AIR_PHASE
@ SAY_BERSERK
@ SAY_RESPITE_FOR_A_TORMENTED_SOUL
SindragosaPoints
@ POINT_FROSTWYRM_LAND
@ POINT_TAKEOFF
@ POINT_FROSTWYRM_FLY_IN
@ POINT_AIR_PHASE
@ POINT_LAND
@ POINT_LAND_GROUND
@ POINT_AIR_PHASE_FAR
void AddSC_boss_sindragosa()
Position const SpinestalkerFlyPos
SindragosaEvents
@ EVENT_ICY_BLAST_CAST
@ EVENT_AIR_MOVEMENT
@ EVENT_TAIL_SWEEP
@ EVENT_TAIL_SMASH
@ EVENT_AIR_PHASE
@ EVENT_AIR_MOVEMENT_FAR
@ EVENT_FROST_BREATH
@ EVENT_GROUP_LAND_PHASE
@ EVENT_LAND_GROUND
@ EVENT_FROST_BOMB
@ EVENT_BLISTERING_COLD
@ EVENT_UNCHAINED_MAGIC
@ EVENT_ICE_TOMB
@ EVENT_THIRD_PHASE_CHECK
@ EVENT_BLISTERING_COLD_YELL
@ EVENT_CLEAVE_SPINESTALKER
@ EVENT_CONCUSSIVE_SHOCK
@ EVENT_FROST_BREATH_RIMEFANG
@ EVENT_BERSERK
@ EVENT_BELLOWING_ROAR
@ EVENT_ICY_BLAST
@ EVENT_ICY_GRIP
@ EVENT_FROSTWARDEN_ORDER_WHELP
@ EVENT_CLEAVE
@ EVENT_LAND
Position const SpinestalkerLandPos
Position const SindragosaFlyPos
Position const RimefangLandPos
SindragosMisc
@ QUEST_FROST_INFUSION
Position const RimefangFlyPos
SindragosaSpells
@ SPELL_FROST_BREATH_P1
@ SPELL_TANK_MARKER
@ SPELL_FROST_BOMB_VISUAL
@ SPELL_CLEAVE
@ SPELL_PERMAEATING_CHILL
@ SPELL_FROST_BOMB_TRIGGER
@ SPELL_CLEAVE_SPINESTALKER
@ SPELL_FROST_BREATH
@ SPELL_UNCHAINED_MAGIC
@ SPELL_BACKLASH
@ SPELL_FROST_INFUSION
@ SPELL_BELLOWING_ROAR
@ SPELL_ICE_TOMB_DAMAGE
@ SPELL_FOCUS_FIRE
@ SPELL_ICE_TOMB_TARGET
@ SPELL_FROST_AURA_RIMEFANG
@ SPELL_ICE_TOMB_UNTARGETABLE
@ SPELL_ORDER_WHELP
@ SPELL_ASPHYXIATION
@ SPELL_FROST_AURA
@ SPELL_FROST_BEACON
@ SPELL_FROST_IMBUED_BLADE
@ SPELL_ICY_BLAST_AREA
@ SPELL_ICY_GRIP_JUMP
@ SPELL_FROST_INFUSION_CREDIT
@ SPELL_TAIL_SMASH
@ SPELL_ICY_BLAST
@ SPELL_FROST_BOMB
@ SPELL_ICE_TOMB_DUMMY
@ SPELL_FROST_BREATH_P2
@ SPELL_CONCUSSIVE_SHOCK
@ SPELL_MYSTIC_BUFFET
@ SPELL_TAIL_SWEEP
@ SPELL_SINDRAGOSA_S_FURY
@ SPELL_BLISTERING_COLD
@ SPELL_BIRTH_NO_VISUAL
@ SPELL_ICY_GRIP
Position const SindragosaAirPosFar
Position const SindragosaLandPos
Position const SindragosaSpawnPos
Position const SindragosaAirPos
uint32 GetTickNumber() const
int32 GetAmount() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
Unit * GetCaster() const
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
uint8 GetStackAmount() const
Definition SpellAuras.h:164
InstanceScript *const instance
void JustReachedHome() override
SummonList summons
EventMap events
void SummonedCreatureDespawn(Creature *summon) override
void Reset() override
@ EVADE_REASON_BOUNDARY
Definition CreatureAI.h:95
@ EVADE_REASON_SEQUENCE_BREAK
Definition CreatureAI.h:97
virtual void JustDied(Unit *)
Definition CreatureAI.h:130
void DoZoneInCombat(Creature *creature=nullptr)
virtual void JustAppeared()
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetCombatPulseDelay(uint32 delay)
Definition Creature.h:269
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:293
void SetImmuneToPC(bool apply) override
Definition Creature.h:129
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:295
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
ObjectGuid::LowType GetSpawnId() const
Definition Creature.h:83
Unit * SelectVictim()
CreatureAI * AI() const
Definition Creature.h:154
void SetDefaultMovementType(MovementGeneratorType mgt)
Definition Creature.h:112
void Update(uint32 time)
Definition EventMap.h:67
Milliseconds GetTimeUntilEvent(EventId eventId) const
Definition EventMap.cpp:179
EventId ExecuteEvent()
Definition EventMap.cpp:73
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:52
void CancelEvent(EventId eventId)
Definition EventMap.cpp:151
void CancelEventGroup(GroupIndex group)
Definition EventMap.cpp:165
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void Reset()
Definition EventMap.cpp:21
void AddEvent(BasicEvent *event, Milliseconds e_time, bool set_addtime=true)
Milliseconds CalculateTime(Milliseconds t_offset) const
bool operator()(WorldObject *target) const
FrostBeaconSelector(Unit *source)
bool Execute(uint64, uint32) override
FrostBombExplosion(Creature *owner, ObjectGuid sindragosaGUID)
bool Execute(uint64, uint32) override
FrostwyrmLandEvent(Creature &owner, Position const &dest)
Position const & _dest
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
void LoadGrid(float x, float y)
Definition Map.cpp:578
bool Is25ManRaid() const
Definition Map.cpp:4261
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1852
bool IsHeroic() const
Definition Map.cpp:4256
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveTakeoff(uint32 id, Position const &pos, Optional< float > velocity={})
void MoveLand(uint32 id, Position const &pos, Optional< float > velocity={})
bool operator()(WorldObject *unit) const
void Clear()
Definition ObjectGuid.h:150
static Unit * ToUnit(Object *o)
Definition Object.h:192
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
OrderWhelpTargetSelector(Creature *owner)
bool operator()(Creature *creature)
Difficulty GetRaidDifficulty() const
Definition Player.h:1636
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15642
bool operator()(WorldObject *object) const
uint32 Id
Definition SpellInfo.h:289
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > BeforeCast
HookList< EffectHandler > OnEffectLaunchTarget
WorldLocation const * GetExplTargetDest() const
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
void DoAction(int32 info, Predicate &&predicate, uint16 max=0)
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
virtual void SetData(uint32, uint32)
Definition UnitAI.h:156
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
virtual uint32 GetData(uint32) const
Definition UnitAI.h:155
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4439
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8668
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3638
ThreatManager & GetThreatManager()
Definition Unit.h:1155
uint8 GetClass() const
Definition Unit.h:895
void RemoveAllGameObjects()
Definition Unit.cpp:5172
void StopMoving(bool force=false)
Definition Unit.cpp:10312
void SendSpellDamageImmune(Unit *target, uint32 spellId)
Definition Unit.cpp:5309
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
Definition Unit.cpp:1109
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
Definition Unit.cpp:5185
TempSummon * ToTempSummon()
Definition Unit.h:1794
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
UnitAI * GetAI() const
Definition Unit.h:800
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13259
bool SetCanFly(bool enable, bool packetOnly=false)
Definition Unit.cpp:13374
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8678
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13250
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
bool AttackStop()
Definition Unit.cpp:5645
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
bool isDead() const
Definition Unit.h:1236
Map * GetMap() const
Definition Object.h:449
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
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:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:2015
void SetFarVisible(bool on)
Definition Object.cpp:1014
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
Definition Object.cpp:1226
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition Object.cpp:1405
EventProcessor m_Events
Definition Object.h:591
virtual void SetData64(uint32, uint64)
Definition ZoneScript.h:52
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:55
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:56
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *, Unit *target) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
PrepareAuraScript(spell_frostwarden_handler_focus_fire_aura)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_frostwarden_handler_focus_fire)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_frostwarden_handler_order_whelp)
void HandleForcedCast(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_rimefang_icy_blast)
void HandleTriggerMissile(SpellEffIndex effIndex)
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_sindragosa_frost_beacon)
PrepareSpellScript(spell_sindragosa_frost_breath)
PrepareSpellScript(spell_sindragosa_ice_tomb_target)
void FilterTargets(std::list< WorldObject * > &unitList)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_sindragosa_ice_tomb_trap)
void PeriodicTick(AuraEffect const *aurEff)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_sindragosa_icy_grip)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_sindragosa_instability)
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_sindragosa_mystic_buffet)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_sindragosa_s_fury)
void HandleDummy(SpellEffIndex effIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_sindragosa_unchained_magic)
@ SPELL_UNSATED_CRAVING
@ SPELL_SHADOWS_FATE
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ GO_ICE_BLOCK
#define ICCScriptName
@ ACTION_START_FROSTWYRM
@ ACTION_TRIGGER_ASPHYXIATION
@ DATA_HEROIC_ATTEMPTS
@ DATA_SINDRAGOSA_FROSTWYRMS
@ DATA_SINDRAGOSA
@ DATA_SINDRAGOSA_INTRO
@ DATA_SPINESTALKER
@ NPC_FROST_BOMB
@ NPC_SINDRAGOSA
@ NPC_ICE_TOMB
@ NPC_FROSTWARDEN_HANDLER
@ NPC_FROSTWING_WHELP
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void RandomShuffle(C &container)
Reorder the elements of the container randomly.
Definition Containers.h:166
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:108
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:66
TC_GAME_API uint8 GetPlayerSpecialization(Player const *who)
TC_GAME_API bool IsPlayerHealer(Player const *who)
@ DATA_RIMEFANG
@ NPC_ICY_BLAST
CastSpellExtraArgs & AddSpellBP0(int32 val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
ObjectGuid OriginalCaster
bool operator()(Unit const *target) const
Definition UnitAI.cpp:439
float m_positionZ
Definition Position.h:58
float GetExactDist(float x, float y, float z) const
Definition Position.h:121
float GetOrientation() const
Definition Position.h:82
float GetPositionX() const
Definition Position.h:79
void GetPosition(float &x, float &y) const
Definition Position.h:84
float GetPositionY() const
Definition Position.h:80
void Relocate(float x, float y)
Definition Position.h:66
void AttackStart(Unit *) override
void SetCombatMovement(bool allowMovement)
bool HealthAbovePct(uint32 pct) const
bool Is25ManRaid() const
void Reset() override
void JustSummoned(Creature *summon) override
void KilledUnit(Unit *victim) override
void EnterEvadeMode(EvadeReason why) override
uint32 GetData(uint32 type) const override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void JustEngagedWith(Unit *victim) override
void SummonedCreatureDespawn(Creature *summon) override
void JustReachedHome() override
void DamageTaken(Unit *, uint32 &, DamageEffectType, SpellInfo const *) override
void DoAction(int32 action) override
void MovementInform(uint32 type, uint32 point) override
boss_sindragosa(Creature *creature)
uint32 _existenceCheckTimer
npc_ice_tomb(Creature *creature)
void DoAction(int32 action) override
ObjectGuid _trappedPlayerGUID
void SetGUID(ObjectGuid const &guid, int32 id) override
void Reset() override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
InstanceScript * _instance
void MovementInform(uint32 type, uint32 point) override
void DoAction(int32 action) override
void InitializeAI() override
void Reset() override
void JustAppeared() override
void JustEngagedWith(Unit *) override
npc_rimefang_icc(Creature *creature)
void UpdateAI(uint32 diff) override
InstanceScript * _instance
void UpdateAI(uint32 diff) override
npc_sindragosa_trash(Creature *creature)
void SetData(uint32 type, uint32 data) override
void InitializeAI() override
void JustAppeared() override
uint32 GetData(uint32 type) const override
void JustAppeared() override
void InitializeAI() override
InstanceScript * _instance
void JustDied(Unit *) override
void DoAction(int32 action) override
void MovementInform(uint32 type, uint32 point) override
npc_spinestalker(Creature *creature)
void UpdateAI(uint32 diff) override
void Reset() override