#grid delete was deleting the grids everywhere (#1346)

Fix to only delete correct zone grid.
This commit is contained in:
Paul Coene authored and GitHub committed 2021-05-09 16:39:54 -04:00
1 parent abf73947f4
commit 39f5949441
1 file changed
+1 -1
+1 -1
View File
@@ -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);