Add iterable payItems methods

Shame they could never be fully generic, but oh well
This commit is contained in:
AnimeGitB
2022-08-17 23:52:03 +09:30
parent efa69c007d
commit 0cb75aeb5f
7 changed files with 60 additions and 33 deletions

View File

@@ -61,7 +61,7 @@ public class HandlerBuyGoodsReq extends PacketHandler {
costs.add(new ItemParamData(202, sg.getScoin()));
costs.add(new ItemParamData(201, sg.getHcoin()));
costs.add(new ItemParamData(203, sg.getMcoin()));
if (!session.getPlayer().getInventory().payItems(costs.toArray(new ItemParamData[0]), buyGoodsReq.getBuyCount())) {
if (!session.getPlayer().getInventory().payItems(costs, buyGoodsReq.getBuyCount())) {
return;
}