2
0
Эх сурвалжийг харах

BETA: Fix for recently created bug with items that was displayed for freight but they shouldn't :| Thanks Evilus

Rumen Nikiforov 14 жил өмнө
parent
commit
63e1c8cebe

+ 7 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java

@@ -241,11 +241,14 @@ public class PcInventory extends Inventory
 		FastList<L2ItemInstance> list = FastList.newInstance();
 		for (L2ItemInstance item : _items)
 		{
-			if (item == null)
+			if (item == null || !item.isAvailable(getOwner(), allowAdena, allowNonTradeable) || !canManipulateWithItemId(item.getItemId()))
 				continue;
-			else if (feightable && item.getLocation() == ItemLocation.INVENTORY && item.isFreightable())
-				list.add(item);
-			else if (item.isAvailable(getOwner(), allowAdena, allowNonTradeable) && canManipulateWithItemId(item.getItemId()))
+			else if (feightable)
+			{
+				if (item.getLocation() == ItemLocation.INVENTORY && item.isFreightable())
+					list.add(item);
+			}
+			else
 				list.add(item);
 		}