TrinityCore
Loading...
Searching...
No Matches
boss_blood_prince_council.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 "InstanceScript.h"
20#include "Map.h"
21#include "MotionMaster.h"
22#include "ObjectAccessor.h"
23#include "PassiveAI.h"
24#include "Player.h"
25#include "ScriptedCreature.h"
26#include "ScriptMgr.h"
27#include "SpellAuraEffects.h"
28#include "SpellInfo.h"
29#include "SpellScript.h"
30#include "TemporarySummon.h"
31
64
66{
70
71 // Heroic mode
75
76 // Prince Keleseth
81
82 // Dark Nucleus
85
86 // Prince Taldaram
91
92 // Ball of Flame
96 SPELL_FLAMES = 71393,
98
99 // Ball of Inferno Flame
102
103 // Prince Valanar
110
111 // Kinetic Bomb
116
117 // Shock Vortex
120
121 // Visual Spells
126
149
160
166
176
178{
179 public:
180 StandUpEvent(Creature* owner) : BasicEvent(), _owner(owner) { }
181
182 bool Execute(uint64 /*eventTime*/, uint32 /*diff*/) override
183 {
186 return true;
187 }
188
189 private:
191};
192
194{
195public:
196 VortexEvent(Creature* owner) : _owner(owner) { }
197
198 bool Execute(uint64 /*eventTime*/, uint32 /*diff*/) override
199 {
201 return true;
202 }
203
204private:
206};
207
208Position const introFinalPos = {4660.490f, 2769.200f, 430.0000f, 0.000000f};
209Position const triggerPos = {4680.231f, 2769.134f, 379.9256f, 3.121708f};
210Position const triggerEndPos = {4680.180f, 2769.150f, 365.5000f, 3.121708f};
211
218
219// 38008 - Blood Orb Controller
221{
227
229 {
231 _resetCounter = 0;
232 }
233
234 void Reset() override
235 {
236 _Reset();
237 Initialize();
239
241 for (uint32 bossData : PrincesData)
242 if (Creature* prince = ObjectAccessor::GetCreature(*me, instance->GetGuidData(bossData)))
243 {
244 prince->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
245 prince->SetImmuneToPC(false);
246 if (bossData == DATA_PRINCE_VALANAR)
247 {
248 prince->SetHealth(prince->GetMaxHealth());
249 prince->CastSpell(prince, SPELL_REMOVE_EMPOWERED_BLOOD, true);
250 }
251 }
252 }
253
254 void EnterEvadeMode(EvadeReason /*why*/) override
255 {
256 for (uint32 bossData : PrincesData)
257 if (Creature* prince = ObjectAccessor::GetCreature(*me, instance->GetGuidData(bossData)))
259
262 }
263
264 void JustEngagedWith(Unit* who) override
265 {
267 return;
268
270 {
273 return;
274 }
275
276 me->setActive(true);
279
281
282 for (uint32 bossData : PrincesData)
283 if (Creature* prince = ObjectAccessor::GetCreature(*me, instance->GetGuidData(bossData)))
284 {
286 DoZoneInCombat(prince);
287 }
288
290
292 if (roll_chance(50))
293 {
296 }
297 else
298 {
301 }
302 }
303
304 void SetData(uint32 /*type*/, uint32 data) override
305 {
306 _resetCounter += uint8(data);
307 if (_resetCounter == 3)
309 }
310
311 uint32 GetData(uint32 data) const override
312 {
314 return DATA_INTRO_DONE;
315 return 0;
316 }
317
318 void JustDied(Unit* killer) override
319 {
320 events.Reset();
322 // Kill all prices
323 for (uint8 i = 0; i < 3; ++i)
324 {
325 if (++_invocationStage == 3)
327
329 {
330 // Make sure looting is allowed
331 prince->LowerPlayerDamageReq(prince->GetMaxHealth());
332 Unit::Kill(killer, prince);
333 }
334 }
335 }
336
337 void DoAction(int32 actionId) override
338 {
340 {
343 bloodQueen->AI()->DoAction(ACTION_START_INTRO);
344 }
345 else if (actionId == ACTION_INTRO_DONE)
346 {
347 // Remove feigh death from princes
348 for (uint32 bossData : PrincesData)
349 if (Creature* prince = ObjectAccessor::GetCreature(*me, instance->GetGuidData(bossData)))
350 {
351 prince->AI()->DoAction(ACTION_STAND_UP);
352 if (bossData == DATA_PRINCE_VALANAR)
353 prince->SetHealth(prince->GetMaxHealth());
354 }
355 }
356 }
357
358 void UpdateAI(uint32 diff) override
359 {
360 if (!UpdateVictim())
361 return;
362
363 events.Update(diff);
364
366 return;
367
368 while (uint32 eventId = events.ExecuteEvent())
369 {
370 switch (eventId)
371 {
373 {
375 if (++_invocationStage == 3)
377
379 if (oldPrince)
380 {
381 oldPrince->AI()->DoAction(ACTION_REMOVE_INVOCATION);
382 if (newPrince)
383 oldPrince->CastSpell(newPrince, _invocationOrder[_invocationStage].visualSpell, true);
384 }
385
386 if (newPrince)
387 {
388 newPrince->SetHealth(me->GetHealth());
389 newPrince->AI()->Talk(uint8(_invocationOrder[_invocationStage].textId));
390 }
391
393 events.Repeat(46s + 500ms);
394 break;
395 }
396 default:
397 break;
398 }
399
401 return;
402 }
403 }
404
405private:
407 {
412
413 InvocationData(ObjectGuid _guid, uint32 _spellId, uint32 _textId, uint32 _visualSpell)
414 {
415 guid = _guid;
416 spellId = _spellId;
417 textId = _textId;
418 visualSpell = _visualSpell;
419 }
420
423
426};
427
429{
430 BloodPrincesBossAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId), _spawnHealth (creature->GetMaxHealth()), _isEmpowered(false)
431 {
433 }
434
435 void InitializeAI() override
436 {
437 _spawnHealth = 1;
438 if (!me->isDead())
439 JustAppeared();
440 }
441
442 void Reset() override
443 {
444 events.Reset();
446
447 me->SetImmuneToPC(false);
448 _isEmpowered = false;
451 }
452
453 void JustEngagedWith(Unit* /*who*/) override
454 {
455 me->setActive(true);
457 DoZoneInCombat(controller);
459 }
460
461 virtual void ScheduleEvents() = 0;
462
463 void JustDied(Unit* /*killer*/) override
464 {
465 events.Reset();
468
469 switch (me->GetEntry())
470 {
473 break;
476 break;
479 break;
480 default:
481 break;
482 }
483 }
484
485 void JustAppeared() override
486 {
488 if (controller->AI()->GetData(DATA_INTRO) != DATA_INTRO_DONE)
490
492 }
493
494 void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
495 {
496 if (!_isEmpowered)
497 {
498 AddThreat(attacker, float(damage));
499 damage = 0;
500 }
501 }
502
503 void KilledUnit(Unit* victim) override
504 {
505 if (victim->GetTypeId() == TYPEID_PLAYER)
506 switch (me->GetEntry())
507 {
510 break;
513 break;
516 break;
517 default:
518 break;
519 }
520 }
521
533
534 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
535 {
536 if (spellInfo->Id == SelectInvocationSpell())
538 }
539
540 void DamageDealt(Unit* /*target*/, uint32& damage, DamageEffectType damageType) override
541 {
542 if (damageType != SPELL_DIRECT_DAMAGE)
543 return;
544
545 if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
547 }
548
549 void DoAction(int32 action) override
550 {
551 switch (action)
552 {
553 case ACTION_STAND_UP:
555 me->SetUninteractible(false);
556 me->SetImmuneToPC(false);
559 break;
563 _isEmpowered = true;
564 break;
569 _isEmpowered = false;
570 break;
571 default:
572 break;
573 }
574 }
575
577 {
578 switch (me->GetEntry())
579 {
586 default: // Should never happen
587 return 0;
588 }
589 }
590
592 {
593 switch (me->GetEntry())
594 {
601 default: // Should never happen
602 return 0;
603 }
604 }
605
606protected:
609};
610
611// 37972 - Prince Keleseth
613{
618
631
632 void JustSummoned(Creature* summon) override
633 {
634 summons.Summon(summon);
635 Position pos = me->GetPosition();
636 float maxRange = me->GetDistance2d(summon);
637 float angle = me->GetAbsoluteAngle(summon);
638 me->MovePositionToFirstCollision(pos, maxRange, angle);
639 summon->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
641 }
642
643 void UpdateAI(uint32 diff) override
644 {
645 if (!UpdateVictim())
646 return;
647
648 events.Update(diff);
649
651 return;
652
653 while (uint32 eventId = events.ExecuteEvent())
654 {
655 switch (eventId)
656 {
657 case EVENT_BERSERK:
660 break;
664 events.Repeat(10s, 15s);
665 break;
668 events.Repeat(2s);
669 break;
670 default:
671 break;
672 }
673
675 return;
676 }
677 }
678};
679
680// 37973 - Prince Taldaram
682{
684
693
694 void JustSummoned(Creature* summon) override
695 {
696 summons.Summon(summon);
697 Unit* target = SelectTarget(SelectTargetMethod::Random, 1, -10.0f, true); // first try at distance
698 if (!target)
699 target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true); // too bad for you raiders, its going to boom
700
701 if (summon->GetEntry() == NPC_BALL_OF_INFERNO_FLAME && target)
702 Talk(EMOTE_TALDARAM_FLAME, target);
703
704 if (target)
705 summon->AI()->SetGUID(target->GetGUID(), DATA_CHASE_TARGET_GUID);
706 }
707
708 void UpdateAI(uint32 diff) override
709 {
710 if (!UpdateVictim())
711 return;
712
713 events.Update(diff);
714
716 return;
717
718 while (uint32 eventId = events.ExecuteEvent())
719 {
720 switch (eventId)
721 {
722 case EVENT_BERSERK:
725 break;
728 events.Repeat(15s, 50s);
729 break;
731 if (_isEmpowered)
732 {
734 events.Repeat(15s, 25s);
735 }
736 else
737 {
739 events.Repeat(20s, 30s);
740 }
742 break;
743 default:
744 break;
745 }
746
748 return;
749 }
750 }
751};
752
753// 37970 - Prince Valanar
755{
757
758 void ScheduleEvents() override
759 {
763 if (IsHeroic())
765 }
766
767 void JustSummoned(Creature* summon) override
768 {
769 switch (summon->GetEntry())
770 {
774 .SetOriginalCaster(me->GetGUID()));
775 break;
776 case NPC_KINETIC_BOMB:
777 {
778 float x, y, z;
779 summon->GetPosition(x, y, z);
780 float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseShift(), x, y, z, true, 500.0f);
781 summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
782 summon->SetUninteractible(false);
783 break;
784 }
785 case NPC_SHOCK_VORTEX:
786 summon->CastSpell(summon, SPELL_SHOCK_VORTEX_DUMMY, true);
787 summon->m_Events.AddEvent(new VortexEvent(summon), summon->m_Events.CalculateTime(5s));
788 break;
789 default:
790 break;
791 }
792
793 summons.Summon(summon);
794 if (me->IsInCombat())
795 DoZoneInCombat(summon);
796 }
797
798 void UpdateAI(uint32 diff) override
799 {
800 if (!UpdateVictim())
801 return;
802
803 events.Update(diff);
804
806 return;
807
808 while (uint32 eventId = events.ExecuteEvent())
809 {
810 switch (eventId)
811 {
812 case EVENT_BERSERK:
815 break;
817 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
818 {
821 }
822 events.Repeat(18s, 24s);
823 break;
825 if (_isEmpowered)
826 {
829 events.Repeat(30s);
830 }
831 else
832 {
833 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
834 DoCast(target, SPELL_SHOCK_VORTEX);
835 events.Repeat(18s, 23s);
836 }
837 break;
838 default:
839 break;
840 }
841
843 return;
844 }
845 }
846};
847
848// 38004 - Blood-Queen Lana'thel
850{
851 npc_blood_queen_lana_thel(Creature* creature) : PassiveAI(creature), _instance(creature->GetInstanceScript()) { }
852
853 void Reset() override
854 {
855 _events.Reset();
856 me->SetDisableGravity(true);
858 }
859
860 void DoAction(int32 action) override
861 {
862 switch (action)
863 {
866 _events.SetPhase(1);
868 // summon a visual trigger
870 {
871 summon->CastSpell(summon, SPELL_OOC_INVOCATION_VISUAL, true);
872 summon->SetSpeedRate(MOVE_RUN, 0.14f);
873 summon->GetMotionMaster()->MovePoint(0, triggerEndPos);
874 }
875 break;
876 default:
877 break;
878 }
879 }
880
881 void MovementInform(uint32 type, uint32 id) override
882 {
883 if (type == POINT_MOTION_TYPE && id == POINT_INTRO_DESPAWN)
884 me->SetVisible(false);
885 }
886
887 void UpdateAI(uint32 diff) override
888 {
889 if (!_events.GetPhaseMask())
890 return;
891
892 _events.Update(diff);
893
895 {
898 _events.Reset();
899
901 controller->AI()->DoAction(ACTION_INTRO_DONE);
902 }
903 }
904
905private:
908};
909
910// 38332 - Ball of Flame
911// 38451 - Ball of Inferno Flame
913{
914 npc_ball_of_flame(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
915
926
927 void MovementInform(uint32 type, uint32 id) override
928 {
929 if (type == CHASE_MOTION_TYPE && id == _chaseGUID.GetCounter() && !_chaseGUID.IsEmpty())
930 {
933 _scheduler.Schedule(2s, [this](TaskContext const& /*context*/)
934 {
936 });
938 }
939 }
940
941 void SetGUID(ObjectGuid const& guid, int32 id) override
942 {
943 if (id != DATA_CHASE_TARGET_GUID)
944 return;
945
946 _chaseGUID = guid;
947 }
948
949 void DoAction(int32 action) override
950 {
951 if (action == ACTION_FLAME_BALL_CHASE)
953 {
954 // need to clear states now because this call is before AuraEffect is fully removed
956 if (me->Attack(target, true))
957 me->GetMotionMaster()->MoveChase(target, 1.0f);
958 }
959 }
960
961 void DamageDealt(Unit* /*target*/, uint32& damage, DamageEffectType damageType) override
962 {
963 if (damageType != SPELL_DIRECT_DAMAGE)
964 return;
965
966 if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
968 }
969
970 void UpdateAI(uint32 diff) override
971 {
972 _scheduler.Update(diff);
973 }
974
975private:
979};
980
981// 38454 - Kinetic Bomb
983{
984 npc_kinetic_bomb(Creature* creature) : ScriptedAI(creature), _x(0.f), _y(0.f), _groundZ(0.f) { }
985
986 void Reset() override
987 {
988 _events.Reset();
989 me->SetWalk(true);
994 me->DespawnOrUnsummon(60s);
995 _groundZ = me->GetMap()->GetHeight(me->GetPhaseShift(), _x, _y, _groundZ, true, 500.0f);
996 }
997
998 void DoAction(int32 action) override
999 {
1000 if (action == SPELL_KINETIC_BOMB_EXPLOSION)
1002
1003 else if (action == ACTION_KINETIC_BOMB_JUMP)
1004 {
1006 {
1007 me->GetMotionMaster()->Clear();
1009 }
1011 }
1012 }
1013
1014 void UpdateAI(uint32 diff) override
1015 {
1016 _events.Update(diff);
1017
1018 while (uint32 eventId = _events.ExecuteEvent())
1019 {
1020 switch (eventId)
1021 {
1022 case EVENT_BOMB_DESPAWN:
1023 me->SetVisible(false);
1024 me->DespawnOrUnsummon(5s);
1025 break;
1027 me->GetMotionMaster()->Clear();
1029 break;
1030 default:
1031 break;
1032 }
1033 }
1034 }
1035
1036private:
1038 float _x;
1039 float _y;
1041};
1042
1043// 38369 - Dark Nucleus
1045{
1046 npc_dark_nucleus(Creature* creature) : ScriptedAI(creature) { }
1047
1048 void Reset() override
1049 {
1052 }
1053
1054 void JustEngagedWith(Unit* who) override
1055 {
1056 _scheduler.Schedule(1s, [this](TaskContext& targetAuraCheck)
1057 {
1058 if (Unit* victim = me->GetVictim())
1059 {
1060 if (me->GetDistance(victim) < 15.0f && !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
1061 DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
1062 else
1063 MoveInLineOfSight(me->GetVictim());
1064 }
1065 targetAuraCheck.Repeat();
1066 });
1067
1068 if (me->GetDistance(who) >= 15.0f)
1069 {
1070 DoStartMovement(who);
1071 return;
1072 }
1073
1075 }
1076
1077 void DamageTaken(Unit* attacker, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
1078 {
1079 if (attacker == me)
1080 return;
1081
1083 AddThreat(attacker, 500000000.0f);
1084 }
1085
1086 void UpdateAI(uint32 diff) override
1087 {
1088 if (!UpdateVictim())
1089 return;
1090
1091 _scheduler.Update(diff);
1092 }
1093
1094private:
1096};
1097
1098// 71806 - Glittering Sparks
1112
1113/* 71718 - Conjure Flame
1114 72040 - Conjure Empowered Flame */
1128
1129/* 55891 - Flame Sphere Spawn Effect
1130 55947 - Flame Sphere Death Effect */
1132{
1133 bool Load() override
1134 {
1136 return true;
1137 return false;
1138 }
1139
1140 bool Validate(SpellInfo const* /*spell*/) override
1141 {
1143 }
1144
1145 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1146 {
1147 Creature* target = GetTarget()->ToCreature();
1148 if (!target)
1149 return;
1150
1151 // SPELL_FLAME_SPHERE_SPAWN_EFFECT
1153 {
1154 target->CastSpell(target, SPELL_BALL_OF_FLAMES, true);
1156 }
1157 else // SPELL_FLAME_SPHERE_DEATH_EFFECT
1158 target->DespawnOrUnsummon();
1159 }
1160
1165};
1166
1167/* 71756 - Ball of Flames Proc
1168 72782 - Ball of Flames Proc
1169 72783 - Ball of Flames Proc
1170 72784 - Ball of Flames Proc */
1172{
1174 {
1175 if (Aura* aur = GetHitAura())
1176 aur->SetStackAmount(uint8(GetSpellInfo()->StackAmount));
1177 }
1178
1183};
1184
1186{
1187 void HandleStackDrop(ProcEventInfo& /*eventInfo*/)
1188 {
1189 ModStackAmount(-1);
1190 }
1191
1196};
1197
1198// 72080 - Kinetic Bomb
1200{
1202 {
1203 Position const offset = { 0.0f, 0.0f, 20.0f, 0.0f };
1204 dest.RelocateOffset(offset);
1205 }
1206
1211};
1212
1214{
1215 bool Validate(SpellInfo const* /*spell*/) override
1216 {
1218 }
1219
1220 void HandleDummyTick(AuraEffect const* /*aurEff*/)
1221 {
1222 Unit* target = GetTarget();
1223 if (target->GetTypeId() != TYPEID_UNIT)
1224 return;
1225
1226 if (Creature* bomb = target->FindNearestCreature(NPC_KINETIC_BOMB, 1.0f, true))
1227 {
1228 bomb->CastSpell(bomb, SPELL_KINETIC_BOMB_EXPLOSION, true);
1229 bomb->RemoveAurasDueToSpell(SPELL_KINETIC_BOMB_VISUAL);
1230 target->RemoveAura(GetAura());
1231 bomb->AI()->DoAction(SPELL_KINETIC_BOMB_EXPLOSION);
1232 }
1233 }
1234
1239};
1240
1241// 72087 - Kinetic Bomb Knockback
1243{
1245 {
1246 if (missInfo != SPELL_MISS_NONE)
1247 return;
1248
1249 if (Creature* target = GetHitCreature())
1250 target->AI()->DoAction(ACTION_KINETIC_BOMB_JUMP);
1251 }
1252
1257};
1258
1259// 72054 - Kinetic Bomb Visual
1261{
1262 void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
1263 {
1264 absorbAmount = CalculatePct(dmgInfo.GetDamage(), aurEff->GetAmount());
1265 RoundToInterval<uint32>(absorbAmount, 0, dmgInfo.GetDamage());
1266 dmgInfo.AbsorbDamage(absorbAmount);
1267 }
1268
1273};
1274
1275// 73001 - Shadow Prison
1277{
1278 bool Validate(SpellInfo const* /*spell*/) override
1279 {
1281 }
1282
1283 void HandleDummyTick(AuraEffect const* aurEff)
1284 {
1285 if (GetTarget()->isMoving())
1287 }
1288
1293};
1294
1295// 72999 - Shadow Prison
1297{
1298 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit const* victim, int32& /*damage*/, int32& flatMod, float& /*pctMod*/) const
1299 {
1300 if (Aura const* aur = victim->GetAura(GetSpellInfo()->Id))
1301 if (AuraEffect const* eff = aur->GetEffect(EFFECT_1))
1302 flatMod += eff->GetAmountAsInt();
1303 }
1304
1309};
1310
1312{
1313 public:
1314 at_blood_prince_council_start_intro() : AreaTriggerScript("at_blood_prince_council_start_intro") { }
1315
1316 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1317 {
1318 if (InstanceScript* instance = player->GetInstanceScript())
1319 if (Creature* controller = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_BLOOD_PRINCES_CONTROL)))
1320 controller->AI()->DoAction(ACTION_START_INTRO);
1321
1322 return true;
1323 }
1324};
1325
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
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
@ IN_PROGRESS
@ DONE
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ CHASE_MOTION_TYPE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_TIMED_DESPAWN
@ TEMPSUMMON_CORPSE_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
bool roll_chance(float chance, PseudoRandomDistributionState &state)
Definition Random.cpp:131
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition ScriptMgr.h:1381
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
SpellMissInfo
@ SPELL_MISS_NONE
@ TARGET_DEST_CASTER
@ EMOTE_ONESHOT_ROAR
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_STUN
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define AuraProcFn(F)
#define BeforeSpellHitFn(F)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellCalcDamageFn(F)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
@ MOVE_RUN
@ REACT_DEFENSIVE
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
DamageEffectType
@ SPELL_DIRECT_DAMAGE
@ UNIT_FLAG3_FAKE_DEAD
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_CASTING
Definition Unit.h:290
@ UNIT_STATE_STUNNED
Definition Unit.h:278
T CalculatePct(T base, U pct)
Definition Util.h:72
@ DATA_PRINCE_TALDARAM
Definition ahnkahet.h:32
@ NPC_PRINCE_TALDARAM
Definition ahnkahet.h:46
Position const triggerPos
@ EMOTE_TALDARAM_INVOCATION
@ EMOTE_KELESETH_INVOCATION
@ EMOTE_VALANAR_SHOCK_VORTEX
void AddSC_boss_blood_prince_council()
Position const triggerEndPos
@ SPELL_SHADOW_RESONANCE_RESIST
@ SPELL_INVOCATION_OF_BLOOD_VALANAR
@ SPELL_INVOCATION_OF_BLOOD_TALDARAM
@ SPELL_BALL_OF_FLAMES_PERIODIC
@ SPELL_FLAME_SPHERE_DEATH_EFFECT
@ SPELL_BALL_OF_FLAMES_VISUAL
@ SPELL_KINETIC_BOMB_KNOCKBACK
@ SPELL_FLAME_SPHERE_SPAWN_EFFECT
@ SPELL_EMPOWERED_SHADOW_LANCE
@ SPELL_INVOCATION_VISUAL_TALDARAM
@ SPELL_SHADOW_PRISON_DUMMY
@ SPELL_OOC_INVOCATION_VISUAL
@ SPELL_KINETIC_BOMB_EXPLOSION
@ SPELL_INVOCATION_VISUAL_VALANAR
@ SPELL_INVOCATION_OF_BLOOD_KELESETH
@ SPELL_SHADOW_PRISON_DAMAGE
@ SPELL_SHOCK_VORTEX_PERIODIC
@ SPELL_REMOVE_EMPOWERED_BLOOD
@ SPELL_SHADOW_RESONANCE_AURA
@ SPELL_CONJURE_EMPOWERED_FLAME
@ SPELL_INVOCATION_VISUAL_ACTIVE
@ SPELL_EMPOWERED_SHOCK_VORTEX
@ SPELL_INVOCATION_VISUAL_KELESETH
Position const introFinalPos
uint32 const PrincesData[]
SpellEffectValue GetAmount() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
Unit * GetCaster() const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Aura * GetAura() const
Unit * GetTarget() const
HookList< AuraProcHandler > OnProc
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
SummonList summons
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool UpdateVictim()
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Creature *const me
Definition CreatureAI.h:63
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetImmuneToPC(bool apply) override
Definition Creature.h:190
void SetReactState(ReactStates st)
Definition Creature.h:180
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
CreatureAI * AI() const
Definition Creature.h:235
void AbsorbDamage(uint32 amount)
Definition Unit.cpp:212
uint32 GetDamage() const
Definition Unit.h:466
void Update(uint32 time)
Definition EventMap.h:77
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
PhaseMask GetPhaseMask() const
Definition EventMap.h:96
EventId ExecuteEvent()
Definition EventMap.cpp:77
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:56
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
void AddEvent(BasicEvent *event, Milliseconds e_time, bool set_addtime=true)
Milliseconds CalculateTime(Milliseconds t_offset) const
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual ObjectGuid GetGuidData(uint32 type) const override
CreatureBoundary const * GetBossBoundary(uint32 id) const
EncounterState GetBossState(uint32 id) const
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
float GetHeight(PhaseShift const &phaseShift, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
Definition Map.h:329
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
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)
LowType GetCounter() const
Definition ObjectGuid.h:336
bool IsEmpty() const
Definition ObjectGuid.h:362
void Clear()
Definition ObjectGuid.h:329
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< DamageAndHealingCalcHandler > CalcDamage
Creature * GetHitCreature() const
Aura * GetHitAura(bool dynObjAura=false, bool withRemoved=false) const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
int32 GetEffectValueAsInt() const
void PreventHitDefaultEffect(SpellEffIndex effIndex)
HookList< EffectHandler > OnEffectHitTarget
HookList< BeforeHitHandler > BeforeHit
SpellInfo const * GetSpellInfo() const
bool Execute(uint64, uint32) override
StandUpEvent(Creature *owner)
void Summon(Creature const *summon)
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
void SetTempSummonType(TempSummonType type)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual void SetGUID(ObjectGuid const &guid, int32 id)
Definition UnitAI.h:76
virtual void DoAction(int32 param)
Definition UnitAI.h:73
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 DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
void ClearUnitState(uint32 f)
Definition Unit.h:756
void SetVisible(bool x)
Definition Unit.cpp:8787
void SetHealth(uint64 val)
Definition Unit.cpp:10041
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8951
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3846
ThreatManager & GetThreatManager()
Definition Unit.h:1093
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
TempSummon * ToTempSummon()
Definition Unit.h:1844
void RemoveUnitFlag3(UnitFlags3 flags)
Definition Unit.h:872
void SetUninteractible(bool apply)
Definition Unit.cpp:8583
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:5872
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
Unit * GetVictim() const
Definition Unit.h:738
void NearTeleportTo(TeleportLocation const &target, bool casting=false)
Definition Unit.cpp:13054
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1662
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:861
bool SetDisableGravity(bool disable, bool updateAnimTier=true, bool updatePlayHoverAnim=true)
Definition Unit.cpp:13440
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition Unit.cpp:11311
bool IsInCombat() const
Definition Unit.h:1073
bool isDead() const
Definition Unit.h:1207
VortexEvent(Creature *owner)
bool Execute(uint64, uint32) override
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
PhaseShift & GetPhaseShift()
Definition Object.h:310
void setActive(bool isActiveObject)
Definition Object.cpp:274
float GetDistance2d(WorldObject const *obj) const
Definition Object.cpp:448
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1522
EventProcessor m_Events
Definition Object.h:561
void MovePositionToFirstCollision(Position &pos, float dist, float angle) const
Definition Object.cpp:2833
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:430
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:1512
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:99
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
void CalculateDamage(SpellEffectInfo const &, Unit const *victim, int32 &, int32 &flatMod, float &) const
bool Validate(SpellInfo const *) override
void HandleDummyTick(AuraEffect const *aurEff)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnAbsorb(AuraEffect *aurEff, DamageInfo &dmgInfo, uint32 &absorbAmount)
bool Validate(SpellInfo const *) override
void SetDest(SpellDestination &dest)
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ DATA_ORB_WHISPERER_ACHIEVEMENT
@ DATA_BLOOD_PRINCE_COUNCIL_INTRO
@ DATA_BLOOD_PRINCE_COUNCIL
@ DATA_PRINCE_VALANAR
@ DATA_BLOOD_QUEEN_LANA_THEL_COUNCIL
also used by conditions
@ DATA_BLOOD_PRINCES_CONTROL
@ DATA_PRINCE_KELESETH
@ NPC_KINETIC_BOMB
@ NPC_PRINCE_VALANAR
@ NPC_SHOCK_VORTEX
@ NPC_BALL_OF_FLAME
@ NPC_FLOATING_TRIGGER
@ NPC_BALL_OF_INFERNO_FLAME
@ NPC_KINETIC_BOMB_TARGET
@ NPC_PRINCE_KELESETH
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
void KilledUnit(Unit *victim) override
void DoAction(int32 action) override
void JustDied(Unit *) override
virtual void ScheduleEvents()=0
BloodPrincesBossAI(Creature *creature, uint32 bossId)
void JustEngagedWith(Unit *) override
void DamageDealt(Unit *, uint32 &damage, DamageEffectType damageType) override
constexpr float GetPositionX() const
Definition Position.h:87
constexpr float GetPositionY() const
Definition Position.h:88
float GetAbsoluteAngle(float x, float y) const
Definition Position.h:136
constexpr void GetPosition(float &x, float &y) const
Definition Position.h:92
constexpr float GetOrientation() const
Definition Position.h:90
constexpr float GetPositionZ() const
Definition Position.h:89
bool IsHeroic() const
void SetCombatMovement(bool allowMovement)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void RelocateOffset(Position const &offset)
Definition Spell.cpp:90
InvocationData(ObjectGuid _guid, uint32 _spellId, uint32 _textId, uint32 _visualSpell)
uint32 GetData(uint32 data) const override
void SetData(uint32, uint32 data) override
struct boss_blood_council_controller::InvocationData _invocationOrder[3]
void DoAction(int32 actionId) override
void EnterEvadeMode(EvadeReason) override
void UpdateAI(uint32 diff) override
void JustSummoned(Creature *summon) override
void UpdateAI(uint32 diff) override
void JustSummoned(Creature *summon) override
void UpdateAI(uint32 diff) override
boss_prince_valanar_icc(Creature *creature)
void JustSummoned(Creature *summon) override
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void SetGUID(ObjectGuid const &guid, int32 id) override
void DamageDealt(Unit *, uint32 &damage, DamageEffectType damageType) override
npc_ball_of_flame(Creature *creature)
void MovementInform(uint32 type, uint32 id) override
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
void JustEngagedWith(Unit *who) override
npc_dark_nucleus(Creature *creature)
void UpdateAI(uint32 diff) override
void DamageTaken(Unit *attacker, uint32 &, DamageEffectType, SpellInfo const *) override
void DoAction(int32 action) override
npc_kinetic_bomb(Creature *creature)
void UpdateAI(uint32 diff) override