mirror of
https://github.com/Melledy/Nebula.git
synced 2026-11-04 21:36:51 +01:00
Fix energy drinks not giving the correct amount of energy
This commit is contained in:
1 parent
8d4736c00e
commit
f123004c9d
1 file changed
+6
-1
@@ -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