mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-20 01:29:54 +02:00
Refactor various inventory functions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user