diff --git a/zone/zone.cpp b/zone/zone.cpp index 333d3f4da..5b9910441 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1580,10 +1580,10 @@ ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, uint32 to, Clien return closest_zp; } -ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, const char* to_name, Client* client, float max_distance) { +ZonePoint* Zone::GetClosestZonePoint(const xyz_location& location, const char* to_name, Client* client, float max_distance) { if(to_name == nullptr) - return GetClosestZonePointWithoutZone(x,y,z, client, max_distance); - return GetClosestZonePoint(x, y, z, database.GetZoneID(to_name), client, max_distance); + return GetClosestZonePointWithoutZone(location.m_X, location.m_Y, location.m_Z, client, max_distance); + return GetClosestZonePoint(location.m_X, location.m_Y, location.m_Z, database.GetZoneID(to_name), client, max_distance); } ZonePoint* Zone::GetClosestZonePointWithoutZone(float x, float y, float z, Client* client, float max_distance) { diff --git a/zone/zone.h b/zone/zone.h index 6c2581d38..4716b3757 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -127,7 +127,7 @@ public: void ReloadStaticData(); uint32 CountSpawn2(); - ZonePoint* GetClosestZonePoint(float x, float y, float z, const char* to_name, Client *client, float max_distance = 40000.0f); + ZonePoint* GetClosestZonePoint(const xyz_location& location, const char* to_name, Client *client, float max_distance = 40000.0f); ZonePoint* GetClosestZonePoint(float x, float y, float z, uint32 to, Client *client, float max_distance = 40000.0f); ZonePoint* GetClosestZonePointWithoutZone(float x, float y, float z, Client *client, float max_distance = 40000.0f); SpawnGroupList spawn_group_list;