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 "icecrown_citadel.h"
19#include "Containers.h"
20#include "DB2Stores.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 "SpellScript.h"
34#include "TemporarySummon.h"
35
37{
38 SAY_AGGRO = 0, // You are fools to have come to this place! The icy winds of Northrend will consume your souls!
39 SAY_UNCHAINED_MAGIC = 1, // Suffer, mortals, as your pathetic magic betrays you!
40 EMOTE_WARN_BLISTERING_COLD = 2, // %s prepares to unleash a wave of blistering cold!
41 SAY_BLISTERING_COLD = 3, // Can you feel the cold hand of death upon your heart?
42 SAY_RESPITE_FOR_A_TORMENTED_SOUL = 4, // Aaah! It burns! What sorcery is this?!
43 SAY_AIR_PHASE = 5, // Your incursion ends here! None shall survive!
44 SAY_PHASE_2 = 6, // Now feel my master's limitless power and despair!
45 EMOTE_WARN_FROZEN_ORB = 7, // %s fires a frozen orb towards $N!
46 SAY_KILL = 8, // Perish!
47 // A flaw of mortality...
48 SAY_BERSERK = 9, // Enough! I tire of these games!
49 SAY_DEATH = 10, // Free...at last...
51};
52
102
140
150
161
166
167Position const RimefangFlyPos = {4413.309f, 2456.421f, 233.3795f, 2.890186f};
168Position const RimefangLandPos = {4413.309f, 2456.421f, 203.3848f, 2.890186f};
169Position const SpinestalkerFlyPos = {4418.895f, 2514.233f, 230.4864f, 3.396045f};
170Position const SpinestalkerLandPos = {4418.895f, 2514.233f, 203.3848f, 3.396045f};
171Position const SindragosaSpawnPos = {4818.700f, 2483.710f, 287.0650f, 3.089233f};
172Position const SindragosaFlyPos = {4475.190f, 2484.570f, 234.8510f, 3.141593f};
173Position const SindragosaLandPos = {4419.190f, 2484.570f, 203.3848f, 3.141593f};
174Position const SindragosaAirPos = {4475.990f, 2484.430f, 247.9340f, 3.141593f};
175Position const SindragosaAirPosFar = {4525.600f, 2485.150f, 245.0820f, 3.141593f};
176Position const SindragosaFlyInPos = {4419.190f, 2484.360f, 232.5150f, 3.141593f};
177
179{
180 public:
181 FrostwyrmLandEvent(Creature& owner, Position const& dest) : _owner(owner), _dest(dest) { }
182
183 bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
184 {
186 return true;
187 }
188
189 private:
192};
193
195{
196 public:
197 FrostBombExplosion(Creature* owner, ObjectGuid sindragosaGUID) : _owner(owner), _sindragosaGUID(sindragosaGUID) { }
198
199 bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
200 {
201 _owner->CastSpell(nullptr, SPELL_FROST_BOMB, CastSpellExtraArgs().SetOriginalCaster(_sindragosaGUID));
203 return true;
204 }
205
206 private:
209};
210
212{
213 public:
214 FrostBeaconSelector(Unit* source) : NonTankTargetSelector(source, true) { }
215
216 bool operator()(WorldObject* target) const
217 {
218 if (Unit* unitTarget = target->ToUnit())
219 return !NonTankTargetSelector::operator()(unitTarget) ||
220 unitTarget->HasAura(SPELL_ICE_TOMB_UNTARGETABLE);
221
222 return false;
223 }
224};
225
226// 36853 - Sindragosa
227struct boss_sindragosa : public BossAI
228{
230 {
231 Initialize();
232 }
233
235 {
237 _isInAirPhase = false;
238 _isThirdPhase = false;
239 }
240
260
261 void JustDied(Unit* /* killer */) override
262 {
263 _JustDied();
265
268
269 }
270
288
289 void EnterEvadeMode(EvadeReason why) override
290 {
292 return;
294 }
295
304
305 void KilledUnit(Unit* victim) override
306 {
307 if (victim->GetTypeId() == TYPEID_PLAYER)
308 Talk(SAY_KILL);
309 }
310
311 void DoAction(int32 action) override
312 {
313 if (action == ACTION_START_FROSTWYRM)
314 {
315
317 if (TempSummon* summon = me->ToTempSummon())
318 summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
319
320 if (me->isDead())
321 return;
322
323 me->setActive(true);
324 me->SetFarVisible(true);
325 me->SetCanFly(true);
326 me->SetDisableGravity(true);
333 }
334 }
335
336 uint32 GetData(uint32 type) const override
337 {
338 switch (type)
339 {
341 return _mysticBuffetStack;
343 return _isThirdPhase;
344 default:
345 return 0xFFFFFFFF;
346 }
347 }
348
349 void MovementInform(uint32 type, uint32 point) override
350 {
351 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
352 return;
353
354 switch (point)
355 {
357 me->setActive(false);
358 me->SetFarVisible(false);
359 me->SetCanFly(false);
360 me->SetDisableGravity(false);
364
365 // Sindragosa enters combat as soon as she lands
367 break;
368 case POINT_TAKEOFF:
370 break;
371 case POINT_AIR_PHASE:
372 {
374 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 5, 2, 6));
375 me->CastSpell(nullptr, SPELL_ICE_TOMB_TARGET, args);
376 me->SetFacingTo(float(M_PI), true);
379 break;
380 }
382 me->SetFacingTo(float(M_PI), true);
384 break;
385 case POINT_LAND:
387 break;
389 {
390 me->SetCanFly(false);
391 me->SetDisableGravity(false);
393
394 _isInAirPhase = false;
395 // trigger Asphyxiation
398 break;
399 }
400 default:
401 break;
402 }
403 }
404
405 void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
406 {
407 if (!_isThirdPhase && !HealthAbovePct(35))
408 {
411 _isThirdPhase = true;
412 }
413 }
414
415 void JustSummoned(Creature* summon) override
416 {
417 summons.Summon(summon);
418 if (summon->GetEntry() == NPC_FROST_BOMB)
419 {
420 summon->CastSpell(summon, SPELL_FROST_BOMB_VISUAL, true);
421 summon->CastSpell(summon, SPELL_BIRTH_NO_VISUAL, true);
422 summon->m_Events.AddEvent(new FrostBombExplosion(summon, me->GetGUID()), summon->m_Events.CalculateTime(5500ms));
423 }
424 }
425
426 void SummonedCreatureDespawn(Creature* summon) override
427 {
429 if (summon->GetEntry() == NPC_ICE_TOMB)
430 summon->AI()->JustDied(summon);
431 }
432
433 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
434 {
435 Unit* unitTarget = target->ToUnit();
436 if (!unitTarget)
437 return;
438
439 if (70127 == spellInfo->Id)
440 if (Aura const* mysticBuffet = unitTarget->GetAura(spellInfo->Id))
441 _mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
442 }
443
444 void UpdateAI(uint32 diff) override
445 {
446 if (!UpdateVictim())
447 return;
448
449 events.Update(diff);
450
452 return;
453
454 while (uint32 eventId = events.ExecuteEvent())
455 {
456 switch (eventId)
457 {
458 case EVENT_BERSERK:
462 break;
463 case EVENT_CLEAVE:
466 break;
467 case EVENT_TAIL_SMASH:
470 break;
476 break;
481 break;
482 case EVENT_ICY_GRIP:
487 if (_isThirdPhase)
489 break;
494 break;
497 break;
498 case EVENT_AIR_PHASE:
499 {
500 _isInAirPhase = true;
502 me->SetCanFly(true);
503 me->SetDisableGravity(true);
505 me->AttackStop();
506 Position pos;
507 pos.Relocate(me);
508 pos.m_positionZ += 17.0f;
512 break;
513 }
516 break;
519 break;
520 case EVENT_ICE_TOMB:
521 {
524 me->CastSpell(nullptr, SPELL_ICE_TOMB_TARGET, args);
526 break;
527 }
528 case EVENT_FROST_BOMB:
529 {
530 float destX, destY, destZ;
531 destX = rand_norm() * 75.0f + 4350.0f;
532 destY = rand_norm() * 75.0f + 2450.0f;
533 destZ = 205.0f; // random number close to ground, get exact in next call
534 me->UpdateGroundPositionZ(destX, destY, destZ);
535 me->CastSpell(Position{ destX, destY, destZ }, SPELL_FROST_BOMB_TRIGGER, false);
537 break;
538 }
539 case EVENT_LAND:
540 {
543 break;
544 }
552 break;
554 {
555 if (!_isInAirPhase)
556 {
561 }
562 else
564 break;
565 }
566 default:
567 break;
568 }
569
571 return;
572 }
573 }
574
575private:
579};
580
581// 36980 - Ice Tomb
583{
584 npc_ice_tomb(Creature* creature) : ScriptedAI(creature)
585 {
587 SetCombatMovement(false);
588 }
589
590 void Reset() override
591 {
593 }
594
595 void SetGUID(ObjectGuid const& guid, int32 id) override
596 {
597 if (id == DATA_TRAPPED_PLAYER)
598 {
599 _trappedPlayerGUID = guid;
601 }
602 }
603
604 void DoAction(int32 action) override
605 {
606 if (action == ACTION_TRIGGER_ASPHYXIATION)
608 player->CastSpell(player, SPELL_ASPHYXIATION, true);
609 }
610
611 void JustDied(Unit* /*killer*/) override
612 {
614
616 {
618 player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE);
619 player->RemoveAurasDueToSpell(SPELL_ASPHYXIATION);
620 player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_UNTARGETABLE);
621 }
622 }
623
624 void UpdateAI(uint32 diff) override
625 {
627 return;
628
629 if (_existenceCheckTimer <= diff)
630 {
632 if (!player || player->isDead() || !player->HasAura(SPELL_ICE_TOMB_DAMAGE))
633 {
634 // Remove object
635 JustDied(me);
637 return;
638 }
640 }
641 else
642 _existenceCheckTimer -= diff;
643 }
644
645private:
648};
649
650// 37534 - Spinestalker
652{
653 npc_spinestalker(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false) { }
654
655 void InitializeAI() override
656 {
657 // Increase add count
658 if (!me->isDead())
659 {
660 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
661 Reset();
662 }
663 }
664
665 void Reset() override
666 {
667 _events.Reset();
671
672 if (!_summoned)
673 {
674 me->SetCanFly(true);
675 me->SetDisableGravity(true);
676 }
677 }
678
679 void JustAppeared() override
680 {
682 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
683 }
684
685 void JustDied(Unit* /*killer*/) override
686 {
687 _events.Reset();
688 }
689
690 void DoAction(int32 action) override
691 {
692 if (action == ACTION_START_FROSTWYRM)
693 {
694 if (_summoned)
695 return;
696
697 _summoned = true;
698 if (me->isDead())
699 return;
700
701 me->setActive(true);
702 me->SetFarVisible(true);
709 me->StopMoving();
712 }
713 }
714
715 void MovementInform(uint32 type, uint32 point) override
716 {
717 if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
718 return;
719
720 me->setActive(false);
721 me->SetFarVisible(false);
722 me->SetCanFly(false);
723 me->SetDisableGravity(false);
728 }
729
730 void UpdateAI(uint32 diff) override
731 {
732 if (!UpdateVictim())
733 return;
734
735 _events.Update(diff);
736
738 return;
739
740 while (uint32 eventId = _events.ExecuteEvent())
741 {
742 switch (eventId)
743 {
747 break;
751 break;
752 case EVENT_TAIL_SWEEP:
755 break;
756 default:
757 break;
758 }
759 }
760 }
761
762private:
766};
767
768// 37533 - Rimefang
770{
771 npc_rimefang_icc(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false)
772 {
773 Initialize();
774 }
775
777 {
779 }
780
781 void InitializeAI() override
782 {
783 // Increase add count
784 if (!me->isDead())
785 {
786 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
787 Reset();
788 }
789 }
790
791 void Reset() override
792 {
793 _events.Reset();
796 Initialize();
797
798 if (!_summoned)
799 {
800 me->SetCanFly(true);
801 me->SetDisableGravity(true);
802 }
803 }
804
805 void JustAppeared() override
806 {
808 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
809 }
810
811 void JustDied(Unit* /*killer*/) override
812 {
813 _events.Reset();
814 }
815
816 void DoAction(int32 action) override
817 {
818 if (action == ACTION_START_FROSTWYRM)
819 {
820 if (_summoned)
821 return;
822
823 _summoned = true;
824 if (me->isDead())
825 return;
826
827 me->setActive(true);
828 me->SetFarVisible(true);
830 me->SetImmuneToPC(true);
835 me->StopMoving();
838 }
839 }
840
841 void MovementInform(uint32 type, uint32 point) override
842 {
843 if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
844 return;
845
846 me->setActive(false);
847 me->SetFarVisible(false);
848 me->SetCanFly(false);
849 me->SetDisableGravity(false);
852 me->SetImmuneToPC(false);
854 }
855
856 void JustEngagedWith(Unit* /*victim*/) override
857 {
859 }
860
861 void UpdateAI(uint32 diff) override
862 {
863 if (!UpdateVictim())
864 return;
865
866 _events.Update(diff);
867
869 return;
870
871 while (uint32 eventId = _events.ExecuteEvent())
872 {
873 switch (eventId)
874 {
878 break;
879 case EVENT_ICY_BLAST:
880 {
881 _icyBlastCounter = RAID_MODE<uint8>(5, 7, 6, 8);
883 me->AttackStop();
884 me->SetCanFly(true);
887 _events.ScheduleEvent(EVENT_ICY_BLAST, moveTime + 60s, moveTime + 70s);
888 _events.ScheduleEvent(EVENT_ICY_BLAST_CAST, moveTime + 250ms);
889 break;
890 }
892 if (--_icyBlastCounter)
893 {
894 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
895 {
896 me->SetFacingToObject(target);
897 DoCast(target, SPELL_ICY_BLAST);
898 }
900 }
901 else if (Unit* victim = me->SelectVictim())
902 {
904 AttackStart(victim);
905 me->SetCanFly(false);
906 }
907 break;
908 default:
909 break;
910 }
911 }
912 }
913
914private:
919};
920
921// 37531 - Frostwarden Handler
922// 37532 - Frostwing Whelp
924{
926 {
927 Initialize();
928 _instance = creature->GetInstanceScript();
929 _frostwyrmId = 0;
930 }
931
933 {
934 _isTaunted = false;
935 }
936
937 void InitializeAI() override
938 {
939 _frostwyrmId = (me->GetHomePosition().GetPositionY() < 2484.35f) ? DATA_RIMEFANG : DATA_SPINESTALKER;
940 // Increase add count
941 if (!me->isDead())
942 {
944 _instance->SetData64(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
945 Reset();
946 }
947 }
948
949 void Reset() override
950 {
951 // This is shared AI for handler and whelps
953 {
956 }
957
958 Initialize();
959 }
960
961 void JustAppeared() override
962 {
964
965 // Increase add count
967 _instance->SetData64(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
968 }
969
970 void SetData(uint32 type, uint32 data) override
971 {
972 if (type == DATA_WHELP_MARKER)
973 _isTaunted = data != 0;
974 }
975
976 uint32 GetData(uint32 type) const override
977 {
978 if (type == DATA_FROSTWYRM_OWNER)
979 return _frostwyrmId;
980 else if (type == DATA_WHELP_MARKER)
981 return uint32(_isTaunted);
982 return 0;
983 }
984
985 void UpdateAI(uint32 diff) override
986 {
987 if (!UpdateVictim())
988 return;
989
990 _events.Update(diff);
991
993 return;
994
995 while (uint32 eventId = _events.ExecuteEvent())
996 {
997 switch (eventId)
998 {
1002 break;
1006 break;
1007 default:
1008 break;
1009 }
1010 }
1011 }
1012
1013private:
1017 bool _isTaunted; // Frostwing Whelp only
1018};
1019
1020// 70598 - Sindragosa's Fury
1022{
1023 bool Load() override
1024 {
1025 // This script should execute only in Icecrown Citadel
1027 }
1028
1030 {
1031 if (WorldLocation const* dest = GetExplTargetDest())
1032 {
1033 float destX = rand_norm() * 75.0f + 4350.0f;
1034 float destY = rand_norm() * 75.0f + 2450.0f;
1035 float destZ = 205.0f; // random number close to ground, get exact in next call
1036 GetCaster()->UpdateGroundPositionZ(destX, destY, destZ);
1037 SetExplTargetDest(WorldLocation(dest->GetMapId(), destX, destY, destZ));
1038 }
1039 }
1040
1041 void FilterTargets(std::list<WorldObject*>& targets)
1042 {
1043 targets.remove_if([](WorldObject* obj) -> bool
1044 {
1045 // remove GMs
1046 if (Player* player = obj->ToPlayer())
1047 return player->IsGameMaster();
1048
1049 // remove non-players too
1050 return true;
1051 });
1052
1053 _targetCount = targets.size();
1054 }
1055
1057 {
1058 PreventHitDefaultEffect(effIndex);
1059
1060 if (!GetHitUnit()->IsAlive() || !_targetCount)
1061 return;
1062
1063 if (GetHitUnit()->IsImmunedToDamage(GetCaster(), GetSpellInfo(), &GetEffectInfo()))
1064 {
1066 return;
1067 }
1068
1069 float resistance = float(GetHitUnit()->GetResistance(SpellSchoolMask(GetSpellInfo()->SchoolMask)));
1070 uint32 minResistFactor = uint32((resistance / (resistance + 510.0f)) * 10.0f) * 2;
1071 uint32 randomResist = urand(0, (9 - minResistFactor) * 100) / 100 + minResistFactor;
1072
1073 uint32 damage = (uint32(GetEffectValueAsInt() / _targetCount) * randomResist) / 10;
1074
1075 SpellNonMeleeDamage damageInfo(GetCaster(), GetHitUnit(), GetSpellInfo(), GetSpell()->m_SpellVisual, GetSpellInfo()->SchoolMask);
1076 damageInfo.damage = damage;
1077 GetCaster()->DealSpellDamage(&damageInfo, false);
1078 GetCaster()->SendSpellNonMeleeDamageLog(&damageInfo);
1079 }
1080
1087
1089};
1090
1091// 69762 - Unchained Magic
1093{
1094 void FilterTargets(std::list<WorldObject*>& targets)
1095 {
1096 std::vector<WorldObject*> healers;
1097 std::vector<WorldObject*> casters;
1098 for (WorldObject* target : targets)
1099 {
1100 Player* player = target->ToPlayer();
1101 if (!player)
1102 continue;
1103
1104 ChrSpecializationEntry const* specialization = player->GetPrimarySpecializationEntry();
1105 if (!specialization)
1106 continue;
1107
1108 if (specialization->GetRole() == ChrSpecializationRole::Healer)
1109 {
1110 healers.push_back(target);
1111 continue;
1112 }
1113
1114 if (specialization->GetFlags().HasFlag(ChrSpecializationFlag::Caster))
1115 casters.push_back(target);
1116 }
1117
1118 targets.clear();
1119
1120 bool const is25ManRaid = GetCaster()->GetMap()->Is25ManRaid();
1121 if (!healers.empty())
1122 {
1123 Trinity::Containers::RandomResize(healers, size_t(is25ManRaid ? 3 : 1));
1124 while (!healers.empty())
1125 {
1126 targets.push_back(healers.back());
1127 healers.pop_back();
1128 }
1129 }
1130 if (!casters.empty())
1131 {
1133 size_t const maxSize = is25ManRaid ? 6 : 2;
1134 while (!casters.empty() && targets.size() < maxSize)
1135 {
1136 targets.push_back(casters.back());
1137 casters.pop_back();
1138 }
1139 }
1140 }
1141
1146};
1147
1148// 69649, 71056, 71057, 71058 - Frost Breath
1149// 73061, 73062, 73063, 73064 - Frost Breath
1151{
1153 {
1154 Player* target = GetHitPlayer();
1155 if (!target)
1156 return;
1157
1158 // Check difficulty and quest status
1160 return;
1161
1162 // Check if player has Shadow's Edge equipped and not ready for infusion
1164 return;
1165
1166 Aura* infusion = target->GetAura(SPELL_FROST_INFUSION, target->GetGUID());
1167 if (infusion && infusion->GetStackAmount() >= 3)
1168 {
1169 target->RemoveAura(infusion);
1171 }
1172 else
1174 }
1175
1180};
1181
1182// 69766 - Instability
1184{
1185 bool Validate(SpellInfo const* /*spell*/) override
1186 {
1188 }
1189
1190 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
1191 {
1192 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
1193 {
1194 CastSpellExtraArgs args(aurEff);
1196 args.AddSpellBP0(aurEff->GetAmount());
1198 }
1199 }
1200
1205};
1206
1207// 70126 - Frost Beacon
1209{
1210 bool Validate(SpellInfo const* /*spell*/) override
1211 {
1213 }
1214
1215 void PeriodicTick(AuraEffect const* /*aurEff*/)
1216 {
1218 if (Unit* caster = GetCaster())
1219 caster->CastSpell(GetTarget(), SPELL_ICE_TOMB_DAMAGE, true);
1220 }
1221
1226};
1227
1228// 70157 - Ice Tomb (Trap)
1230{
1231 bool Validate(SpellInfo const* /*spell*/) override
1232 {
1233 if (!sObjectMgr->GetCreatureTemplate(NPC_ICE_TOMB))
1234 return false;
1235 if (!sObjectMgr->GetGameObjectTemplate(GO_ICE_BLOCK))
1236 return false;
1237 return true;
1238 }
1239
1240 void PeriodicTick(AuraEffect const* aurEff)
1241 {
1243
1244 if (aurEff->GetTickNumber() == 1)
1245 {
1246 if (Unit* caster = GetCaster())
1247 {
1248 Position pos = GetTarget()->GetPosition();
1249
1250 if (TempSummon* summon = caster->SummonCreature(NPC_ICE_TOMB, pos))
1251 {
1252 summon->AI()->SetGUID(GetTarget()->GetGUID(), DATA_TRAPPED_PLAYER);
1255 {
1256 go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
1257 summon->AddGameObject(go);
1258 }
1259 }
1260 }
1261 }
1262 }
1263
1268
1274};
1275
1277{
1278public:
1279 explicit SindragosaIcyGripTargetFilter(Unit* caster) : _caster(caster) { }
1280
1281 bool operator()(WorldObject* object) const
1282 {
1283 if (!object->ToUnit())
1284 return true;
1285 // No frost beaconed players
1286 if (object->ToUnit()->HasAura(SPELL_FROST_BEACON))
1287 return true;
1288 // Not current Victim
1289 if (object->ToUnit() == _caster->GetVictim())
1290 return true;
1291
1292 return false;
1293 }
1294
1295private:
1297};
1298
1299// 70117 - Icy Grip
1301{
1302 bool Validate(SpellInfo const* /*spell*/) override
1303 {
1305 }
1306
1307 void FilterTargets(std::list<WorldObject*>& targets)
1308 {
1309 targets.remove_if(SindragosaIcyGripTargetFilter(GetCaster()));
1310 }
1311
1313 {
1314 PreventHitDefaultEffect(effIndex);
1316 }
1317
1323};
1324
1326{
1327 public:
1328 explicit MysticBuffetTargetFilter(Unit* caster) : _caster(caster) { }
1329
1330 bool operator()(WorldObject* unit) const
1331 {
1332 return !unit->IsWithinLOSInMap(_caster);
1333 }
1334
1335 private:
1337};
1338
1339// 70127, 72528, 72529, 72530 - Mystic Buffet
1341{
1342 void FilterTargets(std::list<WorldObject*>& targets)
1343 {
1344 targets.remove_if(MysticBuffetTargetFilter(GetCaster()));
1345 }
1346
1351};
1352
1353// 71376 - Icy Blast
1355{
1356 bool Validate(SpellInfo const* /*spell*/) override
1357 {
1359 }
1360
1362 {
1363 PreventHitDefaultEffect(effIndex);
1364 if (Position const* pos = GetExplTargetDest())
1365 if (TempSummon* summon = GetCaster()->SummonCreature(NPC_ICY_BLAST, *pos, TEMPSUMMON_TIMED_DESPAWN, 40s))
1366 summon->CastSpell(summon, SPELL_ICY_BLAST_AREA, true);
1367 }
1368
1373};
1374
1376{
1377 public:
1378 explicit OrderWhelpTargetSelector(Creature* owner) : _owner(owner) { }
1379
1380 bool operator()(Creature* creature)
1381 {
1382 if (!creature->AI()->GetData(DATA_WHELP_MARKER) && creature->AI()->GetData(DATA_FROSTWYRM_OWNER) == _owner->AI()->GetData(DATA_FROSTWYRM_OWNER))
1383 return false;
1384 return true;
1385 }
1386
1387 private:
1389};
1390
1391// 71357 - Order Whelp
1393{
1394 bool Validate(SpellInfo const* /*spell*/) override
1395 {
1397 }
1398
1399 void FilterTargets(std::list<WorldObject*>& targets)
1400 {
1401 targets.remove_if(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false));
1402 if (targets.empty())
1403 return;
1404
1406 targets.clear();
1407 targets.push_back(target);
1408 }
1409
1411 {
1412 // caster is Frostwarden Handler, target is player, caster of triggered is whelp
1413 PreventHitDefaultEffect(effIndex);
1414 std::list<Creature*> unitList;
1416 if (Creature* creature = GetCaster()->ToCreature())
1417 unitList.remove_if(OrderWhelpTargetSelector(creature));
1418
1419 if (unitList.empty())
1420 return;
1421
1423 }
1424
1430};
1431
1432// 71350 - Focus Fire
1447
1449{
1450 bool Validate(SpellInfo const* spellInfo) override
1451 {
1452 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
1453 }
1454
1455 void PeriodicTick(AuraEffect const* /*aurEff*/)
1456 {
1458 if (Unit* caster = GetCaster())
1459 {
1460 caster->GetThreatManager().AddThreat(GetTarget(), -float(GetEffectInfo(EFFECT_1).CalcValue()), GetSpellInfo(), true, true);
1461 caster->GetAI()->SetData(DATA_WHELP_MARKER, 0);
1462 }
1463 }
1464
1469};
1470
1471// 69712 - Ice Tomb (Target)
1473{
1474 void FilterTargets(std::list<WorldObject*>& unitList)
1475 {
1476 Unit* caster = GetCaster();
1477 unitList.remove_if(FrostBeaconSelector(caster));
1478 }
1479
1481 {
1482 if (Creature* creatureCaster = GetCaster()->ToCreature())
1483 if (creatureCaster->GetAI()->GetData(DATA_IS_THIRD_PHASE))
1484 creatureCaster->AI()->Talk(EMOTE_WARN_FROZEN_ORB, GetHitUnit());
1485 }
1486
1492};
1493
1495{
1496 public:
1497 at_sindragosa_lair() : AreaTriggerScript("at_sindragosa_lair") { }
1498
1499 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1500 {
1501 if (InstanceScript* instance = player->GetInstanceScript())
1502 {
1503 if (!instance->GetData(DATA_SPINESTALKER))
1504 if (Creature* spinestalker = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SPINESTALKER)))
1505 spinestalker->AI()->DoAction(ACTION_START_FROSTWYRM);
1506
1507 if (!instance->GetData(DATA_RIMEFANG))
1508 if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG)))
1509 rimefang->AI()->DoAction(ACTION_START_FROSTWYRM);
1510
1511 if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && !instance->GetGuidData(DATA_SINDRAGOSA) && instance->GetBossState(DATA_SINDRAGOSA) != DONE)
1512 {
1514 if (Creature* sindragosa = player->GetMap()->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos))
1515 sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
1516 }
1517 }
1518
1519 return true;
1520 }
1521};
1522
1524{
1525 public:
1526 achievement_all_you_can_eat() : AchievementCriteriaScript("achievement_all_you_can_eat") { }
1527
1528 bool OnCheck(Player* /*source*/, Unit* target) override
1529 {
1530 if (!target)
1531 return false;
1532 return target->GetAI()->GetData(DATA_MYSTIC_BUFFET_STACK) <= 5;
1533 }
1534};
1535
1537{
1538 // Creatures
1544
1545 // Spells
1560
1561 // AreaTriggers
1562 new at_sindragosa_lair();
1563
1564 // Achievements
1566}
#define M_PI
Definition Common.h:118
TC_GAME_API bool InstanceHasScript(WorldObject const *obj, char const *scriptName)
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
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:44
#define sObjectMgr
Definition ObjectMgr.h:1873
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:146
float rand_norm()
Definition Random.cpp:76
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:43
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition ScriptMgr.h:1381
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1382
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
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_EXPIRE
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELLVALUE_MAX_TARGETS
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
@ TRIGGERED_IGNORE_SET_FACING
Will not adjust facing to target (if any)
#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)
EvadeReason
@ MOVE_FLIGHT
@ REACT_DEFENSIVE
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
DamageEffectType
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_CASTING
Definition Unit.h:290
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
SpellEffectValue 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:238
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
void JustReachedHome() override
SummonList summons
EventMap events
void SummonedCreatureDespawn(Creature *summon) override
void Reset() override
void DoZoneInCombat()
Definition CreatureAI.h:169
virtual void JustDied(Unit *)
Definition CreatureAI.h:107
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
virtual void JustAppeared()
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:394
void SetImmuneToPC(bool apply) override
Definition Creature.h:190
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:396
void SetReactState(ReactStates st)
Definition Creature.h:180
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
ObjectGuid::LowType GetSpawnId() const
Definition Creature.h:110
Unit * SelectVictim()
CreatureAI * AI() const
Definition Creature.h:235
void SetDefaultMovementType(MovementGeneratorType mgt)
Definition Creature.h:170
void Update(uint32 time)
Definition EventMap.h:77
Milliseconds GetTimeUntilEvent(EventId eventId) const
Definition EventMap.cpp:200
EventId ExecuteEvent()
Definition EventMap.cpp:77
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:56
void CancelEvent(EventId eventId)
Definition EventMap.cpp:156
void CancelEventGroup(GroupIndex group)
Definition EventMap.cpp:178
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
void Reset()
Definition EventMap.cpp:25
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:370
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
Definition Object.cpp:1191
bool Is25ManRaid() const
Definition Map.cpp:3385
void MoveTakeoff(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveLand(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
bool operator()(WorldObject *unit) const
void Clear()
Definition ObjectGuid.h:329
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
Unit * ToUnit()
Definition Object.h:116
OrderWhelpTargetSelector(Creature *owner)
bool operator()(Creature *creature)
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15929
ChrSpecializationEntry const * GetPrimarySpecializationEntry() const
Definition Player.cpp:30736
bool operator()(WorldObject *object) const
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
SpellEffectValue GetEffectValue() const
int32 GetEffectValueAsInt() const
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
void SetExplTargetDest(WorldLocation const &loc)
HookList< CastHandler > BeforeCast
Spell * GetSpell() const
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 id, uint32 value)
Definition UnitAI.h:75
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:71
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
virtual uint32 GetData(uint32 id) const
Definition UnitAI.h:74
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8951
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3846
ThreatManager & GetThreatManager()
Definition Unit.h:1093
void RemoveAllGameObjects()
Definition Unit.cpp:5463
void StopMoving(bool force=false)
Definition Unit.cpp:10753
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
Definition Unit.cpp:1308
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
Definition Unit.cpp:5559
TempSummon * ToTempSummon()
Definition Unit.h:1844
UnitAI * GetAI() const
Definition Unit.h:680
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13394
void SendSpellDamageImmune(Unit *target, uint32 spellId, bool isPeriodic)
Definition Unit.cpp:5658
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4718
bool SetCanFly(bool enable)
Definition Unit.cpp:13538
Unit * GetVictim() const
Definition Unit.h:738
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8961
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13385
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:861
bool SetDisableGravity(bool disable, bool updateAnimTier=true, bool updatePlayHoverAnim=true)
Definition Unit.cpp:13440
bool AttackStop()
Definition Unit.cpp:5984
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:862
bool isDead() const
Definition Unit.h:1207
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:394
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
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:1403
void setActive(bool isActiveObject)
Definition Object.cpp:274
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:1446
void SetFarVisible(bool on)
Definition Object.cpp:325
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
Definition Object.cpp:533
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition Object.cpp:698
EventProcessor m_Events
Definition Object.h:561
virtual void SetData64(uint32, uint64)
Definition ZoneScript.h:96
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:99
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
bool OnCheck(Player *, Unit *target) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex effIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleForcedCast(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void HandleTriggerMissile(SpellEffIndex effIndex)
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &unitList)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void PeriodicTick(AuraEffect const *aurEff)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleDummy(SpellEffIndex effIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void FilterTargets(std::list< WorldObject * > &targets)
@ 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_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(Iterator begin, Iterator end)
Reorder the elements of the iterator range randomly.
Definition Containers.h:171
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
Definition Containers.h:110
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:67
@ DATA_RIMEFANG
@ NPC_ICY_BLAST
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
EnumFlag< ChrSpecializationFlag > GetFlags() const
ChrSpecializationRole GetRole() const
bool operator()(Unit const *target) const
constexpr float GetPositionX() const
Definition Position.h:87
float m_positionZ
Definition Position.h:66
constexpr float GetPositionY() const
Definition Position.h:88
float GetExactDist(float x, float y, float z) const
Definition Position.h:129
constexpr void GetPosition(float &x, float &y) const
Definition Position.h:92
constexpr void Relocate(float x, float y)
Definition Position.h:74
constexpr float GetOrientation() const
Definition Position.h:90
static QuaternionData fromOrientation(float orientation)
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
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