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 "ObjectAccessor.h"
28#include "ScriptedCreature.h"
29#include "ScriptedGossip.h"
30#include "SpellAuraEffects.h"
31#include "SpellMgr.h"
32#include "SpellScript.h"
34
47
57
65
101
110
119
120#define SPELL_DARK_ESSENCE_HELPER RAID_MODE<uint32>(65684, 67176, 67177, 67178)
121#define SPELL_LIGHT_ESSENCE_HELPER RAID_MODE<uint32>(65686, 67222, 67223, 67224)
122
123#define SPELL_POWERING_UP_HELPER RAID_MODE<uint32>(67590, 67602, 67603, 67604)
124
125#define SPELL_UNLEASHED_DARK_HELPER RAID_MODE<uint32>(65808, 67172, 67173, 67174)
126#define SPELL_UNLEASHED_LIGHT_HELPER RAID_MODE<uint32>(65795, 67238, 67239, 67240)
127
133
134#define ESSENCE_REMOVE 0
135#define ESSENCE_APPLY 1
136
138{
139 public:
140 explicit OrbsDespawner(Creature* creature) : _creature(creature) { }
141
142 bool Execute(uint64 /*currTime*/, uint32 /*diff*/) override
143 {
146 return true;
147 }
148
149 void operator()(Creature* creature) const
150 {
151 switch (creature->GetEntry())
152 {
153 case NPC_BULLET_DARK:
154 case NPC_BULLET_LIGHT:
155 creature->DespawnOrUnsummon();
156 return;
157 default:
158 return;
159 }
160 }
161
162 private:
164};
165
166static uint32 GetSisterData(uint32 sisterEntry)
167{
169}
170
172{
173 boss_twin_baseAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId)
174 {
176 Weapon = 0;
177 SisterNpcId = 0;
180 SurgeSpellId = 0;
181 VortexSpellId = 0;
182 ShieldSpellId = 0;
183 TwinPactSpellId = 0;
184 SpikeSpellId = 0;
185 TouchSpellId = 0;
187 }
188
189 void Reset() override
190 {
194 }
195
196 void JustAppeared() override
197 {
198 events.Reset();
201 }
202
210
211 void MovementInform(uint32 type, uint32 pointId) override
212 {
213 if (type == SPLINE_CHAIN_MOTION_TYPE && pointId == POINT_INITIAL_MOVEMENT)
214 {
215 me->SetImmuneToPC(false);
217 if (me->GetEntry() == NPC_FJOLA_LIGHTBANE) // avoid call twice
219 }
220 }
221
222 void KilledUnit(Unit* who) override
223 {
224 if (who->GetTypeId() == TYPEID_PLAYER)
226 }
227
236
237 void JustDied(Unit* /*killer*/) override
238 {
240 if (Creature* pSister = GetSister())
241 {
242 if (!pSister->IsAlive())
243 {
245 pSister->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
246 events.Reset();
250 }
251 else
252 {
255 }
256 }
258 }
259
260 // Called when sister pointer needed
265
266 void JustEngagedWith(Unit* /*who*/) override
267 {
269 if (Creature* pSister = GetSister())
270 {
271 me->AddAura(MyEmphatySpellId, pSister);
272 DoZoneInCombat(pSister);
273 }
275
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
362 }
363
364 protected:
376};
377
379{
384
403
404 void ExecuteEvent(uint32 eventId) override
405 {
406 if (eventId == EVENT_SPECIAL_ABILITY)
407 {
410
411 switch (Stage[CurrentStage])
412 {
414 if (Creature* sister = GetSister())
415 sister->AI()->DoAction(ACTION_VORTEX);
416 break;
417 case STAGE_DARK_PACT:
418 if (Creature* sister = GetSister())
419 sister->AI()->DoAction(ACTION_PACT);
420 break;
423 break;
424 case STAGE_LIGHT_PACT:
426 break;
427 default:
428 break;
429 }
430 ++CurrentStage;
432 }
433 else
435 }
436
444
450
456
458 {
459 CurrentStage = 0;
460
461 // Initialize and clean up.
462 for (int i = 0; i < MAX_STAGES; ++i)
463 Stage[i] = i;
464
465 // Allocate an unique random stage to each position in the array.
466 for (int i = 0; i < MAX_STAGES - 1; ++i)
467 {
468 int random = i + urand(0, MAX_STAGES - i);
469 std::swap(Stage[i], Stage[random]);
470 }
471 }
472 private:
475};
476
498
500{
501 npc_essence_of_twin(Creature* creature) : ScriptedAI(creature) { }
502
503 uint32 GetData(uint32 data) const override
504 {
505 uint32 spellReturned = 0;
506 switch (me->GetEntry())
507 {
510 break;
511 case NPC_DARK_ESSENCE:
513 break;
514 default:
515 break;
516 }
517
518 return spellReturned;
519 }
520
521 bool OnGossipHello(Player* player) override
522 {
524 player->CastSpell(player, GetData(ESSENCE_APPLY), true);
525 CloseGossipMenuFor(player);
526 return true;
527 }
528};
529
531{
533 {
534 Initialize();
535 }
536
538 {
539 RangeCheckTimer = 500;
540 }
541
543 {
544 float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
545 float y = y0;
546 float x = frand(x0 - r, x0 + r);
547 float sq = std::pow(r, 2.f) - std::pow(x - x0, 2.f);
548 float rt = std::sqrt(std::fabs(sq));
549 if (urand(0, 1))
550 y = y0 + rt;
551 else
552 y = y0 - rt;
553 me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
554 }
555
566
567 void MovementInform(uint32 uiType, uint32 uiId) override
568 {
569 if (uiType != POINT_MOTION_TYPE)
570 return;
571
572 switch (uiId)
573 {
574 case 0:
575 if (urand(0, 3) == 0)
577 else
579 break;
580 default:
581 break;
582 }
583 }
584
585 protected:
587};
588
590{
592
593 void UpdateAI(uint32 diff) override
594 {
595 if (RangeCheckTimer < diff)
596 {
597 if (me->SelectNearestPlayer(3.0f))
598 {
602 }
603 RangeCheckTimer = 500;
604 }
605 else
606 RangeCheckTimer -= diff;
607 }
608};
609
611{
613
614 void UpdateAI(uint32 diff) override
615 {
616 if (RangeCheckTimer < diff)
617 {
618 if (me->SelectNearestPlayer(3.0f))
619 {
623 }
624 RangeCheckTimer = 500;
625 }
626 else
627 RangeCheckTimer -= diff;
628 }
629};
630
632{
634 {
635 SetCombatMovement(false);
636 }
637
638 void Reset() override
639 {
641 }
642
643 void UpdateAI(uint32 /*diff*/) override
644 {
645 UpdateVictim();
646 }
647};
648
649// 66149, 68396 - Bullet Controller Periodic
651{
653
654 bool Validate(SpellInfo const* /*spellInfo*/) override
655 {
657 }
658
659 void PeriodicTick(AuraEffect const* /*aurEff*/)
660 {
661 Unit* caster = GetCaster();
662 if (!caster)
663 return;
664
666 args1.AddSpellMod(SPELLVALUE_MAX_TARGETS, urand(1, 6));
670 }
671
676};
677
678// 67590, 67602, 67603, 67604 - Powering Up
680{
682
685
686 bool Load() override
687 {
688 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_SURGE_OF_SPEED, GetCaster());
689 if (!sSpellMgr->GetSpellInfo(spellId))
690 return false;
691
692 poweringUp = sSpellMgr->GetSpellIdForDifficulty(SPELL_POWERING_UP, GetCaster());
693 if (!sSpellMgr->GetSpellInfo(poweringUp))
694 return false;
695
696 return true;
697 }
698
700 {
701 if (Unit* target = GetHitUnit())
702 {
703 if (Aura* pAura = target->GetAura(poweringUp))
704 {
705 if (pAura->GetStackAmount() >= 100)
706 {
707 if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2206, EFFECT_1))
708 target->CastSpell(target, SPELL_EMPOWERED_DARK, true);
709
710 if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2845, EFFECT_1))
711 target->CastSpell(target, SPELL_EMPOWERED_LIGHT, true);
712
713 target->RemoveAurasDueToSpell(poweringUp);
714 }
715 }
716 }
717 }
718
723};
724
725// 65684, 67176, 67177, 67178 - Dark Essence
745
746// 65686, 67222, 67223, 67224 - Light Essence
766
767// 65684, 67176, 67177, 67178 - Dark Essence
768// 65686, 67222, 67223, 67224 - Light Essence
770{
772
773public:
775 {
776 spellId = 0;
777 }
778
779private:
781
782 bool Load() override
783 {
784 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_SURGE_OF_SPEED, GetCaster());
785 if (!sSpellMgr->GetSpellInfo(spellId))
786 return false;
787 return true;
788 }
789
790 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & /*absorbAmount*/)
791 {
792 if (Unit* owner = GetUnitOwner())
793 {
794 if (dmgInfo.GetSpellInfo())
795 {
796 if (uint32 poweringUp = sSpellMgr->GetSpellIdForDifficulty(SPELL_POWERING_UP, owner))
797 {
798 if (urand(0, 99) < 5)
800
801 // Twin Vortex part
802 uint32 lightVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHT_VORTEX_DAMAGE, owner);
803 uint32 darkVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_DARK_VORTEX_DAMAGE, owner);
804 int32 stacksCount = dmgInfo.GetSpellInfo()->GetEffect(EFFECT_0).CalcValue() / 1000 - 1;
805
806 if (lightVortex && darkVortex && stacksCount)
807 {
808 if (dmgInfo.GetSpellInfo()->Id == darkVortex || dmgInfo.GetSpellInfo()->Id == lightVortex)
809 {
810 if (Aura* aura = owner->GetAura(poweringUp))
811 {
812 aura->ModStackAmount(stacksCount);
813 owner->CastSpell(owner, poweringUp, true);
814 }
815 else
816 {
817 owner->CastSpell(owner, poweringUp, true);
818 if (Aura* newAura = owner->GetAura(poweringUp))
819 newAura->ModStackAmount(stacksCount);
820 }
821 }
822 }
823
824 // Picking floating balls
825 uint32 unleashedDark = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNLEASHED_DARK, owner);
826 uint32 unleashedLight = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNLEASHED_LIGHT, owner);
827
828 if (unleashedDark && unleashedLight)
829 {
830 if (dmgInfo.GetSpellInfo()->Id == unleashedDark || dmgInfo.GetSpellInfo()->Id == unleashedLight)
831 {
832 // need to do the things in this order, else players might have 100 charges of Powering Up without anything happening
833 if (Aura* aura = owner->GetAura(poweringUp))
834 {
835 // 2 lines together add the correct amount of buff stacks
836 aura->ModStackAmount(stacksCount);
837 owner->CastSpell(owner, poweringUp, true);
838 }
839 else
840 {
841 owner->CastSpell(owner, poweringUp, true);
842 if (Aura* newAura = owner->GetAura(poweringUp))
843 newAura->ModStackAmount(stacksCount);
844 }
845 }
846 }
847 }
848 }
849 }
850 }
851
856};
857
858// 65879, 67244, 67245, 67246 - Power of the Twins
859// 65916, 67248, 67249, 67250 - Power of the Twins
861{
863
864 bool Load() override
865 {
866 return GetCaster()->GetTypeId() == TYPEID_UNIT;
867 }
868
869 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
870 {
871 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
872 {
873 if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
874 ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(true);
875 }
876 }
877
878 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
879 {
880 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
881 {
882 if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
883 ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(false);
884 }
885 }
886
892};
893
Actions
@ EQUIP_UNEQUIP
Definition CreatureAI.h:76
@ EQUIP_NO_CHANGE
Definition CreatureAI.h:75
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:122
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
#define SIZE_OF_GRIDS
Definition GridDefines.h:38
@ IN_PROGRESS
@ FAIL
@ DONE
@ SPECIAL
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:38
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
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:1128
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_SCRIPT_EFFECT
@ UNIT_DYNFLAG_LOOTABLE
@ SPELLFAMILY_GENERIC
AuraStateType
@ AURA_STATE_NONE
@ AURA_STATE_UNKNOWN19
@ AURA_STATE_UNKNOWN22
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ SPELLVALUE_MAX_TARGETS
#define sSpellMgr
Definition SpellMgr.h:738
#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)
#define ENSURE_AI(a, b)
Definition UnitAI.h:28
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
Weapon
@ 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_POWERING_UP_HELPER
#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
Unit * GetUnitOwner() const
InstanceScript *const instance
SummonList summons
EventMap events
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
Creature *const me
Definition CreatureAI.h:82
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
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)
void SetCanDualWield(bool value) override
void DisappearAndDie()
Definition Creature.h:73
SpellInfo const * GetSpellInfo() const
Definition Unit.h:460
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
EventId ExecuteEvent()
Definition EventMap.cpp:73
bool IsInPhase(PhaseIndex phase) const
Definition EventMap.h:236
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 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 DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
virtual void RemoveDynamicFlag(uint32 flag)
Definition Object.h:90
TypeID GetTypeId() const
Definition Object.h:93
virtual void SetDynamicFlag(uint32 flag)
Definition Object.h:89
uint32 GetEntry() const
Definition Object.h:81
OrbsDespawner(Creature *creature)
void operator()(Creature *creature) const
bool Execute(uint64, uint32) override
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
uint32 Id
Definition SpellInfo.h:289
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
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
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:11964
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
bool SetCanFly(bool enable, bool packetOnly=false)
Definition Unit.cpp:13374
void ModifyAuraState(AuraStateType flag, bool apply)
Definition Unit.cpp:5749
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
Player * SelectNearestPlayer(float distance) const
Definition Object.cpp:2161
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
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:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
EventProcessor m_Events
Definition Object.h:591
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareAuraScript(spell_bullet_controller)
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_power_of_the_twins)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_powering_up)
void Register() override
void HandleScriptEffect(SpellEffIndex)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_twin_valkyr_dark_essence)
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_twin_valkyr_light_essence)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_valkyr_essences)
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:168
float GetPositionZ() const
Definition Position.h:81
float GetPositionX() const
Definition Position.h:79
float GetPositionY() const
Definition Position.h:80
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
Position const 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)