From 0cff40070b94be126b322650d4c1ecf1da6342d2 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 6 May 2024 13:33:28 -0400 Subject: [PATCH] Realm derived not stored --- src/engine/db/handlers/dbCityHandler.java | 19 +++++++++---------- .../client/handlers/PlaceAssetMsgHandler.java | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/engine/db/handlers/dbCityHandler.java b/src/engine/db/handlers/dbCityHandler.java index aeb69d2d..093cc7b3 100644 --- a/src/engine/db/handlers/dbCityHandler.java +++ b/src/engine/db/handlers/dbCityHandler.java @@ -52,7 +52,7 @@ public class dbCityHandler extends dbHandlerBase { } } - public ArrayList CREATE_CITY(int ownerID, int parentZoneID, int realmID, float xCoord, float yCoord, float zCoord, float rotation, float W, String name, LocalDateTime established) { + public ArrayList CREATE_CITY(int ownerID, int parentZoneID, float xCoord, float yCoord, float zCoord, float rotation, float W, String name, LocalDateTime established) { LocalDateTime upgradeTime = LocalDateTime.now().plusHours(2); ArrayList objectList = new ArrayList<>(); @@ -62,15 +62,14 @@ public class dbCityHandler extends dbHandlerBase { preparedStatement.setLong(1, ownerID); //objectUUID of owning player preparedStatement.setLong(2, parentZoneID); //objectUUID of parent (continent) zone - preparedStatement.setLong(3, realmID); //objectUUID of realm city belongs in - preparedStatement.setFloat(4, xCoord); //xOffset from parentZone center - preparedStatement.setFloat(5, yCoord); //yOffset from parentZone center - preparedStatement.setFloat(6, zCoord); //zOffset from parentZone center - preparedStatement.setString(7, name); //city name - preparedStatement.setTimestamp(8, Timestamp.valueOf(established)); - preparedStatement.setFloat(9, rotation); - preparedStatement.setFloat(10, W); - preparedStatement.setTimestamp(11, Timestamp.valueOf(upgradeTime)); + preparedStatement.setFloat(3, xCoord); //xOffset from parentZone center + preparedStatement.setFloat(4, yCoord); //yOffset from parentZone center + preparedStatement.setFloat(5, zCoord); //zOffset from parentZone center + preparedStatement.setString(6, name); //city name + preparedStatement.setTimestamp(7, Timestamp.valueOf(established)); + preparedStatement.setFloat(8, rotation); + preparedStatement.setFloat(9, W); + preparedStatement.setTimestamp(10, Timestamp.valueOf(upgradeTime)); boolean work = preparedStatement.execute(); diff --git a/src/engine/net/client/handlers/PlaceAssetMsgHandler.java b/src/engine/net/client/handlers/PlaceAssetMsgHandler.java index 582a8e74..5912493e 100644 --- a/src/engine/net/client/handlers/PlaceAssetMsgHandler.java +++ b/src/engine/net/client/handlers/PlaceAssetMsgHandler.java @@ -749,7 +749,6 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { treeInfo.getLoc().z); cityObjects = DbManager.CityQueries.CREATE_CITY(playerCharacter.getObjectUUID(), serverZone.getObjectUUID(), - serverRealm.getRealmID(), plantLoc.x - serverZone.absX, plantLoc.y, plantLoc.z - serverZone.absZ, treeInfo.getRot().y, treeInfo.getW(), playerCharacter.getGuild().getName(), LocalDateTime.now());