|
|
|
@ -418,14 +418,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createWeaponList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if (item.isWeapon() || (item.getItem().getType2() == L2Item.TYPE2_WEAPON) || (item.isEtcItem() && (item.getItemType() == EtcItemType.ARROW)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -433,7 +433,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -443,14 +443,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createArmorList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if (item.isArmor() || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -458,7 +458,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -468,14 +468,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createEtcItemList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if (item.isEtcItem() || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -483,7 +483,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -493,14 +493,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createMatList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (item.getEtcItem().getItemType() == EtcItemType.MATERIAL)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -508,7 +508,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -518,14 +518,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createRecipeList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (item.getEtcItem().getItemType() == EtcItemType.RECIPE)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -533,7 +533,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -543,14 +543,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createAmulettList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (item.getItemName().toUpperCase().startsWith("AMULET"))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -558,7 +558,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -568,14 +568,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createSpellbookList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (!item.getItemName().toUpperCase().startsWith("AMULET"))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -583,7 +583,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -593,14 +593,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createConsumableList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && ((item.getEtcItem().getItemType() == EtcItemType.SCROLL) || (item.getEtcItem().getItemType() == EtcItemType.SHOT))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -608,7 +608,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -618,14 +618,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createShotList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (item.getEtcItem().getItemType() == EtcItemType.SHOT)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -633,7 +633,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -643,14 +643,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createScrollList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (item.getEtcItem().getItemType() == EtcItemType.SCROLL)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -658,7 +658,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -668,14 +668,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createSeedList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && (item.getEtcItem().getItemType() == EtcItemType.SEED)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -683,7 +683,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -693,14 +693,14 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createOtherList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if ((item.isEtcItem() && ((item.getEtcItem().getItemType() != EtcItemType.MATERIAL) && (item.getEtcItem().getItemType() != EtcItemType.RECIPE) && (item.getEtcItem().getItemType() != EtcItemType.SCROLL) && (item.getEtcItem().getItemType() != EtcItemType.SHOT))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -708,7 +708,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -718,19 +718,19 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
|
|
|
|
*/
|
|
|
|
|
private List<L2WarehouseItem> createAllList(L2ItemInstance[] _items)
|
|
|
|
|
{
|
|
|
|
|
List<L2WarehouseItem> _list = new ArrayList<>();
|
|
|
|
|
List<L2WarehouseItem> list = new ArrayList<>();
|
|
|
|
|
for (L2ItemInstance item : _items)
|
|
|
|
|
{
|
|
|
|
|
if (_list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
if (list.size() < MAX_SORT_LIST_ITEMS)
|
|
|
|
|
{
|
|
|
|
|
_list.add(new L2WarehouseItem(item));
|
|
|
|
|
list.add(new L2WarehouseItem(item));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _list;
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|