From 6d16eccc24beb873a8af89a1092ae90e7db2793e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 21 May 2024 16:41:28 -0500 Subject: [PATCH] shrines can be looted once destroyed --- .../net/client/handlers/ManageCityAssetMsgHandler.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java b/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java index 54e3469b..7ba982c1 100644 --- a/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java +++ b/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java @@ -5,6 +5,7 @@ import engine.Enum.DispatchChannel; import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; +import engine.gameManager.DbManager; import engine.gameManager.SessionManager; import engine.gameManager.ZoneManager; import engine.math.Bounds; @@ -130,6 +131,14 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler { ErrorPopupMsg.sendErrorPopup(player, 166); // There is no more favor in this shrine to loot return true; } + //loot elan stones + MobLoot elanStones = new MobLoot(player,ItemBase.getItemBase(1705032),1,false); + Item promotedItem = elanStones.promoteToItem(player); + promotedItem.setNumOfItems(shrine.getFavors()); + player.getCharItemManager().addItemToInventory(promotedItem); + DbManager.ItemQueries.UPDATE_NUM_ITEMS(promotedItem,promotedItem.getNumOfItems(),1); + player.getCharItemManager().updateInventory(); + shrine.setFavors(0); break; case WAREHOUSE: Warehouse warehouse = Warehouse.warehouseByBuildingUUID.get(building.getObjectUUID());