252 if (heart->IsAlive())
255 heart->DespawnOrUnsummon();
305 uint32 transferHealth = data;
395 if (waypointId == 3 || waypointId == 9)
404 else if (waypointId == 13)
479 xt002->AI()->JustSummoned(
me);
491 if (me->IsWithinMeleeRange(xt002))
493 DoCast(xt002, SPELL_SCRAPBOT_RIDE_VEHICLE);
494 _scheduler.Schedule(1s, [this](TaskContext )
496 if (Creature* xt002 = _instance->GetCreature(DATA_XT002))
497 xt002->CastSpell(me, SPELL_SCRAP_REPAIR, true);
498 me->DespawnOrUnsummon(1s);
511 _scheduler.Update(diff);
536 xt002->AI()->JustSummoned(
me);
592 xt002->AI()->JustSummoned(
me);
605 if (me->IsWithinMeleeRange(xt002))
606 DoCastAOE(SPELL_BOOM);
777 std::list<Creature*> possibleCreatures;
780 possibleCreatures.remove_if([caster](
Creature* creature)
785 if (possibleCreatures.empty())
855 return !creature->IsPet();
915 if (!damageInfo || !damageInfo->
GetDamage())
945 if (!target || !target->
GetAI())
959 if (!target || !target->
GetAI())
973 if (!target || !target->
GetAI())
uint32 urand(uint32 min, uint32 max)
bool roll_chance_i(int chance)
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
#define RegisterSpellScript(spell_script)
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_STATE_SPELL_CHANNEL_OMNI
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ 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
@ 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 Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetRegenerateHealth(bool value)
void AddLootMode(uint16 lootMode)
void LowerPlayerDamageReq(uint64 unDamage)
void Repeat(Milliseconds time)
void DelayEvents(Milliseconds delay)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void CancelEvent(uint32 eventId)
void SetPhase(uint8 phase)
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void TriggerGameEvent(uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
void MoveFollow(Unit *target, float dist, ChaseAngle angle, Optional< Milliseconds > duration={}, MovementSlot slot=MOTION_SLOT_ACTIVE)
static Creature * ToCreature(Object *o)
Unit * GetActionTarget() const
DamageInfo * GetDamageInfo() const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
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 > duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< Rep, Period > time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
virtual void SetData(uint32, uint32)
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)
int64 ModifyHealth(int64 val)
Creature * GetVehicleCreatureBase() const
MotionMaster * GetMotionMaster()
void SetUninteractible(bool apply)
void SetEmoteState(Emote emote)
bool HealthBelowPct(int32 pct) const
uint64 GetMaxHealth() 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
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
void HandleProc(AuraEffect *, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleSummons(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnProc(AuraEffect *, ProcEventInfo &eventInfo)
void HandleLifeTransfer(AuraEffect const *, AuraEffectHandleModes)
void OnPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
Creature * GetRandomToyPile()
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
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 WaypointReached(uint32 waypointId, uint32 pathId) 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)