gameserver.network.clientpackets; MultiSellChoose.java
sitas neleis pirkt > 1 ir neleis pirkt jei inventoriuj vietoj nebus pakankamai, bent turetu taip but
int slotsLeft = player.getInventoryLimit() - player.getInventory().getSize();
int slotsTaken = 0;
for (final MultiSellIngredient e : entry.getProducts())
{
if(!ItemTable.getInstance().createDummyItem(e.getItemId()).isStackable())
{
slotsTaken += e.getItemCount();
if(_amount > 1)
{
player.sendMessage("Can not buy more than one stackable item.");
return;
}
}
else
slotsTaken++;
if(slotsTaken > slotsLeft)
{
player.sendMessage("Not enough space in inventory.");
return;
}
}
orientuokis koda idet tiesiai po
final MultiSellEntry entry = prepareEntry(merchant, templateEntry, applyTaxes, maintainEnchantment, enchantment);
sita koda rasydamas dar viena svarbu faktoriu uzmirsau, jei zmogus jau tures stackable itema kuri pirks inventoriuj ir inventorius bus pilnas, vistiek parasys, kad nepakankamai vietos ;D
Paskutinį kartą redagavo: 16 Rugsėjo 2015 - 14:19