Browse Source

More itembase refactor

combat-2
MagicBot 8 months ago
parent
commit
03e6c591ff
  1. 5
      src/engine/gameManager/MaintenanceManager.java

5
src/engine/gameManager/MaintenanceManager.java

@ -14,7 +14,6 @@ package engine.gameManager; @@ -14,7 +14,6 @@ package engine.gameManager;
import engine.Enum;
import engine.objects.Building;
import engine.objects.City;
import engine.objects.ItemBase;
import engine.objects.Warehouse;
import org.pmw.tinylog.Logger;
@ -228,7 +227,7 @@ public enum MaintenanceManager { @@ -228,7 +227,7 @@ public enum MaintenanceManager {
if ((overDraft > 0))
if ((building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SHRINE) == false) &&
(warehouse != null) && building.assetIsProtected() == true &&
(warehouse.resources.get(ItemBase.GOLD_ITEM_BASE)) >= overDraft) {
(warehouse.resources.get(Enum.ResourceType.GOLD)) >= overDraft) {
hasFunds = true;
}
@ -291,7 +290,7 @@ public enum MaintenanceManager { @@ -291,7 +290,7 @@ public enum MaintenanceManager {
if (overDraft > 0) {
resourceValue = warehouse.resources.get(ItemBase.getItemBase(7));
resourceValue = warehouse.resources.get(Enum.ResourceType.GOLD);
warehouse.resources.put(Enum.ResourceType.GOLD, resourceValue - overDraft);
if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) {

Loading…
Cancel
Save