За что отвечает эта функция и если кто знает как она называется на сборке lostworle
public void SimpleExchange(String[] param)
{
if(param.length < 4)
throw new IllegalArgumentException();
Player player = getSelf();
if(player == null)
return;
int itemToTake = Integer.parseInt(param[0]);
long countToTake = Long.parseLong(param[1]);
int itemToGive = Integer.parseInt(param[2]);
long countToGive = Long.parseLong(param[3]);
if(getItemCount(player, itemToTake) < countToTake)
{
player.sendPacket(itemToTake == 57 ? SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_ADENA : SystemMsg.INCORRECT_ITEM_COUNT);
return;
}
removeItem(player, itemToTake, countToTake);
addItem(player, itemToGive, countToGive);
}
{
if(param.length < 4)
throw new IllegalArgumentException();
Player player = getSelf();
if(player == null)
return;
int itemToTake = Integer.parseInt(param[0]);
long countToTake = Long.parseLong(param[1]);
int itemToGive = Integer.parseInt(param[2]);
long countToGive = Long.parseLong(param[3]);
if(getItemCount(player, itemToTake) < countToTake)
{
player.sendPacket(itemToTake == 57 ? SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_ADENA : SystemMsg.INCORRECT_ITEM_COUNT);
return;
}
removeItem(player, itemToTake, countToTake);
addItem(player, itemToGive, countToGive);
}