Browse Source

shrines can be looted once destroyed

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
6d16eccc24
  1. 9
      src/engine/net/client/handlers/ManageCityAssetMsgHandler.java

9
src/engine/net/client/handlers/ManageCityAssetMsgHandler.java

@ -5,6 +5,7 @@ import engine.Enum.DispatchChannel;
import engine.Enum.GameObjectType; import engine.Enum.GameObjectType;
import engine.exception.MsgSendException; import engine.exception.MsgSendException;
import engine.gameManager.BuildingManager; import engine.gameManager.BuildingManager;
import engine.gameManager.DbManager;
import engine.gameManager.SessionManager; import engine.gameManager.SessionManager;
import engine.gameManager.ZoneManager; import engine.gameManager.ZoneManager;
import engine.math.Bounds; 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 ErrorPopupMsg.sendErrorPopup(player, 166); // There is no more favor in this shrine to loot
return true; 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; break;
case WAREHOUSE: case WAREHOUSE:
Warehouse warehouse = Warehouse.warehouseByBuildingUUID.get(building.getObjectUUID()); Warehouse warehouse = Warehouse.warehouseByBuildingUUID.get(building.getObjectUUID());

Loading…
Cancel
Save