From cafa266c89a16b3245118d18a4720e7c0d0f7a2a Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Tue, 2 Dec 2014 16:42:19 -0800 Subject: [PATCH] UpdateZoneSafeCoords converted to xyz_heading --- zone/zonedb.cpp | 5 +++-- zone/zonedb.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index a59223f68..029726bef 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2471,10 +2471,11 @@ void ZoneDatabase::DeleteMerchantTemp(uint32 npcid, uint32 slot){ } -bool ZoneDatabase::UpdateZoneSafeCoords(const char* zonename, float x=0, float y=0, float z=0) { +bool ZoneDatabase::UpdateZoneSafeCoords(const char* zonename, const xyz_location& location) { std::string query = StringFormat("UPDATE zone SET safe_x='%f', safe_y='%f', safe_z='%f' " - "WHERE short_name='%s';", x, y, z, zonename); + "WHERE short_name='%s';", + location.m_X, location.m_Y, location.m_Z, zonename); auto results = QueryDatabase(query); if (!results.Success() || results.RowsAffected() == 0) return false; diff --git a/zone/zonedb.h b/zone/zonedb.h index 7fadaf6cf..f89bb5865 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -345,7 +345,7 @@ public: bool GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct *data, bool &can_bind, bool &can_combat, bool &can_levitate, bool &can_castoutdoor, bool &is_city, bool &is_hotzone, bool &allow_mercs, uint8 &zone_type, int &ruleset, char **map_filename); bool SaveZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct* zd); bool LoadStaticZonePoints(LinkedList* zone_point_list,const char* zonename, uint32 version); - bool UpdateZoneSafeCoords(const char* zonename, float x, float y, float z); + bool UpdateZoneSafeCoords(const char* zonename, const xyz_location& location); uint8 GetUseCFGSafeCoords(); int getZoneShutDownDelay(uint32 zoneID, uint32 version);