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
221
223 {
224 switch (me->GetEntry())
225 {
226 case NPC_GORMOK:
227 case NPC_DREADSCALE:
229 break;
230 case NPC_ICEHOWL:
232 break;
233 default:
234 break;
235 }
236 }
237
239 {
241 {
242 if (me->GetEntry() == NPC_GORMOK)
243 combatStalker->AI()->DoAction(ACTION_START_JORMUNGARS);
244 else if (me->GetEntry() == NPC_DREADSCALE)
245 combatStalker->AI()->DoAction(ACTION_START_ICEHOWL);
246 }
247 }
248
259
261 {
262 switch (me->GetEntry())
263 {
264 case NPC_GORMOK:
266 break;
267 case NPC_ACIDMAW:
268 case NPC_DREADSCALE:
271 break;
272 case NPC_ICEHOWL:
274 break;
275 default:
276 break;
277 }
278 }
279
280 void EnterEvadeMode(EvadeReason why) override
281 {
285 // prevent losing 2 attempts at once on heroics
289 combatStalker->DespawnOrUnsummon();
292 }
293
294 void JustDied(Unit* /*killer*/) override
295 {
297 if (me->GetEntry() == NPC_GORMOK)
298 {
301 combatStalker->AI()->DoAction(ACTION_GORMOK_DEAD);
302 }
303 else
305 }
306
307 void UpdateAI(uint32 diff) override
308 {
310 return;
311
312 events.Update(diff);
313
315 return;
316
317 while (uint32 eventId = events.ExecuteEvent())
318 {
319 ExecuteEvent(eventId);
321 return;
322 }
323
325 }
326};
327
329{
331
338
339 void PassengerBoarded(Unit* who, int8 seatId, bool apply) override
340 {
341 if (apply && seatId == GORMOK_HAND_SEAT)
342 who->CastSpell(who, SPELL_RISING_ANGER, true);
343 }
344
345 void MovementInform(uint32 type, uint32 pointId) override
346 {
347 if (type == SPLINE_CHAIN_MOTION_TYPE && pointId == POINT_INITIAL_MOVEMENT)
349 }
350
351 void ExecuteEvent(uint32 eventId) override
352 {
353 switch (eventId)
354 {
355 case EVENT_ENGAGE:
357 me->SetImmuneToPC(false);
359 // Npc that should keep raid in combat while boss change
361 {
362 DoZoneInCombat(combatStalker);
363 combatStalker->SetCombatPulseDelay(5);
364 }
368 break;
369 case EVENT_IMPALE:
371 events.Repeat(10s);
372 break;
375 events.Repeat(22s);
376 break;
377 case EVENT_THROW:
378 for (uint8 i = 0; i < MAX_SNOBOLDS; ++i)
379 {
380 if (Unit* snobold = me->GetVehicleKit()->GetPassenger(i))
381 {
382 snobold->ExitVehicle();
383 snobold->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
384 snobold->GetAI()->DoAction(ACTION_DISABLE_FIRE_BOMB);
385 snobold->CastSpell(me, SPELL_JUMP_TO_HAND, true);
386 break;
387 }
388 }
389 events.Repeat(20s);
390 break;
391 default:
392 break;
393 }
394 }
395};
396
398{
399 npc_snobold_vassal(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _mountedOnPlayer(false), _gormokDead(false)
400 {
402 SetCombatMovement(false);
403 }
404
405 bool CanAIAttack(Unit const* who) const override
406 {
407 if (_mountedOnPlayer && who->GetGUID() != _targetGUID)
408 return false;
409
410 return ScriptedAI::CanAIAttack(who);
411 }
412
413 void AttackStart(Unit* victim) override
414 {
416 if (!_mountedOnPlayer && (!gormok || !gormok->IsAlive()))
417 AttackStartCaster(victim, 30.0f);
418 else
420 }
421
422 void JustEngagedWith(Unit* /*who*/) override
423 {
426 }
427
428 void JustDied(Unit* /*killer*/) override
429 {
431 }
432
433 void DoAction(int32 action) override
434 {
435 switch (action)
436 {
439 break;
442 break;
444 _mountedOnPlayer = true;
445 break;
446 default:
447 break;
448 }
449 }
450
451 void SetGUID(ObjectGuid const& guid, int32 id) override
452 {
453 if (id == DATA_NEW_TARGET)
454 if (Unit* target = ObjectAccessor::GetPlayer(*me, guid))
455 {
456 _targetGUID = guid;
457 AttackStart(target);
461 }
462 }
463
465 {
467 if (gormok && gormok->IsAlive())
468 {
469 me->AttackStop();
471 _mountedOnPlayer = false;
474
475 for (uint8 i = 0; i < MAX_SNOBOLDS; i++)
476 {
477 if (!gormok->GetVehicleKit()->GetPassenger(i))
478 {
479 me->EnterVehicle(gormok, i);
481 break;
482 }
483 }
484 }
485 else
486 {
490 me->AttackStop();
491 SetCombatMovement(true);
492 _gormokDead = true;
493 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
494 {
495 AttackStart(target);
496 me->GetMotionMaster()->MoveChase(target);
499 }
500 }
501 }
502
503 void UpdateAI(uint32 diff) override
504 {
505 if (!UpdateVictim())
506 return;
507
508 _events.Update(diff);
509
511 return;
512
513 while (uint32 eventId = _events.ExecuteEvent())
514 {
515 switch (eventId)
516 {
517 case EVENT_FIRE_BOMB:
518 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
519 me->CastSpell(target, SPELL_FIRE_BOMB);
520 _events.Repeat(20s, 30s);
521 break;
522 case EVENT_HEAD_CRACK:
523 if (Unit* target = me->GetVehicleBase())
524 DoCast(target, SPELL_HEAD_CRACK);
525 else
527 _events.Repeat(30s);
528 break;
529 case EVENT_BATTER:
530 if (Unit* target = me->GetVehicleBase())
531 DoCast(target, SPELL_BATTER);
532 else
534 _events.Repeat(10s, 15s);
535 break;
536 case EVENT_SNOBOLLED:
538 break;
540 if (!me->GetVehicleBase())
541 MountOnBoss();
542 _events.Repeat(3s);
543 break;
544 default:
545 break;
546 }
547
549 return;
550 }
551
552 // do melee attack only if is in player back or if gormok is dead.
555 }
556
557private:
563};
564
566{
567 npc_fire_bomb(Creature* creature) : ScriptedAI(creature) { }
568
569 void Reset() override
570 {
572 }
573};
574
576{
577 npc_beasts_combat_stalker(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
578
579 void Reset() override
580 {
582 _events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 9min : 15min);
583 }
584
585 void DoAction(int32 action) override
586 {
587 switch (action)
588 {
591 break;
594 break;
597 break;
600 break;
601 default:
602 break;
603 }
604 }
605
606 void UpdateAI(uint32 diff) override
607 {
608 _events.Update(diff);
609
610 while (uint32 eventId = _events.ExecuteEvent())
611 {
612 switch (eventId)
613 {
614 case EVENT_BERSERK:
616 gormok->CastSpell(gormok, SPELL_BERSERK, true);
617
618 if (Creature* dreadscale = _instance->GetCreature(DATA_DREADSCALE))
619 dreadscale->CastSpell(dreadscale, SPELL_BERSERK, true);
620
622 acidmaw->CastSpell(acidmaw, SPELL_BERSERK, true);
623
625 icehowl->CastSpell(icehowl, SPELL_BERSERK, true);
626 break;
629 tirion->AI()->DoAction(ACTION_START_JORMUNGARS);
630 break;
633 tirion->AI()->DoAction(ACTION_START_ICEHOWL);
634 break;
635 default:
636 break;
637 }
638 }
639 }
640
641private:
644};
645
647{
648 boss_jormungarAI(Creature* creature, uint32 bossId) : boss_northrend_beastsAI(creature, bossId)
649 {
650 Initialize();
651 }
652
654 {
655 otherWormEntry = 0;
656 modelStationary = 0;
657 modelMobile = 0;
658 biteSpell = 0;
659 spewSpell = 0;
660 spitSpell = 0;
661 spraySpell = 0;
662 wasMobile = false;
663 }
664
665 void Reset() override
666 {
667 Initialize();
669 }
670
671 void JustSummoned(Creature* summoned) override
672 {
673 if (summoned->GetEntry() == NPC_ACIDMAW)
674 BossAI::JustSummoned(summoned);
675 else
676 summons.Summon(summoned);
677 }
678
695
697 {
698 return wormEntry == NPC_ACIDMAW ? DATA_ACIDMAW : DATA_DREADSCALE;
699 }
700
701 void JustDied(Unit* /*killer*/) override
702 {
704 {
705 if (!otherWorm->IsAlive())
706 {
709 otherWorm->DespawnOrUnsummon();
711 combatStalker->AI()->DoAction(ACTION_JORMUNGARS_DEAD);
712 }
713 else
714 {
716 otherWorm->AI()->DoAction(ACTION_ENRAGE);
717 }
718 }
720 }
721
722 void DoAction(int32 action) override
723 {
724 if (action == ACTION_ENRAGE)
725 {
730 }
731 }
732
762
763 void Emerge()
764 {
767 me->RemoveAurasDueToSpell(submergeSpell);
774 AttackStart(target);
775
776 // if the worm was mobile before submerging, make him stationary now
777 if (wasMobile)
778 {
783 }
784 else
785 {
786 if (Unit* target = me->GetVictim())
787 me->GetMotionMaster()->MoveChase(target);
790 }
793 }
794
795 void ExecuteEvent(uint32 eventId) override
796 {
797 switch (eventId)
798 {
799 case EVENT_ENGAGE:
800 if (me->GetEntry() == NPC_DREADSCALE)
801 {
803 me->SetImmuneToPC(false);
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 else
871 }
872
873 protected:
882};
883
907
929
931{
933
934 void Reset() override
935 {
937 {
940 }, 1s);
941 }
942};
943
945{
947
955
963
964 void MovementInform(uint32 type, uint32 pointId) override
965 {
966 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE && type != SPLINE_CHAIN_MOTION_TYPE)
967 return;
968
969 switch (pointId)
970 {
973 break;
974 case POINT_MIDDLE:
977 break;
979 events.Reset();
984 break;
985 default:
986 break;
987 }
988 }
989
990 void DoAction(int32 action) override
991 {
992 if (action == ACTION_ENRAGE)
993 {
996 }
997 else if (action == ACTION_TRAMPLE_FAIL)
998 {
1001 events.DelayEvents(15s);
1002 }
1003 }
1004
1005 void ExecuteEvent(uint32 eventId) override
1006 {
1007 switch (eventId)
1008 {
1009 case EVENT_ENGAGE:
1011 me->SetImmuneToPC(false);
1015 break;
1018 me->AttackStop();
1020 me->GetMotionMaster()->MoveJump(ToCCommonLoc[1], 20.0f, 20.0f, POINT_MIDDLE);
1021 break;
1023 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
1024 {
1025 DoCast(target, SPELL_FURIOUS_CHARGE_SUMMON, true);
1026 me->SetTarget(target->GetGUID());
1027 Talk(EMOTE_TRAMPLE_ROAR, target);
1029 }
1030 break;
1031 case EVENT_ICEHOWL_ROAR:
1033 DoCast(stalker, SPELL_ROAR);
1035 break;
1036 case EVENT_JUMP_BACK:
1038 DoCast(stalker, SPELL_JUMP_BACK);
1040 break;
1041 case EVENT_TRAMPLE:
1043 me->GetMotionMaster()->MoveCharge(stalker->GetPositionX(), stalker->GetPositionY(), stalker->GetPositionZ(), 42.0f, POINT_ICEHOWL_CHARGE);
1045 break;
1048 events.Repeat(20s);
1049 break;
1051 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
1052 DoCast(target, SPELL_ARCTIC_BREATH);
1053 events.Repeat(24s);
1054 break;
1055 case EVENT_WHIRL:
1057 events.Repeat(16s);
1058 break;
1059 default:
1060 break;
1061 }
1062 }
1063};
1064
1065// 66342 - Jump to Hand
1067{
1069
1070 bool Validate(SpellInfo const* /*spell*/) override
1071 {
1073 }
1074
1075 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1076 {
1077 Unit* caster = GetCaster();
1078 if (!caster || caster->GetEntry() != NPC_SNOBOLD_VASSAL)
1079 return;
1080
1081 if (Creature* gormok = GetTarget()->ToCreature())
1082 if (Unit* target = gormok->AI()->SelectTarget(SelectTargetMethod::Random, 0, SnobolledTargetSelector()))
1083 {
1084 gormok->AI()->Talk(EMOTE_SNOBOLLED);
1086 caster->CastSpell(target, SPELL_RIDE_PLAYER, true);
1087 }
1088 }
1089
1094};
1095
1096// 66245 - Ride Vehicle
1098{
1100
1101 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1102 {
1103 Unit* target = GetTarget();
1104 if (target->GetTypeId() != TYPEID_PLAYER || !target->IsInWorld())
1105 return;
1106
1107 if (Unit *caster = GetCaster())
1108 if (caster->IsAIEnabled())
1109 caster->GetAI()->SetGUID(target->GetGUID(), DATA_NEW_TARGET);
1110 }
1111
1116};
1117
1118// 66406 - Snobolled!
1120{
1122
1123 bool Validate(SpellInfo const* /*spell*/) override
1124 {
1126 }
1127
1128 void OnPeriodic(AuraEffect const* /*aurEff*/)
1129 {
1130 if (!GetTarget()->HasAura(SPELL_RIDE_PLAYER))
1131 Remove();
1132 }
1133
1138};
1139
1140// 66823, 67618, 67619, 67620 - Paralytic Toxin
1142{
1144
1145 bool Validate(SpellInfo const* /*spell*/) override
1146 {
1148 }
1149
1150 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1151 {
1152 Unit* caster = GetCaster();
1153 if (caster && caster->GetEntry() == NPC_ACIDMAW)
1154 if (Creature* acidmaw = caster->ToCreature())
1155 acidmaw->AI()->Talk(SAY_SPECIAL, GetTarget());
1156 }
1157
1158 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1159 {
1161 }
1162
1163 void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
1164 {
1165 if (!canBeRecalculated)
1166 amount = aurEff->GetAmount();
1167
1168 canBeRecalculated = false;
1169 }
1170
1171 void HandleDummy(AuraEffect const* /*aurEff*/)
1172 {
1173 if (AuraEffect* slowEff = GetEffect(EFFECT_0))
1174 {
1175 int32 newAmount = slowEff->GetAmount() - 10;
1176 if (newAmount < -100)
1177 newAmount = -100;
1178 slowEff->ChangeAmount(newAmount);
1179
1180 if (newAmount == -100 && !GetTarget()->HasAura(SPELL_PARALYSIS))
1181 GetTarget()->CastSpell(GetTarget(), SPELL_PARALYSIS, CastSpellExtraArgs(slowEff).SetOriginalCaster(GetCasterGUID()));
1182 }
1183 }
1184
1192};
1193
1194// 66870, 67621, 67622, 67623 - Burning Bile
1210
1211// 66882 - Slime Pool
1213{
1215
1216 bool Validate(SpellInfo const* spellInfo) override
1217 {
1218 return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
1219 }
1220
1221 void PeriodicTick(AuraEffect const* aurEff)
1222 {
1224
1225 int32 const radius = static_cast<int32>(((aurEff->GetTickNumber() / 60.f) * 0.9f + 0.1f) * 10000.f * 2.f / 3.f);
1226 CastSpellExtraArgs args(aurEff);
1227 args.AddSpellMod(SPELLVALUE_RADIUS_MOD, radius);
1228 GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, args);
1229 }
1230
1235};
1236
1237/* 66869 - Burning Bile
1238 66823 - Paralytic Toxin */
1240{
1242
1243public:
1245
1246private:
1247 bool Validate(SpellInfo const* /*spell*/) override
1248 {
1249 return ValidateSpellInfo({ _spellId });
1250 }
1251
1252 void HandleScript(SpellEffIndex /*effIndex*/)
1253 {
1255 }
1256
1261
1263};
1264
1265// 66830 - Paralysis
1267{
1269
1270 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1271 {
1272 if (Unit* caster = GetCaster())
1273 if (InstanceScript* instance = caster->GetInstanceScript())
1274 if (instance->GetBossState(DATA_NORTHREND_BEASTS) == IN_PROGRESS)
1275 return;
1276
1277 Remove();
1278 }
1279
1284};
1285
1286// 66688 - Arctic Breath
1288{
1290
1291 bool Validate(SpellInfo const* spellInfo) override
1292 {
1293 return ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
1294 }
1295
1297 {
1298 uint32 spellId = GetEffectInfo().CalcValue();
1299 GetCaster()->CastSpell(GetHitUnit(), spellId, true);
1300 }
1301
1306};
1307
1308// 66734 - Trample
1310{
1312
1313 void CheckTargets(std::list<WorldObject*>& targets)
1314 {
1315 Creature* caster = GetCaster()->ToCreature();
1316 if (!caster || !caster->IsAIEnabled())
1317 return;
1318
1319 if (targets.empty())
1320 caster->AI()->DoAction(ACTION_TRAMPLE_FAIL);
1321 else
1322 caster->AI()->DoAction(ACTION_ENRAGE);
1323 }
1324
1329};
1330
1331// 66683 - Massive Crash
1333{
1335
1336 bool Validate(SpellInfo const* /*spell*/) override
1337 {
1339 }
1340
1341 void HandleSpeed(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1342 {
1343 if (Player* target = GetTarget()->ToPlayer())
1344 if (target->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL || target->GetRaidDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
1345 target->CastSpell(target, SPELL_SURGE_OF_ADRENALINE, true);
1346 }
1347
1352};
1353
@ RAID_DIFFICULTY_10MAN_NORMAL
Definition DBCEnums.h:286
@ RAID_DIFFICULTY_25MAN_NORMAL
Definition DBCEnums.h:287
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
@ IN_PROGRESS
@ FAIL
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
float frand(float min, float max)
Definition Random.cpp:55
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1127
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_ONESHOT_SUBMERGE
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
@ 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)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ MOVE_RUN
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_ROOT
Definition Unit.h:230
@ UNIT_STATE_CASTING
Definition Unit.h:235
@ 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
int32 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
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectApplyHandler > OnEffectApply
InstanceScript *const instance
void JustSummoned(Creature *summon) override
virtual void ExecuteEvent(uint32)
SummonList summons
EventMap events
virtual void ScheduleTasks()
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Creature *const me
Definition CreatureAI.h:82
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetCombatPulseDelay(uint32 delay)
Definition Creature.h:269
void SetDisplayId(uint32 modelId) override
void SetImmuneToPC(bool apply) override
Definition Creature.h:129
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid guid) override
CreatureAI * AI() const
Definition Creature.h:154
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:95
EventId ExecuteEvent()
Definition EventMap.cpp:73
bool IsInPhase(PhaseIndex phase) const
Definition EventMap.h:236
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:52
void CancelEvent(EventId eventId)
Definition EventMap.cpp:151
void SetPhase(PhaseIndex phase)
Definition EventMap.cpp:28
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void Reset()
Definition EventMap.cpp:21
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=nullptr, uint8 param1=0, uint8 param2=0)
Definition model.h:33
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false)
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false)
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
static ObjectGuid const Empty
Definition ObjectGuid.h:140
void Clear()
Definition ObjectGuid.h:150
static Creature * ToCreature(Object *o)
Definition Object.h:186
bool IsInWorld() const
Definition Object.h:73
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
bool operator()(Unit *unit) const
uint32 TriggerSpell
Definition SpellInfo.h:228
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
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)
virtual void DoAction(int32)
Definition UnitAI.h:154
void AttackStartCaster(Unit *victim, float dist)
Definition UnitAI.cpp:48
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
virtual bool CanAIAttack(Unit const *) const
Definition UnitAI.h:139
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
void EnterVehicle(Unit *base, int8 seatId=-1)
Definition Unit.cpp:12569
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3765
void SetControlled(bool apply, UnitState state)
Definition Unit.cpp:11256
float GetCollisionHeight() const override
Definition Unit.cpp:13924
void UpdateSpeed(UnitMoveType mtype)
Definition Unit.cpp:8523
Unit * GetVehicleBase() const
Definition Unit.cpp:11826
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool IsAlive() const
Definition Unit.h:1234
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
UnitAI * GetAI() const
Definition Unit.h:800
bool IsAIEnabled() const
Definition Unit.h:798
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8678
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1568
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
Vehicle * GetVehicleKit() const
Definition Unit.h:1735
bool AttackStop()
Definition Unit.cpp:5645
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Definition Vehicle.cpp:296
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
EventProcessor m_Events
Definition Object.h:591
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:55
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:56
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_gormok_jump_to_hand)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_gormok_ride_player)
PrepareAuraScript(spell_gormok_snobolled)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *)
PrepareSpellScript(spell_icehowl_arctic_breath)
bool Validate(SpellInfo const *spellInfo) override
void HandleSpeed(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_icehowl_massive_crash)
PrepareSpellScript(spell_icehowl_trample)
void CheckTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_jormungars_burning_bile)
void HandleScriptEffect(SpellEffIndex effIndex)
PrepareAuraScript(spell_jormungars_paralysis)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_jormungars_paralytic_toxin)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void CalculateAmount(AuraEffect const *aurEff, int32 &amount, bool &canBeRecalculated)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_jormungars_slime_pool)
bool Validate(SpellInfo const *spellInfo) override
void PeriodicTick(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_jormungars_snakes_spray)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
bool IsHeroic() const
void AttackStart(Unit *) override
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
npc_snobold_vassal(Creature *creature)
bool CanAIAttack(Unit const *who) const override
@ DATA_MAIN_GATE
Position const 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