Browse Source

Realm derived not stored

combat-2
MagicBot 8 months ago
parent
commit
0cff40070b
  1. 19
      src/engine/db/handlers/dbCityHandler.java
  2. 1
      src/engine/net/client/handlers/PlaceAssetMsgHandler.java

19
src/engine/db/handlers/dbCityHandler.java

@ -52,7 +52,7 @@ public class dbCityHandler extends dbHandlerBase { @@ -52,7 +52,7 @@ public class dbCityHandler extends dbHandlerBase {
}
}
public ArrayList<AbstractGameObject> CREATE_CITY(int ownerID, int parentZoneID, int realmID, float xCoord, float yCoord, float zCoord, float rotation, float W, String name, LocalDateTime established) {
public ArrayList<AbstractGameObject> 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<AbstractGameObject> objectList = new ArrayList<>();
@ -62,15 +62,14 @@ public class dbCityHandler extends dbHandlerBase { @@ -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();

1
src/engine/net/client/handlers/PlaceAssetMsgHandler.java

@ -749,7 +749,6 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -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());

Loading…
Cancel
Save