189 std::list<Creature*> creatures;
194 if (creatures.empty())
197 for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
381 if (!target || target->
IsAlive())
386 mandokir->GetAI()->SetGUID(target->
GetGUID());
410 targets.push_back(target);
503 targets.push_back(target);
521 for (
uint8 i = 0; i <= 50; ++i)
523 angle =
rand_norm() *
static_cast<float>(
M_PI * 35.0f / 180.0f) -
static_cast<float>(
M_PI * 17.5f / 180.0f);
548 targets.push_back(target);
575 caster->GetMotionMaster()->Clear();
576 caster->GetThreatManager().ResetAllThreat();
577 caster->GetThreatManager().AddThreat(target, 50000000.0f);
float frand(float min, float max)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_FORCE_CAST
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
@ SUMMON_GROUP_CHAINED_SPIRIT
@ SPELL_OHGAN_ORDERS_TRIGGER
@ SPELL_OHGAN_HEART_VISUAL
@ SPELL_SPIRIT_VENGEANCE_CANCEL
@ SPELL_BLOODLETTING_DAMAGE
@ SPELL_DEVASTATING_SLAM_DAMAGE
@ SPELL_BLOODLETTING_HEAL
@ SPELL_PERMANENT_FEIGN_DEATH
@ SPELL_DEVASTATING_SLAM_TRIGGER
@ EVENT_REANIMATE_OHGAN_COOLDOWN
void AddSC_boss_mandokir()
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
void JustEngagedWith(Unit *who) override
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid const &guid) override
DevastatingSlamTargetSelector(Creature *me, const Unit *victim)
bool operator()(WorldObject *target)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
virtual ObjectGuid GetGuidData(uint32 type) const override
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
static ObjectGuid const Empty
static Creature * ToCreature(Object *o)
static ObjectGuid GetGUID(Object const *o)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Player * GetHitPlayer() const
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
StorageType::const_iterator const_iterator
size_t GetThreatListSize() const
virtual uint32 GetData(uint32) const
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void ClearUnitState(uint32 f)
void SetHealth(uint64 val)
ThreatManager & GetThreatManager()
MotionMaster * GetMotionMaster()
void AddUnitMovementFlag(uint32 f)
uint64 CountPctFromCurHealth(int32 pct) const
void SetFacingTo(float const ori, bool force=true)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
void SetMountDisplayId(uint32 mountDisplayId)
InstanceScript * GetInstanceScript() const
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
achievement_ohganot_so_fast()
bool OnCheck(Player *, Unit *target) override
bool Validate(SpellInfo const *) override
void HandleEffectPeriodic(AuraEffect const *aurEff)
void HandleScript(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void RandomResize(C &container, std::size_t requestedSize)
constexpr void SetOrientation(float orientation)
float GetAbsoluteAngle(float x, float y) const
void KilledUnit(Unit *victim) override
void JustDied(Unit *) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 diff) override
bool _reanimateOhganCooldown
boss_mandokir(Creature *creature)
uint32 GetData(uint32 type) const override
void JustEngagedWith(Unit *who) override
void DoAction(int32 action) override
void SetGUID(ObjectGuid const &guid, int32) override
ObjectGuid _revivePlayerGUID
void UpdateAI(uint32) override
void JustDied(Unit *) override
void MovementInform(uint32 type, uint32 pointId) override
InstanceScript * _instance
npc_chained_spirit(Creature *creature)
void DoAction(int32 action) override
void SetGUID(ObjectGuid const &guid, int32) override
void JustEngagedWith(Unit *) override
void KilledUnit(Unit *victim) override
npc_ohgan(Creature *creature)
InstanceScript * _instance
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
#define RegisterZulGurubCreatureAI(ai_name)