{
player.setMultiSellId(-1);
return;
}
MultiSellListContainer list = L2Multisell.getInstance().getList(_listId);
int selectedList = player.getMultiSellId();
if (list == null || list.getListId() != _listId || selectedList!=_listId)
{
player.setMultiSellId(-1);
return;
}
if (player.isCastingNow()|| player.isCastingPotionNow())
{
player.sendPacket(ActionFailed.STATIC_PACKET);
player.setMultiSellId(-1);
return;
}
for (MultiSellEntry entry : list.getEntries())
{
if(entry.getEntryId() == _entryId)
{
doExchange(player, entry, list.getApplyTaxes(), list.getMaintainEnchantment(), _enchantment);
//dnt change multisell on exchange to avoid new window open need
//player.setMultiSellId(-1);
return;
}