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

@@ -81,7 +81,7 @@ public class CombineManger extends BaseGameSystem {
List<ItemParamData> material = new ArrayList<>(combineData.getMaterialItems());
material.add(new ItemParamData(202, combineData.getScoinCost()));
boolean success = player.getInventory().payItems(material.toArray(new ItemParamData[0]), count, ActionReason.Combine);
boolean success = player.getInventory().payItems(material, count, ActionReason.Combine);
// abort if not enough material
if (!success) {