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
226struct boss_sindragosa : public BossAI
227{
229 {
230 Initialize();
231 }
232
234 {
236 _isInAirPhase = false;
237 _isThirdPhase = false;
238 }
239
259
260 void JustDied(Unit* /* killer */) override
261 {
262 _JustDied();
264
267
268 }
269
287
288 void EnterEvadeMode(EvadeReason why) override
289 {
291 return;
293 }
294
303
304 void KilledUnit(Unit* victim) override
305 {
306 if (victim->GetTypeId() == TYPEID_PLAYER)
307 Talk(SAY_KILL);
308 }
309
310 void DoAction(int32 action) override
311 {
312 if (action == ACTION_START_FROSTWYRM)
313 {
314
316 if (TempSummon* summon = me->ToTempSummon())
317 summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
318
319 if (me->isDead())
320 return;
321
322 me->setActive(true);
323 me->SetFarVisible(true);
324 me->SetCanFly(true);
325 me->SetDisableGravity(true);
332 }
333 }
334
335 uint32 GetData(uint32 type) const override
336 {
337 switch (type)
338 {
340 return _mysticBuffetStack;
342 return _isThirdPhase;
343 default:
344 return 0xFFFFFFFF;
345 }
346 }
347
348 void MovementInform(uint32 type, uint32 point) override
349 {
350 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
351 return;
352
353 switch (point)
354 {
356 me->setActive(false);
357 me->SetFarVisible(false);
358 me->SetCanFly(false);
359 me->SetDisableGravity(false);
363
364 // Sindragosa enters combat as soon as she lands
366 break;
367 case POINT_TAKEOFF:
369 break;
370 case POINT_AIR_PHASE:
371 {
373 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 5, 2, 6));
374 me->CastSpell(nullptr, SPELL_ICE_TOMB_TARGET, args);
375 me->SetFacingTo(float(M_PI), true);
378 break;
379 }
381 me->SetFacingTo(float(M_PI), true);
383 break;
384 case POINT_LAND:
386 break;
388 {
389 me->SetCanFly(false);
390 me->SetDisableGravity(false);
392
393 _isInAirPhase = false;
394 // trigger Asphyxiation
397 break;
398 }
399 default:
400 break;
401 }
402 }
403
404 void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
405 {
406 if (!_isThirdPhase && !HealthAbovePct(35))
407 {
410 _isThirdPhase = true;
411 }
412 }
413
414 void JustSummoned(Creature* summon) override
415 {
416 summons.Summon(summon);
417 if (summon->GetEntry() == NPC_FROST_BOMB)
418 {
419 summon->CastSpell(summon, SPELL_FROST_BOMB_VISUAL, true);
420 summon->CastSpell(summon, SPELL_BIRTH_NO_VISUAL, true);
421 summon->m_Events.AddEvent(new FrostBombExplosion(summon, me->GetGUID()), summon->m_Events.CalculateTime(5500ms));
422 }
423 }
424
425 void SummonedCreatureDespawn(Creature* summon) override
426 {
428 if (summon->GetEntry() == NPC_ICE_TOMB)
429 summon->AI()->JustDied(summon);
430 }
431
432 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
433 {
434 Unit* unitTarget = target->ToUnit();
435 if (!unitTarget)
436 return;
437
438 if (70127 == spellInfo->Id)
439 if (Aura const* mysticBuffet = unitTarget->GetAura(spellInfo->Id))
440 _mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
441 }
442
443 void UpdateAI(uint32 diff) override
444 {
445 if (!UpdateVictim())
446 return;
447
448 events.Update(diff);
449
451 return;
452
453 while (uint32 eventId = events.ExecuteEvent())
454 {
455 switch (eventId)
456 {
457 case EVENT_BERSERK:
461 break;
462 case EVENT_CLEAVE:
465 break;
466 case EVENT_TAIL_SMASH:
469 break;
473 break;
478 break;
479 case EVENT_ICY_GRIP:
482 break;
487 break;
490 break;
491 case EVENT_AIR_PHASE:
492 {
493 _isInAirPhase = true;
495 me->SetCanFly(true);
496 me->SetDisableGravity(true);
498 me->AttackStop();
499 Position pos;
500 pos.Relocate(me);
501 pos.m_positionZ += 17.0f;
505 break;
506 }
509 break;
512 break;
513 case EVENT_ICE_TOMB:
514 {
517 me->CastSpell(nullptr, SPELL_ICE_TOMB_TARGET, args);
519 break;
520 }
521 case EVENT_FROST_BOMB:
522 {
523 float destX, destY, destZ;
524 destX = rand_norm() * 75.0f + 4350.0f;
525 destY = rand_norm() * 75.0f + 2450.0f;
526 destZ = 205.0f; // random number close to ground, get exact in next call
527 me->UpdateGroundPositionZ(destX, destY, destZ);
528 me->CastSpell(Position{ destX, destY, destZ }, SPELL_FROST_BOMB_TRIGGER, false);
530 break;
531 }
532 case EVENT_LAND:
533 {
536 break;
537 }
545 break;
547 {
548 if (!_isInAirPhase)
549 {
554 }
555 else
557 break;
558 }
559 default:
560 break;
561 }
562
564 return;
565 }
566 }
567
568private:
572};
573
575{
576 npc_ice_tomb(Creature* creature) : ScriptedAI(creature)
577 {
579 SetCombatMovement(false);
580 }
581
582 void Reset() override
583 {
585 }
586
587 void SetGUID(ObjectGuid const& guid, int32 id) override
588 {
589 if (id == DATA_TRAPPED_PLAYER)
590 {
591 _trappedPlayerGUID = guid;
593 }
594 }
595
596 void DoAction(int32 action) override
597 {
598 if (action == ACTION_TRIGGER_ASPHYXIATION)
600 player->CastSpell(player, SPELL_ASPHYXIATION, true);
601 }
602
603 void JustDied(Unit* /*killer*/) override
604 {
606
608 {
610 player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE);
611 player->RemoveAurasDueToSpell(SPELL_ASPHYXIATION);
612 player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_UNTARGETABLE);
613 }
614 }
615
616 void UpdateAI(uint32 diff) override
617 {
619 return;
620
621 if (_existenceCheckTimer <= diff)
622 {
624 if (!player || player->isDead() || !player->HasAura(SPELL_ICE_TOMB_DAMAGE))
625 {
626 // Remove object
627 JustDied(me);
629 return;
630 }
632 }
633 else
634 _existenceCheckTimer -= diff;
635 }
636
637private:
640};
641
643{
644 npc_spinestalker(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false) { }
645
646 void InitializeAI() override
647 {
648 // Increase add count
649 if (!me->isDead())
650 {
651 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
652 Reset();
653 }
654 }
655
656 void Reset() override
657 {
658 _events.Reset();
662
663 if (!_summoned)
664 {
665 me->SetCanFly(true);
666 me->SetDisableGravity(true);
667 }
668 }
669
670 void JustAppeared() override
671 {
673 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
674 }
675
676 void JustDied(Unit* /*killer*/) override
677 {
678 _events.Reset();
679 }
680
681 void DoAction(int32 action) override
682 {
683 if (action == ACTION_START_FROSTWYRM)
684 {
685 if (_summoned)
686 return;
687
688 _summoned = true;
689 if (me->isDead())
690 return;
691
692 me->setActive(true);
693 me->SetFarVisible(true);
700 me->StopMoving();
703 }
704 }
705
706 void MovementInform(uint32 type, uint32 point) override
707 {
708 if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
709 return;
710
711 me->setActive(false);
712 me->SetFarVisible(false);
713 me->SetCanFly(false);
714 me->SetDisableGravity(false);
719 }
720
721 void UpdateAI(uint32 diff) override
722 {
723 if (!UpdateVictim())
724 return;
725
726 _events.Update(diff);
727
729 return;
730
731 while (uint32 eventId = _events.ExecuteEvent())
732 {
733 switch (eventId)
734 {
738 break;
742 break;
743 case EVENT_TAIL_SWEEP:
746 break;
747 default:
748 break;
749 }
750 }
751 }
752
753private:
757};
758
760{
761 npc_rimefang_icc(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false)
762 {
763 Initialize();
764 }
765
767 {
769 }
770
771 void InitializeAI() override
772 {
773 // Increase add count
774 if (!me->isDead())
775 {
776 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
777 Reset();
778 }
779 }
780
781 void Reset() override
782 {
783 _events.Reset();
786 Initialize();
787
788 if (!_summoned)
789 {
790 me->SetCanFly(true);
791 me->SetDisableGravity(true);
792 }
793 }
794
795 void JustAppeared() override
796 {
798 _instance->SetData64(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
799 }
800
801 void JustDied(Unit* /*killer*/) override
802 {
803 _events.Reset();
804 }
805
806 void DoAction(int32 action) override
807 {
808 if (action == ACTION_START_FROSTWYRM)
809 {
810 if (_summoned)
811 return;
812
813 _summoned = true;
814 if (me->isDead())
815 return;
816
817 me->setActive(true);
818 me->SetFarVisible(true);
820 me->SetImmuneToPC(true);
825 me->StopMoving();
828 }
829 }
830
831 void MovementInform(uint32 type, uint32 point) override
832 {
833 if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
834 return;
835
836 me->setActive(false);
837 me->SetFarVisible(false);
838 me->SetCanFly(false);
839 me->SetDisableGravity(false);
842 me->SetImmuneToPC(false);
844 }
845
846 void JustEngagedWith(Unit* /*victim*/) override
847 {
849 }
850
851 void UpdateAI(uint32 diff) override
852 {
853 if (!UpdateVictim())
854 return;
855
856 _events.Update(diff);
857
859 return;
860
861 while (uint32 eventId = _events.ExecuteEvent())
862 {
863 switch (eventId)
864 {
868 break;
869 case EVENT_ICY_BLAST:
870 {
871 _icyBlastCounter = RAID_MODE<uint8>(5, 7, 6, 8);
873 me->AttackStop();
874 me->SetCanFly(true);
877 _events.ScheduleEvent(EVENT_ICY_BLAST, moveTime + 60s, moveTime + 70s);
878 _events.ScheduleEvent(EVENT_ICY_BLAST_CAST, moveTime + 250ms);
879 break;
880 }
882 if (--_icyBlastCounter)
883 {
884 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
885 {
886 me->SetFacingToObject(target);
887 DoCast(target, SPELL_ICY_BLAST);
888 }
890 }
891 else if (Unit* victim = me->SelectVictim())
892 {
894 AttackStart(victim);
895 me->SetCanFly(false);
896 }
897 break;
898 default:
899 break;
900 }
901 }
902 }
903
904private:
909};
910
912{
914 {
915 Initialize();
916 _instance = creature->GetInstanceScript();
917 _frostwyrmId = 0;
918 }
919
921 {
922 _isTaunted = false;
923 }
924
925 void InitializeAI() override
926 {
927 _frostwyrmId = (me->GetHomePosition().GetPositionY() < 2484.35f) ? DATA_RIMEFANG : DATA_SPINESTALKER;
928 // Increase add count
929 if (!me->isDead())
930 {
932 _instance->SetData64(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
933 Reset();
934 }
935 }
936
937 void Reset() override
938 {
939 // This is shared AI for handler and whelps
941 {
944 }
945
946 Initialize();
947 }
948
949 void JustAppeared() override
950 {
952
953 // Increase add count
955 _instance->SetData64(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
956 }
957
958 void SetData(uint32 type, uint32 data) override
959 {
960 if (type == DATA_WHELP_MARKER)
961 _isTaunted = data != 0;
962 }
963
964 uint32 GetData(uint32 type) const override
965 {
966 if (type == DATA_FROSTWYRM_OWNER)
967 return _frostwyrmId;
968 else if (type == DATA_WHELP_MARKER)
969 return uint32(_isTaunted);
970 return 0;
971 }
972
973 void UpdateAI(uint32 diff) override
974 {
975 if (!UpdateVictim())
976 return;
977
978 _events.Update(diff);
979
981 return;
982
983 while (uint32 eventId = _events.ExecuteEvent())
984 {
985 switch (eventId)
986 {
990 break;
994 break;
995 default:
996 break;
997 }
998 }
999 }
1000
1001private:
1005 bool _isTaunted; // Frostwing Whelp only
1006};
1007
1008// 70598 - Sindragosa's Fury
1010{
1011 bool Load() override
1012 {
1013 // This script should execute only in Icecrown Citadel
1015 }
1016
1018 {
1019 if (WorldLocation const* dest = GetExplTargetDest())
1020 {
1021 float destX = rand_norm() * 75.0f + 4350.0f;
1022 float destY = rand_norm() * 75.0f + 2450.0f;
1023 float destZ = 205.0f; // random number close to ground, get exact in next call
1024 GetCaster()->UpdateGroundPositionZ(destX, destY, destZ);
1025 SetExplTargetDest(WorldLocation(dest->GetMapId(), destX, destY, destZ));
1026 }
1027 }
1028
1029 void FilterTargets(std::list<WorldObject*>& targets)
1030 {
1031 targets.remove_if([](WorldObject* obj) -> bool
1032 {
1033 // remove GMs
1034 if (Player* player = obj->ToPlayer())
1035 return player->IsGameMaster();
1036
1037 // remove non-players too
1038 return true;
1039 });
1040
1041 _targetCount = targets.size();
1042 }
1043
1045 {
1046 PreventHitDefaultEffect(effIndex);
1047
1048 if (!GetHitUnit()->IsAlive() || !_targetCount)
1049 return;
1050
1051 if (GetHitUnit()->IsImmunedToDamage(GetCaster(), GetSpellInfo(), &GetEffectInfo()))
1052 {
1054 return;
1055 }
1056
1057 float resistance = float(GetHitUnit()->GetResistance(SpellSchoolMask(GetSpellInfo()->SchoolMask)));
1058 uint32 minResistFactor = uint32((resistance / (resistance + 510.0f)) * 10.0f) * 2;
1059 uint32 randomResist = urand(0, (9 - minResistFactor) * 100) / 100 + minResistFactor;
1060
1061 uint32 damage = (uint32(GetEffectValueAsInt() / _targetCount) * randomResist) / 10;
1062
1063 SpellNonMeleeDamage damageInfo(GetCaster(), GetHitUnit(), GetSpellInfo(), GetSpell()->m_SpellVisual, GetSpellInfo()->SchoolMask);
1064 damageInfo.damage = damage;
1065 GetCaster()->DealSpellDamage(&damageInfo, false);
1066 GetCaster()->SendSpellNonMeleeDamageLog(&damageInfo);
1067 }
1068
1075
1077};
1078
1079// 69762 - Unchained Magic
1081{
1082 void FilterTargets(std::list<WorldObject*>& targets)
1083 {
1084 std::vector<WorldObject*> healers;
1085 std::vector<WorldObject*> casters;
1086 for (WorldObject* target : targets)
1087 {
1088 Player* player = target->ToPlayer();
1089 if (!player)
1090 continue;
1091
1092 ChrSpecializationEntry const* specialization = player->GetPrimarySpecializationEntry();
1093 if (!specialization)
1094 continue;
1095
1096 if (specialization->GetRole() == ChrSpecializationRole::Healer)
1097 {
1098 healers.push_back(target);
1099 continue;
1100 }
1101
1102 if (specialization->GetFlags().HasFlag(ChrSpecializationFlag::Caster))
1103 casters.push_back(target);
1104 }
1105
1106 targets.clear();
1107
1108 bool const is25ManRaid = GetCaster()->GetMap()->Is25ManRaid();
1109 if (!healers.empty())
1110 {
1111 Trinity::Containers::RandomResize(healers, size_t(is25ManRaid ? 3 : 1));
1112 while (!healers.empty())
1113 {
1114 targets.push_back(healers.back());
1115 healers.pop_back();
1116 }
1117 }
1118 if (!casters.empty())
1119 {
1121 size_t const maxSize = is25ManRaid ? 6 : 2;
1122 while (!casters.empty() && targets.size() < maxSize)
1123 {
1124 targets.push_back(casters.back());
1125 casters.pop_back();
1126 }
1127 }
1128 }
1129
1134};
1135
1136// 69649, 71056, 71057, 71058 - Frost Breath
1137// 73061, 73062, 73063, 73064 - Frost Breath
1139{
1141 {
1142 Player* target = GetHitPlayer();
1143 if (!target)
1144 return;
1145
1146 // Check difficulty and quest status
1148 return;
1149
1150 // Check if player has Shadow's Edge equipped and not ready for infusion
1152 return;
1153
1154 Aura* infusion = target->GetAura(SPELL_FROST_INFUSION, target->GetGUID());
1155 if (infusion && infusion->GetStackAmount() >= 3)
1156 {
1157 target->RemoveAura(infusion);
1159 }
1160 else
1162 }
1163
1168};
1169
1170// 69766 - Instability
1172{
1173 bool Validate(SpellInfo const* /*spell*/) override
1174 {
1176 }
1177
1178 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
1179 {
1180 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
1181 {
1182 CastSpellExtraArgs args(aurEff);
1184 args.AddSpellBP0(aurEff->GetAmount());
1186 }
1187 }
1188
1193};
1194
1195// 70126 - Frost Beacon
1197{
1198 bool Validate(SpellInfo const* /*spell*/) override
1199 {
1201 }
1202
1203 void PeriodicTick(AuraEffect const* /*aurEff*/)
1204 {
1206 if (Unit* caster = GetCaster())
1207 caster->CastSpell(GetTarget(), SPELL_ICE_TOMB_DAMAGE, true);
1208 }
1209
1214};
1215
1216// 70157 - Ice Tomb (Trap)
1218{
1219 bool Validate(SpellInfo const* /*spell*/) override
1220 {
1221 if (!sObjectMgr->GetCreatureTemplate(NPC_ICE_TOMB))
1222 return false;
1223 if (!sObjectMgr->GetGameObjectTemplate(GO_ICE_BLOCK))
1224 return false;
1225 return true;
1226 }
1227
1228 void PeriodicTick(AuraEffect const* aurEff)
1229 {
1231
1232 if (aurEff->GetTickNumber() == 1)
1233 {
1234 if (Unit* caster = GetCaster())
1235 {
1236 Position pos = GetTarget()->GetPosition();
1237
1238 if (TempSummon* summon = caster->SummonCreature(NPC_ICE_TOMB, pos))
1239 {
1240 summon->AI()->SetGUID(GetTarget()->GetGUID(), DATA_TRAPPED_PLAYER);
1242 if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos, QuaternionData::fromEulerAnglesZYX(pos.GetOrientation(), 0.0f, 0.0f), 0s))
1243 {
1244 go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
1245 summon->AddGameObject(go);
1246 }
1247 }
1248 }
1249 }
1250 }
1251
1256
1262};
1263
1264// 70117 - Icy Grip
1266{
1267 bool Validate(SpellInfo const* /*spell*/) override
1268 {
1270 }
1271
1273 {
1274 PreventHitDefaultEffect(effIndex);
1276 }
1277
1282};
1283
1285{
1286 public:
1287 explicit MysticBuffetTargetFilter(Unit* caster) : _caster(caster) { }
1288
1289 bool operator()(WorldObject* unit) const
1290 {
1291 return !unit->IsWithinLOSInMap(_caster);
1292 }
1293
1294 private:
1296};
1297
1298// 70127, 72528, 72529, 72530 - Mystic Buffet
1300{
1301 void FilterTargets(std::list<WorldObject*>& targets)
1302 {
1303 targets.remove_if(MysticBuffetTargetFilter(GetCaster()));
1304 }
1305
1310};
1311
1312// 71376 - Icy Blast
1314{
1315 bool Validate(SpellInfo const* /*spell*/) override
1316 {
1318 }
1319
1321 {
1322 PreventHitDefaultEffect(effIndex);
1323 if (Position const* pos = GetExplTargetDest())
1324 if (TempSummon* summon = GetCaster()->SummonCreature(NPC_ICY_BLAST, *pos, TEMPSUMMON_TIMED_DESPAWN, 40s))
1325 summon->CastSpell(summon, SPELL_ICY_BLAST_AREA, true);
1326 }
1327
1332};
1333
1335{
1336 public:
1337 explicit OrderWhelpTargetSelector(Creature* owner) : _owner(owner) { }
1338
1339 bool operator()(Creature* creature)
1340 {
1341 if (!creature->AI()->GetData(DATA_WHELP_MARKER) && creature->AI()->GetData(DATA_FROSTWYRM_OWNER) == _owner->AI()->GetData(DATA_FROSTWYRM_OWNER))
1342 return false;
1343 return true;
1344 }
1345
1346 private:
1348};
1349
1350// 71357 - Order Whelp
1352{
1353 bool Validate(SpellInfo const* /*spell*/) override
1354 {
1356 }
1357
1358 void FilterTargets(std::list<WorldObject*>& targets)
1359 {
1360 targets.remove_if(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false));
1361 if (targets.empty())
1362 return;
1363
1365 targets.clear();
1366 targets.push_back(target);
1367 }
1368
1370 {
1371 // caster is Frostwarden Handler, target is player, caster of triggered is whelp
1372 PreventHitDefaultEffect(effIndex);
1373 std::list<Creature*> unitList;
1375 if (Creature* creature = GetCaster()->ToCreature())
1376 unitList.remove_if(OrderWhelpTargetSelector(creature));
1377
1378 if (unitList.empty())
1379 return;
1380
1382 }
1383
1389};
1390
1391// 71350 - Focus Fire
1406
1408{
1409 bool Validate(SpellInfo const* spellInfo) override
1410 {
1411 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
1412 }
1413
1414 void PeriodicTick(AuraEffect const* /*aurEff*/)
1415 {
1417 if (Unit* caster = GetCaster())
1418 {
1419 caster->GetThreatManager().AddThreat(GetTarget(), -float(GetEffectInfo(EFFECT_1).CalcValue()), GetSpellInfo(), true, true);
1420 caster->GetAI()->SetData(DATA_WHELP_MARKER, 0);
1421 }
1422 }
1423
1428};
1429
1430// 69712 - Ice Tomb (Target)
1432{
1433 void FilterTargets(std::list<WorldObject*>& unitList)
1434 {
1435 Unit* caster = GetCaster();
1436 unitList.remove_if(FrostBeaconSelector(caster));
1437 }
1438
1440 {
1441 if (Creature* creatureCaster = GetCaster()->ToCreature())
1442 if (creatureCaster->GetAI()->GetData(DATA_IS_THIRD_PHASE))
1443 creatureCaster->AI()->Talk(EMOTE_WARN_FROZEN_ORB, GetHitUnit());
1444 }
1445
1451};
1452
1454{
1455 public:
1456 at_sindragosa_lair() : AreaTriggerScript("at_sindragosa_lair") { }
1457
1458 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1459 {
1460 if (InstanceScript* instance = player->GetInstanceScript())
1461 {
1462 if (!instance->GetData(DATA_SPINESTALKER))
1463 if (Creature* spinestalker = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SPINESTALKER)))
1464 spinestalker->AI()->DoAction(ACTION_START_FROSTWYRM);
1465
1466 if (!instance->GetData(DATA_RIMEFANG))
1467 if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG)))
1468 rimefang->AI()->DoAction(ACTION_START_FROSTWYRM);
1469
1470 if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && !instance->GetGuidData(DATA_SINDRAGOSA) && instance->GetBossState(DATA_SINDRAGOSA) != DONE)
1471 {
1473 if (Creature* sindragosa = player->GetMap()->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos))
1474 sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
1475 }
1476 }
1477
1478 return true;
1479 }
1480};
1481
1483{
1484 public:
1485 achievement_all_you_can_eat() : AchievementCriteriaScript("achievement_all_you_can_eat") { }
1486
1487 bool OnCheck(Player* /*source*/, Unit* target) override
1488 {
1489 if (!target)
1490 return false;
1491 return target->GetAI()->GetData(DATA_MYSTIC_BUFFET_STACK) <= 5;
1492 }
1493};
1494
1496{
1497 // Creatures
1503
1504 // Spells
1519
1520 // AreaTriggers
1521 new at_sindragosa_lair();
1522
1523 // Achievements
1525}
#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:1885
Spells
Definition PlayerAI.cpp:32
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:150
float rand_norm()
Definition Random.cpp:75
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
#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
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ TARGET_UNIT_DEST_AREA_ENTRY
SpellSchoolMask
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_TRIGGER_MISSILE
@ SPELL_EFFECT_FORCE_CAST
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:276
Position const SindragosaFlyInPos
@ 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
void AddSC_boss_sindragosa()
FrostwingData
@ DATA_LINKED_GAMEOBJECT
@ DATA_MYSTIC_BUFFET_STACK
@ DATA_WHELP_MARKER
@ DATA_FROSTWYRM_OWNER
@ DATA_IS_THIRD_PHASE
@ DATA_TRAPPED_PLAYER
Position const SpinestalkerFlyPos
Position const SpinestalkerLandPos
Position const SindragosaFlyPos
@ POINT_FROSTWYRM_LAND
@ POINT_TAKEOFF
@ POINT_FROSTWYRM_FLY_IN
@ POINT_AIR_PHASE
@ POINT_LAND
@ POINT_LAND_GROUND
@ POINT_AIR_PHASE_FAR
Position const RimefangLandPos
@ 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
@ QUEST_FROST_INFUSION
Position const RimefangFlyPos
Position const SindragosaAirPosFar
Position const SindragosaLandPos
Position const SindragosaSpawnPos
@ 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 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:386
void SetImmuneToPC(bool apply) override
Definition Creature.h:184
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:388
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
ObjectGuid::LowType GetSpawnId() const
Definition Creature.h:110
Unit * SelectVictim()
CreatureAI * AI() const
Definition Creature.h:228
void SetDefaultMovementType(MovementGeneratorType mgt)
Definition Creature.h:164
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void CancelEventGroup(uint32 group)
Definition EventMap.cpp:157
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
void CancelEvent(uint32 eventId)
Definition EventMap.cpp:135
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:56
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:372
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:1186
bool Is25ManRaid() const
Definition Map.cpp:3349
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:15962
ChrSpecializationEntry const * GetPrimarySpecializationEntry() const
Definition Player.cpp:30819
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:180
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:162
virtual uint32 GetData(uint32 id) const
Definition UnitAI.h:74
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8932
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3828
ThreatManager & GetThreatManager()
Definition Unit.h:1078
void RemoveAllGameObjects()
Definition Unit.cpp:5442
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
Definition Unit.cpp:1303
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
void SetFacingToObject(WorldObject const *object, bool force=true)
Definition Unit.cpp:13307
void StopMoving()
Definition Unit.cpp:10680
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
Definition Unit.cpp:5540
TempSummon * ToTempSummon()
Definition Unit.h:1828
UnitAI * GetAI() const
Definition Unit.h:668
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13361
void SendSpellDamageImmune(Unit *target, uint32 spellId, bool isPeriodic)
Definition Unit.cpp:5639
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4700
bool SetCanFly(bool enable)
Definition Unit.cpp:13459
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8942
void SetFacingTo(float const ori, bool force=true)
Definition Unit.cpp:13289
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:846
bool AttackStop()
Definition Unit.cpp:5965
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:847
bool isDead() const
Definition Unit.h:1187
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:396
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
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:1398
void setActive(bool isActiveObject)
Definition Object.cpp:276
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:1441
void SetFarVisible(bool on)
Definition Object.cpp:327
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
Definition Object.cpp:535
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition Object.cpp:700
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 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 fromEulerAnglesZYX(float Z, float Y, float X)
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