Start mobequip refactor

This commit is contained in:
2024-03-18 10:01:29 -04:00
parent 0590ae64e7
commit 61c4cb1361
56 changed files with 198 additions and 377 deletions
+6 -6
View File
@@ -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;