aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2017-05-02 14:18:42 +0200
committerfunjoker <funjoker109@gmail.com>2020-06-14 20:04:17 +0200
commit55576d20d837a9b4575c11a73940c29c0e8e605b (patch)
tree8b4db4405e3664aac4a779fd6a75257ca88a70e9 /src/server/game
parenta90f60f7d3b482072d0ae3dbfd49580a3ef9ce88 (diff)
Core/Creature: drop method SetPosition
eeeevil, use UpdatePosition. It was there just for old scripts compatibility. (cherry picked from commit 17579f8d91e0dcc6990fe581de9ca51ed444b754)
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp14
-rw-r--r--src/server/game/Entities/Creature/Creature.h3
2 files changed, 0 insertions, 17 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 44a6ae2b3a4..1d17e161b47 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2943,20 +2943,6 @@ float Creature::GetPetChaseDistance() const
return range;
}
-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))
- {
- TC_LOG_DEBUG("entities.unit", "Creature::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
- return;
- }
-
- GetMap()->CreatureRelocation(this, x, y, z, o);
- if (IsVehicle())
- GetVehicleKit()->RelocatePassengers();
-}
-
float Creature::GetAggroRange(Unit const* target) const
{
// Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection.
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index cc5608bfc3d..4d7171b4c0d 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -282,9 +282,6 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
void SetCannotReachTarget(bool cannotReach) { if (cannotReach == m_cannotReachTarget) return; m_cannotReachTarget = cannotReach; m_cannotReachTimer = 0; }
bool CanNotReachTarget() const { return m_cannotReachTarget; }
- 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) const { m_homePosition.GetPosition(x, y, z, ori); }