52 {-11195.353516f, -1613.237183f, 278.237258f},
53 {-11137.846680f, -1685.607422f, 278.239258f},
54 {-11094.493164f, -1591.969238f, 279.949188f}
77 return GetKarazhanAI<boss_netherspiteAI>(creature);
117 if (!u1 || !u2 || !target)
120 float xn, yn, xp, yp, xh, yh;
129 if (
dist(xn, yn, xh, yh) >=
dist(xn, yn, xp, yp) ||
dist(xp, yp, xh, yh) >=
dist(xn, yn, xp, yp))
132 return (std::abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/
dist(xn, yn, xp, yp) < 1.5f);
135 float dist(
float xa,
float ya,
float xb,
float yb)
137 return std::sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb));
154 pos[
RED_PORTAL] = ((r % 2) ? (r > 1 ? 2 : 1) : 0);
158 for (
int i = 0; i < 3; ++i)
168 for (
int i=0; i<3; ++i)
171 portal->DisappearAndDie();
173 portal->DisappearAndDie();
181 for (
int j = 0; j < 3; ++j)
194 Player* p = i->GetSource();
211 if (!current || target != current)
217 beamer->CastSpell(target,
PortalBeam[j],
false);
218 beamer->DisappearAndDie();
224 beamer->CastSpell(target,
PortalBeam[j],
false);
257 for (
uint8 i = 0; i < 3; ++i)
@ TEMPSUMMON_TIMED_DESPAWN
uint32 urand(uint32 min, uint32 max)
const float PortalCoord[3][3]
const uint32 PlayerBuff[3]
const uint32 PortalBeam[3]
const uint32 NetherBuff[3]
const uint32 PlayerDebuff[3]
void AddSC_boss_netherspite()
const uint32 PortalVisual[3]
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
virtual bool SetBossState(uint32 id, EncounterState state)
virtual ObjectGuid GetGuidData(uint32 type) const override
PlayerList const & GetPlayers() const
static ObjectGuid GetGUID(Object const *o)
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCast(uint32 spellId)
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Aura * AddAura(uint32 spellId, Unit *target)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
InstanceScript * GetInstanceScript() const
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)
float GetDistance2d(WorldObject const *obj) const
CreatureAI * GetAI(Creature *creature) const override
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
uint32 NetherInfusionTimer
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
void SwitchToPortalPhase()
void SwitchToBanishPhase()
void JustDied(Unit *) override
void HandleDoors(bool open)
boss_netherspiteAI(Creature *creature)
InstanceScript * instance
float dist(float xa, float ya, float xb, float yb)
bool IsBetween(WorldObject *u1, WorldObject *target, WorldObject *u2)