Start mobequip refactor
This commit is contained in:
@@ -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