sendResult(player, BR_BUY_LACK_OF_POINT);
return;
}
}
validateMyPoints(player);
L2Item dummy = ItemTable.getInstance().getTemplate(item.template.itemId);
if(dummy.isStackable())
{
if(!player.getInventory().validateWeight(dummy.getWeight() * item.count * count))
{
sendResult(player, BR_BUY_INVENTROY_OVERFLOW);
return;
}
if(player.getInventory().getItemByItemId(item.template.itemId) == null && !player.getInventory().validateCapacity(1))
{
sendResult(player, BR_BUY_INVENTROY_OVERFLOW);
return;
}
player.getInventory().addItem(item.template.itemId, item.count * count);
player.sendPacket(new SystemMessage(53).addItemName(item.template.itemId).addNumber(count));
}
else
{
if(!player.getInventory().validateCapacity(item.count * count) || !player.getInventory().validateWeight(dummy.getWeight() * item.count * count))
{
sendResult(player, BR_BUY_INVENTROY_OVERFLOW);
return;
}
for(int i = 0; i < count * item.count; i++)