TrinityCore
boss_twin_valkyr.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// Known bugs:
19// - They should be floating but they aren't respecting the floor =(
20// - Hardcoded bullets spawner
21
22#include "ScriptMgr.h"
23#include "CellImpl.h"
24#include "GridNotifiersImpl.h"
25#include "InstanceScript.h"
26#include "MotionMaster.h"
27#include "ScriptedCreature.h"
28#include "ScriptedGossip.h"
29#include "SpellAuraEffects.h"
30#include "SpellMgr.h"
31#include "SpellScript.h"
33
35{
44 SAY_DEATH = 8
45};
46
47enum Misc
48{
50 EQUIP_MAIN_2 = 37377,
54 PHASE_COMBAT = 2
55};
56
58{
60
62 NPC_BULLET_LIGHT = 34630
63};
64
66{
78
90
96
99
101
103{
110
112{
119
120// branch compatibility macros
121#define SPELL_DARK_ESSENCE_HELPER SPELL_DARK_ESSENCE
122#define SPELL_LIGHT_ESSENCE_HELPER SPELL_LIGHT_ESSENCE
123
124#define SPELL_POWERING_UP_HELPER SPELL_POWERING_UP
125
126#define SPELL_UNLEASHED_DARK_HELPER SPELL_UNLEASHED_DARK
127#define SPELL_UNLEASHED_LIGHT_HELPER SPELL_UNLEASHED_LIGHT
128
130{
134
135#define ESSENCE_REMOVE 0
136#define ESSENCE_APPLY 1
137
139{
140 public:
141 explicit OrbsDespawner(Creature* creature) : _creature(creature) { }
142
143 bool Execute(uint64 /*currTime*/, uint32 /*diff*/) override
144 {
147 return true;
148 }
149
150 void operator()(Creature* creature) const
151 {
152 switch (creature->GetEntry())
153 {
154 case NPC_BULLET_DARK:
155 case NPC_BULLET_LIGHT:
156 creature->DespawnOrUnsummon();
157 return;
158 default:
159 return;
160 }
161 }
162
163 private:
165};
166
167static uint32 GetSisterData(uint32 sisterEntry)
168{
170}
171
173{
174 boss_twin_baseAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId)
175 {
177 Weapon = 0;
178 SisterNpcId = 0;
181 SurgeSpellId = 0;
182 VortexSpellId = 0;
183 ShieldSpellId = 0;
184 TwinPactSpellId = 0;
185 SpikeSpellId = 0;
186 TouchSpellId = 0;
188 }
189
190 void Reset() override
191 {
195 }
196
197 void JustAppeared() override
198 {
199 events.Reset();
202 }
203
204 void JustReachedHome() override
205 {
210 }
211
212 void MovementInform(uint32 type, uint32 pointId) override
213 {
214 if (type == SPLINE_CHAIN_MOTION_TYPE && pointId == POINT_INITIAL_MOVEMENT)
215 {
216 me->SetImmuneToPC(false);
218 if (me->GetEntry() == NPC_FJOLA_LIGHTBANE) // avoid call twice
220 }
221 }
222
223 void KilledUnit(Unit* who) override
224 {
225 if (who->GetTypeId() == TYPEID_PLAYER)
227 }
228
230 {
236 }
237
238 void JustDied(Unit* /*killer*/) override
239 {
241 if (Creature* pSister = GetSister())
242 {
243 if (!pSister->IsAlive())
244 {
246 pSister->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
247 events.Reset();
251 }
252 else
253 {
256 }
257 }
259 }
260
261 // Called when sister pointer needed
263 {
265 }
266
267 void JustEngagedWith(Unit* /*who*/) override
268 {
270 if (Creature* pSister = GetSister())
271 {
272 me->AddAura(MyEmphatySpellId, pSister);
273 DoZoneInCombat(pSister);
274 }
276
280 me->setActive(true);
281
283 events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6min : 8min);
284 if (IsHeroic())
286 }
287
288 void DoAction(int32 action) override
289 {
290 switch (action)
291 {
292 case ACTION_VORTEX:
295 break;
296 case ACTION_PACT:
299 if (Creature* sister = GetSister())
300 sister->CastSpell(sister, SPELL_POWER_TWINS, false);
303 break;
304 default:
305 break;
306 }
307 }
308
309 void EnableDualWield(bool mode = true)
310 {
312 me->SetCanDualWield(mode);
313 }
314
315 void ExecuteEvent(uint32 eventId) override
316 {
317 switch (eventId)
318 {
319 case EVENT_TWIN_SPIKE:
321 events.Repeat(20s);
322 break;
323 case EVENT_TOUCH:
324 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 200.0f, true, true, OtherEssenceSpellId))
325 {
327 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, 1); // @todo spellmgr correction instead?
328 me->CastSpell(target, TouchSpellId, args);
329 }
330 events.Repeat(10s, 15s);
331 break;
332 case EVENT_BERSERK:
335 break;
336 case EVENT_START_MOVE:
339 break;
340 default:
341 break;
342 }
343 }
344
345 void UpdateAI(uint32 diff) override
346 {
348 return;
349
350 events.Update(diff);
351
353 return;
354
355 while (uint32 eventId = events.ExecuteEvent())
356 {
357 ExecuteEvent(eventId);
359 return;
360 }
361 }
362
363 protected:
375};
376
378{
380 {
382 }
383
384 void Reset() override
385 {
398
400 }
401
402 void ExecuteEvent(uint32 eventId) override
403 {
404 if (eventId == EVENT_SPECIAL_ABILITY)
405 {
408
409 switch (Stage[CurrentStage])
410 {
412 if (Creature* sister = GetSister())
413 sister->AI()->DoAction(ACTION_VORTEX);
414 break;
415 case STAGE_DARK_PACT:
416 if (Creature* sister = GetSister())
417 sister->AI()->DoAction(ACTION_PACT);
418 break;
421 break;
422 case STAGE_LIGHT_PACT:
424 break;
425 default:
426 break;
427 }
428 ++CurrentStage;
430 }
431 else
433 }
434
435 void JustEngagedWith(Unit* who) override
436 {
439 me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
441 }
442
443 void EnterEvadeMode(EvadeReason why) override
444 {
447 }
448
449 void JustReachedHome() override
450 {
453 }
454
456 {
457 CurrentStage = 0;
458
459 // Initialize and clean up.
460 for (int i = 0; i < MAX_STAGES; ++i)
461 Stage[i] = i;
462
463 // Allocate an unique random stage to each position in the array.
464 for (int i = 0; i < MAX_STAGES - 1; ++i)
465 {
466 int random = i + urand(0, MAX_STAGES - i);
467 std::swap(Stage[i], Stage[random]);
468 }
469 }
470 private:
473};
474
476{
478
479 void Reset() override
480 {
494 }
495};
496
498{
499 npc_essence_of_twin(Creature* creature) : ScriptedAI(creature) { }
500
501 uint32 GetData(uint32 data) const override
502 {
503 uint32 spellReturned = 0;
504 switch (me->GetEntry())
505 {
508 break;
509 case NPC_DARK_ESSENCE:
511 break;
512 default:
513 break;
514 }
515
516 return spellReturned;
517 }
518
519 bool OnGossipHello(Player* player) override
520 {
522 player->CastSpell(player, GetData(ESSENCE_APPLY), true);
523 CloseGossipMenuFor(player);
524 return true;
525 }
526};
527
529{
531 {
532 Initialize();
533 }
534
536 {
537 RangeCheckTimer = 500;
538 }
539
541 {
542 float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
543 float y = y0;
544 float x = frand(x0 - r, x0 + r);
545 float sq = std::pow(r, 2.f) - std::pow(x - x0, 2.f);
546 float rt = std::sqrt(std::fabs(sq));
547 if (urand(0, 1))
548 y = y0 + rt;
549 else
550 y = y0 - rt;
551 me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
552 }
553
554 void Reset() override
555 {
557 me->SetUninteractible(true);
559 me->SetDisableGravity(true);
560 me->SetCanFly(true);
561 SetCombatMovement(false);
563 Initialize();
564 }
565
566 void MovementInform(uint32 uiType, uint32 uiId) override
567 {
568 if (uiType != POINT_MOTION_TYPE)
569 return;
570
571 switch (uiId)
572 {
573 case 0:
574 if (urand(0, 3) == 0)
576 else
578 break;
579 default:
580 break;
581 }
582 }
583
584 protected:
586};
587
589{
591
592 void UpdateAI(uint32 diff) override
593 {
594 if (RangeCheckTimer < diff)
595 {
596 if (me->SelectNearestPlayer(3.0f))
597 {
601 }
602 RangeCheckTimer = 500;
603 }
604 else
605 RangeCheckTimer -= diff;
606 }
607};
608
610{
612
613 void UpdateAI(uint32 diff) override
614 {
615 if (RangeCheckTimer < diff)
616 {
617 if (me->SelectNearestPlayer(3.0f))
618 {
622 }
623 RangeCheckTimer = 500;
624 }
625 else
626 RangeCheckTimer -= diff;
627 }
628};
629
631{
633 {
634 SetCombatMovement(false);
635 }
636
637 void Reset() override
638 {
640 }
641
642 void UpdateAI(uint32 /*diff*/) override
643 {
644 UpdateVictim();
645 }
646};
647
648// 66149, 68396 - Bullet Controller Periodic
650{
651 bool Validate(SpellInfo const* /*spellInfo*/) override
652 {
654 }
655
656 void PeriodicTick(AuraEffect const* /*aurEff*/)
657 {
658 Unit* caster = GetCaster();
659 if (!caster)
660 return;
661
663 args1.AddSpellMod(SPELLVALUE_MAX_TARGETS, urand(1, 6));
667 }
668
669 void Register() override
670 {
672 }
673};
674
675// 67590, 67602, 67603, 67604 - Powering Up
677{
680
681 bool Load() override
682 {
684 if (!sSpellMgr->GetSpellInfo(spellId, GetCastDifficulty()))
685 return false;
686
688 if (!sSpellMgr->GetSpellInfo(poweringUp, GetCastDifficulty()))
689 return false;
690
691 return true;
692 }
693
695 {
696 if (Unit* target = GetHitUnit())
697 {
698 if (Aura* pAura = target->GetAura(poweringUp))
699 {
700 if (pAura->GetStackAmount() >= 100)
701 {
702 if (target->HasAura(SPELL_DARK_ESSENCE_HELPER))
703 target->CastSpell(target, SPELL_EMPOWERED_DARK, true);
704
705 if (target->HasAura(SPELL_LIGHT_ESSENCE_HELPER))
706 target->CastSpell(target, SPELL_EMPOWERED_LIGHT, true);
707
708 target->RemoveAurasDueToSpell(poweringUp);
709 }
710 }
711 }
712 }
713
714 void Register() override
715 {
717 }
718};
719
720// 65684, 67176, 67177, 67178 - Dark Essence
721// 65686, 67222, 67223, 67224 - Light Essence
723{
724public:
726 {
727 spellId = 0;
728 }
729
730private:
732
733 bool Load() override
734 {
736 if (!sSpellMgr->GetSpellInfo(spellId, GetCastDifficulty()))
737 return false;
738 return true;
739 }
740
741 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & /*absorbAmount*/)
742 {
743 if (Unit* owner = GetUnitOwner())
744 {
745 if (dmgInfo.GetSpellInfo())
746 {
747 uint32 poweringUp = SPELL_POWERING_UP;
748 if (urand(0, 99) < 5)
750
751 // Twin Vortex part
752 uint32 lightVortex = SPELL_LIGHT_VORTEX_DAMAGE;
753 uint32 darkVortex = SPELL_DARK_VORTEX_DAMAGE;
754 int32 stacksCount = dmgInfo.GetSpellInfo()->GetEffect(EFFECT_0).CalcValue() / 1000 - 1;
755
756 if (lightVortex && darkVortex && stacksCount)
757 {
758 if (dmgInfo.GetSpellInfo()->Id == darkVortex || dmgInfo.GetSpellInfo()->Id == lightVortex)
759 {
760 if (Aura* aura = owner->GetAura(poweringUp))
761 {
762 aura->ModStackAmount(stacksCount);
763 owner->CastSpell(owner, poweringUp, true);
764 }
765 else
766 {
767 owner->CastSpell(owner, poweringUp, true);
768 if (Aura* newAura = owner->GetAura(poweringUp))
769 newAura->ModStackAmount(stacksCount);
770 }
771 }
772 }
773
774 // Picking floating balls
775 uint32 unleashedDark = SPELL_UNLEASHED_DARK;
776 uint32 unleashedLight = SPELL_UNLEASHED_LIGHT;
777
778 if (unleashedDark && unleashedLight)
779 {
780 if (dmgInfo.GetSpellInfo()->Id == unleashedDark || dmgInfo.GetSpellInfo()->Id == unleashedLight)
781 {
782 // need to do the things in this order, else players might have 100 charges of Powering Up without anything happening
783 if (Aura* aura = owner->GetAura(poweringUp))
784 {
785 // 2 lines together add the correct amount of buff stacks
786 aura->ModStackAmount(stacksCount);
787 owner->CastSpell(owner, poweringUp, true);
788 }
789 else
790 {
791 owner->CastSpell(owner, poweringUp, true);
792 if (Aura* newAura = owner->GetAura(poweringUp))
793 newAura->ModStackAmount(stacksCount);
794 }
795 }
796 }
797 }
798 }
799 }
800
801 void Register() override
802 {
804 }
805};
806
807// 65879, 67244, 67245, 67246 - Power of the Twins
808// 65916, 67248, 67249, 67250 - Power of the Twins
810{
811 bool Load() override
812 {
813 return GetCaster()->GetTypeId() == TYPEID_UNIT;
814 }
815
816 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
817 {
818 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
819 {
820 if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
821 ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(true);
822 }
823 }
824
825 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
826 {
827 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
828 {
829 if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
830 ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(false);
831 }
832 }
833
834 void Register() override
835 {
838 }
839};
840
842{
849
854}
Texts
Actions
@ EQUIP_UNEQUIP
Definition: CreatureAI.h:55
@ EQUIP_NO_CHANGE
Definition: CreatureAI.h:54
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint64_t uint64
Definition: Define.h:141
uint32_t uint32
Definition: Define.h:142
#define SIZE_OF_GRIDS
Definition: GridDefines.h:40
@ IN_PROGRESS
@ FAIL
@ DONE
@ SPECIAL
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TYPEID_UNIT
Definition: ObjectGuid.h:40
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
float frand(float min, float max)
Definition: Random.cpp:55
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
void CloseGossipMenuFor(Player *player)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ UNIT_DYNFLAG_LOOTABLE
@ SPELL_EFFECT_SCRIPT_EFFECT
AuraStateType
@ AURA_STATE_NONE
@ AURA_STATE_VULNERABLE
@ AURA_STATE_RAID_ENCOUNTER
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:230
#define sSpellMgr
Definition: SpellMgr.h:849
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraEffectAbsorbFn(F, I)
Definition: SpellScript.h:2090
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
EvadeReason
Definition: UnitAICommon.h:30
#define ENSURE_AI(a, b)
Definition: UnitAI.h:29
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ UNIT_STATE_CASTING
Definition: Unit.h:270
@ MAX_STAGES
@ STAGE_LIGHT_VORTEX
@ STAGE_DARK_PACT
@ STAGE_DARK_VORTEX
@ STAGE_LIGHT_PACT
@ ACTION_VORTEX
@ ACTION_PACT
#define SPELL_DARK_ESSENCE_HELPER
@ PHASE_EVENT
@ EQUIP_MAIN_2
@ POINT_INITIAL_MOVEMENT
@ SPLINE_INITIAL_MOVEMENT
@ PHASE_COMBAT
@ EQUIP_MAIN_1
#define SPELL_LIGHT_ESSENCE_HELPER
@ SPELL_SUMMON_PERIODIC_LIGHT
@ SPELL_EMPOWERED_DARK
@ SPELL_EMPOWERED_LIGHT
@ SPELL_DARK_SURGE
@ SPELL_LIGHT_VORTEX
@ SPELL_LIGHT_TOUCH
@ SPELL_POWER_TWINS
@ SPELL_SURGE_OF_SPEED
@ SPELL_LIGHT_TWIN_PACT
@ SPELL_DARK_VORTEX_DAMAGE
@ SPELL_UNLEASHED_LIGHT
@ SPELL_LIGHT_VORTEX_DAMAGE
@ SPELL_LIGHT_SHIELD
@ SPELL_TWIN_EMPATHY_DARK
@ SPELL_DARK_TOUCH
@ SPELL_POWERING_UP
@ SPELL_DARK_TWIN_SPIKE
@ SPELL_SUMMON_PERIODIC_DARK
@ SPELL_LIGHT_ESSENCE
@ SPELL_DARK_VORTEX
@ SPELL_DARK_TWIN_PACT
@ SPELL_DARK_SHIELD
@ SPELL_LIGHT_SURGE
@ SPELL_LIGHT_TWIN_SPIKE
@ SPELL_BERSERK
@ SPELL_UNLEASHED_DARK
@ SPELL_DARK_ESSENCE
@ SPELL_CONTROLLER_PERIODIC
@ SPELL_TWIN_EMPATHY_LIGHT
#define SPELL_UNLEASHED_DARK_HELPER
@ SAY_DEATH
@ SAY_NIGHT
@ SAY_AGGRO
@ SAY_LIGHT
@ EMOTE_TWIN_PACT
@ SAY_KILL_PLAYER
@ SAY_TWIN_PACT
@ SAY_BERSERK
@ EMOTE_VORTEX
#define ESSENCE_APPLY
void AddSC_boss_twin_valkyr()
#define ESSENCE_REMOVE
@ NPC_BULLET_DARK
@ NPC_BULLET_CONTROLLER
@ NPC_BULLET_LIGHT
static uint32 GetSisterData(uint32 sisterEntry)
@ EVENT_START_MOVE
@ EVENT_TOUCH
@ EVENT_SPECIAL_ABILITY
@ EVENT_BERSERK
@ EVENT_TWIN_SPIKE
#define SPELL_UNLEASHED_LIGHT_HELPER
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetCaster() const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Definition: SpellScript.h:2089
Unit * GetTarget() const
Difficulty GetCastDifficulty() const
Unit * GetUnitOwner() const
InstanceScript *const instance
SummonList summons
EventMap events
void DoZoneInCombat()
Definition: CreatureAI.h:161
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Definition: CreatureAI.cpp:446
Creature *const me
Definition: CreatureAI.h:61
void SetCombatPulseDelay(uint32 delay)
Definition: Creature.h:345
void SetImmuneToPC(bool apply) override
Definition: Creature.h:170
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetCanDualWield(bool value) override
Definition: Creature.cpp:1940
void DisappearAndDie()
Definition: Creature.h:83
SpellInfo const * GetSpellInfo() const
Definition: Unit.h:442
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:217
void SetPhase(uint8 phase)
Definition: EventMap.cpp:28
void Reset()
Definition: EventMap.cpp:21
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCloseDoorOrButton(ObjectGuid guid)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
virtual ObjectGuid GetGuidData(uint32 type) const override
void DoUseDoorOrButton(ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
CreatureBoundary const * GetBossBoundary(uint32 id) const
void TriggerGameEvent(uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
void SetDynamicFlag(uint32 flag)
Definition: Object.h:169
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
void RemoveDynamicFlag(uint32 flag)
Definition: Object.h:170
Creature * _creature
OrbsDespawner(Creature *creature)
void operator()(Creature *creature) const
bool Execute(uint64, uint32) override
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
Definition: SpellInfo.cpp:495
uint32 const Id
Definition: SpellInfo.h:325
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
Difficulty GetCastDifficulty() const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:11618
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
void ModifyAuraState(AuraStateType flag, bool apply)
Definition: Unit.cpp:5894
bool SetCanFly(bool enable)
Definition: Unit.cpp:12820
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
Player * SelectNearestPlayer(float range) const
Definition: Object.cpp:2210
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
void setActive(bool isActiveObject)
Definition: Object.cpp:922
EventProcessor m_Events
Definition: Object.h:777
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
bool Load() override
void Register() override
void HandleScriptEffect(SpellEffIndex)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition: CellImpl.h:179
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
constexpr float GetPositionZ() const
Definition: Position.h:78
bool IsHeroic() const
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
void SetCombatMovement(bool allowMovement)
boss_eydis(Creature *creature)
void Reset() override
void ExecuteEvent(uint32 eventId) override
void EnterEvadeMode(EvadeReason why) override
void JustEngagedWith(Unit *who) override
boss_fjola(Creature *creature)
void GenerateStageSequence()
void JustReachedHome() override
void Reset() override
void EnableDualWield(bool mode=true)
void JustAppeared() override
void Reset() override
void DoAction(int32 action) override
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId) override
Creature * GetSister()
AuraStateType AuraState
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 pointId) override
void JustReachedHome() override
void KilledUnit(Unit *who) override
boss_twin_baseAI(Creature *creature, uint32 bossId)
void JustEngagedWith(Unit *) override
npc_bullet_controller(Creature *creature)
void UpdateAI(uint32) override
uint32 GetData(uint32 data) const override
bool OnGossipHello(Player *player) override
npc_essence_of_twin(Creature *creature)
npc_unleashed_ballAI(Creature *creature)
void MovementInform(uint32 uiType, uint32 uiId) override
void UpdateAI(uint32 diff) override
npc_unleashed_dark(Creature *creature)
npc_unleashed_light(Creature *creature)
void UpdateAI(uint32 diff) override
@ DATA_MAIN_GATE
constexpr Position ToCCommonLoc[]
@ NPC_FJOLA_LIGHTBANE
@ NPC_LIGHT_ESSENCE
@ NPC_DARK_ESSENCE
@ NPC_EYDIS_DARKBANE
@ EVENT_START_TWINS_FIGHT
@ DATA_TWIN_VALKIRIES
@ DATA_EYDIS_DARKBANE
@ DATA_FJOLA_LIGHTBANE
#define RegisterTrialOfTheCrusaderCreatureAI(ai_name)