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 "ScriptMgr.h"
19#include "icecrown_citadel.h"
20#include "InstanceScript.h"
21#include "Map.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "PassiveAI.h"
25#include "Player.h"
26#include "ScriptedCreature.h"
27#include "Spell.h"
28#include "SpellAuraEffects.h"
29#include "SpellInfo.h"
30#include "SpellScript.h"
31#include "TemporarySummon.h"
32
65
67{
71
72 // Heroic mode
76
77 // Prince Keleseth
82
83 // Dark Nucleus
86
87 // Prince Taldaram
92
93 // Ball of Flame
97 SPELL_FLAMES = 71393,
99
100 // Ball of Inferno Flame
103
104 // Prince Valanar
111
112 // Kinetic Bomb
117
118 // Shock Vortex
121
122 // Visual Spells
127
150
161
167
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
277 me->setActive(true);
280
282
283 for (uint32 bossData : PrincesData)
284 if (Creature* prince = ObjectAccessor::GetCreature(*me, instance->GetGuidData(bossData)))
285 {
287 DoZoneInCombat(prince);
288 }
289
291
293 if (roll_chance_i(50))
294 {
297 }
298 else
299 {
302 }
303 }
304
305 void SetData(uint32 /*type*/, uint32 data) override
306 {
307 _resetCounter += uint8(data);
308 if (_resetCounter == 3)
310 }
311
312 uint32 GetData(uint32 data) const override
313 {
315 return DATA_INTRO_DONE;
316 return 0;
317 }
318
319 void JustDied(Unit* killer) override
320 {
321 events.Reset();
323 // Kill all prices
324 for (uint8 i = 0; i < 3; ++i)
325 {
326 if (++_invocationStage == 3)
328
330 {
331 // Make sure looting is allowed
333 prince->LowerPlayerDamageReq(prince->GetMaxHealth());
334 Unit::Kill(killer, prince);
335 }
336 }
337 }
338
339 void DoAction(int32 actionId) override
340 {
342 {
345 bloodQueen->AI()->DoAction(ACTION_START_INTRO);
346 }
347 else if (actionId == ACTION_INTRO_DONE)
348 {
349 // Remove feigh death from princes
350 for (uint32 bossData : PrincesData)
351 if (Creature* prince = ObjectAccessor::GetCreature(*me, instance->GetGuidData(bossData)))
352 {
353 prince->AI()->DoAction(ACTION_STAND_UP);
354 if (bossData == DATA_PRINCE_VALANAR)
355 prince->SetHealth(prince->GetMaxHealth());
356 }
357 }
358 }
359
360 void UpdateAI(uint32 diff) override
361 {
362 if (!UpdateVictim())
363 return;
364
365 events.Update(diff);
366
368 return;
369
370 while (uint32 eventId = events.ExecuteEvent())
371 {
372 switch (eventId)
373 {
375 {
377 if (++_invocationStage == 3)
379
381 if (oldPrince)
382 {
383 oldPrince->AI()->DoAction(ACTION_REMOVE_INVOCATION);
384 if (newPrince)
385 oldPrince->CastSpell(newPrince, _invocationOrder[_invocationStage].visualSpell, true);
386 }
387
388 if (newPrince)
389 {
390 newPrince->SetHealth(me->GetHealth());
391 newPrince->AI()->Talk(uint8(_invocationOrder[_invocationStage].textId));
392 }
393
395 events.Repeat(46s + 500ms);
396 break;
397 }
398 default:
399 break;
400 }
401
403 return;
404 }
405 }
406
407private:
409 {
414
415 InvocationData(ObjectGuid _guid, uint32 _spellId, uint32 _textId, uint32 _visualSpell)
416 {
417 guid = _guid;
418 spellId = _spellId;
419 textId = _textId;
420 visualSpell = _visualSpell;
421 }
422
425
428};
429
431{
432 BloodPrincesBossAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId), _spawnHealth (creature->GetMaxHealth()), _isEmpowered(false)
433 {
435 }
436
437 void InitializeAI() override
438 {
439 _spawnHealth = 1;
440 if (!me->isDead())
441 JustAppeared();
442 }
443
444 void Reset() override
445 {
446 events.Reset();
449
450 me->SetImmuneToPC(false);
451 _isEmpowered = false;
454 }
455
456 void JustEngagedWith(Unit* /*who*/) override
457 {
459 me->setActive(true);
461 DoZoneInCombat(controller);
463 }
464
465 virtual void ScheduleEvents() = 0;
466
467 void JustDied(Unit* /*killer*/) override
468 {
469 events.Reset();
472
473 switch (me->GetEntry())
474 {
477 break;
480 break;
483 break;
484 default:
485 break;
486 }
487 }
488
489 void JustAppeared() override
490 {
492 if (controller->AI()->GetData(DATA_INTRO) != DATA_INTRO_DONE)
494
496 }
497
498 void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
499 {
500 if (!_isEmpowered)
501 {
502 AddThreat(attacker, float(damage));
503 damage = 0;
504 }
505 }
506
507 void KilledUnit(Unit* victim) override
508 {
509 if (victim->GetTypeId() == TYPEID_PLAYER)
510 switch (me->GetEntry())
511 {
514 break;
517 break;
520 break;
521 default:
522 break;
523 }
524 }
525
537
538 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
539 {
540 if (spellInfo->Id == SelectInvocationSpell())
542 }
543
544 void DamageDealt(Unit* /*target*/, uint32& damage, DamageEffectType damageType) override
545 {
546 if (damageType != SPELL_DIRECT_DAMAGE)
547 return;
548
549 if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
551 }
552
553 void DoAction(int32 action) override
554 {
555 switch (action)
556 {
557 case ACTION_STAND_UP:
560 me->SetImmuneToPC(false);
561 me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
563 break;
567 _isEmpowered = true;
568 break;
573 _isEmpowered = false;
574 break;
575 default:
576 break;
577 }
578 }
579
581 {
582 switch (me->GetEntry())
583 {
590 default: // Should never happen
591 return 0;
592 }
593 }
594
596 {
597 switch (me->GetEntry())
598 {
605 default: // Should never happen
606 return 0;
607 }
608 }
609
610protected:
613};
614
615// 37972 - Prince Keleseth
617{
619
632
633 void JustSummoned(Creature* summon) override
634 {
635 summons.Summon(summon);
636 Position pos = me->GetPosition();
637 float maxRange = me->GetDistance2d(summon);
638 float angle = me->GetAbsoluteAngle(summon);
639 me->MovePositionToFirstCollision(pos, maxRange, angle);
640 summon->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
642 }
643
644 void UpdateAI(uint32 diff) override
645 {
646 if (!UpdateVictim())
647 return;
648
649 events.Update(diff);
650
652 return;
653
654 while (uint32 eventId = events.ExecuteEvent())
655 {
656 switch (eventId)
657 {
658 case EVENT_BERSERK:
661 break;
665 events.Repeat(10s, 15s);
666 break;
669 events.Repeat(2s);
670 break;
671 default:
672 break;
673 }
674
676 return;
677 }
678
679 // does not melee
680 }
681};
682
683// 37973 - Prince Taldaram
685{
687
696
697 void JustSummoned(Creature* summon) override
698 {
699 summons.Summon(summon);
700 Unit* target = SelectTarget(SelectTargetMethod::Random, 1, -10.0f, true); // first try at distance
701 if (!target)
702 target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true); // too bad for you raiders, its going to boom
703
704 if (summon->GetEntry() == NPC_BALL_OF_INFERNO_FLAME && target)
705 Talk(EMOTE_TALDARAM_FLAME, target);
706
707 if (target)
708 summon->AI()->SetGUID(target->GetGUID());
709 }
710
711 void UpdateAI(uint32 diff) override
712 {
713 if (!UpdateVictim())
714 return;
715
716 events.Update(diff);
717
719 return;
720
721 while (uint32 eventId = events.ExecuteEvent())
722 {
723 switch (eventId)
724 {
725 case EVENT_BERSERK:
728 break;
731 events.Repeat(15s, 50s);
732 break;
734 if (_isEmpowered)
735 {
737 events.Repeat(15s, 25s);
738 }
739 else
740 {
742 events.Repeat(20s, 30s);
743 }
745 break;
746 default:
747 break;
748 }
749
751 return;
752 }
753
755 }
756};
757
758// 37970 - Prince Valanar
760{
762
763 void ScheduleEvents() override
764 {
768 if (IsHeroic())
770 }
771
772 void JustSummoned(Creature* summon) override
773 {
774 switch (summon->GetEntry())
775 {
778 summon->CastSpell(summon, SPELL_KINETIC_BOMB, me->GetGUID());
779 break;
780 case NPC_KINETIC_BOMB:
781 {
782 float x, y, z;
783 summon->GetPosition(x, y, z);
784 float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
785 summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
787 break;
788 }
789 case NPC_SHOCK_VORTEX:
790 summon->CastSpell(summon, SPELL_SHOCK_VORTEX_DUMMY, true);
791 summon->m_Events.AddEvent(new VortexEvent(summon), summon->m_Events.CalculateTime(5s));
792 break;
793 default:
794 break;
795 }
796
797 summons.Summon(summon);
798 if (me->IsInCombat())
799 DoZoneInCombat(summon);
800 }
801
802 void UpdateAI(uint32 diff) override
803 {
804 if (!UpdateVictim())
805 return;
806
807 events.Update(diff);
808
810 return;
811
812 while (uint32 eventId = events.ExecuteEvent())
813 {
814 switch (eventId)
815 {
816 case EVENT_BERSERK:
819 break;
821 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
822 {
825 }
826 events.Repeat(18s, 24s);
827 break;
829 if (_isEmpowered)
830 {
833 events.Repeat(30s);
834 }
835 else
836 {
837 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
838 DoCast(target, SPELL_SHOCK_VORTEX);
839 events.Repeat(18s, 23s);
840 }
841 break;
842 default:
843 break;
844 }
845
847 return;
848 }
849
851 }
852};
853
854// 38004 - Blood-Queen Lana'thel
856{
857 npc_blood_queen_lana_thel(Creature* creature) : PassiveAI(creature), _instance(creature->GetInstanceScript()) { }
858
859 void Reset() override
860 {
861 _events.Reset();
862 me->SetDisableGravity(true);
864 }
865
866 void DoAction(int32 action) override
867 {
868 switch (action)
869 {
872 _events.SetPhase(1);
874 // summon a visual trigger
876 {
877 summon->CastSpell(summon, SPELL_OOC_INVOCATION_VISUAL, true);
878 summon->SetSpeedRate(MOVE_RUN, 0.14f);
879 summon->GetMotionMaster()->MovePoint(0, triggerEndPos);
880 }
881 break;
882 default:
883 break;
884 }
885 }
886
887 void MovementInform(uint32 type, uint32 id) override
888 {
889 if (type == POINT_MOTION_TYPE && id == POINT_INTRO_DESPAWN)
890 me->SetVisible(false);
891 }
892
893 void UpdateAI(uint32 diff) override
894 {
895 if (!_events.GetPhaseMask())
896 return;
897
898 _events.Update(diff);
899
901 {
904 _events.Reset();
905
907 controller->AI()->DoAction(ACTION_INTRO_DONE);
908 }
909 }
910
911private:
914};
915
916// 38332 - Ball of Flame
917// 38451 - Ball of Inferno Flame
919{
920 npc_ball_of_flame(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
921
932
933 void MovementInform(uint32 type, uint32 id) override
934 {
935 if (type == CHASE_MOTION_TYPE && id == _chaseGUID.GetCounter() && !_chaseGUID.IsEmpty())
936 {
939 _scheduler.Schedule(2s, [this](TaskContext /*context*/)
940 {
942 });
944 }
945 }
946
947 void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
948 {
949 _chaseGUID = guid;
950 }
951
952 void DoAction(int32 action) override
953 {
954 if (action == ACTION_FLAME_BALL_CHASE)
956 {
957 // need to clear states now because this call is before AuraEffect is fully removed
959 if (me->Attack(target, true))
960 me->GetMotionMaster()->MoveChase(target, 1.0f);
961 }
962 }
963
964 void DamageDealt(Unit* /*target*/, uint32& damage, DamageEffectType damageType) override
965 {
966 if (damageType != SPELL_DIRECT_DAMAGE)
967 return;
968
969 if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
971 }
972
973 void UpdateAI(uint32 diff) override
974 {
975 _scheduler.Update(diff);
976 }
977
978private:
982};
983
984// 38454 - Kinetic Bomb
986{
987 npc_kinetic_bomb(Creature* creature) : ScriptedAI(creature), _x(0.f), _y(0.f), _groundZ(0.f) { }
988
989 void Reset() override
990 {
991 _events.Reset();
992 me->SetWalk(true);
997 me->DespawnOrUnsummon(60s);
998 _groundZ = me->GetMap()->GetHeight(me->GetPhaseMask(), _x, _y, _groundZ, true, 500.0f);
999 }
1000
1001 void DoAction(int32 action) override
1002 {
1003 if (action == SPELL_KINETIC_BOMB_EXPLOSION)
1005
1006 else if (action == ACTION_KINETIC_BOMB_JUMP)
1007 {
1009 {
1010 me->GetMotionMaster()->Clear();
1012 }
1014 }
1015 }
1016
1017 void UpdateAI(uint32 diff) override
1018 {
1019 _events.Update(diff);
1020
1021 while (uint32 eventId = _events.ExecuteEvent())
1022 {
1023 switch (eventId)
1024 {
1025 case EVENT_BOMB_DESPAWN:
1026 me->SetVisible(false);
1027 me->DespawnOrUnsummon(5s);
1028 break;
1030 me->GetMotionMaster()->Clear();
1032 break;
1033 default:
1034 break;
1035 }
1036 }
1037 }
1038
1039private:
1041 float _x;
1042 float _y;
1044};
1045
1046// 38369 - Dark Nucleus
1048{
1049 npc_dark_nucleus(Creature* creature) : ScriptedAI(creature) { }
1050
1051 void Reset() override
1052 {
1055 }
1056
1057 void JustEngagedWith(Unit* who) override
1058 {
1059 _scheduler.Schedule(1s, [this](TaskContext targetAuraCheck)
1060 {
1061 if (Unit* victim = me->GetVictim())
1062 {
1063 if (me->GetDistance(victim) < 15.0f && !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
1064 DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
1065 else
1066 MoveInLineOfSight(me->GetVictim());
1067 }
1068 targetAuraCheck.Repeat();
1069 });
1070
1071 if (me->GetDistance(who) >= 15.0f)
1072 {
1073 DoStartMovement(who);
1074 return;
1075 }
1076
1078 }
1079
1080 void DamageTaken(Unit* attacker, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
1081 {
1082 if (attacker == me)
1083 return;
1084
1086 AddThreat(attacker, 500000000.0f);
1087 }
1088
1089 void UpdateAI(uint32 diff) override
1090 {
1091 if (!UpdateVictim())
1092 return;
1093
1094 _scheduler.Update(diff);
1095 }
1096
1097private:
1099};
1100
1101// 71806 - Glittering Sparks
1117
1118/* 71718 - Conjure Flame
1119 72040 - Conjure Empowered Flame */
1135
1136/* 55891 - Flame Sphere Spawn Effect
1137 55947 - Flame Sphere Death Effect */
1139{
1141
1142 bool Load() override
1143 {
1144 if (GetCaster()->GetEntry() == NPC_BALL_OF_FLAME || GetCaster()->GetEntry() == NPC_BALL_OF_INFERNO_FLAME)
1145 return true;
1146 return false;
1147 }
1148
1149 bool Validate(SpellInfo const* /*spell*/) override
1150 {
1152 }
1153
1154 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1155 {
1156 Creature* target = GetTarget()->ToCreature();
1157 if (!target)
1158 return;
1159
1160 // SPELL_FLAME_SPHERE_SPAWN_EFFECT
1162 {
1163 target->CastSpell(target, SPELL_BALL_OF_FLAMES, true);
1165 }
1166 else // SPELL_FLAME_SPHERE_DEATH_EFFECT
1167 target->DespawnOrUnsummon();
1168 }
1169
1174};
1175
1176/* 71756 - Ball of Flames Proc
1177 72782 - Ball of Flames Proc
1178 72783 - Ball of Flames Proc
1179 72784 - Ball of Flames Proc */
1181{
1183
1185 {
1186 if (Aura* aur = GetHitAura())
1187 aur->SetStackAmount(uint8(GetSpellInfo()->StackAmount));
1188 }
1189
1194};
1195
1210
1211// 72080 - Kinetic Bomb
1213{
1215
1217 {
1218 Position const offset = { 0.0f, 0.0f, 20.0f, 0.0f };
1219 dest.RelocateOffset(offset);
1220 }
1221
1226};
1227
1229{
1231
1232 bool Validate(SpellInfo const* /*spell*/) override
1233 {
1235 }
1236
1237 void HandleDummyTick(AuraEffect const* /*aurEff*/)
1238 {
1239 Unit* target = GetTarget();
1240 if (target->GetTypeId() != TYPEID_UNIT)
1241 return;
1242
1243 if (Creature* bomb = target->FindNearestCreature(NPC_KINETIC_BOMB, 1.0f, true))
1244 {
1245 bomb->CastSpell(bomb, SPELL_KINETIC_BOMB_EXPLOSION, true);
1246 bomb->RemoveAurasDueToSpell(SPELL_KINETIC_BOMB_VISUAL);
1247 target->RemoveAura(GetAura());
1248 bomb->AI()->DoAction(SPELL_KINETIC_BOMB_EXPLOSION);
1249 }
1250 }
1251
1256};
1257
1258// 72087 - Kinetic Bomb Knockback
1260{
1262
1264 {
1265 if (missInfo != SPELL_MISS_NONE)
1266 return;
1267
1268 if (Creature* target = GetHitCreature())
1269 target->AI()->DoAction(ACTION_KINETIC_BOMB_JUMP);
1270 }
1271
1276};
1277
1278// 72054 - Kinetic Bomb Visual
1280{
1282
1283 void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
1284 {
1285 absorbAmount = CalculatePct(dmgInfo.GetDamage(), aurEff->GetAmount());
1286 RoundToInterval<uint32>(absorbAmount, 0, dmgInfo.GetDamage());
1287 dmgInfo.AbsorbDamage(absorbAmount);
1288 }
1289
1294};
1295
1296// 73001 - Shadow Prison
1317
1318// 72999 - Shadow Prison
1335
1337{
1338 public:
1339 at_blood_prince_council_start_intro() : AreaTriggerScript("at_blood_prince_council_start_intro") { }
1340
1341 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1342 {
1343 if (InstanceScript* instance = player->GetInstanceScript())
1344 if (Creature* controller = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_BLOOD_PRINCES_CONTROL)))
1345 controller->AI()->DoAction(ACTION_START_INTRO);
1346
1347 return true;
1348 }
1349};
1350
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint64_t uint64
Definition Define.h:132
uint32_t uint32
Definition Define.h:133
@ 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:38
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
bool roll_chance_i(int chance)
Definition Random.h:59
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition ScriptMgr.h:1130
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_DEST_CASTER
@ EMOTE_ONESHOT_ROAR
SpellMissInfo
@ SPELL_MISS_NONE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_STUN
#define AuraProcFn(F)
#define BeforeSpellHitFn(F)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ REACT_DEFENSIVE
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ MOVE_RUN
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
@ UNIT_STATE_STUNNED
Definition Unit.h:223
DamageEffectType
Definition Unit.h:352
@ SPELL_DIRECT_DAMAGE
Definition Unit.h:354
@ UNIT_NPC_FLAGS
T CalculatePct(T base, U pct)
Definition Util.h:71
@ 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[]
int32 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)
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
SummonList summons
EventMap events
@ EVADE_REASON_OTHER
Definition CreatureAI.h:98
@ EVADE_REASON_SEQUENCE_BREAK
Definition CreatureAI.h:97
void DoZoneInCombat(Creature *creature=nullptr)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool UpdateVictim()
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Creature *const me
Definition CreatureAI.h:82
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
void SetCombatPulseDelay(uint32 delay)
Definition Creature.h:269
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)
bool IsDamageEnoughForLootingAndReward() const
Definition Creature.h:321
CreatureAI * AI() const
Definition Creature.h:154
void AbsorbDamage(uint32 amount)
Definition Unit.cpp:199
uint32 GetDamage() const
Definition Unit.h:464
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
PhaseMask GetPhaseMask() const
Definition EventMap.h:86
EventId ExecuteEvent()
Definition EventMap.cpp:73
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:52
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 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=nullptr, uint8 param1=0, uint8 param2=0)
float GetHeight(float x, float y, float z, bool checkVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
Definition Map.cpp:2484
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)
LowType GetCounter() const
Definition ObjectGuid.h:156
bool IsEmpty() const
Definition ObjectGuid.h:172
void Clear()
Definition ObjectGuid.h:150
static Creature * ToCreature(Object *o)
Definition Object.h:186
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
void ForceValuesUpdateAtIndex(uint32)
Definition Object.cpp:1777
uint32 Id
Definition SpellInfo.h:289
Creature * GetHitCreature() const
void SetEffectValue(int32 value)
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
Aura * GetHitAura(bool dynObjAura=false) const
HookList< EffectHandler > OnEffectLaunchTarget
HookList< BeforeHitHandler > BeforeHit
SpellInfo const * GetSpellInfo() const
bool Execute(uint64, uint32) override
StandUpEvent(Creature *owner)
void Summon(Creature const *summon)
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
void SetTempSummonType(TempSummonType type)
virtual void DoAction(int32)
Definition UnitAI.h:154
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
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
virtual void SetGUID(ObjectGuid const &, int32=0)
Definition UnitAI.h:157
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
void ClearUnitState(uint32 f)
Definition Unit.h:877
void SetVisible(bool x)
Definition Unit.cpp:8513
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8668
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3638
ThreatManager & GetThreatManager()
Definition Unit.h:1155
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
void SetHealth(uint32 val)
Definition Unit.cpp:9361
TempSummon * ToTempSummon()
Definition Unit.h:1794
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:5535
uint32 GetHealth() const
Definition Unit.h:913
bool SetWalk(bool enable)
Definition Unit.cpp:13268
void NearTeleportTo(Position const &pos, bool casting=false)
Definition Unit.cpp:12832
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
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1568
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true)
Definition Unit.cpp:10930
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
bool IsInCombat() const
Definition Unit.h:1144
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
bool isDead() const
Definition Unit.h:1236
VortexEvent(Creature *owner)
bool Execute(uint64, uint32) override
uint32 GetPhaseMask() const
Definition Object.h:368
Map * GetMap() const
Definition Object.h:449
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
void MovePositionToFirstCollision(Position &pos, float dist, float angle)
Definition Object.cpp:3323
void setActive(bool isActiveObject)
Definition Object.cpp:991
float GetDistance2d(WorldObject const *obj) const
Definition Object.cpp:1141
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
EventProcessor m_Events
Definition Object.h:591
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1123
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:2082
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)
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
PrepareSpellScript(spell_blood_council_shadow_prison_damage)
bool Validate(SpellInfo const *) override
void HandleDummyTick(AuraEffect const *aurEff)
PrepareAuraScript(spell_blood_council_shadow_prison)
PrepareAuraScript(spell_taldaram_ball_of_inferno_flame_aura)
PrepareSpellScript(spell_taldaram_ball_of_inferno_flame)
PrepareAuraScript(spell_taldaram_flame_ball_visual)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_taldaram_glittering_sparks)
PrepareSpellScript(spell_taldaram_summon_flame_ball)
PrepareAuraScript(spell_valanar_kinetic_bomb_absorb)
void OnAbsorb(AuraEffect *aurEff, DamageInfo &dmgInfo, uint32 &absorbAmount)
PrepareAuraScript(spell_valanar_kinetic_bomb_aura)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_valanar_kinetic_bomb_knockback)
PrepareSpellScript(spell_valanar_kinetic_bomb)
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
float GetPositionZ() const
Definition Position.h:81
float GetOrientation() const
Definition Position.h:82
float GetAbsoluteAngle(float x, float y) const
Definition Position.h:128
float GetPositionX() const
Definition Position.h:79
void GetPosition(float &x, float &y) const
Definition Position.h:84
float GetPositionY() const
Definition Position.h:80
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:110
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) 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