97 virtual void Reset()
override = 0;
118 int odmg = (int)(dPercent * ((
float)pOtherBoss->
GetMaxHealth()));
119 int ohealth = pOtherBoss->
GetHealth()-odmg;
120 pOtherBoss->
SetHealth(ohealth > 0 ? ohealth : 0);
178 float mult = ((float)mytotal) / ((float)histotal);
181 #define HEAL_BROTHER_AMOUNT 30000.0f
184 if (mytotal > histotal)
192 pOtherBoss->
SetHealth(std::min(histotal, h));
315 std::list<Creature*> lUnitList;
319 if (lUnitList.empty())
324 for (std::list<Creature*>::const_iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter)
337 if (!nearb || (
rand32() % 4) == 0)
399 return GetAQ40AI<boss_veknilashAI>(creature);
483 return GetAQ40AI<boss_veklorAI>(creature);
#define NOMINAL_MELEE_RANGE
uint32 urand(uint32 min, uint32 max)
#define HEAL_BROTHER_AMOUNT
@ SPELL_UNBALANCING_STRIKE
@ SPELL_TWIN_TELEPORT_VISUAL
static constexpr float PULL_RANGE
void AddSC_boss_twinemperors()
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void Respawn(bool force=false)
void setDeathState(DeathState s) override
float GetAttackDistance(Unit const *player) const
bool CanCreatureAttack(Unit const *victim, bool force=true) const
Unit * SelectNearestTarget(float dist=0, bool playerOnly=false) const
Creature * GetCreature(uint32 type)
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void SetDynamicFlag(uint32 flag)
Unit * GetCurrentVictim()
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCast(uint32 spellId)
void ClearUnitState(uint32 f)
bool isTargetableForAttack(bool checkFakeDeath=true) const
void SetHealth(uint64 val)
ThreatManager & GetThreatManager()
void SetFaction(uint32 faction) override
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Aura * AddAura(uint32 spellId, Unit *target)
void AddUnitState(uint32 f)
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
uint64 GetMaxHealth() const
bool Attack(Unit *victim, bool meleeAttack)
virtual void setDeathState(DeathState s)
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) 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
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
constexpr void Relocate(float x, float y)
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void ResetThreatList(Unit *who=nullptr)
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void HandleBugs(uint32 diff)
bool TryActivateAfterTTelep(uint32 diff)
void JustDied(Unit *) override
void CheckEnrage(uint32 diff)
Creature * RespawnNearbyBugsAndGetOne()
void MoveInLineOfSight(Unit *who) override
virtual void CastSpellOnBug(Creature *target)=0
uint32 AfterTeleportTimer
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void TryHealBrother(uint32 diff)
Creature * GetOtherBoss()
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
virtual void Reset() override=0
void KilledUnit(Unit *) override
void JustEngagedWith(Unit *who) override
virtual bool IAmVeklor()=0
void TeleportToMyBrother()
boss_twinemperorsAI(Creature *creature)
boss_veklorAI(Creature *creature)
void CastSpellOnBug(Creature *target) override
void UpdateAI(uint32 diff) override
void AttackStart(Unit *who) override
== Triggered Actions Requested ==================
bool IAmVeklor() override
void CastSpellOnBug(Creature *target) override
uint32 UnbalancingStrike_Timer
boss_veknilashAI(Creature *creature)
void UpdateAI(uint32 diff) override
bool IAmVeklor() override