item_wt refactored to template
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user