mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-12 20:34:36 +01:00
Fix energy drinks not giving the correct amount of energy
This commit is contained in:
@@ -678,6 +678,11 @@ public class Inventory extends PlayerManager implements GameDatabaseObject {
|
||||
change = new PlayerChangeInfo();
|
||||
}
|
||||
|
||||
// Sanity check
|
||||
if (count <= 0) {
|
||||
return change;
|
||||
}
|
||||
|
||||
// Get item data
|
||||
var data = GameData.getItemDataTable().get(id);
|
||||
if (data == null || data.getUseParams() == null) {
|
||||
@@ -696,7 +701,7 @@ public class Inventory extends PlayerManager implements GameDatabaseObject {
|
||||
switch (data.getUseAction()) {
|
||||
case 2 -> {
|
||||
// Add items
|
||||
this.addItems(data.getUseParams(), change);
|
||||
this.addItems(data.getUseParams().mulitply(count), change);
|
||||
|
||||
// Success
|
||||
success = true;
|
||||
|
||||
Reference in New Issue
Block a user