소스 검색

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

Rumen Nikiforov 14 년 전
부모
커밋
63e1c8cebe
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java

+ 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);
 		}