TrinityCore
Loading...
Searching...
No Matches
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
46
56
64
101
110
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
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
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
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
266
267 void JustEngagedWith(Unit* /*who*/) override
268 {
270 if (Creature* pSister = GetSister())
271 {
272 me->AddAura(MyEmphatySpellId, pSister);
273 DoZoneInCombat(pSister);
274 }
276
279 me->setActive(true);
280
282 events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6min : 8min);
283 if (IsHeroic())
285 }
286
287 void DoAction(int32 action) override
288 {
289 switch (action)
290 {
291 case ACTION_VORTEX:
294 break;
295 case ACTION_PACT:
298 if (Creature* sister = GetSister())
299 sister->CastSpell(sister, SPELL_POWER_TWINS, false);
302 break;
303 default:
304 break;
305 }
306 }
307
308 void EnableDualWield(bool mode = true)
309 {
311 me->SetCanDualWield(mode);
312 }
313
314 void ExecuteEvent(uint32 eventId) override
315 {
316 switch (eventId)
317 {
318 case EVENT_TWIN_SPIKE:
320 events.Repeat(20s);
321 break;
322 case EVENT_TOUCH:
323 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 200.0f, true, true, OtherEssenceSpellId))
324 {
326 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, 1); // @todo spellmgr correction instead?
327 me->CastSpell(target, TouchSpellId, args);
328 }
329 events.Repeat(10s, 15s);
330 break;
331 case EVENT_BERSERK:
334 break;
335 case EVENT_START_MOVE:
338 break;
339 default:
340 break;
341 }
342 }
343
344 void UpdateAI(uint32 diff) override
345 {
347 return;
348
349 events.Update(diff);
350
352 return;
353
354 while (uint32 eventId = events.ExecuteEvent())
355 {
356 ExecuteEvent(eventId);
358 return;
359 }
360 }
361
362 protected:
374};
375
377{
382
400
401 void ExecuteEvent(uint32 eventId) override
402 {
403 if (eventId == EVENT_SPECIAL_ABILITY)
404 {
407
408 switch (Stage[CurrentStage])
409 {
411 if (Creature* sister = GetSister())
412 sister->AI()->DoAction(ACTION_VORTEX);
413 break;
414 case STAGE_DARK_PACT:
415 if (Creature* sister = GetSister())
416 sister->AI()->DoAction(ACTION_PACT);
417 break;
420 break;
421 case STAGE_LIGHT_PACT:
423 break;
424 default:
425 break;
426 }
427 ++CurrentStage;
429 }
430 else
432 }
433
441
447
453
455 {
456 CurrentStage = 0;
457
458 // Initialize and clean up.
459 for (int i = 0; i < MAX_STAGES; ++i)
460 Stage[i] = i;
461
462 // Allocate an unique random stage to each position in the array.
463 for (int i = 0; i < MAX_STAGES - 1; ++i)
464 {
465 int random = i + urand(0, MAX_STAGES - i);
466 std::swap(Stage[i], Stage[random]);
467 }
468 }
469 private:
472};
473
495
497{
498 npc_essence_of_twin(Creature* creature) : ScriptedAI(creature) { }
499
500 uint32 GetData(uint32 data) const override
501 {
502 uint32 spellReturned = 0;
503 switch (me->GetEntry())
504 {
507 break;
508 case NPC_DARK_ESSENCE:
510 break;
511 default:
512 break;
513 }
514
515 return spellReturned;
516 }
517
518 bool OnGossipHello(Player* player) override
519 {
521 player->CastSpell(player, GetData(ESSENCE_APPLY), true);
522 CloseGossipMenuFor(player);
523 return true;
524 }
525};
526
528{
530 {
531 Initialize();
532 }
533
535 {
536 RangeCheckTimer = 500;
537 }
538
540 {
541 float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
542 float y = y0;
543 float x = frand(x0 - r, x0 + r);
544 float sq = std::pow(r, 2.f) - std::pow(x - x0, 2.f);
545 float rt = std::sqrt(std::fabs(sq));
546 if (urand(0, 1))
547 y = y0 + rt;
548 else
549 y = y0 - rt;
550 me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
551 }
552
553 void Reset() override
554 {
556 me->SetUninteractible(true);
558 me->SetDisableGravity(true);
559 me->SetCanFly(true);
560 SetCombatMovement(false);
562 Initialize();
563 }
564
565 void MovementInform(uint32 uiType, uint32 uiId) override
566 {
567 if (uiType != POINT_MOTION_TYPE)
568 return;
569
570 switch (uiId)
571 {
572 case 0:
573 if (urand(0, 3) == 0)
575 else
577 break;
578 default:
579 break;
580 }
581 }
582
583 protected:
585};
586
588{
590
591 void UpdateAI(uint32 diff) override
592 {
593 if (RangeCheckTimer < diff)
594 {
595 if (me->SelectNearestPlayer(3.0f))
596 {
600 }
601 RangeCheckTimer = 500;
602 }
603 else
604 RangeCheckTimer -= diff;
605 }
606};
607
609{
611
612 void UpdateAI(uint32 diff) override
613 {
614 if (RangeCheckTimer < diff)
615 {
616 if (me->SelectNearestPlayer(3.0f))
617 {
621 }
622 RangeCheckTimer = 500;
623 }
624 else
625 RangeCheckTimer -= diff;
626 }
627};
628
630{
632 {
633 SetCombatMovement(false);
634 }
635
636 void Reset() override
637 {
639 }
640
641 void UpdateAI(uint32 /*diff*/) override
642 {
643 UpdateVictim();
644 }
645};
646
647// 66149, 68396 - Bullet Controller Periodic
649{
650 bool Validate(SpellInfo const* /*spellInfo*/) override
651 {
653 }
654
655 void PeriodicTick(AuraEffect const* /*aurEff*/)
656 {
657 Unit* caster = GetCaster();
658 if (!caster)
659 return;
660
662 args1.AddSpellMod(SPELLVALUE_MAX_TARGETS, urand(1, 6));
666 }
667
672};
673
674// 67590, 67602, 67603, 67604 - Powering Up
676{
679
680 bool Load() override
681 {
683 if (!sSpellMgr->GetSpellInfo(spellId, GetCastDifficulty()))
684 return false;
685
687 if (!sSpellMgr->GetSpellInfo(poweringUp, GetCastDifficulty()))
688 return false;
689
690 return true;
691 }
692
694 {
695 if (Unit* target = GetHitUnit())
696 {
697 if (Aura* pAura = target->GetAura(poweringUp))
698 {
699 if (pAura->GetStackAmount() >= 100)
700 {
701 if (target->HasAura(SPELL_DARK_ESSENCE_HELPER))
702 target->CastSpell(target, SPELL_EMPOWERED_DARK, true);
703
704 if (target->HasAura(SPELL_LIGHT_ESSENCE_HELPER))
705 target->CastSpell(target, SPELL_EMPOWERED_LIGHT, true);
706
707 target->RemoveAurasDueToSpell(poweringUp);
708 }
709 }
710 }
711 }
712
717};
718
719// 65684, 67176, 67177, 67178 - Dark Essence
720// 65686, 67222, 67223, 67224 - Light Essence
722{
723public:
725 {
726 spellId = 0;
727 }
728
729private:
731
732 bool Load() override
733 {
735 if (!sSpellMgr->GetSpellInfo(spellId, GetCastDifficulty()))
736 return false;
737 return true;
738 }
739
740 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & /*absorbAmount*/)
741 {
742 if (Unit* owner = GetUnitOwner())
743 {
744 if (dmgInfo.GetSpellInfo())
745 {
746 uint32 poweringUp = SPELL_POWERING_UP;
747 if (urand(0, 99) < 5)
749
750 // Twin Vortex part
751 uint32 lightVortex = SPELL_LIGHT_VORTEX_DAMAGE;
752 uint32 darkVortex = SPELL_DARK_VORTEX_DAMAGE;
753 int32 stacksCount = dmgInfo.GetSpellInfo()->GetEffect(EFFECT_0).CalcValueAsInt() / 1000 - 1;
754
755 if (lightVortex && darkVortex && stacksCount)
756 {
757 if (dmgInfo.GetSpellInfo()->Id == darkVortex || dmgInfo.GetSpellInfo()->Id == lightVortex)
758 {
759 if (Aura* aura = owner->GetAura(poweringUp))
760 {
761 aura->ModStackAmount(stacksCount);
762 owner->CastSpell(owner, poweringUp, true);
763 }
764 else
765 {
766 owner->CastSpell(owner, poweringUp, true);
767 if (Aura* newAura = owner->GetAura(poweringUp))
768 newAura->ModStackAmount(stacksCount);
769 }
770 }
771 }
772
773 // Picking floating balls
774 uint32 unleashedDark = SPELL_UNLEASHED_DARK;
775 uint32 unleashedLight = SPELL_UNLEASHED_LIGHT;
776
777 if (unleashedDark && unleashedLight)
778 {
779 if (dmgInfo.GetSpellInfo()->Id == unleashedDark || dmgInfo.GetSpellInfo()->Id == unleashedLight)
780 {
781 // need to do the things in this order, else players might have 100 charges of Powering Up without anything happening
782 if (Aura* aura = owner->GetAura(poweringUp))
783 {
784 // 2 lines together add the correct amount of buff stacks
785 aura->ModStackAmount(stacksCount);
786 owner->CastSpell(owner, poweringUp, true);
787 }
788 else
789 {
790 owner->CastSpell(owner, poweringUp, true);
791 if (Aura* newAura = owner->GetAura(poweringUp))
792 newAura->ModStackAmount(stacksCount);
793 }
794 }
795 }
796 }
797 }
798 }
799
804};
805
806// 65879, 67244, 67245, 67246 - Power of the Twins
807// 65916, 67248, 67249, 67250 - Power of the Twins
809{
810 bool Load() override
811 {
812 return GetCaster()->GetTypeId() == TYPEID_UNIT;
813 }
814
815 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
816 {
817 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
818 {
819 if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
820 ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(true);
821 }
822 }
823
824 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
825 {
826 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
827 {
828 if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
829 ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(false);
830 }
831 }
832
838};
839
@ EQUIP_UNEQUIP
Definition CreatureAI.h:57
@ EQUIP_NO_CHANGE
Definition CreatureAI.h:56
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
#define SIZE_OF_GRIDS
Definition GridDefines.h:40
@ IN_PROGRESS
@ FAIL
@ DONE
@ SPECIAL
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
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:1383
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ 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
@ SPELLVALUE_MAX_TARGETS
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define sSpellMgr
Definition SpellMgr.h:812
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
#define ENSURE_AI(a, b)
Definition UnitAI.h:30
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_CASTING
Definition Unit.h:276
@ 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
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetCaster() const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Unit * GetTarget() const
Difficulty GetCastDifficulty() const
Unit * GetUnitOwner() const
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
SummonList summons
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Creature *const me
Definition CreatureAI.h:63
void SetImmuneToPC(bool apply) override
Definition Creature.h:184
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetCanDualWield(bool value) override
void DisappearAndDie()
Definition Creature.h:95
SpellInfo const * GetSpellInfo() const
Definition Unit.h:448
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
bool IsInPhase(uint8 phase) const
Definition EventMap.h:222
void SetPhase(uint8 phase)
Definition EventMap.cpp:32
void Reset()
Definition EventMap.cpp:25
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={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void SetDynamicFlag(uint32 flag)
Definition Object.h:97
uint32 GetEntry() const
Definition Object.h:89
void RemoveDynamicFlag(uint32 flag)
Definition Object.h:98
OrbsDespawner(Creature *creature)
void operator()(Creature *creature) const
bool Execute(uint64, uint32) override
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
uint32 const Id
Definition SpellInfo.h:328
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
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:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:12249
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13361
void SetUninteractible(bool apply)
Definition Unit.cpp:8564
void ModifyAuraState(AuraStateType flag, bool apply)
Definition Unit.cpp:6079
bool SetCanFly(bool enable)
Definition Unit.cpp:13459
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:846
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
Player * SelectNearestPlayer(float range) const
Definition Object.cpp:1579
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
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:1398
void setActive(bool isActiveObject)
Definition Object.cpp:276
EventProcessor m_Events
Definition Object.h:561
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void HandleScriptEffect(SpellEffIndex)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
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:87
constexpr float GetPositionY() const
Definition Position.h:88
constexpr float GetPositionZ() const
Definition Position.h:89
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
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)