Warehosue cleanup
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user