From 39f5949441421a48f03b5652fb19025175cb9311 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 9 May 2021 16:39:54 -0400 Subject: [PATCH] #grid delete was deleting the grids everywhere (#1346) Fix to only delete correct zone grid. --- zone/waypoints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 8ed940194..90fc25d1e 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -1029,7 +1029,7 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type return; } - std::string query = StringFormat("DELETE FROM grid where id=%i", id); + std::string query = StringFormat("DELETE FROM grid where id=%i and zoneid=%i", id, zoneid); auto results = QueryDatabase(query); query = StringFormat("DELETE FROM grid_entries WHERE zoneid = %i AND gridid = %i", zoneid, id);