249 if (heart->IsAlive())
252 heart->DespawnOrUnsummon();
303 uint32 transferHealth = data;
455 xt002->AI()->JustSummoned(
me);
511 xt002->AI()->JustSummoned(
me);
576 xt002->AI()->JustSummoned(
me);
774 std::list<Creature*> possibleCreatures;
777 possibleCreatures.remove_if([caster](
Creature* creature)
782 if (possibleCreatures.empty())
856 return !creature->IsPet();
920 if (!damageInfo || !damageInfo->
GetDamage())
950 if (!target || !target->
GetAI())
964 if (!target || !target->
GetAI())
978 if (!target || !target->
GetAI())
@ ACHIEVEMENT_TIMED_TYPE_EVENT
uint32 urand(uint32 min, uint32 max)
bool roll_chance_i(int chance)
#define RegisterSpellScript(spell_script)
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_UNIT_SRC_AREA_ENEMY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ 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 AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
@ UNIT_FLAG_UNINTERACTIBLE
@ ACTION_START_PHASE_HEART
@ HEART_VEHICLE_SEAT_EXPOSED
@ ACHIEV_MUST_DECONSTRUCT_FASTER
@ DATA_GRAVITY_BOMB_CASUALTY
@ SPELL_SUMMON_LIFE_SPARK
@ SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS
@ SPELL_RECHARGE_SCRAPBOT
@ SPELL_COOLDOWN_CREATURE_SPECIAL_2
@ SPELL_RECHARGE_PUMMELER
@ SPELL_HEART_RIDE_VEHICLE
@ SPELL_SCRAPBOT_RIDE_VEHICLE
@ SPELL_HEART_LIGHTNING_TETHER
@ SPELL_ARCANE_POWER_STATE
@ SPELL_RIDE_VEHICLE_EXPOSED
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
WorldObject * GetOwner() 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)
void DoZoneInCombat(Creature *creature=nullptr)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetRegenerateHealth(bool value)
void AddLootMode(uint16 lootMode)
void LowerPlayerDamageReq(uint32 unDamage)
void Repeat(Milliseconds time)
void DelayEvents(Milliseconds delay)
bool IsInPhase(PhaseIndex phase) const
void CancelEvent(EventId eventId)
void SetPhase(PhaseIndex phase)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
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)
void SetFloatValue(uint16 index, float value)
Unit * GetActionTarget() const
DamageInfo * GetDamageInfo() const
int32 GetHitDamage() 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)
void DoMeleeAttackIfReady()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual uint32 GetData(uint32) const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
int32 ModifyHealth(int32 val)
bool IsWithinMeleeRange(Unit const *obj) const
Creature * GetVehicleCreatureBase() const
MotionMaster * GetMotionMaster()
uint32 GetMaxHealth() const
bool HealthBelowPct(int32 pct) const
bool HasUnitState(const uint32 f) const
void SetUnitFlag(UnitFlags flags)
void RemoveUnitFlag(UnitFlags flags)
InstanceScript * GetInstanceScript() const
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
float GetDistance2d(WorldObject const *obj) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *, Unit *target) override
achievement_heartbreaker()
bool OnCheck(Player *, Unit *target) override
achievement_nerf_engineering()
achievement_nerf_gravity_bombs()
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)
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
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_xt002_heart_overload_periodic)
Creature * GetRandomToyPile()
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 &
bool _gravityBombCasualty
uint8 _exposeHeartPercent
void UpdateAI(uint32 diff) override
void DisposeHeart(bool isHardMode=false)
void JustDied(Unit *) override
void DoAction(int32 action) override
uint32 GetData(uint32 type) const override
void PassengerBoarded(Unit *who, int8 seatId, bool apply) override
== Fields =======================================
void JustEngagedWith(Unit *who) override
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
void UpdateAI(uint32 diff) override
npc_life_spark(Creature *creature)
void JustEngagedWith(Unit *) override
npc_pummeller(Creature *creature)
InstanceScript * _instance
void UpdateAI(uint32 diff) override
npc_scrapbot(Creature *creature)
void UpdateAI(uint32 diff) override
InstanceScript * _instance
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
#define RegisterUlduarCreatureAI(ai_name)