Refactor various inventory functions

This commit is contained in:
Melledy
2025-11-12 03:33:00 -08:00
parent 2c74441583
commit 281d61d0ab
14 changed files with 61 additions and 87 deletions
@@ -181,7 +181,7 @@ public class Character implements GameDatabaseObject {
params.add(GameConstants.GOLD_ITEM_ID, (int) Math.ceil(exp * 0.15D));
// Verify that the player has the items
if (!this.getPlayer().getInventory().verifyItems(params)) {
if (!this.getPlayer().getInventory().hasItems(params)) {
return null;
}
@@ -207,7 +207,7 @@ public class Character implements GameDatabaseObject {
}
// Verify that the player has the items
if (!this.getPlayer().getInventory().verifyItems(data.getMaterials())) {
if (!this.getPlayer().getInventory().hasItems(data.getMaterials())) {
return null;
}
@@ -257,7 +257,7 @@ public class Character implements GameDatabaseObject {
}
// Verify that the player has the items
if (!this.getPlayer().getInventory().verifyItems(data.getMaterials())) {
if (!this.getPlayer().getInventory().hasItems(data.getMaterials())) {
return null;
}
@@ -161,7 +161,7 @@ public class GameDisc implements GameDatabaseObject {
params.add(GameConstants.GOLD_ITEM_ID, (int) Math.ceil(exp * 0.25D));
// Verify that the player has the items
if (!this.getPlayer().getInventory().verifyItems(params)) {
if (!this.getPlayer().getInventory().hasItems(params)) {
return null;
}
@@ -190,7 +190,7 @@ public class GameDisc implements GameDatabaseObject {
}
// Verify that the player has the items
if (!this.getPlayer().getInventory().verifyItems(data.getMaterials())) {
if (!this.getPlayer().getInventory().hasItems(data.getMaterials())) {
return null;
}
@@ -218,7 +218,7 @@ public class GameDisc implements GameDatabaseObject {
materials.add(this.getData().getTransformItemId(), count);
// Verify that the player has the items
if (!this.getPlayer().getInventory().verifyItems(materials)) {
if (!this.getPlayer().getInventory().hasItems(materials)) {
return null;
}