36 {-11195.353516f, -1613.237183f, 278.237258f},
37 {-11137.846680f, -1685.607422f, 278.239258f},
38 {-11094.493164f, -1591.969238f, 279.949188f}
70 for (
int i=0; i<3; ++i)
94 if (!u1 || !u2 || !target)
97 float xn, yn, xp, yp, xh, yh;
106 if (
dist(xn, yn, xh, yh) >=
dist(xn, yn, xp, yp) ||
dist(xp, yp, xh, yh) >=
dist(xn, yn, xp, yp))
109 return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/
dist(xn, yn, xp, yp) < 1.5f);
112 float dist(
float xa,
float ya,
float xb,
float yb)
114 return sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb));
132 pos[
RED_PORTAL] = ((r % 2) ? (r > 1 ? 2 : 1) : 0);
136 for (
int i=0; i<3; ++i)
146 for (
int i=0; i<3; ++i)
149 portal->DisappearAndDie();
151 portal->DisappearAndDie();
159 for (
int j=0; j<3; ++j)
167 if (
Map* map =
me->GetMap())
174 Player* p = i->GetSource();
191 if (!current || target != current)
197 beamer->CastSpell(target,
PortalBeam[j],
false);
198 beamer->DisappearAndDie();
204 beamer->CastSpell(target,
PortalBeam[j],
false);
210 me->getThreatManager().addThreat(target, 100000.0f+
DoGetThreat(
me->GetVictim()));
237 for (
int i=0; i<3; ++i)
298 if (!
me->IsNonMeleeSpellCasted(
false))
317 if (!
me->IsNonMeleeSpellCasted(
false))
@ TEMPSUMMON_TIMED_DESPAWN
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=NULL)
CreatureScript(const char *name)
static GameObject * GetGameObject(WorldObject &object, uint64 guid)
LinkedListHead::Iterator< MapReference const > const_iterator
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Aura * AddAura(uint32 spellId, Unit *target)
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
static Creature * GetCreature(WorldObject &object, uint64 guid)
static Unit * GetUnit(WorldObject &object, uint64 guid)
InstanceScript * GetInstanceScript()
float GetDistance2d(WorldObject const *obj) const
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
CreatureAI * GetAI(Creature *creature) const OVERRIDE
float GetPositionX() const
float GetPositionY() const
float DoGetThreat(Unit *unit)
ScriptedAI(Creature *creature)
uint32 NetherInfusionTimer
void SwitchToPortalPhase()
void SwitchToBanishPhase()
void EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void HandleDoors(bool open)
boss_netherspiteAI(Creature *creature)
InstanceScript * instance
float dist(float xa, float ya, float xb, float yb)
void JustDied(Unit *) OVERRIDE
bool IsBetween(WorldObject *u1, WorldObject *target, WorldObject *u2)