Start mobequip refactor
This commit is contained in:
@@ -49,7 +49,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
|
||||
protected CharacterItemManager charItemManager;
|
||||
public CharacterItemManager charItemManager;
|
||||
private final ReentrantReadWriteLock healthLock = new ReentrantReadWriteLock();
|
||||
public short level;
|
||||
public AbstractWorldObject combatTarget;
|
||||
@@ -657,10 +657,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
return this.unusedStatPoints;
|
||||
}
|
||||
|
||||
public final CharacterItemManager getCharItemManager() {
|
||||
return this.charItemManager;
|
||||
}
|
||||
|
||||
public final void setDebug(
|
||||
final int value,
|
||||
final boolean toggle
|
||||
|
||||
@@ -214,16 +214,16 @@ public class Account extends AbstractGameObject {
|
||||
}
|
||||
|
||||
//dupe check
|
||||
if (!item.validForInventory(origin, player, player.getCharItemManager()))
|
||||
if (!item.validForInventory(origin, player, player.charItemManager))
|
||||
return;
|
||||
|
||||
if (item.containerType == Enum.ItemContainerType.INVENTORY && player.getCharItemManager().isVaultOpen()) {
|
||||
if (!player.getCharItemManager().hasRoomVault(item.template.item_wt)) {
|
||||
if (item.containerType == Enum.ItemContainerType.INVENTORY && player.charItemManager.isVaultOpen()) {
|
||||
if (!player.charItemManager.hasRoomVault(item.template.item_wt)) {
|
||||
ClientMessagePump.forceTransferFromVaultToInventory(msg, origin, "There is no room in your vault.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getCharItemManager().moveItemToVault(item)) {
|
||||
if (player.charItemManager.moveItemToVault(item)) {
|
||||
this.vault.add(item);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
@@ -245,7 +245,7 @@ public class Account extends AbstractGameObject {
|
||||
return;
|
||||
}
|
||||
|
||||
CharacterItemManager itemManager = player.getCharItemManager();
|
||||
CharacterItemManager itemManager = player.charItemManager;
|
||||
|
||||
if (itemManager == null) {
|
||||
ClientMessagePump.forceTransferFromInventoryToVault(msg, origin, "Can't find your item manager.");
|
||||
@@ -300,7 +300,7 @@ public class Account extends AbstractGameObject {
|
||||
if (npc == null)
|
||||
return;
|
||||
|
||||
CharacterItemManager itemManager = player.getCharItemManager();
|
||||
CharacterItemManager itemManager = player.charItemManager;
|
||||
|
||||
if (itemManager == null)
|
||||
return;
|
||||
@@ -347,7 +347,7 @@ public class Account extends AbstractGameObject {
|
||||
if (!ClientMessagePump.NPCVaultBankRangeCheck(player, origin, "vault"))
|
||||
return;
|
||||
|
||||
CharacterItemManager itemManager = player.getCharItemManager();
|
||||
CharacterItemManager itemManager = player.charItemManager;
|
||||
|
||||
if (itemManager == null)
|
||||
return;
|
||||
|
||||
@@ -94,12 +94,12 @@ public class CharacterItemManager {
|
||||
if (template == null)
|
||||
return;
|
||||
|
||||
CharacterItemManager itemMan = pc.getCharItemManager();
|
||||
CharacterItemManager itemMan = pc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return;
|
||||
|
||||
CharacterItemManager npcCim = npc.getCharItemManager();
|
||||
CharacterItemManager npcCim = npc.charItemManager;
|
||||
|
||||
if (npcCim == null)
|
||||
return;
|
||||
@@ -322,7 +322,7 @@ public class CharacterItemManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.getOwner().getCharItemManager().getGoldTrading() > 0) {
|
||||
if (this.getOwner().charItemManager.getGoldTrading() > 0) {
|
||||
if (this.getOwner().getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.getOwner(), 195);
|
||||
return false;
|
||||
@@ -440,8 +440,8 @@ public class CharacterItemManager {
|
||||
|
||||
// TODO uncomment this block after we determine when we
|
||||
// setBankOpen(false) and setVaultOpen(false)
|
||||
CharacterItemManager cim1 = source.getCharItemManager();
|
||||
CharacterItemManager cim2 = target.getCharItemManager();
|
||||
CharacterItemManager cim1 = source.charItemManager;
|
||||
CharacterItemManager cim2 = target.charItemManager;
|
||||
|
||||
if (cim1 == null)
|
||||
return false;
|
||||
@@ -539,7 +539,7 @@ public class CharacterItemManager {
|
||||
return false;
|
||||
|
||||
|
||||
CharacterItemManager toTradeWith = target.getCharItemManager();
|
||||
CharacterItemManager toTradeWith = target.charItemManager;
|
||||
|
||||
if (toTradeWith == null)
|
||||
return false;
|
||||
@@ -603,7 +603,7 @@ public class CharacterItemManager {
|
||||
if (other == null || !other.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager tradingWith = other.getCharItemManager();
|
||||
CharacterItemManager tradingWith = other.charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
@@ -669,7 +669,7 @@ public class CharacterItemManager {
|
||||
if (other == null || !other.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager tradingWith = other.getCharItemManager();
|
||||
CharacterItemManager tradingWith = other.charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
@@ -725,7 +725,7 @@ public class CharacterItemManager {
|
||||
if (source == null || !source.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager sourceItemMan = source.getCharItemManager();
|
||||
CharacterItemManager sourceItemMan = source.charItemManager;
|
||||
|
||||
if (sourceItemMan == null)
|
||||
return false;
|
||||
@@ -768,7 +768,7 @@ public class CharacterItemManager {
|
||||
if (other == null || !other.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager tradingWith = other.getCharItemManager();
|
||||
CharacterItemManager tradingWith = other.charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
@@ -784,7 +784,7 @@ public class CharacterItemManager {
|
||||
CloseTradeWindowMsg ctwm2 = new CloseTradeWindowMsg(other, tradeID);
|
||||
this.commitTrade();
|
||||
this.closeTradeWindow(ctwm1, false);
|
||||
other.getCharItemManager().closeTradeWindow(ctwm2, false);
|
||||
other.charItemManager.closeTradeWindow(ctwm2, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -797,7 +797,7 @@ public class CharacterItemManager {
|
||||
|
||||
if (this.getTradingWith().getPlayerCharacter() == null)
|
||||
return false;
|
||||
CharacterItemManager man2 = this.getTradingWith().getPlayerCharacter().getCharItemManager();
|
||||
CharacterItemManager man2 = this.getTradingWith().getPlayerCharacter().charItemManager;
|
||||
Dispatch dispatch;
|
||||
|
||||
if (man1 == null || man2 == null)
|
||||
@@ -825,7 +825,7 @@ public class CharacterItemManager {
|
||||
if (source == null)
|
||||
return false;
|
||||
|
||||
CharacterItemManager sourceItemMan = source.getCharItemManager();
|
||||
CharacterItemManager sourceItemMan = source.charItemManager;
|
||||
|
||||
if (sourceItemMan == null)
|
||||
return false;
|
||||
@@ -851,7 +851,7 @@ public class CharacterItemManager {
|
||||
sourceItemMan.endTrade();
|
||||
|
||||
|
||||
cc2.getPlayerCharacter().getCharItemManager().closeTradeWindow(msg, false);
|
||||
cc2.getPlayerCharacter().charItemManager.closeTradeWindow(msg, false);
|
||||
|
||||
|
||||
return true;
|
||||
@@ -1149,7 +1149,7 @@ public class CharacterItemManager {
|
||||
if (tar == null)
|
||||
return false;
|
||||
|
||||
CharacterItemManager tarCim = tar.getCharItemManager();
|
||||
CharacterItemManager tarCim = tar.charItemManager;
|
||||
if (tarCim == null)
|
||||
return false;
|
||||
|
||||
@@ -1398,7 +1398,7 @@ public class CharacterItemManager {
|
||||
return false;
|
||||
|
||||
|
||||
if (this.getOwner().getCharItemManager().getGoldTrading() > 0) {
|
||||
if (this.getOwner().charItemManager.getGoldTrading() > 0) {
|
||||
if (this.getOwner().getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.getOwner(), 195);
|
||||
return false;
|
||||
@@ -1437,7 +1437,7 @@ public class CharacterItemManager {
|
||||
if (itemToSell == null || npc == null)
|
||||
return false;
|
||||
|
||||
itemMan = npc.getCharItemManager();
|
||||
itemMan = npc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
@@ -1495,7 +1495,7 @@ public class CharacterItemManager {
|
||||
if (purchasedItem == null || npc == null)
|
||||
return false;
|
||||
|
||||
itemMan = npc.getCharItemManager();
|
||||
itemMan = npc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
@@ -1587,7 +1587,7 @@ public class CharacterItemManager {
|
||||
return null;
|
||||
|
||||
// get looters item manager
|
||||
CharacterItemManager looterItems = lootingPlayer.getCharItemManager();
|
||||
CharacterItemManager looterItems = lootingPlayer.charItemManager;
|
||||
|
||||
if (looterItems == null)
|
||||
return null;
|
||||
@@ -2129,7 +2129,7 @@ public class CharacterItemManager {
|
||||
tradeCharacter = this.tradingWith.getPlayerCharacter();
|
||||
|
||||
tradeWeight = this.getCarriedWeight() + itemWeight;
|
||||
tradeWeight = tradeWeight + tradeCharacter.getCharItemManager().getTradingWeight();
|
||||
tradeWeight = tradeWeight + tradeCharacter.charItemManager.getTradingWeight();
|
||||
tradeWeight = tradeWeight - this.getTradingWeight();
|
||||
|
||||
return tradeWeight <= (int) playerCharacter.statStrBase * 3;
|
||||
@@ -2311,7 +2311,7 @@ public class CharacterItemManager {
|
||||
}
|
||||
|
||||
|
||||
CharacterItemManager tradingWith = this.getTradingWith().getPlayerCharacter().getCharItemManager();
|
||||
CharacterItemManager tradingWith = this.getTradingWith().getPlayerCharacter().charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
|
||||
@@ -274,7 +274,7 @@ public class Corpse extends AbstractWorldObject {
|
||||
}
|
||||
|
||||
//TODO transfer items from players inventory and trade window to corpse
|
||||
CharacterItemManager cim = belongsTo.getCharItemManager();
|
||||
CharacterItemManager cim = belongsTo.charItemManager;
|
||||
if (cim != null)
|
||||
cim.transferEntireInventory(this.inventory, this, enterWorld);
|
||||
else
|
||||
@@ -287,7 +287,7 @@ public class Corpse extends AbstractWorldObject {
|
||||
return null;
|
||||
|
||||
//get looters item manager
|
||||
CharacterItemManager looterItems = looter.getCharItemManager();
|
||||
CharacterItemManager looterItems = looter.charItemManager;
|
||||
if (looterItems == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
if (item.getOwner() != null && item.getOwner().getObjectType() == GameObjectType.PlayerCharacter) {
|
||||
PlayerCharacter player = (PlayerCharacter) item.getOwner();
|
||||
int tradingAmount = player.getCharItemManager().getGoldTrading();
|
||||
int tradingAmount = player.charItemManager.getGoldTrading();
|
||||
writer.putInt(item.numberOfItems - tradingAmount);
|
||||
} else
|
||||
writer.putInt(item.numberOfItems); // Amount of gold
|
||||
@@ -334,7 +334,7 @@ public class Item extends AbstractWorldObject {
|
||||
writer.putInt(0); // Pad
|
||||
|
||||
|
||||
writer.putInt(player.getCharItemManager().getGoldTrading()); // Amount of gold
|
||||
writer.putInt(player.charItemManager.getGoldTrading()); // Amount of gold
|
||||
|
||||
|
||||
writer.putInt(0);
|
||||
@@ -347,7 +347,7 @@ public class Item extends AbstractWorldObject {
|
||||
writer.putInt(4); //Non-Magical, grey name
|
||||
writer.putInt(1);
|
||||
writer.putInt(0); // Pad
|
||||
writer.putInt(player.getCharItemManager().getGoldTrading());
|
||||
writer.putInt(player.charItemManager.getGoldTrading());
|
||||
writer.put((byte) 0);
|
||||
|
||||
writer.putShort((short) 0);
|
||||
@@ -375,8 +375,8 @@ public class Item extends AbstractWorldObject {
|
||||
if (!itemWorked)
|
||||
return false;
|
||||
|
||||
reciever.getCharItemManager().addItemToInventory(item);
|
||||
reciever.getCharItemManager().updateInventory();
|
||||
reciever.charItemManager.addItemToInventory(item);
|
||||
reciever.charItemManager.updateInventory();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ public class Item extends AbstractWorldObject {
|
||||
}
|
||||
++serialized;
|
||||
}
|
||||
if (player.getCharItemManager().getGoldTrading() > 0) {
|
||||
if (player.charItemManager.getGoldTrading() > 0) {
|
||||
Item.SerializeTradingGold(player, writer);
|
||||
++serialized;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ItemFactory {
|
||||
return;
|
||||
|
||||
int max = 20;
|
||||
CharacterItemManager itemManager = pc.getCharItemManager();
|
||||
CharacterItemManager itemManager = pc.charItemManager;
|
||||
|
||||
ItemTemplate template = ItemTemplate.templates.get(templateID);
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ItemFactory {
|
||||
if (forge == null)
|
||||
return null;
|
||||
|
||||
if (!npc.getCharItemManager().hasRoomInventory(template.item_wt)) {
|
||||
if (!npc.charItemManager.hasRoomInventory(template.item_wt)) {
|
||||
if (pc != null)
|
||||
ErrorPopupMsg.sendErrorPopup(pc, 21);
|
||||
return null;
|
||||
@@ -646,7 +646,7 @@ public class ItemFactory {
|
||||
if (template == null)
|
||||
return null;
|
||||
|
||||
if (!vendor.getCharItemManager().hasRoomInventory(template.item_wt)) {
|
||||
if (!vendor.charItemManager.hasRoomInventory(template.item_wt)) {
|
||||
|
||||
if (playerCharacter != null)
|
||||
ChatManager.chatSystemInfo(playerCharacter, vendor.getName() + " " + vendor.getContract().getName() + " Inventory is full.");
|
||||
|
||||
@@ -127,9 +127,10 @@ public class MobBase extends AbstractGameObject {
|
||||
for (BootySetEntry equipmentSetEntry : equipList) {
|
||||
|
||||
Item item = new Item(equipmentSetEntry.templateID);
|
||||
item.objectUUID = MobLoot.lastNegativeID.decrementAndGet();
|
||||
item.drop_chance = equipmentSetEntry.dropChance;
|
||||
|
||||
equip.put(item.slot, Item);
|
||||
item.equipSlot = item.template.item_eq_slots_or.iterator().next();
|
||||
equip.put(item.equipSlot, item);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
*/
|
||||
public final class MobLoot extends Item {
|
||||
|
||||
private static final AtomicInteger LastUsedId = new AtomicInteger(0);
|
||||
public static final AtomicInteger lastNegativeID = new AtomicInteger(0);
|
||||
|
||||
private boolean isDeleted = false;
|
||||
private boolean noSteal;
|
||||
@@ -77,7 +77,7 @@ public final class MobLoot extends Item {
|
||||
* @return Id number
|
||||
*/
|
||||
private static int generateId() {
|
||||
int id = LastUsedId.decrementAndGet();
|
||||
int id = lastNegativeID.decrementAndGet();
|
||||
|
||||
//TODO Add a way to reclaim disposed IDs if this becomes a problem
|
||||
if (id == (-10000))
|
||||
|
||||
@@ -52,7 +52,6 @@ public class NPC extends AbstractCharacter {
|
||||
private final ArrayList<MobLoot> rolling = new ArrayList<>();
|
||||
public ReentrantReadWriteLock minionLock = new ReentrantReadWriteLock();
|
||||
public ArrayList<ProducedItem> forgedItems = new ArrayList<>();
|
||||
public HashMap<Enum.EquipSlotType, Item> equip = null;
|
||||
public int runeSetID = 0;
|
||||
public int extraRune2 = 0;
|
||||
protected int loadID;
|
||||
@@ -341,11 +340,11 @@ public class NPC extends AbstractCharacter {
|
||||
|
||||
// get a copy of the equipped items.
|
||||
|
||||
if (npc.equip != null) {
|
||||
writer.putInt(npc.equip.size());
|
||||
if (npc.charItemManager.equipped.isEmpty() == false) {
|
||||
writer.putInt(npc.charItemManager.equipped.size());
|
||||
|
||||
for (Item me : npc.equip.values())
|
||||
Item.serializeForClientMsg(me, writer);
|
||||
for (Item me : npc.charItemManager.equipped.values())
|
||||
Item._serializeForClientMsg(me, writer);
|
||||
} else
|
||||
writer.putInt(0);
|
||||
|
||||
@@ -913,7 +912,7 @@ public class NPC extends AbstractCharacter {
|
||||
if (equipmentSetID != 0 && LootManager._bootySetMap.get(equipmentSetID) == null)
|
||||
Logger.error("Invalid equipSet: " + equipmentSetID + " contract: " + this.contractUUID + " npc: " + this.getObjectUUID());
|
||||
|
||||
this.equip = loadEquipmentSet(this.equipmentSetID);
|
||||
this.charItemManager.equipped = loadEquipmentSet(this.equipmentSetID);
|
||||
|
||||
try {
|
||||
|
||||
@@ -1241,7 +1240,7 @@ public class NPC extends AbstractCharacter {
|
||||
if (targetItem == null)
|
||||
return false;
|
||||
|
||||
if (!this.getCharItemManager().forgeContains(targetItem, this))
|
||||
if (!this.charItemManager.forgeContains(targetItem, this))
|
||||
return false;
|
||||
|
||||
if (!DbManager.NPCQueries.UPDATE_ITEM_TO_INVENTORY(targetItem.getObjectUUID(), currentID))
|
||||
@@ -1250,7 +1249,7 @@ public class NPC extends AbstractCharacter {
|
||||
targetItem.setIsID(true);
|
||||
|
||||
this.rolling.remove(targetItem);
|
||||
this.getCharItemManager().addItemToInventory(targetItem);
|
||||
this.charItemManager.addItemToInventory(targetItem);
|
||||
|
||||
//remove from client forge window
|
||||
|
||||
@@ -1265,10 +1264,6 @@ public class NPC extends AbstractCharacter {
|
||||
return true;
|
||||
}
|
||||
|
||||
public HashMap<Enum.EquipSlotType, Item> getEquip() {
|
||||
return equip;
|
||||
}
|
||||
|
||||
public int getEquipmentSetID() {
|
||||
return equipmentSetID;
|
||||
}
|
||||
|
||||
@@ -1944,7 +1944,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
Mine.releaseMineClaims(this);
|
||||
|
||||
this.getCharItemManager().closeTradeWindow();
|
||||
this.charItemManager.closeTradeWindow();
|
||||
|
||||
//increment live counter. This is to prevent double kills from casts
|
||||
this.liveCounter++;
|
||||
|
||||
@@ -400,9 +400,9 @@ public class Resists {
|
||||
|
||||
// get resists from equipment
|
||||
if (ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) {
|
||||
if (ac.getCharItemManager() != null && ac.getCharItemManager().getEquipped() != null) {
|
||||
if (ac.charItemManager != null && ac.charItemManager.getEquipped() != null) {
|
||||
float[] phys = {0f, 0f, 0f};
|
||||
ConcurrentHashMap<Enum.EquipSlotType, Item> equip = ac.getCharItemManager().getEquipped();
|
||||
ConcurrentHashMap<Enum.EquipSlotType, Item> equip = ac.charItemManager.getEquipped();
|
||||
|
||||
// get base physical resists
|
||||
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.HELM), phys);
|
||||
|
||||
@@ -253,7 +253,7 @@ public class Shrine extends AbstractWorldObject implements Comparable<Shrine> {
|
||||
if (boonItem == null)
|
||||
return false;
|
||||
|
||||
if (!boonOwner.getCharItemManager().doesCharOwnThisItem(boonItem.getObjectUUID()))
|
||||
if (!boonOwner.charItemManager.doesCharOwnThisItem(boonItem.getObjectUUID()))
|
||||
return false;
|
||||
|
||||
for (ShrineType boonShrineType : boonItem.template.item_offering_info.keySet()) {
|
||||
@@ -271,8 +271,8 @@ public class Shrine extends AbstractWorldObject implements Comparable<Shrine> {
|
||||
}
|
||||
|
||||
this.favors += amount;
|
||||
boonOwner.getCharItemManager().delete(boonItem);
|
||||
boonOwner.getCharItemManager().updateInventory();
|
||||
boonOwner.charItemManager.delete(boonItem);
|
||||
boonOwner.charItemManager.updateInventory();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -98,7 +98,7 @@ public class Warehouse {
|
||||
return;
|
||||
|
||||
depositAmount = msg.getAmount();
|
||||
CharacterItemManager itemMan = player.getCharItemManager();
|
||||
CharacterItemManager itemMan = player.charItemManager;
|
||||
|
||||
if (!itemMan.doesCharOwnThisItem(resource.getObjectUUID()))
|
||||
return;
|
||||
@@ -250,7 +250,7 @@ public class Warehouse {
|
||||
if (warehouse.resources.get(resourceType) == null)
|
||||
return false;
|
||||
|
||||
CharacterItemManager itemMan = pc.getCharItemManager();
|
||||
CharacterItemManager itemMan = pc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
@@ -465,7 +465,7 @@ public class Warehouse {
|
||||
if (amount <= 0)
|
||||
return false;
|
||||
|
||||
CharacterItemManager itemMan = pc.getCharItemManager();
|
||||
CharacterItemManager itemMan = pc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
@@ -477,10 +477,10 @@ public class Warehouse {
|
||||
}
|
||||
|
||||
if (addToInventory && resourceType.equals(Enum.ResourceType.GOLD)) {
|
||||
if (pc.getCharItemManager().getGoldInventory().getNumOfItems() + amount > MBServerStatics.PLAYER_GOLD_LIMIT)
|
||||
if (pc.charItemManager.getGoldInventory().getNumOfItems() + amount > MBServerStatics.PLAYER_GOLD_LIMIT)
|
||||
return false;
|
||||
|
||||
if (pc.getCharItemManager().getGoldInventory().getNumOfItems() + amount < 0)
|
||||
if (pc.charItemManager.getGoldInventory().getNumOfItems() + amount < 0)
|
||||
return false;
|
||||
}
|
||||
int oldAmount = warehouse.resources.get(resourceType);
|
||||
@@ -551,7 +551,7 @@ public class Warehouse {
|
||||
if (amount <= 0)
|
||||
return false;
|
||||
|
||||
CharacterItemManager itemMan = pc.getCharItemManager();
|
||||
CharacterItemManager itemMan = pc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user