TrinityCore
Loading...
Searching...
No Matches
boss_xt002.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 "Containers.h"
20#include "InstanceScript.h"
21#include "MotionMaster.h"
22#include "ObjectAccessor.h"
23#include "Opcodes.h"
24#include "PassiveAI.h"
25#include "Player.h"
26#include "ScriptedCreature.h"
27#include "SpellAuraEffects.h"
28#include "SpellMgr.h"
29#include "SpellScript.h"
30#include "ulduar.h"
31#include "Vehicle.h"
32#include "WorldPacket.h"
33
35{
42 SPELL_STAND = 37752,
44 SPELL_ENRAGE = 26662,
47
48 // XT-Toy Pile
52
53 // Heart of the Deconstructor
62
63 // Void Zone
65
66 // Life Spark
69 SPELL_SHOCK = 64230,
70
71 // XM-024 Pummeller
75
76 //Boombot
78 SPELL_BOOM = 62834,
79
80 // Achievement-related spells
82};
83
96
102
109
117
133
140
141struct boss_xt002 : public BossAI
142{
143 boss_xt002(Creature* creature) : BossAI(creature, DATA_XT002)
144 {
145 Initialize();
146 }
147
149 {
150 _healthRecovered = false;
151 _gravityBombCasualty = false;
152 _hardMode = false;
154 }
155
157 {
158 switch (_exposeHeartPercent)
159 {
160 case 75:
162 break;
163 case 50:
165 break;
166 default:
168 break;
169 }
170 }
171
180
181 void EnterEvadeMode(EvadeReason /*why*/) override
182 {
185 }
186
198
199 void DoAction(int32 action) override
200 {
201 if (action == ACTION_ENTER_HARD_MODE)
203 }
204
205 void KilledUnit(Unit* who) override
206 {
207 if (who->GetTypeId() == TYPEID_PLAYER)
208 Talk(SAY_SLAY);
209 }
210
211 void JustDied(Unit* /*killer*/) override
212 {
214 _JustDied();
216 }
217
228
229 void DisposeHeart(bool isHardMode = false)
230 {
232
233 if (isHardMode)
234 {
237 }
238 else
239 {
242 }
243
248 {
249 if (heart->IsAlive())
250 heart->AI()->DoAction(ACTION_DISPOSE_HEART);
251 else
252 heart->DespawnOrUnsummon();
253 }
254
255 }
256
266
267 void PassengerBoarded(Unit* who, int8 seatId, bool apply) override
268 {
269 if (!apply)
270 return;
271
272 if (who->GetEntry() == NPC_XS013_SCRAPBOT)
273 {
275 _healthRecovered = true;
276 }
277 else if (seatId == HEART_VEHICLE_SEAT_EXPOSED)
278 who->CastSpell(who, SPELL_EXPOSED_HEART); // Channeled
279 }
280
281 uint32 GetData(uint32 type) const override
282 {
283 switch (type)
284 {
285 case DATA_HARD_MODE:
286 return _hardMode ? 1 : 0;
288 return _healthRecovered ? 1 : 0;
290 return _gravityBombCasualty ? 1 : 0;
291 default:
292 return 0;
293 }
294 }
295
296 void SetData(uint32 type, uint32 data) override
297 {
298 switch (type)
299 {
301 if (!_hardMode)
302 {
303 uint32 transferHealth = data;
304 if (transferHealth >= me->GetHealth())
305 transferHealth = me->GetHealth() - 1;
306
307 me->ModifyHealth(-static_cast<int32>(transferHealth));
308 me->LowerPlayerDamageReq(transferHealth);
309 }
310 break;
312 _gravityBombCasualty = (data > 0) ? true : false;
313 break;
314 default:
315 break;
316 }
317 }
318
319 void UpdateAI(uint32 diff) override
320 {
321 if (!UpdateVictim())
322 return;
323
324 events.Update(diff);
325
327 return;
328
329 while (uint32 eventId = events.ExecuteEvent())
330 {
331 switch (eventId)
332 {
335 events.Repeat(Is25ManRaid() ? 16s : 20s);
336 break;
339 events.Repeat(Is25ManRaid() ? 16s : 20s);
340 break;
346 events.Repeat(1min);
347 break;
350 ExposeHeart();
351 events.Repeat(1s);
352 break;
353 case EVENT_SUBMERGE:
358 heart->AI()->DoAction(ACTION_START_PHASE_HEART);
360 break;
362 DisposeHeart();
363 break;
364 case EVENT_ENRAGE:
367 break;
369 me->SetFullHealth();
372 _hardMode = true;
374 break;
378 break;
379 default:
380 break;
381 }
382
384 return;
385 }
386
389 }
390
391private:
392 bool _healthRecovered; // Did a scrapbot recover XT-002's health during the encounter?
393 bool _hardMode; // Are we in hard mode? Or: was the heart killed during phase 2?
394 bool _gravityBombCasualty; // Did someone die because of Gravity Bomb damage?
396};
397
399{
400 npc_xt002_heart(Creature* creature) : NullCreatureAI(creature), _instance(creature->GetInstanceScript()) { }
401
402 void Reset() override
403 {
404 me->SetRegenerateHealth(false);
405 }
406
428
429 void JustDied(Unit* /*killer*/) override
430 {
432 xt002->AI()->DoAction(ACTION_ENTER_HARD_MODE);
433 }
434
435private:
437};
438
440{
441 npc_scrapbot(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
442
443 void Reset() override
444 {
447
449 {
451 return;
452 }
453
455 xt002->AI()->JustSummoned(me);
456
458 Schedule(2s, [this](TaskContext /*StartMove*/)
459 {
461 me->GetMotionMaster()->MoveFollow(xt002, 0.0f, 0.0f);
462 })
463 .Schedule(1s, [this](TaskContext checkXt002)
464 {
466 {
467 if (me->IsWithinMeleeRange(xt002))
468 {
470 _scheduler.Schedule(1s, [this](TaskContext /*ScrapRepair*/)
471 {
473 xt002->CastSpell(me, SPELL_SCRAP_REPAIR, true);
475 });
476 }
477 else
478 checkXt002.Repeat();
479 }
480 else
482 });
483 }
484
485 void UpdateAI(uint32 diff) override
486 {
487 _scheduler.Update(diff);
488 }
489
490private:
493};
494
496{
497 npc_pummeller(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
498
499 void Reset() override
500 {
503
505 {
507 return;
508 }
509
511 xt002->AI()->JustSummoned(me);
512
514 Schedule(1s, [this](TaskContext /*StartMove*/)
515 {
518 })
519 .Schedule(17s, [this](TaskContext trample)
520 {
522 trample.Repeat(11s);
523 })
524 .Schedule(19s, [this](TaskContext arcingSmash)
525 {
527 arcingSmash.Repeat(8s);
528 })
529 .Schedule(19s, [this](TaskContext upperCut)
530 {
532 upperCut.Repeat(14s);
533 });
534
535 }
536
537 void UpdateAI(uint32 diff) override
538 {
539 if (!UpdateVictim())
540 return;
541
542 _scheduler.Update(diff, [this]
543 {
545 });
546 }
547
548private:
551};
552
553struct npc_boombot : public ScriptedAI
554{
555 npc_boombot(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _boomed(false) { }
556
557 void Reset() override
558 {
562
564 {
566 return;
567 }
568
569 // HACK/workaround:
570 // these values aren't confirmed - lack of data - and the values in DB are incorrect
571 // these values are needed for correct damage of Boom spell
574
576 xt002->AI()->JustSummoned(me);
577
579 Schedule(4s, [this](TaskContext /*StartMove*/)
580 {
582 me->GetMotionMaster()->MoveFollow(xt002, 0.0f, 0.0f);
583
584 })
585 .Schedule(1s, [this](TaskContext checkXt002)
586 {
588 {
589 if (me->IsWithinMeleeRange(xt002))
591 else
592 checkXt002.Repeat();
593 }
594 else
596 });
597 }
598
599 void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
600 {
601 if (damage >= (me->GetHealth() - me->GetMaxHealth() * 0.5f) && !_boomed)
602 {
603 _boomed = true; // Prevent recursive call
604 damage = 0;
606 }
607 }
608
609 void UpdateAI(uint32 diff) override
610 {
611 _scheduler.Update(diff);
612 }
613
614private:
618};
619
621{
622 npc_life_spark(Creature* creature) : ScriptedAI(creature) { }
623
624 void Reset() override
625 {
628 }
629
630 void JustEngagedWith(Unit* /*who*/) override
631 {
633 _scheduler.Schedule(12s, [this](TaskContext spellShock)
634 {
636 spellShock.Repeat();
637 });
638 }
639
640 void UpdateAI(uint32 diff) override
641 {
642 if (!UpdateVictim())
643 return;
644
646 return;
647
648 _scheduler.Update(diff, [this]
649 {
651 });
652 }
653
654private:
656};
657
659{
660 npc_xt_void_zone(Creature* creature) : PassiveAI(creature) { }
661
662 void JustAppeared() override
663 {
664 _scheduler.Schedule(2500ms, [this](TaskContext /*task*/)
665 {
667 });
668 }
669
670 void UpdateAI(uint32 diff) override
671 {
672 _scheduler.Update(diff);
673 }
674
675private:
677};
678
679// 63018, 65121 - Searing Light
681{
683
684 bool Validate(SpellInfo const* /*spell*/) override
685 {
687 }
688
689 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
690 {
691 if (Player* player = GetOwner()->ToPlayer())
692 if (Unit* xt002 = GetCaster())
693 if (xt002->HasAura(aurEff->GetAmount())) // Heartbreak aura indicating hard mode
694 xt002->CastSpell(player, SPELL_SUMMON_LIFE_SPARK, true);
695 }
696
701};
702
703// 63024, 64234 - Gravity Bomb
705{
707
708 bool Validate(SpellInfo const* /*spell*/) override
709 {
711 }
712
713 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
714 {
715 if (Player* player = GetOwner()->ToPlayer())
716 if (Unit* xt002 = GetCaster())
717 if (xt002->HasAura(aurEff->GetAmount())) // Heartbreak aura indicating hard mode
718 xt002->CastSpell(player, SPELL_SUMMON_VOID_ZONE, true);
719 }
720
721 void OnPeriodic(AuraEffect const* aurEff)
722 {
723 Unit* xt002 = GetCaster();
724 Unit* owner = GetTarget();
725 if (!xt002)
726 return;
727
728 if (aurEff->GetAmount() >= int32(owner->GetHealth()))
730 }
731
737};
738
739// 63025, 64233 - Gravity Bomb (Damage)
741{
743
744 void HandleScript(SpellEffIndex /*effIndex*/)
745 {
746 if (GetHitDamage() >= int32(GetHitUnit()->GetHealth()))
747 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
748 if (Creature* xt002 = instance->GetCreature(DATA_XT002))
749 xt002->AI()->SetData(DATA_GRAVITY_BOMB_CASUALTY, 1);
750 }
751
756};
757
758// 62791 - XT-002 Heart Overload Trigger Spell (SERVERSIDE)
760{
762
763 bool Validate(SpellInfo const* /*spell*/) override
764 {
765 return ValidateSpellInfo
766 ({
769 });
770 }
771
773 {
774 std::list<Creature*> possibleCreatures;
775 Unit* caster = GetCaster();
776 caster->GetCreatureListWithEntryInGrid(possibleCreatures, NPC_XT_TOY_PILE);
777 possibleCreatures.remove_if([caster](Creature* creature)
778 {
779 return caster->GetDistance2d(creature) < 60.0f;
780 });
781
782 if (possibleCreatures.empty())
783 return nullptr;
784
786 }
787
788 void HandleScript(SpellEffIndex /*effIndex*/)
789 {
790 Unit* caster = GetCaster();
791 if (Creature* toyPile = GetRandomToyPile())
792 {
793 caster->CastSpell(toyPile, SPELL_ENERGY_ORB, true);
794 caster->CastSpell(nullptr, SPELL_HEART_LIGHTNING_TETHER, true);
795 }
796 }
797
802};
803
804// 62826 - Energy Orb
806{
808
809 bool Validate(SpellInfo const* /*spell*/) override
810 {
811 return ValidateSpellInfo
812 ({
816 });
817 }
818
819 void HandleSummons(SpellEffIndex /*effIndex*/)
820 {
821 Unit* target = GetHitUnit();
822 if (target->GetEntry() != NPC_XT_TOY_PILE)
823 return;
824
825 target->CastSpell(target, SPELL_RECHARGE_BOOMBOT, true);
826
827 if (roll_chance_i(30))
828 target->CastSpell(target, SPELL_RECHARGE_PUMMELER, true);
829
830 for (uint8 i = 0; i < urand(5, 7); ++i)
831 target->CastSpell(target, SPELL_RECHARGE_SCRAPBOT, true);
832
834 base->AI()->Talk(SAY_SUMMON);
835 }
836
841};
842
843// 62775 - Tympanic Tantrum
845{
847
848 void FilterTargets(std::list<WorldObject*>& targets)
849 {
850 targets.remove_if([](WorldObject* object) -> bool
851 {
852 if (object->GetTypeId() == TYPEID_PLAYER)
853 return false;
854
855 if (Creature* creature = object->ToCreature())
856 return !creature->IsPet();
857
858 return true;
859 });
860 }
861
863 {
864 SetHitDamage(GetHitUnit()->CountPctFromMaxHealth(GetHitDamage()));
865 }
866
873};
874
875// 65032 - 321-Boombot Aura
877{
879
880 bool Validate(SpellInfo const* /*spellInfo*/) override
881 {
883 }
884
885 bool CheckProc(ProcEventInfo& eventInfo)
886 {
887 if (eventInfo.GetActionTarget()->GetEntry() != NPC_XS013_SCRAPBOT)
888 return false;
889 return true;
890 }
891
892 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
893 {
894 if (InstanceScript* instance = eventInfo.GetActor()->GetInstanceScript())
895 instance->DoCastSpellOnPlayers(SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS);
896 }
897
903};
904
905// 63849 - Exposed Heart
907{
909
910 bool Load() override
911 {
912 _damageAmount = 0;
913 return true;
914 }
915
916 void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
917 {
919 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
920 if (!damageInfo || !damageInfo->GetDamage())
921 return;
922
923 _damageAmount += damageInfo->GetDamage();
924 }
925
926 void HandleLifeTransfer(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
927 {
928 if (InstanceScript* instance = GetTarget()->GetInstanceScript())
929 if (Creature* xt002 = instance->GetCreature(DATA_XT002))
930 xt002->AI()->SetData(DATA_TRANSFERED_HEALTH, _damageAmount);
931 }
932
938
939private:
941};
942
944{
945 public:
946 achievement_nerf_engineering() : AchievementCriteriaScript("achievement_nerf_engineering") { }
947
948 bool OnCheck(Player* /*source*/, Unit* target) override
949 {
950 if (!target || !target->GetAI())
951 return false;
952
953 return !(target->GetAI()->GetData(DATA_HEALTH_RECOVERED));
954 }
955};
956
958{
959 public:
960 achievement_heartbreaker() : AchievementCriteriaScript("achievement_heartbreaker") { }
961
962 bool OnCheck(Player* /*source*/, Unit* target) override
963 {
964 if (!target || !target->GetAI())
965 return false;
966
967 return target->GetAI()->GetData(DATA_HARD_MODE) != 0;
968 }
969};
970
972{
973 public:
974 achievement_nerf_gravity_bombs() : AchievementCriteriaScript("achievement_nerf_gravity_bombs") { }
975
976 bool OnCheck(Player* /*source*/, Unit* target) override
977 {
978 if (!target || !target->GetAI())
979 return false;
980
981 return !(target->GetAI()->GetData(DATA_GRAVITY_BOMB_CASUALTY));
982 }
983};
984
Actions
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:122
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
@ IN_PROGRESS
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
Spells
Definition PlayerAI.cpp:32
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
bool roll_chance_i(int chance)
Definition Random.h:59
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_UNIT_SRC_AREA_ENEMY
@ LOOT_MODE_HARD_MODE_1
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ REACT_DEFENSIVE
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
DamageEffectType
Definition Unit.h:352
@ UNIT_FIELD_MINDAMAGE
@ UNIT_FIELD_MAXDAMAGE
Yells
@ ACTION_ENTER_HARD_MODE
@ ACTION_START_PHASE_HEART
@ ACTION_DISPOSE_HEART
@ GROUP_SEARING_GRAVITY
@ HEART_VEHICLE_SEAT_EXPOSED
@ ACHIEV_MUST_DECONSTRUCT_FASTER
XT002Data
@ DATA_GRAVITY_BOMB_CASUALTY
@ DATA_TRANSFERED_HEALTH
@ DATA_HEALTH_RECOVERED
@ DATA_HARD_MODE
@ SAY_DEATH
@ SAY_HEART_OPENED
@ EMOTE_HEART_CLOSED
@ SAY_AGGRO
@ SAY_TYMPANIC_TANTRUM
@ EMOTE_SCRAPBOT
@ EMOTE_TYMPANIC_TANTRUM
@ SAY_SLAY
@ EMOTE_HEART_OPENED
@ SAY_HEART_CLOSED
@ SAY_SUMMON
@ SAY_BERSERK
@ SPELL_EXPOSED_HEART
@ SPELL_TRAMPLE
@ SPELL_SUMMON_LIFE_SPARK
@ SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS
@ SPELL_STATIC_CHARGED
@ SPELL_RECHARGE_SCRAPBOT
@ SPELL_HEART_OVERLOAD
@ SPELL_SEARING_LIGHT
@ SPELL_COOLDOWN_CREATURE_SPECIAL_2
@ SPELL_321_BOOMBOT_AURA
@ SPELL_ENRAGE
@ SPELL_HEARTBREAK
@ SPELL_SHOCK
@ SPELL_GRAVITY_BOMB
@ SPELL_ENERGY_ORB
@ SPELL_RECHARGE_PUMMELER
@ SPELL_BOOM
@ SPELL_STAND
@ SPELL_HEART_RIDE_VEHICLE
@ SPELL_TYMPANIC_TANTRUM
@ SPELL_RECHARGE_BOOMBOT
@ SPELL_SCRAPBOT_RIDE_VEHICLE
@ SPELL_SUMMON_VOID_ZONE
@ SPELL_CONSUMPTION
@ SPELL_HEART_LIGHTNING_TETHER
@ SPELL_ARCANE_POWER_STATE
@ SPELL_ARCING_SMASH
@ SPELL_SCRAP_REPAIR
@ SPELL_FULL_HEAL
@ SPELL_SUBMERGE
@ SPELL_UPPERCUT
@ SPELL_RIDE_VEHICLE_EXPOSED
XT002Phases
@ PHASE_HEART
@ PHASE_1
void AddSC_boss_xt002()
@ EVENT_PHASE_CHECK
@ EVENT_SEARING_LIGHT
@ EVENT_ENTER_HARD_MODE
@ EVENT_DISPOSE_HEART
@ EVENT_ENRAGE
@ EVENT_GRAVITY_BOMB
@ EVENT_RESUME_ATTACK
@ EVENT_TYMPANIC_TANTRUM
@ EVENT_SUBMERGE
int32 GetAmount() const
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
WorldObject * GetOwner() const
Unit * GetCaster() const
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectProcHandler > OnEffectProc
HookList< AuraProcHandler > OnProc
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
SummonList summons
EventMap events
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetRegenerateHealth(bool value)
Definition Creature.h:285
void AddLootMode(uint16 lootMode)
Definition Creature.h:225
void LowerPlayerDamageReq(uint32 unDamage)
uint32 GetDamage() const
Definition Unit.h:464
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:95
EventId ExecuteEvent()
Definition EventMap.cpp:73
bool IsInPhase(PhaseIndex phase) const
Definition EventMap.h:236
void CancelEvent(EventId eventId)
Definition EventMap.cpp:151
void SetPhase(PhaseIndex phase)
Definition EventMap.cpp:28
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void MoveFollow(Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
static Creature * ToCreature(Object *o)
Definition Object.h:186
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
void SetFloatValue(uint16 index, float value)
Definition Object.cpp:655
Unit * GetActionTarget() const
Definition Unit.h:509
Unit * GetActor()
Definition Unit.h:508
DamageInfo * GetDamageInfo() const
Definition Unit.h:519
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
void SetHitDamage(int32 damage)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
virtual void SetData(uint32, uint32)
Definition UnitAI.h:156
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
virtual uint32 GetData(uint32) const
Definition UnitAI.h:155
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
int32 ModifyHealth(int32 val)
Definition Unit.cpp:8381
bool IsWithinMeleeRange(Unit const *obj) const
Definition Unit.h:844
void SetFullHealth()
Definition Unit.h:927
Creature * GetVehicleCreatureBase() const
Definition Unit.cpp:11847
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
uint32 GetMaxHealth() const
Definition Unit.h:914
UnitAI * GetAI() const
Definition Unit.h:800
bool HealthBelowPct(int32 pct) const
Definition Unit.h:917
uint32 GetHealth() const
Definition Unit.h:913
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
bool AttackStop()
Definition Unit.cpp:5645
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition Object.cpp:3153
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
float GetDistance2d(WorldObject const *obj) const
Definition Object.cpp:1141
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *, Unit *target) override
bool OnCheck(Player *, Unit *target) override
bool OnCheck(Player *, Unit *target) override
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_xt002_321_boombot_aura)
void HandleSummons(SpellEffIndex)
void Register() override
PrepareSpellScript(spell_xt002_energy_orb)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_xt002_exposed_heart)
void OnProc(AuraEffect const *, ProcEventInfo &eventInfo)
void HandleLifeTransfer(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_xt002_gravity_bomb_aura)
void OnPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareSpellScript(spell_xt002_gravity_bomb_damage)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_xt002_heart_overload_periodic)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_xt002_searing_light_spawn_life_spark)
PrepareSpellScript(spell_xt002_tympanic_tantrum)
void FilterTargets(std::list< WorldObject * > &targets)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:108
bool Is25ManRaid() const
void ChangeNextExpose()
void Reset() override
bool _gravityBombCasualty
uint8 _exposeHeartPercent
void UpdateAI(uint32 diff) override
void RescheduleEvents()
void DisposeHeart(bool isHardMode=false)
void JustDied(Unit *) override
void DoAction(int32 action) override
void ExposeHeart()
bool _healthRecovered
uint32 GetData(uint32 type) const override
void PassengerBoarded(Unit *who, int8 seatId, bool apply) override
== Fields =======================================
void JustEngagedWith(Unit *who) override
void Initialize()
void EnterEvadeMode(EvadeReason) override
void SetData(uint32 type, uint32 data) override
void KilledUnit(Unit *who) override
boss_xt002(Creature *creature)
void UpdateAI(uint32 diff) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_boombot(Creature *creature)
InstanceScript * _instance
TaskScheduler _scheduler
void Reset() override
void Reset() override
void UpdateAI(uint32 diff) override
npc_life_spark(Creature *creature)
TaskScheduler _scheduler
void JustEngagedWith(Unit *) override
npc_pummeller(Creature *creature)
InstanceScript * _instance
void UpdateAI(uint32 diff) override
TaskScheduler _scheduler
void Reset() override
npc_scrapbot(Creature *creature)
void Reset() override
TaskScheduler _scheduler
void UpdateAI(uint32 diff) override
InstanceScript * _instance
void Reset() override
void DoAction(int32 action) override
void JustDied(Unit *) override
InstanceScript * _instance
npc_xt002_heart(Creature *creature)
void UpdateAI(uint32 diff) override
npc_xt_void_zone(Creature *creature)
void JustAppeared() override
TaskScheduler _scheduler
@ DATA_XT002
Definition ulduar.h:39
@ DATA_XT002_HEART
Definition ulduar.h:421
#define RegisterUlduarCreatureAI(ai_name)
Definition ulduar.h:541
@ NPC_XT_TOY_PILE
Definition ulduar.h:66
@ NPC_XS013_SCRAPBOT
Definition ulduar.h:98