Add correct areatrigger teleport messages.
And a bit of refactoring.
This commit is contained in:
@@ -237,10 +237,10 @@ struct boss_nefarianAI : ScriptedAI
|
||||
double dsin = sin(dang);
|
||||
double dcos = cos(dang);
|
||||
m_creature->GetPosition(loc);
|
||||
loc.coord_x += 5.0f * dcos;
|
||||
loc.coord_y += 5.0f * dsin;
|
||||
loc.coord_z += 0.5f;
|
||||
loc.orientation = dang - M_PI_F;
|
||||
loc.x += 5.0f * dcos;
|
||||
loc.y += 5.0f * dsin;
|
||||
loc.z += 0.5f;
|
||||
loc.o = dang - M_PI_F;
|
||||
pPlayer->TeleportTo(loc);
|
||||
pPlayer->AddAura(SPELL_ROGUE); // OK
|
||||
break;
|
||||
|
||||
@@ -124,7 +124,7 @@ struct mob_rottingMaggotAI : public ScriptedAI
|
||||
if (!m_creature->HasAura(SPELL_RETCHING_PLAGUE))
|
||||
m_creature->CastSpell(m_creature, SPELL_RETCHING_PLAGUE, true);
|
||||
}
|
||||
if (m_creature->GetDistance(aggroPossition.coord_x, aggroPossition.coord_y, aggroPossition.coord_z) > 40.0f)
|
||||
if (m_creature->GetDistance(aggroPossition) > 40.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user