TrinityCore
Loading...
Searching...
No Matches
boss_northrend_beasts.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "ScriptMgr.h"
19#include "InstanceScript.h"
20#include "Map.h"
21#include "MotionMaster.h"
22#include "ObjectAccessor.h"
23#include "Player.h"
24#include "ScriptedCreature.h"
25#include "SpellAuraEffects.h"
26#include "SpellScript.h"
27#include "TemporarySummon.h"
29#include "Vehicle.h"
30
32{
33 // Gormok
35
36 // Acidmaw & Dreadscale
39
40 // Icehowl
44};
45
53
55{
56 // Gormok
57 SPELL_IMPALE = 66331,
59 SPELL_TANKING_GORMOK = 66415, // No idea what it does (SERVERSIDE spell)
60
61 // Snobold
64 SPELL_BATTER = 66408,
70
71 // Acidmaw & Dreadscale Generic
72 SPELL_SWEEP = 66794,
74 SPELL_EMERGE = 66947,
77 SPELL_ENRAGE = 68335,
81 // Acidmaw
88 // Dreadscale
94
95 // Slime Pool
98
99 // Icehowl
102 SPELL_WHIRL = 67345,
108 SPELL_ROAR = 66736,
111 SPELL_BERSERK = 26662
113
124
166
176
183
191
192Position const CombatStalkerPosition = { 563.8941f, 137.3333f, 405.8467f };
193
195{
196public:
198
199 bool operator()(Unit* unit) const
200 {
201 return unit->GetTypeId() == TYPEID_PLAYER && !unit->HasAura(SPELL_RIDE_PLAYER) && !unit->HasAura(SPELL_SNOBOLLED);
202 }
203};
204
206{
207 boss_northrend_beastsAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId)
208 {
210 }
211
212 void Reset() override
213 {
214 events.Reset();
219 }
220
222 {
223 switch (me->GetEntry())
224 {
225 case NPC_GORMOK:
226 case NPC_DREADSCALE:
228 break;
229 case NPC_ICEHOWL:
231 break;
232 default:
233 break;
234 }
235 }
236
238 {
240 {
241 if (me->GetEntry() == NPC_GORMOK)
242 combatStalker->AI()->DoAction(ACTION_START_JORMUNGARS);
243 else if (me->GetEntry() == NPC_DREADSCALE)
244 combatStalker->AI()->DoAction(ACTION_START_ICEHOWL);
245 }
246 }
247
248 void JustEngagedWith(Unit* /*who*/) override
249 {
250 me->setActive(true);
254 if (IsHeroic())
256 }
257
259 {
260 switch (me->GetEntry())
261 {
262 case NPC_GORMOK:
264 break;
265 case NPC_ACIDMAW:
266 case NPC_DREADSCALE:
269 break;
270 case NPC_ICEHOWL:
272 break;
273 default:
274 break;
275 }
276 }
277
278 void EnterEvadeMode(EvadeReason why) override
279 {
283 // prevent losing 2 attempts at once on heroics
287 combatStalker->DespawnOrUnsummon();
290 }
291
292 void JustDied(Unit* /*killer*/) override
293 {
295 if (me->GetEntry() == NPC_GORMOK)
296 {
299 combatStalker->AI()->DoAction(ACTION_GORMOK_DEAD);
300 }
301 else
303 }
304
305 void UpdateAI(uint32 diff) override
306 {
308 return;
309
310 events.Update(diff);
311
313 return;
314
315 while (uint32 eventId = events.ExecuteEvent())
316 {
317 ExecuteEvent(eventId);
319 return;
320 }
321 }
322};
323
325{
327
334
335 void PassengerBoarded(Unit* who, int8 seatId, bool apply) override
336 {
337 if (apply && seatId == GORMOK_HAND_SEAT)
338 who->CastSpell(who, SPELL_RISING_ANGER, true);
339 }
340
341 void MovementInform(uint32 type, uint32 pointId) override
342 {
343 if (type == SPLINE_CHAIN_MOTION_TYPE && pointId == POINT_INITIAL_MOVEMENT)
345 }
346
347 void ExecuteEvent(uint32 eventId) override
348 {
349 switch (eventId)
350 {
351 case EVENT_ENGAGE:
353 me->SetImmuneToPC(false);
355 // Npc that should keep raid in combat while boss change
357 DoZoneInCombat(combatStalker);
361 break;
362 case EVENT_IMPALE:
364 events.Repeat(10s);
365 break;
368 events.Repeat(22s);
369 break;
370 case EVENT_THROW:
371 for (uint8 i = 0; i < MAX_SNOBOLDS; ++i)
372 {
373 if (Unit* snobold = me->GetVehicleKit()->GetPassenger(i))
374 {
375 snobold->ExitVehicle();
376 snobold->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
377 snobold->SetUninteractible(false);
378 snobold->GetAI()->DoAction(ACTION_DISABLE_FIRE_BOMB);
379 snobold->CastSpell(me, SPELL_JUMP_TO_HAND, true);
380 break;
381 }
382 }
383 events.Repeat(20s);
384 break;
385 default:
386 break;
387 }
388 }
389};
390
392{
393 npc_snobold_vassal(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _mountedOnPlayer(false), _gormokDead(false)
394 {
396 SetCombatMovement(false);
397 }
398
399 bool CanAIAttack(Unit const* who) const override
400 {
401 if (_mountedOnPlayer && who->GetGUID() != _targetGUID)
402 return false;
403
404 return ScriptedAI::CanAIAttack(who);
405 }
406
407 void AttackStart(Unit* victim) override
408 {
410 if (!_mountedOnPlayer && (!gormok || !gormok->IsAlive()))
411 AttackStartCaster(victim, 30.0f);
412 else
414 }
415
416 void JustEngagedWith(Unit* /*who*/) override
417 {
420 }
421
422 void JustDied(Unit* /*killer*/) override
423 {
425 }
426
427 void DoAction(int32 action) override
428 {
429 switch (action)
430 {
433 break;
436 break;
438 _mountedOnPlayer = true;
439 me->SetCanMelee(true);
440 break;
441 default:
442 break;
443 }
444 }
445
446 void SetGUID(ObjectGuid const& guid, int32 id) override
447 {
448 if (id == DATA_NEW_TARGET)
449 if (Unit* target = ObjectAccessor::GetPlayer(*me, guid))
450 {
451 _targetGUID = guid;
452 AttackStart(target);
456 }
457 }
458
460 {
462 if (gormok && gormok->IsAlive())
463 {
464 me->AttackStop();
465 me->SetCanMelee(false);
467 _mountedOnPlayer = false;
470
471 for (uint8 i = 0; i < MAX_SNOBOLDS; i++)
472 {
473 if (!gormok->GetVehicleKit()->GetPassenger(i))
474 {
475 me->EnterVehicle(gormok, i);
477 break;
478 }
479 }
480 }
481 else
482 {
484 me->SetUninteractible(false);
487 me->AttackStop();
488 me->SetCanMelee(true);
489 SetCombatMovement(true);
490 _gormokDead = true;
491 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
492 {
493 AttackStart(target);
494 me->GetMotionMaster()->MoveChase(target);
497 }
498 }
499 }
500
501 void UpdateAI(uint32 diff) override
502 {
503 if (!UpdateVictim())
504 return;
505
506 _events.Update(diff);
507
509 return;
510
511 while (uint32 eventId = _events.ExecuteEvent())
512 {
513 switch (eventId)
514 {
515 case EVENT_FIRE_BOMB:
516 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
517 me->CastSpell(target, SPELL_FIRE_BOMB);
518 _events.Repeat(20s, 30s);
519 break;
520 case EVENT_HEAD_CRACK:
521 if (Unit* target = me->GetVehicleBase())
522 DoCast(target, SPELL_HEAD_CRACK);
523 else
525 _events.Repeat(30s);
526 break;
527 case EVENT_BATTER:
528 if (Unit* target = me->GetVehicleBase())
529 DoCast(target, SPELL_BATTER);
530 else
532 _events.Repeat(10s, 15s);
533 break;
534 case EVENT_SNOBOLLED:
536 break;
538 if (!me->GetVehicleBase())
539 MountOnBoss();
540 _events.Repeat(3s);
541 break;
542 default:
543 break;
544 }
545
547 return;
548 }
549 }
550
551private:
557};
558
560{
561 npc_fire_bomb(Creature* creature) : ScriptedAI(creature) { }
562
563 void Reset() override
564 {
566 }
567};
568
570{
571 npc_beasts_combat_stalker(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
572
573 void Reset() override
574 {
576 _events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 9min : 15min);
577 }
578
579 void DoAction(int32 action) override
580 {
581 switch (action)
582 {
585 break;
588 break;
591 break;
594 break;
595 default:
596 break;
597 }
598 }
599
600 void UpdateAI(uint32 diff) override
601 {
602 _events.Update(diff);
603
604 while (uint32 eventId = _events.ExecuteEvent())
605 {
606 switch (eventId)
607 {
608 case EVENT_BERSERK:
610 gormok->CastSpell(gormok, SPELL_BERSERK, true);
611
612 if (Creature* dreadscale = _instance->GetCreature(DATA_DREADSCALE))
613 dreadscale->CastSpell(dreadscale, SPELL_BERSERK, true);
614
616 acidmaw->CastSpell(acidmaw, SPELL_BERSERK, true);
617
619 icehowl->CastSpell(icehowl, SPELL_BERSERK, true);
620 break;
623 tirion->AI()->DoAction(ACTION_START_JORMUNGARS);
624 break;
627 tirion->AI()->DoAction(ACTION_START_ICEHOWL);
628 break;
629 default:
630 break;
631 }
632 }
633 }
634
635private:
638};
639
641{
642 boss_jormungarAI(Creature* creature, uint32 bossId) : boss_northrend_beastsAI(creature, bossId)
643 {
644 Initialize();
645 }
646
648 {
649 otherWormEntry = 0;
650 modelStationary = 0;
651 modelMobile = 0;
652 biteSpell = 0;
653 spewSpell = 0;
654 spitSpell = 0;
655 spraySpell = 0;
656 wasMobile = false;
657 }
658
659 void Reset() override
660 {
661 Initialize();
663 me->SetCanMelee(true);
664 }
665
666 void JustSummoned(Creature* summoned) override
667 {
668 if (summoned->GetEntry() == NPC_ACIDMAW)
669 BossAI::JustSummoned(summoned);
670 else
671 summons.Summon(summoned);
672 }
673
690
692 {
693 return wormEntry == NPC_ACIDMAW ? DATA_ACIDMAW : DATA_DREADSCALE;
694 }
695
696 void JustDied(Unit* /*killer*/) override
697 {
699 {
700 if (!otherWorm->IsAlive())
701 {
704 otherWorm->DespawnOrUnsummon();
706 combatStalker->AI()->DoAction(ACTION_JORMUNGARS_DEAD);
707 }
708 else
709 {
711 otherWorm->AI()->DoAction(ACTION_ENRAGE);
712 }
713 }
715 }
716
717 void DoAction(int32 action) override
718 {
719 if (action == ACTION_ENRAGE)
720 {
725 }
726 }
727
758
759 void Emerge()
760 {
763 me->RemoveAurasDueToSpell(submergeSpell);
768 me->SetUninteractible(false);
771 AttackStart(target);
772
773 // if the worm was mobile before submerging, make him stationary now
774 if (wasMobile)
775 {
778 me->SetCanMelee(false);
781 }
782 else
783 {
784 if (Unit* target = me->GetVictim())
785 me->GetMotionMaster()->MoveChase(target);
787 me->SetCanMelee(true);
789 }
792 }
793
794 void ExecuteEvent(uint32 eventId) override
795 {
796 switch (eventId)
797 {
798 case EVENT_ENGAGE:
799 if (me->GetEntry() == NPC_DREADSCALE)
800 {
802 me->SetImmuneToPC(false);
803 me->SetCanMelee(true);
808 }
809 else
810 {
813 }
814 break;
815 case EVENT_EMERGE:
816 Emerge();
817 break;
818 case EVENT_SUBMERGE:
819 Submerge();
820 break;
821 case EVENT_BITE:
823 events.Repeat(15s);
824 break;
825 case EVENT_SPEW:
827 events.Repeat(21s);
828 break;
829 case EVENT_SLIME_POOL:
831 events.Repeat(12s);
832 break;
835 break;
836 case EVENT_SPRAY:
837 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
838 DoCast(target, spraySpell);
839 events.Repeat(21s);
840 break;
841 case EVENT_SWEEP:
843 events.Repeat(17s);
844 break;
845 default:
846 break;
847 }
848 }
849
850 void UpdateAI(uint32 diff) override
851 {
853 return;
854
855 events.Update(diff);
856
858 return;
859
860 while (uint32 eventId = events.ExecuteEvent())
861 {
862 ExecuteEvent(eventId);
864 return;
865 }
866
869 }
870
871 protected:
880};
881
905
927
929{
931
932 void Reset() override
933 {
935 {
938 }, 1s);
939 }
940};
941
943{
945
953
961
962 void MovementInform(uint32 type, uint32 pointId) override
963 {
964 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE && type != SPLINE_CHAIN_MOTION_TYPE)
965 return;
966
967 switch (pointId)
968 {
971 break;
972 case POINT_MIDDLE:
975 break;
977 events.Reset();
982 break;
983 default:
984 break;
985 }
986 }
987
988 void DoAction(int32 action) override
989 {
990 if (action == ACTION_ENRAGE)
991 {
994 }
995 else if (action == ACTION_TRAMPLE_FAIL)
996 {
999 events.DelayEvents(15s);
1000 }
1001 }
1002
1003 void ExecuteEvent(uint32 eventId) override
1004 {
1005 switch (eventId)
1006 {
1007 case EVENT_ENGAGE:
1009 me->SetImmuneToPC(false);
1013 break;
1016 me->AttackStop();
1018 me->GetMotionMaster()->MoveJump(POINT_MIDDLE, ToCCommonLoc[1], 50.0f, 2.0f);
1019 break;
1021 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
1022 {
1023 DoCast(target, SPELL_FURIOUS_CHARGE_SUMMON, true);
1024 me->SetTarget(target->GetGUID());
1025 Talk(EMOTE_TRAMPLE_ROAR, target);
1027 }
1028 break;
1029 case EVENT_ICEHOWL_ROAR:
1031 DoCast(stalker, SPELL_ROAR);
1033 break;
1034 case EVENT_JUMP_BACK:
1036 DoCast(stalker, SPELL_JUMP_BACK);
1038 break;
1039 case EVENT_TRAMPLE:
1041 me->GetMotionMaster()->MoveCharge(stalker->GetPositionX(), stalker->GetPositionY(), stalker->GetPositionZ(), 42.0f, POINT_ICEHOWL_CHARGE);
1043 break;
1046 events.Repeat(20s);
1047 break;
1049 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
1050 DoCast(target, SPELL_ARCTIC_BREATH);
1051 events.Repeat(24s);
1052 break;
1053 case EVENT_WHIRL:
1055 events.Repeat(16s);
1056 break;
1057 default:
1058 break;
1059 }
1060 }
1061};
1062
1063// 66342 - Jump to Hand
1065{
1066 bool Validate(SpellInfo const* /*spell*/) override
1067 {
1069 }
1070
1071 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1072 {
1073 Unit* caster = GetCaster();
1074 if (!caster || caster->GetEntry() != NPC_SNOBOLD_VASSAL)
1075 return;
1076
1077 if (Creature* gormok = GetTarget()->ToCreature())
1078 if (Unit* target = gormok->AI()->SelectTarget(SelectTargetMethod::Random, 0, SnobolledTargetSelector()))
1079 {
1080 gormok->AI()->Talk(EMOTE_SNOBOLLED);
1082 caster->CastSpell(target, SPELL_RIDE_PLAYER, true);
1083 }
1084 }
1085
1090};
1091
1092// 66245 - Ride Vehicle
1094{
1095 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1096 {
1097 Unit* target = GetTarget();
1098 if (target->GetTypeId() != TYPEID_PLAYER || !target->IsInWorld())
1099 return;
1100
1101 if (Unit *caster = GetCaster())
1102 if (caster->IsAIEnabled())
1103 caster->GetAI()->SetGUID(target->GetGUID(), DATA_NEW_TARGET);
1104 }
1105
1110};
1111
1112// 66406 - Snobolled!
1114{
1115 bool Validate(SpellInfo const* /*spell*/) override
1116 {
1118 }
1119
1120 void OnPeriodic(AuraEffect const* /*aurEff*/)
1121 {
1123 Remove();
1124 }
1125
1130};
1131
1132// 66823, 67618, 67619, 67620 - Paralytic Toxin
1134{
1135 bool Validate(SpellInfo const* /*spell*/) override
1136 {
1138 }
1139
1140 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1141 {
1142 Unit* caster = GetCaster();
1143 if (caster && caster->GetEntry() == NPC_ACIDMAW)
1144 if (Creature* acidmaw = caster->ToCreature())
1145 acidmaw->AI()->Talk(SAY_SPECIAL, GetTarget());
1146 }
1147
1148 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1149 {
1151 }
1152
1153 void CalculateAmount(AuraEffect const* aurEff, SpellEffectValue& amount, bool& canBeRecalculated)
1154 {
1155 if (!canBeRecalculated)
1156 amount = aurEff->GetAmount();
1157
1158 canBeRecalculated = false;
1159 }
1160
1161 void HandleDummy(AuraEffect const* /*aurEff*/)
1162 {
1163 if (AuraEffect* slowEff = GetEffect(EFFECT_0))
1164 {
1165 SpellEffectValue newAmount = slowEff->GetAmount() - 10;
1166 if (newAmount < -100)
1167 newAmount = -100;
1168 slowEff->ChangeAmount(newAmount);
1169
1170 if (newAmount == -100 && !GetTarget()->HasAura(SPELL_PARALYSIS))
1171 GetTarget()->CastSpell(GetTarget(), SPELL_PARALYSIS, CastSpellExtraArgs(slowEff).SetOriginalCaster(GetCasterGUID()));
1172 }
1173 }
1174
1182};
1183
1184// 66870, 67621, 67622, 67623 - Burning Bile
1198
1199// 66882 - Slime Pool
1201{
1202 bool Validate(SpellInfo const* spellInfo) override
1203 {
1204 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
1205 }
1206
1207 void PeriodicTick(AuraEffect const* aurEff)
1208 {
1210
1211 float const radius = ((aurEff->GetTickNumber() / 60.f) * 0.9f + 0.1f) * 2.f / 3.f;
1212 CastSpellExtraArgs args(aurEff);
1213 args.AddSpellMod(SPELLVALUE_RADIUS_MOD, radius);
1214 GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, args);
1215 }
1216
1221};
1222
1223/* 66869 - Burning Bile
1224 66823 - Paralytic Toxin */
1226{
1227public:
1229
1230private:
1231 bool Validate(SpellInfo const* /*spell*/) override
1232 {
1233 return ValidateSpellInfo({ _spellId });
1234 }
1235
1236 void HandleScript(SpellEffIndex /*effIndex*/)
1237 {
1239 }
1240
1245
1247};
1248
1249// 66830 - Paralysis
1251{
1252 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1253 {
1254 if (Unit* caster = GetCaster())
1255 if (InstanceScript* instance = caster->GetInstanceScript())
1256 if (instance->GetBossState(DATA_NORTHREND_BEASTS) == IN_PROGRESS)
1257 return;
1258
1259 Remove();
1260 }
1261
1266};
1267
1268// 66688 - Arctic Breath
1270{
1271 bool Validate(SpellInfo const* spellInfo) override
1272 {
1273 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValueAsInt()) });
1274 }
1275
1277 {
1278 uint32 spellId = GetEffectInfo().CalcValueAsInt();
1279 GetCaster()->CastSpell(GetHitUnit(), spellId, true);
1280 }
1281
1286};
1287
1288// 66734 - Trample
1290{
1291 void CheckTargets(std::list<WorldObject*>& targets)
1292 {
1293 Creature* caster = GetCaster()->ToCreature();
1294 if (!caster || !caster->IsAIEnabled())
1295 return;
1296
1297 if (targets.empty())
1298 caster->AI()->DoAction(ACTION_TRAMPLE_FAIL);
1299 else
1300 caster->AI()->DoAction(ACTION_ENRAGE);
1301 }
1302
1307};
1308
1309// 66683 - Massive Crash
1311{
1312 bool Validate(SpellInfo const* /*spell*/) override
1313 {
1315 }
1316
1317 void HandleSpeed(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1318 {
1319 if (Player* target = GetTarget()->ToPlayer())
1320 if (target->GetMap()->IsHeroic())
1321 target->CastSpell(target, SPELL_SURGE_OF_ADRENALINE, true);
1322 }
1323
1328};
1329
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ IN_PROGRESS
@ FAIL
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
float frand(float min, float max)
Definition Random.cpp:55
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1382
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_ONESHOT_SUBMERGE
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SCHOOL_DAMAGE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_MOD_DECREASE_SPEED
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_STUN
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ SPELLVALUE_RADIUS_MOD
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
@ MOVE_RUN
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_ROOT
Definition Unit.h:271
@ UNIT_STATE_CASTING
Definition Unit.h:276
@ MODEL_ACIDMAW_MOBILE
@ MODEL_ACIDMAW_STATIONARY
@ MODEL_DREADSCALE_MOBILE
@ MODEL_DREADSCALE_STATIONARY
Position const CombatStalkerPosition
@ SPLINE_INITIAL_MOVEMENT
@ EMOTE_TRAMPLE_ENRAGE
@ EMOTE_TRAMPLE_FAIL
@ EMOTE_TRAMPLE_ROAR
void AddSC_boss_northrend_beasts()
@ SPELL_MASSIVE_CRASH
@ SPELL_FEROCIOUS_BUTT
@ SPELL_JUMP_TO_HAND
@ SPELL_SLIME_POOL_EFFECT
@ SPELL_FURIOUS_CHARGE_SUMMON
@ SPELL_BURNING_SPRAY
@ SPELL_RIDE_PLAYER
@ SPELL_PARALYTIC_BITE
@ SPELL_BURNING_BITE
@ SPELL_PARALYTIC_TOXIN
@ SUMMON_SLIME_POOL
@ SPELL_FROTHING_RAGE
@ SPELL_RISING_ANGER
@ SPELL_HATE_TO_ZERO
@ SPELL_PACIFY_SELF
@ SPELL_PARALYTIC_SPRAY
@ SPELL_FIRE_BOMB_AURA
@ SPELL_TANKING_GORMOK
@ SPELL_GROUND_VISUAL_0
@ SPELL_STAGGERING_STOMP
@ SPELL_SURGE_OF_ADRENALINE
@ SPELL_ARCTIC_BREATH
@ SPELL_MOLTEN_SPEW
@ SPELL_BURNING_BILE
@ SPELL_STAGGERED_DAZE
@ SPELL_GROUND_VISUAL_1
@ ACTION_ACTIVE_SNOBOLD
@ ACTION_JORMUNGARS_DEAD
@ ACTION_TRAMPLE_FAIL
@ ACTION_ENABLE_FIRE_BOMB
@ ACTION_DISABLE_FIRE_BOMB
@ POINT_ICEHOWL_CHARGE
@ POINT_INITIAL_MOVEMENT
@ EVENT_SUMMON_ACIDMAW
@ EVENT_MASSIVE_CRASH
@ EVENT_SELECT_CHARGE_TARGET
@ EVENT_START_ICEHOWL
@ EVENT_STAGGERING_STOMP
@ EVENT_FEROCIOUS_BUTT
@ EVENT_START_JORGMUNGARS
@ EVENT_ARCTIC_BREATH
Yells
uint32 GetTickNumber() const
SpellEffectInfo const & GetSpellEffectInfo() const
SpellEffectValue GetAmount() const
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
AuraEffect * GetEffect(uint8 effIndex) const
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
HookList< EffectApplyHandler > OnEffectApply
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
bool IsInWorld() const
Definition BaseEntity.h:158
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
void JustSummoned(Creature *summon) override
virtual void ExecuteEvent(uint32)
SummonList summons
EventMap events
virtual void ScheduleTasks()
void DoZoneInCombat()
Definition CreatureAI.h:169
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Creature *const me
Definition CreatureAI.h:63
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetImmuneToPC(bool apply) override
Definition Creature.h:184
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid const &guid) override
void SetDisplayId(uint32 displayId, bool setNative=false) override
CreatureAI * AI() const
Definition Creature.h:228
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:100
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
bool IsInPhase(uint8 phase) const
Definition EventMap.h:222
void CancelEvent(uint32 eventId)
Definition EventMap.cpp:135
void SetPhase(uint8 phase)
Definition EventMap.cpp:32
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:56
void Reset()
Definition EventMap.cpp:25
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
void DoCloseDoorOrButton(ObjectGuid guid)
Creature * GetCreature(uint32 type)
virtual ObjectGuid GetGuidData(uint32 type) const override
void DoUseDoorOrButton(ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
CreatureBoundary const * GetBossBoundary(uint32 id) const
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
Definition model.h:34
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MoveJump(uint32 id, Position const &pos, std::variant< std::monostate, float, Milliseconds > speedOrTime={}, Optional< float > minHeight={}, Optional< float > maxHeight={}, MovementFacingTarget const &facing={}, bool orientationFixed=false, bool unlimitedSpeed=false, Optional< float > speedMultiplier={}, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
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 MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false, Unit const *target=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
static ObjectGuid const Empty
Definition ObjectGuid.h:314
void Clear()
Definition ObjectGuid.h:329
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
bool operator()(Unit *unit) const
uint32 TriggerSpell
Definition SpellInfo.h:234
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
uint32 const Id
Definition SpellInfo.h:328
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Unit * GetCaster() const
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
void AttackStartCaster(Unit *victim, float dist)
Definition UnitAI.cpp:55
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual bool CanAIAttack(Unit const *) const
Definition UnitAI.h:58
virtual void DoAction(int32 param)
Definition UnitAI.h:73
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
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void EnterVehicle(Unit *base, int8 seatId=-1)
Definition Unit.cpp:12749
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3955
void SetControlled(bool apply, UnitState state)
Definition Unit.cpp:11545
float GetCollisionHeight() const override
Definition Unit.cpp:14533
void UpdateSpeed(UnitMoveType mtype)
Definition Unit.cpp:8778
Unit * GetVehicleBase() const
Definition Unit.cpp:12111
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
bool IsAlive() const
Definition Unit.h:1185
UnitAI * GetAI() const
Definition Unit.h:668
void SetUninteractible(bool apply)
Definition Unit.cpp:8564
bool IsAIEnabled() const
Definition Unit.h:666
Unit * GetVictim() const
Definition Unit.h:726
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8942
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 HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1657
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:846
Vehicle * GetVehicleKit() const
Definition Unit.h:1782
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
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Definition Vehicle.cpp:303
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
EventProcessor m_Events
Definition Object.h:561
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:99
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *)
bool Validate(SpellInfo const *spellInfo) override
void HandleSpeed(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void CheckTargets(std::list< WorldObject * > &targets)
void HandleScriptEffect(SpellEffIndex effIndex)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void CalculateAmount(AuraEffect const *aurEff, SpellEffectValue &amount, bool &canBeRecalculated)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *spellInfo) override
void PeriodicTick(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
bool IsHeroic() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void SetCombatMovement(bool allowMovement)
void Reset() override
boss_acidmaw(Creature *creature)
void MovementInform(uint32 type, uint32 pointId) override
boss_dreadscale(Creature *creature)
void PassengerBoarded(Unit *who, int8 seatId, bool apply) override
== Fields =======================================
void MovementInform(uint32 type, uint32 pointId) override
void ScheduleTasks() override
void ExecuteEvent(uint32 eventId) override
boss_gormok(Creature *creature)
void DoAction(int32 action) override
void MovementInform(uint32 type, uint32 pointId) override
void ExecuteEvent(uint32 eventId) override
boss_icehowl(Creature *creature)
void ScheduleTasks() override
void JustSummoned(Creature *summoned) override
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId) override
void ScheduleTasks() override
uint32 GetOtherWormData(uint32 wormEntry)
boss_jormungarAI(Creature *creature, uint32 bossId)
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason why) override
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
boss_northrend_beastsAI(Creature *creature, uint32 bossId)
void UpdateAI(uint32 diff) override
void DoAction(int32 action) override
npc_beasts_combat_stalker(Creature *creature)
npc_fire_bomb(Creature *creature)
npc_jormungars_slime_pool(Creature *creature)
void SetGUID(ObjectGuid const &guid, int32 id) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void DoAction(int32 action) override
void JustDied(Unit *) override
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
npc_snobold_vassal(Creature *creature)
bool CanAIAttack(Unit const *who) const override
@ DATA_MAIN_GATE
constexpr Position ToCCommonLoc[]
@ NPC_SNOBOLD_VASSAL
@ NPC_BEASTS_COMBAT_STALKER
@ ACTION_START_JORMUNGARS
@ ACTION_START_ICEHOWL
@ DATA_DESPAWN_SNOBOLDS
@ DATA_DREADSCALE
@ DATA_GORMOK_THE_IMPALER
@ DATA_NORTHREND_BEASTS
@ DATA_FORDRING
@ TYPE_NORTHREND_BEASTS
@ DATA_SNOBOLD_COUNT
@ DATA_BEASTS_COMBAT_STALKER
@ DATA_FURIOUS_CHARGE
#define RegisterTrialOfTheCrusaderCreatureAI(ai_name)
@ GORMOK_IN_PROGRESS
@ ICEHOWL_IN_PROGRESS
@ SNAKES_IN_PROGRESS