Rename "SetPosition" to "UpdatePosition".
Replace CreatureRelocation in scripts with new Creature::SetPosition.
This commit is contained in:
@@ -493,7 +493,7 @@ void npc_escortAI::SetEscortPaused(bool on)
|
||||
|
||||
bool npc_escortAI::SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
|
||||
{
|
||||
me->SetPosition(x, y, z, orientation);
|
||||
me->UpdatePosition(x, y, z, orientation);
|
||||
return SetNextWaypoint(pointId, false, true);
|
||||
}
|
||||
|
||||
@@ -516,7 +516,7 @@ bool npc_escortAI::SetNextWaypoint(uint32 pointId, bool setPosition, bool resetW
|
||||
if (waypoint.id == pointId)
|
||||
{
|
||||
if (setPosition)
|
||||
me->SetPosition(waypoint.x, waypoint.y, waypoint.z, me->GetOrientation());
|
||||
me->UpdatePosition(waypoint.x, waypoint.y, waypoint.z, me->GetOrientation());
|
||||
|
||||
CurrentWP = WaypointList.begin();
|
||||
return true;
|
||||
|
||||
@@ -2387,6 +2387,7 @@ const char* Creature::GetNameForLocaleIdx(LocaleConstant loc_idx) const
|
||||
return GetName();
|
||||
}
|
||||
|
||||
//TODO: This may cause crash. Creature must be removed from the original grid and added to the new grid.
|
||||
void Creature::FarTeleportTo(Map* map, float X, float Y, float Z, float O)
|
||||
{
|
||||
InterruptNonMeleeSpells(true);
|
||||
@@ -2401,7 +2402,21 @@ void Creature::FarTeleportTo(Map* map, float X, float Y, float Z, float O)
|
||||
SetMap(map);
|
||||
AddToWorld();
|
||||
|
||||
SetPosition(X, Y, Z, O, true);
|
||||
UpdatePosition(X, Y, Z, O, true);
|
||||
}
|
||||
|
||||
void Creature::SetPosition(float x, float y, float z, float o)
|
||||
{
|
||||
// prevent crash when a bad coord is sent by the client
|
||||
if (!Trinity::IsValidMapCoord(x, y, z, o))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Creature::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
|
||||
return;
|
||||
}
|
||||
|
||||
GetMap()->CreatureRelocation(ToCreature(), x, y, z, o);
|
||||
if (IsVehicle())
|
||||
GetVehicleKit()->RelocatePassengers(x, y, z, o);
|
||||
}
|
||||
|
||||
bool Creature::IsDungeonBoss() const
|
||||
|
||||
@@ -664,6 +664,9 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
return m_charmInfo->GetCharmSpell(pos)->GetAction();
|
||||
}
|
||||
|
||||
void SetPosition(float x, float y, float z, float o);
|
||||
void SetPosition(const Position &pos) { SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()); }
|
||||
|
||||
void SetHomePosition(float x, float y, float z, float o) { m_homePosition.Relocate(x, y, z, o); }
|
||||
void SetHomePosition(const Position &pos) { m_homePosition.Relocate(pos); }
|
||||
void GetHomePosition(float &x, float &y, float &z, float &ori) { m_homePosition.GetPosition(x, y, z, ori); }
|
||||
|
||||
@@ -6727,9 +6727,9 @@ ActionButton const* Player::GetActionButton(uint8 button)
|
||||
return &buttonItr->second;
|
||||
}
|
||||
|
||||
bool Player::SetPosition(float x, float y, float z, float orientation, bool teleport)
|
||||
bool Player::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
|
||||
{
|
||||
if (!Unit::SetPosition(x, y, z, orientation, teleport))
|
||||
if (!Unit::UpdatePosition(x, y, z, orientation, teleport))
|
||||
return false;
|
||||
|
||||
//if (movementInfo.flags & MOVEMENTFLAG_MOVING)
|
||||
@@ -6743,7 +6743,7 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
// code block for underwater state update
|
||||
// Unit::SetPosition() checks for validity and updates our coordinates
|
||||
// Unit::UpdatePosition() checks for validity and updates our coordinates
|
||||
// so we re-fetch them instead of using "raw" coordinates from function params
|
||||
UpdateUnderwaterState(GetMap(), GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
|
||||
|
||||
@@ -1937,8 +1937,8 @@ class Player : public Unit, public GridObject<Player>
|
||||
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
|
||||
void SendResetFailedNotify(uint32 mapid);
|
||||
|
||||
virtual bool SetPosition(float x, float y, float z, float orientation, bool teleport = false);
|
||||
bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
|
||||
virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false);
|
||||
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
|
||||
void UpdateUnderwaterState(Map* m, float x, float y, float z);
|
||||
|
||||
void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
|
||||
|
||||
@@ -17151,16 +17151,16 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
|
||||
{
|
||||
// FIXME: this interrupts spell visual
|
||||
DestroyForNearbyPlayers();
|
||||
SetPosition(x, y, z, orientation, true);
|
||||
UpdatePosition(x, y, z, orientation, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool Unit::SetPosition(float x, float y, float z, float orientation, bool teleport)
|
||||
bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
|
||||
{
|
||||
// prevent crash when a bad coord is sent by the client
|
||||
if (!Trinity::IsValidMapCoord(x, y, z, orientation))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Unit::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Unit::UpdatePosition(%f, %f, %f) .. bad coordinates!", x, y, z);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1600,9 +1600,9 @@ class Unit : public WorldObject
|
||||
void SendSpellDamageImmune(Unit* target, uint32 spellId);
|
||||
|
||||
void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false);
|
||||
virtual bool SetPosition(float x, float y, float z, float ang, bool teleport = false);
|
||||
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport = false);
|
||||
// returns true if unit's position really changed
|
||||
bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
|
||||
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
|
||||
|
||||
void KnockbackFrom(float x, float y, float speedXY, float speedZ);
|
||||
void JumpTo(float speedXY, float speedZ, bool forward = true);
|
||||
|
||||
@@ -445,7 +445,7 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
|
||||
float pz = z + passenger->m_movementInfo.t_pos.m_positionZ;
|
||||
float po = ang + passenger->m_movementInfo.t_pos.m_orientation;
|
||||
|
||||
passenger->SetPosition(px, py, pz, po);
|
||||
passenger->UpdatePosition(px, py, pz, po);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ void FlightPathMovementGenerator::Finalize(Player & player)
|
||||
float y = 0;
|
||||
float z = 0;
|
||||
i_destinationHolder.GetLocationNow(player.GetBaseMap(), x, y, z);
|
||||
player.SetPosition(x, y, z, player.GetOrientation());
|
||||
player.UpdatePosition(x, y, z, player.GetOrientation());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ inline float Traveller<Creature>::Speed()
|
||||
template<>
|
||||
inline void Traveller<Creature>::Relocation(float x, float y, float z, float orientation)
|
||||
{
|
||||
i_traveller.SetPosition(x, y, z, orientation);
|
||||
i_traveller.UpdatePosition(x, y, z, orientation);
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -136,7 +136,7 @@ inline float Traveller<Player>::GetMoveDestinationTo(float x, float y, float z)
|
||||
template<>
|
||||
inline void Traveller<Player>::Relocation(float x, float y, float z, float orientation)
|
||||
{
|
||||
i_traveller.SetPosition(x, y, z, orientation);
|
||||
i_traveller.UpdatePosition(x, y, z, orientation);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -215,7 +215,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
|
||||
|
||||
WorldLocation const& dest = plMover->GetTeleportDest();
|
||||
|
||||
plMover->SetPosition(dest, true);
|
||||
plMover->UpdatePosition(dest, true);
|
||||
|
||||
uint32 newzone, newarea;
|
||||
plMover->GetZoneAndAreaId(newzone, newarea);
|
||||
@@ -355,7 +355,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
mover->SetPosition(movementInfo.pos);
|
||||
mover->UpdatePosition(movementInfo.pos);
|
||||
|
||||
if (plMover) // nothing is charmed, or player charmed
|
||||
{
|
||||
|
||||
@@ -3368,7 +3368,7 @@ void Spell::EffectDistract(SpellEffIndex /*effIndex*/)
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// For players just turn them
|
||||
unitTarget->ToPlayer()->SetPosition(unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), angle, false);
|
||||
unitTarget->ToPlayer()->UpdatePosition(unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), angle, false);
|
||||
unitTarget->ToPlayer()->SendTeleportAckPacket();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -623,7 +623,7 @@ public:
|
||||
const_cast<CreatureData*>(data)->posZ = z;
|
||||
const_cast<CreatureData*>(data)->orientation = o;
|
||||
}
|
||||
creature->GetMap()->CreatureRelocation(creature, x, y, z, o);
|
||||
creature->SetPosition(x, y, z, o);
|
||||
creature->GetMotionMaster()->Initialize();
|
||||
if (creature->isAlive()) // dead creature will reset movement generator at respawn
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
{
|
||||
float x = KaelLocations[0][0];
|
||||
float y = KaelLocations[0][1];
|
||||
me->GetMap()->CreatureRelocation(me, x, y, LOCATION_Z, 0.0f);
|
||||
me->SetPosition(x, y, LOCATION_Z, 0.0f);
|
||||
//me->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues...
|
||||
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i)
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
me->GetPosition(x, y, z);
|
||||
z += 4; x -= 3.5; y -= 5;
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMap()->CreatureRelocation(me, x, y, z, 0.0f);
|
||||
me->SetPosition(x, y, z, 0.0f);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -756,7 +756,7 @@ public:
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z); //this visual aura some under ground
|
||||
me->GetMap()->CreatureRelocation(me, x, y, z + 0.35f, 0.0f);
|
||||
me->SetPosition(x, y, z + 0.35f, 0.0f);
|
||||
Despawn();
|
||||
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
|
||||
if (debuff)
|
||||
|
||||
@@ -661,7 +661,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_SATH_DEATH, me);
|
||||
me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
|
||||
me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
|
||||
TeleportAllPlayersBack();
|
||||
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
|
||||
{
|
||||
|
||||
@@ -335,7 +335,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
else
|
||||
{
|
||||
creature->AI()->EnterEvadeMode();
|
||||
creature->GetMap()->CreatureRelocation(me, Pos_X[i], POS_Y, POS_Z, ORIENT);
|
||||
creature->SetPosition(Pos_X[i], POS_Y, POS_Z, ORIENT);
|
||||
creature->StopMoving();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ class boss_marli : public CreatureScript
|
||||
if (target)
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
//me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
//me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
//me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
@@ -107,10 +107,10 @@ public:
|
||||
{
|
||||
if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY)
|
||||
{
|
||||
if (Unit* target = Unit::GetUnit(*summoned, targetGUID))
|
||||
if (Creature* target = Unit::GetCreature(*summoned, targetGUID))
|
||||
{
|
||||
target->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0);
|
||||
target->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
|
||||
target->SetPosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
|
||||
summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SendMonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, 5000);
|
||||
me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
|
||||
me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
|
||||
EventMove = false;
|
||||
} else EventMove_Timer -= diff;
|
||||
}
|
||||
|
||||
@@ -1202,7 +1202,7 @@ public:
|
||||
me->GetPosition(x, y, z);
|
||||
z = me->GetMap()->GetHeight(x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->GetMap()->CreatureRelocation(me, x, y, z, 0);
|
||||
me->SetPosition(x, y, z, 0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
@@ -1321,7 +1321,7 @@ public:
|
||||
me->GetPosition(x, y, z);
|
||||
z = me->GetMap()->GetHeight(x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->GetMap()->CreatureRelocation(me, x, y, z, 0);
|
||||
me->SetPosition(x, y, z, 0);
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -1073,7 +1073,7 @@ public:
|
||||
|
||||
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
if (Creature* pPortal = me->SummonCreature(MOB_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
@@ -1185,7 +1185,7 @@ public:
|
||||
|
||||
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
|
||||
@@ -157,15 +157,15 @@ public:
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
me->GetMap()->CreatureRelocation(me, -8340.782227f, 2083.814453f, 125.648788f, 0.0f);
|
||||
me->SetPosition(-8340.782227f, 2083.814453f, 125.648788f, 0.0f);
|
||||
DoResetThreat();
|
||||
break;
|
||||
case 1:
|
||||
me->GetMap()->CreatureRelocation(me, -8341.546875f, 2118.504639f, 133.058151f, 0.0f);
|
||||
me->SetPosition(-8341.546875f, 2118.504639f, 133.058151f, 0.0f);
|
||||
DoResetThreat();
|
||||
break;
|
||||
case 2:
|
||||
me->GetMap()->CreatureRelocation(me, -8318.822266f, 2058.231201f, 133.058151f, 0.0f);
|
||||
me->SetPosition(-8318.822266f, 2058.231201f, 133.058151f, 0.0f);
|
||||
DoResetThreat();
|
||||
break;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
me->RemoveAllAuras();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetVisible(false);
|
||||
me->GetMap()->CreatureRelocation(me, bossc->x, bossc->y, bossc->z, bossc->r);
|
||||
me->SetPosition(bossc->x, bossc->y, bossc->z, bossc->r);
|
||||
Invisible = true;
|
||||
DoResetThreat();
|
||||
DoStopAttack();
|
||||
|
||||
@@ -216,15 +216,12 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
if (pOtherBoss)
|
||||
{
|
||||
//me->MonsterYell("Teleporting ...", LANG_UNIVERSAL, 0);
|
||||
float other_x = pOtherBoss->GetPositionX();
|
||||
float other_y = pOtherBoss->GetPositionY();
|
||||
float other_z = pOtherBoss->GetPositionZ();
|
||||
float other_o = pOtherBoss->GetOrientation();
|
||||
|
||||
Map* thismap = me->GetMap();
|
||||
thismap->CreatureRelocation(pOtherBoss, me->GetPositionX(),
|
||||
me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
thismap->CreatureRelocation(me, other_x, other_y, other_z, other_o);
|
||||
Position thisPos;
|
||||
thisPos.Relocate(me);
|
||||
Position otherPos;
|
||||
otherPos.Relocate(pOtherBoss);
|
||||
pOtherBoss->SetPosition(thisPos);
|
||||
me->SetPosition(otherPos);
|
||||
|
||||
SetAfterTeleport();
|
||||
CAST_AI(boss_twinemperorsAI, pOtherBoss->AI())->SetAfterTeleport();
|
||||
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
Map* map = me->GetMap();
|
||||
if (map)
|
||||
{
|
||||
map->CreatureRelocation(me, 3706.39f, -3969.15f, 35.9118f, 0);
|
||||
me->SetPosition(3706.39f, -3969.15f, 35.9118f, 0);
|
||||
me->AI_SendMoveToPacket(3706.39f, -3969.15f, 35.9118f, 0, 0, 0);
|
||||
}
|
||||
//begin swimming and summon depth charges
|
||||
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
for (uint8 n = 0; n < 3; ++n)
|
||||
time[n] = 0;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMap()->CreatureRelocation(me, CenterOfRoom.GetPositionX(), CenterOfRoom.GetPositionY(), CenterOfRoom.GetPositionZ(), CenterOfRoom.GetOrientation());
|
||||
me->SetPosition(CenterOfRoom.GetPositionX(), CenterOfRoom.GetPositionY(), CenterOfRoom.GetPositionZ(), CenterOfRoom.GetOrientation());
|
||||
DoCast(me, SPELL_TELESTRA_BACK);
|
||||
me->SetVisible(true);
|
||||
if (Phase == 1)
|
||||
|
||||
@@ -757,7 +757,7 @@ class boss_flame_leviathan_safety_container : public CreatureScript
|
||||
me->GetPosition(x, y, z);
|
||||
z = me->GetMap()->GetHeight(x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->GetMap()->CreatureRelocation(me, x, y, z, 0);
|
||||
me->SetPosition(x, y, z, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const /*diff*/)
|
||||
|
||||
@@ -260,7 +260,7 @@ class mob_frozen_orb_stalker : public CreatureScript
|
||||
{
|
||||
Position pos;
|
||||
me->GetNearPoint(toravon, pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0.0f, 10.0f, 0.0f);
|
||||
me->SetPosition(pos, true);
|
||||
me->SetPosition(pos);
|
||||
DoCast(me, SPELL_FROZEN_ORB_SUMMON);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH))
|
||||
i_pl->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
|
||||
me->GetMap()->CreatureRelocation(me, VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
me->SetPosition(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
DoCast(me, SPELL_DRAW_SHADOWS, true);
|
||||
|
||||
DoCast(me, SPELL_RAIN_OF_FIRE);
|
||||
|
||||
@@ -1967,7 +1967,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence()
|
||||
Summons.DespawnAll();
|
||||
break;
|
||||
case 17:
|
||||
if (GETUNIT(Akama, AkamaGUID))
|
||||
if (GETCRE(Akama, AkamaGUID))
|
||||
{
|
||||
if (!me->IsWithinDistInMap(Akama, 15))
|
||||
{
|
||||
@@ -1976,7 +1976,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence()
|
||||
x += 10; y += 10;
|
||||
Akama->GetMotionMaster()->Clear(false);
|
||||
//Akama->GetMotionMaster()->MoveIdle();
|
||||
Akama->GetMap()->CreatureRelocation(me, x, y, z, 0.0f);
|
||||
Akama->SetPosition(x, y, z, 0.0f);
|
||||
Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0);//Illidan must not die until Akama arrives.
|
||||
Akama->GetMotionMaster()->MoveChase(me);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ class boss_alar : public CreatureScript
|
||||
if (me->IsWithinDist3d(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 5.0f))
|
||||
dist = 5.0f;
|
||||
WaitTimer = 1000 + uint32(floor(dist / 80 * 1000.0f));
|
||||
me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f);
|
||||
me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f);
|
||||
me->StopMoving();
|
||||
WaitEvent = WE_LAND;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
Phase1_Timer = 50000;
|
||||
//After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind.
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMap()->CreatureRelocation(me, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
|
||||
me->SetPosition(CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
|
||||
for (uint8 i=0; i <= 2; ++i)
|
||||
{
|
||||
if (!i)
|
||||
@@ -346,7 +346,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
//15 seconds later Solarian reappears out of one of the 3 portals. Simultaneously, 2 healers appear in the two other portals.
|
||||
int i = rand()%3;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMap()->CreatureRelocation(me, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O);
|
||||
me->SetPosition(Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O);
|
||||
|
||||
for (int j=0; j <= 2; j++)
|
||||
if (j != i)
|
||||
|
||||
@@ -819,7 +819,7 @@ class boss_kaelthas : public CreatureScript
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->GetMap()->CreatureRelocation(me, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
|
||||
me->SetPosition(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
|
||||
me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, 0, 0);
|
||||
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
@@ -886,7 +886,7 @@ class boss_kaelthas : public CreatureScript
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->GetMap()->CreatureRelocation(me, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
|
||||
me->SetPosition(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
|
||||
me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MOVEMENTFLAG_NONE, 0);
|
||||
|
||||
// 1) Kael'thas will portal the whole raid right into his body
|
||||
|
||||
Reference in New Issue
Block a user