TrinityCore
Loading...
Searching...
No Matches
boss_deathbringer_saurfang.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 "InstanceScript.h"
21#include "Map.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "ScriptedCreature.h"
25#include "ScriptedGossip.h"
26#include "ScriptMgr.h"
27#include "SpellAuras.h"
28#include "SpellScript.h"
29
31{
32 // Deathbringer Saurfang
48
49 // High Overlord Saurfang
57 SAY_OUTRO_ALLIANCE_12 = 7, // kneel after WP reached
65
66 // Muradin Bronzebeard
80
81 // Lady Jaina Proudmoore
84
85 // King Varian Wrynn
90};
91
123
124// Helper to get id of the aura on different modes (HasAura(baseId) wont work)
125#define BOILING_BLOOD_HELPER RAID_MODE<int32>(72385, 72441, 72442, 72443)
126
128{
136
146
148
155
177
186};
187
194
205
207{
208 DATA_MADE_A_MESS = 45374613, // 4537, 4613 are achievement IDs
209
212
214};
215
217{
218 POINT_SAURFANG = 3781300,
220 POINT_CHARGE = 3781302,
221 POINT_CHOKE = 3781303,
222 POINT_CORPSE = 3781304,
223 POINT_FINAL = 3781305,
224 POINT_EXIT = 5, // waypoint id
225};
226
227Position const deathbringerPos = {-496.3542f, 2211.33f, 541.1138f, 0.0f};
228Position const firstStepPos = {-541.3177f, 2211.365f, 539.2921f, 0.0f};
229
231{
232 {-509.6505f, 2211.377f, 539.2872f, 0.0f}, // High Overlord Saurfang/Muradin Bronzebeard
233 {-508.7480f, 2211.897f, 539.2870f, 0.0f}, // front left
234 {-509.2929f, 2211.411f, 539.2870f, 0.0f}, // front right
235 {-506.6607f, 2211.367f, 539.2870f, 0.0f}, // back middle
236 {-506.1137f, 2213.306f, 539.2870f, 0.0f}, // back left
237 {-509.0040f, 2211.743f, 539.2870f, 0.0f} // back right
238};
239
241{
242 {-514.4834f, 2211.334f, 549.2887f, 0.0f}, // High Overlord Saurfang/Muradin Bronzebeard
243 {-510.1081f, 2211.592f, 546.3773f, 0.0f}, // front left
244 {-513.3210f, 2211.396f, 551.2882f, 0.0f}, // front right
245 {-507.3684f, 2210.353f, 545.7497f, 0.0f}, // back middle
246 {-507.0486f, 2212.999f, 545.5512f, 0.0f}, // back left
247 {-510.7041f, 2211.069f, 546.5298f, 0.0f} // back right
248};
249
250Position const finalPos = {-563.7552f, 2211.328f, 538.7848f, 0.0f};
251
252// 37813 - Deathbringer Saurfang
254{
256 {
257 ASSERT(creature->GetVehicleKit()); // we dont actually use it, just check if exists
259 }
260
278
318
319 void JustDied(Unit* /*killer*/) override
320 {
321 }
322
323 void AttackStart(Unit* victim) override
324 {
325 if (me->IsImmuneToPC())
326 return;
327
329 }
330
331 void EnterEvadeMode(EvadeReason why) override
332 {
334 if (_introDone)
335 me->SetImmuneToPC(false);
336 }
337
347
348 void KilledUnit(Unit* victim) override
349 {
350 if (victim->GetTypeId() == TYPEID_PLAYER)
351 Talk(SAY_KILL);
352 }
353
354 void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
355 {
356 if (damage >= me->GetHealth())
357 damage = me->GetHealth() - 1;
358
359 if (!_frenzied && HealthBelowPct(31)) // AT 30%, not below
360 {
361 _frenzied = true;
364 }
365
366 if (!_dead && me->GetHealth()-damage < FightWonValue)
367 {
368 _dead = true;
369 _JustDied();
371 me->SetUninteractible(true);
372 me->SetImmuneToPC(true);
380 creature->AI()->DoAction(ACTION_START_OUTRO);
381 }
382 }
383
384 void JustSummoned(Creature* summon) override
385 {
386 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
387 {
388 if (target->GetTransport())
389 {
390 summon->DespawnOrUnsummon(1ms);
392 return;
393 }
394
395 summon->AI()->AttackStart(target);
396 }
397
398 summon->CastSpell(summon, SPELL_BLOOD_LINK_BEAST, true);
399 summon->CastSpell(summon, SPELL_RESISTANT_SKIN, true);
400 summons.Summon(summon);
401 DoZoneInCombat(summon);
402 }
403
404 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
405 {
406 summons.Despawn(summon);
407 }
408
409 void MovementInform(uint32 type, uint32 id) override
410 {
411 if (type != POINT_MOTION_TYPE && id != POINT_SAURFANG)
412 return;
413
415 }
416
417 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
418 {
419 if (target->GetTransport())
420 {
422 return;
423 }
424
425 switch (spellInfo->Id)
426 {
429 break;
430 case 72255: // Mark of the Fallen Champion, triggered id
431 case 72444:
432 case 72445:
433 case 72446:
435 {
437 args.AddSpellBP0(1);
438 target->CastSpell(nullptr, SPELL_BLOOD_LINK_DUMMY, args);
439 }
440 break;
441 default:
442 break;
443 }
444 }
445
446 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
447 {
448 if (spellInfo->Id == SPELL_BLOOD_LINK_POWER)
449 if (Aura* bloodPower = me->GetAura(SPELL_BLOOD_POWER))
450 bloodPower->RecalculateAmountOfEffects();
451 }
452
453 void UpdateAI(uint32 diff) override
454 {
456 return;
457
458 events.Update(diff);
459
461 return;
462
463 while (uint32 eventId = events.ExecuteEvent())
464 {
465 switch (eventId)
466 {
468 me->SetUninteractible(false);
471 break;
474 break;
479 break;
481 me->SetUninteractible(false);
484 break;
487 break;
491 break;
494 _introDone = true;
495 me->SetImmuneToPC(false);
496 break;
498 for (uint32 i10 = 0; i10 < 2; ++i10)
500 if (Is25ManRaid())
501 for (uint32 i25 = 0; i25 < 3; ++i25)
505 if (IsHeroic())
507 break;
508 case EVENT_BLOOD_NOVA:
511 break;
515 break;
519 break;
520 case EVENT_BERSERK:
523 break;
525 if (!summons.empty())
526 {
529 }
530 break;
531 default:
532 break;
533 }
534
536 return;
537 }
538 }
539
540 uint32 GetData(uint32 type) const override
541 {
542 if (type == DATA_MADE_A_MESS)
543 if (_fallenChampionCastCount < RAID_MODE<uint32>(3, 5, 3, 5))
544 return 1;
545
546 return 0;
547 }
548
549 // intro setup
550 void DoAction(int32 action) override
551 {
552 switch (action)
553 {
554 case PHASE_INTRO_A:
555 case PHASE_INTRO_H:
556 {
557 // controls what events will execute
558 events.SetPhase(uint32(action));
559
562
565
567 break;
568 }
570 {
571 if (_introDone)
572 return;
573
576
580 break;
581 }
583 {
585 {
589 if (Aura* bloodPower = me->GetAura(SPELL_BLOOD_POWER))
590 bloodPower->RecalculateAmountOfEffects();
591 }
592 break;
593 }
594 default:
595 break;
596 }
597 }
598
599 bool CanAIAttack(Unit const* target) const override
600 {
601 if (target->GetTransport())
602 return false;
603
604 return BossAI::CanAIAttack(target);
605 }
606
607 static uint32 const FightWonValue;
608
609private:
612 bool _frenzied; // faster than iterating all auras to find Frenzy
613 bool _dead;
614};
615
617
618// 37187 - High Overlord Saurfang
620{
622 {
623 ASSERT(creature->GetVehicleKit());
625 }
626
627 void Reset() override
628 {
629 _events.Reset();
630 }
631
632 bool OnGossipSelect(Player* player, uint32 menuId, uint32 /*gossipListId*/) override
633 {
635 {
636 CloseGossipMenuFor(player);
638 }
639 return false;
640 }
641
642 void GuardBroadcast(int32 action) const
643 {
644 std::vector<Creature*> guardList;
646 for (Creature* guard : guardList)
647 guard->AI()->DoAction(action);
648 }
649
650 void DoAction(int32 action) override
651 {
652 switch (action)
653 {
655 {
656 // Prevent crashes
658 return;
659
660 std::list<Creature*> guardList;
662 guardList.sort(Trinity::ObjectDistanceOrderPred(me));
663 uint32 x = 1;
664 for (auto itr = guardList.begin(); itr != guardList.end(); ++x, ++itr)
665 (*itr)->AI()->SetData(0, x);
666
673 deathbringer->AI()->DoAction(PHASE_INTRO_H);
674 break;
675 }
677 {
684 me->SetDisableGravity(false);
687 break;
688 }
690 {
691 _events.Reset();
693 break;
694 }
695 default:
696 break;
697 }
698 }
699
700 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
701 {
702 if (spellInfo->Id == SPELL_GRIP_OF_AGONY)
703 {
704 me->SetDisableGravity(true);
706 }
707 }
708
709 void MovementInform(uint32 type, uint32 id) override
710 {
711 if (type == POINT_MOTION_TYPE)
712 {
713 switch (id)
714 {
715 case POINT_FIRST_STEP:
716 me->SetWalk(false);
723 deathbringer->AI()->DoAction(ACTION_CONTINUE_INTRO);
724 break;
725 case POINT_CORPSE:
727 {
728 deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true); // for the packet logs.
729 deathbringer->SetUninteractible(true);
730 deathbringer->SetUnitFlag2(UNIT_FLAG2_PLAY_DEATH_ANIM);
731 deathbringer->SetEmoteState(EMOTE_STATE_DROWNED);
732 }
735 break;
736 case POINT_FINAL:
738 deathbringer->DespawnOrUnsummon();
740 break;
741 default:
742 break;
743 }
744 }
745 else if (type == WAYPOINT_MOTION_TYPE && id == POINT_EXIT)
746 {
748 }
749 }
750
751 void UpdateAI(uint32 diff) override
752 {
753 _events.Update(diff);
754 while (uint32 eventId = _events.ExecuteEvent())
755 {
756 switch (eventId)
757 {
759 me->SetWalk(true);
761 break;
764 break;
767 break;
770 break;
774 me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
775 break;
776 case EVENT_OUTRO_HORDE_2: // say
778 me->SetFacingToObject(deathbringer);
780 break;
781 case EVENT_OUTRO_HORDE_3: // say
783 break;
784 case EVENT_OUTRO_HORDE_4: // move
786 {
787 float x, y, z;
788 deathbringer->GetClosePoint(x, y, z, deathbringer->GetCombatReach());
789 me->SetWalk(true);
791 }
792 break;
793 case EVENT_OUTRO_HORDE_5: // move
795 break;
796 case EVENT_OUTRO_HORDE_6: // say
798 break;
799 }
800 }
801 }
802
803private:
806};
807
808// 37200 - Muradin Bronzebeard
810{
812 {
814 }
815
816 void Reset() override
817 {
818 _events.Reset();
819 }
820
821 bool OnGossipSelect(Player* player, uint32 menuId, uint32 /*gossipListId*/) override
822 {
824 {
825 CloseGossipMenuFor(player);
827 }
828 return false;
829 }
830
831 void GuardBroadcast(int32 action) const
832 {
833 std::vector<Creature*> guardList;
835 for (Creature* guard : guardList)
836 guard->AI()->DoAction(action);
837 }
838
839 void DoAction(int32 action) override
840 {
841 switch (action)
842 {
844 {
845 // Prevent crashes
847 return;
848
850 std::list<Creature*> guardList;
852 guardList.sort(Trinity::ObjectDistanceOrderPred(me));
853 uint32 x = 1;
854 for (auto itr = guardList.begin(); itr != guardList.end(); ++x, ++itr)
855 (*itr)->AI()->SetData(0, x);
856
862 deathbringer->AI()->DoAction(PHASE_INTRO_A);
863 break;
864 }
866 {
869 me->SetDisableGravity(false);
872
873 // temp until outro fully done - to put deathbringer on respawn timer (until next reset)
875 deathbringer->DespawnOrUnsummon(5s);
876 break;
877 }
879 _events.Reset();
881 break;
882 }
883 }
884
885 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
886 {
887 if (spellInfo->Id == SPELL_GRIP_OF_AGONY)
888 {
889 me->SetDisableGravity(true);
891 }
892 }
893
894 void MovementInform(uint32 type, uint32 id) override
895 {
896 if (type == POINT_MOTION_TYPE && id == POINT_FIRST_STEP)
897 {
898 me->SetWalk(false);
902 deathbringer->AI()->DoAction(ACTION_CONTINUE_INTRO);
903 }
904 else if (type == WAYPOINT_MOTION_TYPE && id == POINT_EXIT)
905 {
907 }
908 }
909
910 void UpdateAI(uint32 diff) override
911 {
912 _events.Update(diff);
913 while (uint32 eventId = _events.ExecuteEvent())
914 {
915 switch (eventId)
916 {
918 me->SetWalk(true);
920 break;
924 me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
925 break;
926 }
927 }
928 }
929
930private:
933};
934
935// 37830 - Skybreaker Marine
936// 37920 - Kor'kron Reaver
938{
940 {
941 _index = 0;
942 }
943
944 void SetData(uint32 type, uint32 data) override
945 {
946 if (!(!type && data && data < 6))
947 return;
948 _index = data;
949 }
950
951 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
952 {
953 if (spellInfo->Id == SPELL_GRIP_OF_AGONY)
954 {
955 me->SetDisableGravity(true);
957 }
958 }
959
960 void DoAction(int32 action) override
961 {
962 if (action == ACTION_CHARGE && _index)
963 me->GetMotionMaster()->MoveCharge(chargePos[_index].GetPositionX(), chargePos[_index].GetPositionY(), chargePos[_index].GetPositionZ(), 13.0f, POINT_CHARGE);
964 else if (action == ACTION_DESPAWN)
966 }
967
968private:
970};
971
972// 72202 - Blood Link
993
994// 72178 - Blood Link
996{
997 bool Validate(SpellInfo const* /*spellInfo*/) override
998 {
1000 }
1001
1002 void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
1003 {
1005 if (GetUnitOwner()->GetPowerType() == POWER_ENERGY && GetUnitOwner()->GetPower(POWER_ENERGY) == GetUnitOwner()->GetMaxPower(POWER_ENERGY))
1006 if (Creature* saurfang = GetUnitOwner()->ToCreature())
1007 saurfang->AI()->DoAction(ACTION_MARK_OF_THE_FALLEN_CHAMPION);
1008 }
1009
1014};
1015
1016// 72371 - Blood Power
1018{
1020 {
1021 if (Aura* aura = GetHitAura())
1022 aura->RecalculateAmountOfEffects();
1023 }
1024
1029};
1030
1045
1046// 72409, 72447, 72448, 72449 - Rune of Blood
1048{
1049 bool Validate(SpellInfo const* /*spellInfo*/) override
1050 {
1052 }
1053
1055 {
1056 PreventHitDefaultEffect(effIndex); // make this the default handler
1058 }
1059
1064};
1065
1066// 72176 - Blood Beast's Blood Link
1068{
1069 bool Validate(SpellInfo const* /*spellInfo*/) override
1070 {
1072 }
1073
1074 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1075 {
1077 eventInfo.GetActionTarget()->CastSpell(nullptr, SPELL_BLOOD_LINK_DUMMY, CastSpellExtraArgs(aurEff).AddSpellBP0(3));
1078 }
1079
1084};
1085
1086// 72380, 72438, 72439, 72440 - Blood Nova
1088{
1089 bool Validate(SpellInfo const* /*spellInfo*/) override
1090 {
1092 }
1093
1095 {
1096 PreventHitDefaultEffect(effIndex); // make this the default handler
1098 }
1099
1104};
1105
1106// 72378, 73058 - Blood Nova
1108{
1109public:
1111 {
1112 target = nullptr;
1113 }
1114
1115private:
1116 void FilterTargetsInitial(std::list<WorldObject*>& targets)
1117 {
1118 if (targets.empty())
1119 return;
1120
1121 // select one random target, preferring ranged targets
1122 uint32 targetsAtRange = 0;
1123 uint32 const minTargets = uint32(GetCaster()->GetMap()->Is25ManRaid() ? 10 : 4);
1124 targets.sort(Trinity::ObjectDistanceOrderPred(GetCaster(), false));
1125
1126 // get target count at range
1127 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr, ++targetsAtRange)
1128 if ((*itr)->GetDistance(GetCaster()) < 12.0f)
1129 break;
1130
1131 // If not enough ranged targets are present just select anyone
1132 if (targetsAtRange < minTargets)
1133 targetsAtRange = uint32(targets.size());
1134
1135 std::list<WorldObject*>::const_iterator itr = targets.begin();
1136 std::advance(itr, urand(0, targetsAtRange - 1));
1137 target = *itr;
1138 targets.clear();
1139 targets.push_back(target);
1140 }
1141
1142 // use the same target for first and second effect
1143 void FilterTargetsSubsequent(std::list<WorldObject*>& unitList)
1144 {
1145 unitList.clear();
1146 if (!target)
1147 return;
1148
1149 unitList.push_back(target);
1150 }
1151
1156
1163
1165};
1166
1167// 72385, 72441, 72442, 72443 - Boiling Blood
1169{
1170 bool Load() override
1171 {
1172 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1173 }
1174
1175 void FilterTargets(std::list<WorldObject*>& targets)
1176 {
1177 targets.remove(GetCaster()->GetVictim());
1178 if (targets.empty())
1179 return;
1180
1182 targets.clear();
1183 targets.push_back(target);
1184 }
1185
1190};
1191
1193{
1194 public:
1195 achievement_ive_gone_and_made_a_mess() : AchievementCriteriaScript("achievement_ive_gone_and_made_a_mess") { }
1196
1197 bool OnCheck(Player* /*source*/, Unit* target) override
1198 {
1199 if (target)
1200 if (Creature* saurfang = target->ToCreature())
1201 if (saurfang->AI()->GetData(DATA_MADE_A_MESS))
1202 return true;
1203
1204 return false;
1205 }
1206};
1207
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
#define ASSERT
Definition Errors.h:72
@ IN_PROGRESS
@ FAIL
@ WAYPOINT_MOTION_TYPE
@ POINT_MOTION_TYPE
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:43
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition ScriptMgr.h:1381
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_FORCE_CAST
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_STATE_DROWNED
@ POWER_ENERGY
@ FACTION_UNDEAD_SCOURGE
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_SCALE
@ SPELL_AURA_PERIODIC_DUMMY
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellHitFn(F)
EvadeReason
@ UNIT_FLAG2_PLAY_DEATH_ANIM
@ UNIT_NPC_FLAG_GOSSIP
DamageEffectType
@ UNIT_STATE_CASTING
Definition Unit.h:290
Position const deathbringerPos
Position const chargePos[6]
@ SPELL_MARK_OF_THE_FALLEN_CHAMPION
@ SPELL_SUMMON_BLOOD_BEAST_25_MAN
@ SPELL_REMOVE_MARKS_OF_THE_FALLEN_CHAMPION
@ SPELL_MARK_OF_THE_FALLEN_CHAMPION_S
@ SPAWN_GROUP_ENTRANCE_THE_DAMNED_EVENT
@ GOSSIP_MENU_HIGH_OVERLORD_SAURFANG
@ GOSSIP_MENU_MURADIN_BRONZEBEARD
Position const finalPos
void AddSC_boss_deathbringer_saurfang()
Position const chokePos[6]
@ ACTION_MARK_OF_THE_FALLEN_CHAMPION
Position const firstStepPos
@ SAY_MARK_OF_THE_FALLEN_CHAMPION
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
void _JustReachedHome()
bool CanAIAttack(Unit const *target) const override
SummonList summons
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Creature *const me
Definition CreatureAI.h:63
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:394
void SetImmuneToPC(bool apply) override
Definition Creature.h:190
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool IsImmuneToPC() const
Definition Unit.h:1060
CreatureAI * AI() const
Definition Creature.h:235
void Update(uint32 time)
Definition EventMap.h:77
EventId ExecuteEvent()
Definition EventMap.cpp:77
bool IsInPhase(PhaseIndex phase) const
Definition EventMap.h:246
void SetPhase(PhaseIndex phase)
Definition EventMap.cpp:32
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
void Reset()
Definition EventMap.cpp:25
virtual bool SetBossState(uint32 id, EncounterState state)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
virtual ObjectGuid GetGuidData(uint32 type) const override
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
bool SpawnGroupDespawn(uint32 groupId, bool deleteRespawnTimes=false, size_t *count=nullptr)
Definition Map.cpp:2449
void MoveFall(uint32 id=0, 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 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)
Player * ToPlayer()
Definition Object.h:126
Creature * ToCreature()
Definition Object.h:121
Unit * GetActionTarget() const
Definition Unit.h:514
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Aura * GetHitAura(bool dynObjAura=false, bool withRemoved=false) const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
SpellEffectValue GetEffectValue() const
int32 GetEffectValueAsInt() const
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
bool empty() const
void Despawn(Creature const *summon)
void Summon(Creature const *summon)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:71
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
void SetFaction(uint32 faction) override
Definition Unit.h:887
void SetPower(Powers power, int32 val, bool withPowerUpdate=true)
Definition Unit.cpp:10114
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
int32 GetMaxPower(Powers power) const
Definition Unit.cpp:10105
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:1013
void SetUninteractible(bool apply)
Definition Unit.cpp:8583
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13394
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4718
uint64 GetHealth() const
Definition Unit.h:800
bool SetWalk(bool enable)
Definition Unit.cpp:13422
int32 GetPower(Powers power) const
Definition Unit.cpp:10096
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
Vehicle * GetVehicleKit() const
Definition Unit.h:1798
bool SetDisableGravity(bool disable, bool updateAnimTier=true, bool updatePlayHoverAnim=true)
Definition Unit.cpp:13440
void RemoveAurasOnEvade()
Definition Unit.cpp:4461
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:394
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
TransportBase * GetTransport() const
Definition Object.h:537
void setActive(bool isActiveObject)
Definition Object.cpp:274
bool OnCheck(Player *, Unit *target) override
void FilterTargetsSubsequent(std::list< WorldObject * > &unitList)
void FilterTargetsInitial(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void RecalculateHook(AuraEffect const *, SpellEffectValue &amount, bool &canBeRecalculated)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
@ SPELL_REPUTATION_BOSS_KILL
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ GO_SAURFANG_S_DOOR
@ DATA_DEATHBRINGER_SAURFANG
@ DATA_SAURFANG_EVENT_NPC
@ NPC_SE_SKYBREAKER_MARINE
@ NPC_SE_KOR_KRON_REAVER
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
Definition Containers.h:110
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
constexpr float GetPositionX() const
Definition Position.h:87
constexpr float GetPositionY() const
Definition Position.h:88
constexpr float GetOrientation() const
Definition Position.h:90
constexpr float GetPositionZ() const
Definition Position.h:89
bool IsHeroic() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
bool HealthBelowPct(uint32 pct) const
bool Is25ManRaid() const
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
uint32 GetData(uint32 type) const override
void MovementInform(uint32 type, uint32 id) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void SummonedCreatureDies(Creature *summon, Unit *) override
void DoAction(int32 action) override
void AttackStart(Unit *victim) override
bool CanAIAttack(Unit const *target) const override
void JustSummoned(Creature *summon) override
void KilledUnit(Unit *victim) override
void EnterEvadeMode(EvadeReason why) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
bool OnGossipSelect(Player *player, uint32 menuId, uint32) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void MovementInform(uint32 type, uint32 id) override
void MovementInform(uint32 type, uint32 id) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
bool OnGossipSelect(Player *player, uint32 menuId, uint32) override
npc_saurfang_event(Creature *creature)
void DoAction(int32 action) override
void SetData(uint32 type, uint32 data) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override