item_wt refactored to template

This commit is contained in:
2024-03-03 15:06:44 -05:00
parent 58652ee32f
commit 4dc0f52295
12 changed files with 101 additions and 120 deletions
+5 -3
View File
@@ -715,7 +715,7 @@ public class Warehouse extends AbstractWorldObject {
return false;
if (addToInventory)
if (!itemMan.hasRoomInventory(ib.getWeight())) {
if (!itemMan.hasRoomInventory(template.item_wt)) {
ChatManager.chatSystemInfo(pc, "You can not carry any more of that item.");
return false;
}
@@ -790,7 +790,9 @@ public class Warehouse extends AbstractWorldObject {
if (pc == null)
return false;
if (ib == null)
ItemTemplate template = ItemTemplate.itemTemplates.get(ib.getUUID());
if (template == null)
return false;
if (warehouse.resources.get(ib) == null)
@@ -804,7 +806,7 @@ public class Warehouse extends AbstractWorldObject {
if (itemMan == null)
return false;
if (!itemMan.hasRoomInventory(ib.getWeight())) {
if (!itemMan.hasRoomInventory(template.item_wt)) {
ChatManager.chatSystemInfo(pc, "You can not carry any more of that item.");
return false;
}