int[] item = weapons[i];
if(item == null)
{
continue;
}
L2Item itm = ItemTable.getInstance().getTemplate(i);
int[] price = getPvPWeaponPrice(itm);
if(price == null)
{
continue;
}
if(item[ItemTable.WEX_PVP1] > 0)
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA1] > 0 ? item[ItemTable.WEX_SA1] : i, 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_PVP1], 1));
list.addEntry(e1);
}
if(item[ItemTable.WEX_PVP2] > 0 && item[ItemTable.WEX_SA2] > 0)
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA2], 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_PVP2], 1));
list.addEntry(e1);
}
if(item[ItemTable.WEX_PVP3] > 0 && item[ItemTable.WEX_SA3] > 0)
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA3], 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_PVP3], 1));
list.addEntry(e1);
}
if(item[ItemTable.WEX_RARE_PVP1] > 0 && (item[ItemTable.WEX_RARE_SA1] > 0 || item[ItemTable.WEX_RARE] > 0))
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_RARE_SA1] > 0 ? item[ItemTable.WEX_RARE_SA1] : item[ItemTable.WEX_RARE], 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_RARE_PVP1], 1));
list.addEntry(e1);
}
if(item[ItemTable.WEX_RARE_PVP2] > 0 && item[ItemTable.WEX_RARE_SA2] > 0)
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_RARE_SA2], 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_RARE_PVP2], 1));
list.addEntry(e1);
}
if(item[ItemTable.WEX_RARE_PVP3] > 0 && item[ItemTable.WEX_RARE_SA3] > 0)
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_RARE_SA3], 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_RARE_PVP3], 1));
list.addEntry(e1);
}
}
int[][] armors = ItemTable.getInstance().getArmorEx();
for(int i = 0; i < armors.length; i++)
{
int[] item = armors[i];
if(item == null || item[ItemTable.AEX_PvP] <= 0)
{
continue;
}
L2Item itm = ItemTable.getInstance().getTemplate(item[ItemTable.AEX_UNSEALED_1] > 0 ? item[ItemTable.AEX_UNSEALED_1] : i);
int[] price = getPvPArmorPrice(itm);
if(price == null)
{
continue;
}
if(item[ItemTable.AEX_PvP] > 0)
{
MultiSellEntry e1 = new MultiSellEntry(entId++);
e1.addIngredient(new MultiSellIngredient(itm.getItemId(), 1));
e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
e1.addIngredient(new MultiSellIngredient(57, price[1]));
e1.addProduct(new MultiSellIngredient(item[ItemTable.AEX_PvP], 1));
list.addEntry(e1);
}