148 }
else if (owner && owner->
isDead())
238 for (
uint8 i = 0; i < 3; ++i)
241 add->DisappearAndDie();
246 if (i == 0) {nx += 10; ny -= 5; o=2.5f;}
247 if (i == 1) {nx -= 8; ny -= 7; o=0.9f;}
248 if (i == 2) {nx -= 3; ny += 9; o=5.0f;}
285 uint8 AliveChannelers = 0;
286 for (
uint8 i = 0; i < 3; ++i)
334 for (
uint8 i=0; i<5; ++i)
340 if (creature && creature->
IsAlive())
352 for (
uint8 i = 0; i < 5; ++i)
360 if (unit_target && unit_target->
IsAlive())
386 pDemon->DespawnOrUnsummon();
502 std::list<Unit*> TargetList;
507 if (tempTarget != currentVictim && TargetList.size()<5)
508 TargetList.push_back(tempTarget);
511 for (
auto itr = TargetList.begin(), end = TargetList.end(); itr != end; ++itr)
513 if ((*itr) && (*itr)->IsAlive())
564 Demon = Copy->GetGUID();
679 if (leotheras && leotheras->
IsAlive())
702 if (leotheras && leotheras->
IsAlive())
744 if (
Player* i_pl = itr->GetSource())
746 bool isCasting =
false;
748 if (i_pl->GetCurrentSpell(i))
#define CREATURE_Z_ATTACK_RANGE
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
uint32 urand(uint32 min, uint32 max)
@ CURRENT_CHANNELED_SPELL
#define CURRENT_MAX_SPELL
@ SPELL_CONSUMING_MADNESS
@ SPELL_INSIDIOUS_WHISPER
void AddSC_boss_leotheras_the_blind()
InstanceScript *const instance
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
float GetAttackDistance(Unit const *player) const
void LoadEquipment(int8 id=1, bool force=false)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool CanCreatureAttack(Unit const *victim, bool force=true) const
void SetDisplayId(uint32 displayId, bool setNative=false) override
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
void SetCanDualWield(bool value) override
virtual bool SetBossState(uint32 id, EncounterState state)
virtual ObjectGuid GetGuidData(uint32 type) const override
PlayerList const & GetPlayers() const
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
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 ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
Unit * GetLastVictim() const
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetSortedThreatList() const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
virtual ObjectGuid GetGUID(int32=0) const
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
virtual void SetGUID(ObjectGuid const &, int32=0)
SpellCastResult DoCast(uint32 spellId)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
ThreatManager & GetThreatManager()
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
Unit * EnsureVictim() const
void SetSpeedRate(UnitMoveType mtype, float rate)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
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)
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
float GetDistanceZ(WorldObject const *obj) const
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
virtual void SetGuidData(uint32, ObjectGuid)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
@ DATA_LEOTHERAS_EVENT_STARTER
@ BOSS_LEOTHERAS_THE_BLIND
#define RegisterSerpentshrineCavernCreatureAI(ai_name)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
bool HasInArc(float arcangle, Position const *pos, float border=2.0f) const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetPositionZ() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
bool HealthBelowPct(uint32 pct) const
void ModifyThreatByPercent(Unit *victim, int32 pct, Unit *who=nullptr)
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime)
void ResetThreatList(Unit *who=nullptr)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
uint32 SwitchToHuman_Timer
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
boss_leotheras_the_blind(Creature *creature)
ObjectGuid InnderDemon[5]
void KilledUnit(Unit *victim) override
uint32 SwitchToDemon_Timer
ObjectGuid SpellBinderGUID[3]
void CastConsumingMadness()
void MoveInLineOfSight(Unit *who) override
void JustEngagedWith(Unit *) override
npc_greyheart_spellbinder(Creature *creature)
void JustEngagedWith(Unit *who) override
InstanceScript * instance
void UpdateAI(uint32 diff) override
void JustAppeared() override
void DamageTaken(Unit *done_by, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_inner_demon(Creature *creature)
void JustDied(Unit *) override
ObjectGuid GetGUID(int32 id) const override
void SetGUID(ObjectGuid const &guid, int32 id) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override