mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-21 03:15:59 +01:00
Add iterable payItems methods
Shame they could never be fully generic, but oh well
This commit is contained in:
@@ -122,7 +122,7 @@ public class InventorySystem extends BaseGameSystem {
|
||||
|
||||
// Confirm payment of materials and mora (assume food relics are payable afterwards)
|
||||
payList.add(new ItemParamData(202, moraCost));
|
||||
if (!player.getInventory().payItems(payList.toArray(new ItemParamData[0]))) {
|
||||
if (!player.getInventory().payItems(payList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public class InventorySystem extends BaseGameSystem {
|
||||
|
||||
// Confirm payment of materials and mora (assume food weapons are payable afterwards)
|
||||
payList.add(new ItemParamData(202, moraCost));
|
||||
if (!player.getInventory().payItems(payList.toArray(new ItemParamData[0]))) {
|
||||
if (!player.getInventory().payItems(payList)) {
|
||||
return;
|
||||
}
|
||||
player.getInventory().removeItems(foodWeapons);
|
||||
@@ -692,7 +692,7 @@ public class InventorySystem extends BaseGameSystem {
|
||||
if (proudSkill.getCoinCost() > 0) {
|
||||
costs.add(new ItemParamData(202, proudSkill.getCoinCost()));
|
||||
}
|
||||
if (!player.getInventory().payItems(costs.toArray(new ItemParamData[0]))) {
|
||||
if (!player.getInventory().payItems(costs)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user