From dae20d5591c12191c2022d4fd84606807d628829 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 28 Mar 2024 19:45:50 -0500 Subject: [PATCH] create saetor shrine blueprint --- src/engine/db/handlers/dbBlueprintHandler.java | 8 ++++++++ .../net/client/handlers/PlaceAssetMsgHandler.java | 3 +++ src/engine/net/client/msg/PlaceAssetMsg.java | 3 +++ src/engine/objects/Blueprint.java | 12 +++++++----- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/engine/db/handlers/dbBlueprintHandler.java b/src/engine/db/handlers/dbBlueprintHandler.java index 46d36ef7..3a0ce125 100644 --- a/src/engine/db/handlers/dbBlueprintHandler.java +++ b/src/engine/db/handlers/dbBlueprintHandler.java @@ -73,6 +73,14 @@ public class dbBlueprintHandler extends dbHandlerBase { Blueprint._meshLookup.putIfAbsent(thisBlueprint.getMeshForRank(3), thisBlueprint); Blueprint._meshLookup.putIfAbsent(thisBlueprint.getMeshForRank(7), thisBlueprint); + if(thisBlueprint.getName().contains("Vampire Shrine")){ + Blueprint saetorShrine = new Blueprint(rs); + saetorShrine.setBlueprintUUID(1720000); + saetorShrine.rank1UUID = 1720000; + saetorShrine.rank3UUID = 1720000; + saetorShrine.rank7UUID = 1720000; + } + } } catch (SQLException e) { diff --git a/src/engine/net/client/handlers/PlaceAssetMsgHandler.java b/src/engine/net/client/handlers/PlaceAssetMsgHandler.java index c5f59add..bb2f24f2 100644 --- a/src/engine/net/client/handlers/PlaceAssetMsgHandler.java +++ b/src/engine/net/client/handlers/PlaceAssetMsgHandler.java @@ -412,6 +412,9 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { break; if (!playerCharacter.getCharItemManager().doesCharOwnThisItem(contract.getObjectUUID())) break; + if(contract.getItemBaseID() == 1035){//saetor shrine override + msg.getFirstPlacementInfo().setBlueprintUUID(1720000); + } buildingCreated = placeShrine(playerCharacter, origin, msg); break; case BARRACK: diff --git a/src/engine/net/client/msg/PlaceAssetMsg.java b/src/engine/net/client/msg/PlaceAssetMsg.java index c59bd23f..297ed4bb 100644 --- a/src/engine/net/client/msg/PlaceAssetMsg.java +++ b/src/engine/net/client/msg/PlaceAssetMsg.java @@ -601,6 +601,9 @@ public class PlaceAssetMsg extends ClientNetMsg { public int getBlueprintUUID() { return this.blueprintUUID; } + public void setBlueprintUUID(int id) { + this.blueprintUUID = id; + } public Vector3fImmutable getLoc() { return this.loc; diff --git a/src/engine/objects/Blueprint.java b/src/engine/objects/Blueprint.java index dcd4841a..36db2dd5 100644 --- a/src/engine/objects/Blueprint.java +++ b/src/engine/objects/Blueprint.java @@ -30,15 +30,15 @@ public class Blueprint { public static HashMap _meshLookup = new HashMap<>(); private static HashMap _blueprints = new HashMap<>(); private static HashMap _doorNumbers = new HashMap<>(); - private final int blueprintUUID; + private int blueprintUUID; private final String name; private final BuildingGroup buildingGroup; private final int icon; private final int maxRank; private final int maxSlots; - private final int rank1UUID; - private final int rank3UUID; - private final int rank7UUID; + public int rank1UUID; + public int rank3UUID; + public int rank7UUID; private final int destroyedUUID; private Blueprint() { @@ -583,7 +583,9 @@ public class Blueprint { public int getBlueprintUUID() { return blueprintUUID; } - + public void setBlueprintUUID(int id) { + this.blueprintUUID = id; + } @Override public boolean equals(Object object) {