forked from MagicBane/Server
Complete JodaTime -> java.time migration (remaining objects, db handlers, net msg, jobs) + QC pass; untrack working reference files
This commit is contained in:
1 parent
efd35e89f1
commit
93eb77fcc8
26 files changed
+160
-426
No files matched your search
@@ -22,7 +22,7 @@ import engine.net.client.msg.PlaceAssetMsg;
|
||||
import engine.net.client.msg.PlaceAssetMsg.PlacementInfo;
|
||||
import engine.objects.*;
|
||||
import engine.server.MBServerStatics;
|
||||
import org.joda.time.DateTime;
|
||||
import java.time.Instant;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -1160,7 +1160,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
Blueprint blueprint;
|
||||
Building newMesh;
|
||||
DateTime completionDate;
|
||||
Instant completionDate;
|
||||
float vendorRotation;
|
||||
float buildingRotation;
|
||||
|
||||
@@ -1174,9 +1174,9 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
// All siege buildings build in 15 minutes
|
||||
if ((blueprint.getBuildingGroup().equals(BuildingGroup.SIEGETENT))
|
||||
|| (blueprint.getBuildingGroup().equals(BuildingGroup.BULWARK)))
|
||||
completionDate = DateTime.now().plusMinutes(15);
|
||||
completionDate = Instant.now().plusSeconds(15 * 60);
|
||||
else
|
||||
completionDate = DateTime.now().plusHours(blueprint.getRankTime(1));
|
||||
completionDate = Instant.now().plusSeconds(blueprint.getRankTime(1) * 3600);
|
||||
|
||||
Vector3fImmutable localLoc = new Vector3fImmutable(ZoneManager.worldToLocal(buildingInfo.getLoc(), currentZone));
|
||||
|
||||
@@ -1244,7 +1244,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
ArrayList<AbstractGameObject> shrineObjects = DbManager.ShrineQueries.CREATE_SHRINE(
|
||||
currentZone.getObjectUUID(), player.getObjectUUID(), blueprint.getName(), blueprint.getMeshForRank(0),
|
||||
localLoc, 1.0f, blueprint.getMaxHealth(0), ProtectionState.PROTECTED, 0, 0,
|
||||
DateTime.now().plusHours(blueprint.getRankTime(1)), blueprint.getMeshForRank(0), vendorRotation, buildingRotation, shrineType.name());
|
||||
Instant.now().plusSeconds(blueprint.getRankTime(1) * 3600), blueprint.getMeshForRank(0), vendorRotation, buildingRotation, shrineType.name());
|
||||
|
||||
if (shrineObjects == null) {
|
||||
PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity");
|
||||
@@ -1304,7 +1304,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
float buildingRotation = buildingInfo.getRot().y;
|
||||
float vendorRotation = buildingInfo.getW();
|
||||
DateTime completionDate = DateTime.now().plusHours(blueprint.getRankTime(1));
|
||||
Instant completionDate = Instant.now().plusSeconds(blueprint.getRankTime(1) * 3600);
|
||||
|
||||
|
||||
newMesh = DbManager.BuildingQueries.CREATE_BUILDING(
|
||||
@@ -1347,7 +1347,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
warehouseObjects = DbManager.WarehouseQueries.CREATE_WAREHOUSE(
|
||||
currentZone.getObjectUUID(), player.getObjectUUID(), blueprint.getName(), blueprint.getMeshForRank(0),
|
||||
localLoc, 1.0f, blueprint.getMaxHealth(0), ProtectionState.NONE, 0, 0,
|
||||
DateTime.now().plusHours(blueprint.getRankTime(1)), blueprint.getMeshForRank(0), vendorRotation, buildingRotation);
|
||||
Instant.now().plusSeconds(blueprint.getRankTime(1) * 3600), blueprint.getMeshForRank(0), vendorRotation, buildingRotation);
|
||||
|
||||
if (warehouseObjects == null) {
|
||||
PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity");
|
||||
|
||||
Reference in new issue
Block a user