Warehosue cleanup

This commit is contained in:
2024-01-24 20:03:27 -06:00
parent 92d8ed9e3f
commit cc1e0d8986
20 changed files with 1038 additions and 1425 deletions
+3 -6
View File
@@ -12,10 +12,7 @@ package engine.objects;
import engine.Enum;
import engine.Enum.GameObjectType;
import engine.Enum.ItemType;
import engine.gameManager.BuildingManager;
import engine.gameManager.ChatManager;
import engine.gameManager.ConfigManager;
import engine.gameManager.DbManager;
import engine.gameManager.*;
import engine.math.Vector3fImmutable;
import engine.net.Dispatch;
import engine.net.DispatchMessage;
@@ -345,13 +342,13 @@ public class CharacterItemManager {
Warehouse warehouse = (Warehouse) object;
if (amount < 0) {
if (!warehouse.deposit((PlayerCharacter) this.absCharacter, this.getGoldInventory(), amount * -1, true, true)) {
if (!WarehouseManager.deposit((PlayerCharacter) this.absCharacter, this.getGoldInventory(), amount * -1, true, true,warehouse)) {
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.absCharacter, 203);
return false;
}
} else {
if (!warehouse.withdraw((PlayerCharacter) this.absCharacter, this.getGoldInventory().getItemBase(), amount * -1, true, true)) {
if (!WarehouseManager.withdraw(warehouse, (PlayerCharacter) this.absCharacter, this.getGoldInventory().getItemBase(), amount * -1, true, true)) {
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.absCharacter, 203);
return false;