Refactor warehouse part two.
This commit is contained in:
@@ -25,10 +25,7 @@ import engine.net.client.msg.*;
|
||||
import engine.server.MBServerStatics;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@@ -350,10 +347,11 @@ public class CharacterItemManager {
|
||||
break;
|
||||
case Warehouse:
|
||||
|
||||
Warehouse warehouse = (Warehouse) object;
|
||||
Building warehouseBuilding = (Building) object;
|
||||
Warehouse warehouse = Objects.requireNonNull(warehouseBuilding.getCity()).warehouse;
|
||||
|
||||
if (amount < 0) {
|
||||
if (!Warehouse.deposit((PlayerCharacter) this.absCharacter, this.getGoldInventory(), amount * -1, true, true,warehouse)) {
|
||||
if (!Warehouse.deposit((PlayerCharacter) this.absCharacter, this.getGoldInventory(), amount * -1, true, true, warehouse)) {
|
||||
|
||||
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.absCharacter, 203);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user