2 second function overload fix

This commit is contained in:
ceikry
2021-12-21 18:24:58 -06:00
parent 67cb61b871
commit b0c231459b
4 changed files with 3 additions and 14 deletions
@@ -54,7 +54,7 @@ public abstract class Consumable implements Plugin<Object> {
} else removeItem(player, item, Container.INVENTORY);
if (nextItemId != -1) {
addItem(player, nextItemId, 1);
addItem(player, nextItemId, 1, Container.INVENTORY);
}
final int initialLifePoints = player.getSkills().getLifepoints();
Consumables.getConsumableById(item.getId()).effect.activate(player);
@@ -8,6 +8,7 @@ import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
import core.game.node.entity.player.Player;
import core.plugin.Plugin;
import org.rs09.consts.Items;
/**
* @author 'Vexia
@@ -41,7 +41,7 @@ public final class HerbCleanPlugin extends OptionHandler {
double exp = herb.getExperience();
if (removeItem(player, node.asItem(), Container.INVENTORY)){
player.getSkills().addExperience(Skills.HERBLORE, exp, true);
addItem(player, herb.getProduct().getId(), 1);
addItem(player, herb.getProduct().getId(), 1, Container.INVENTORY);
player.getAudioManager().send(SFX_IDS[RandomFunction.random(SFX_IDS.length)], 1);
player.getPacketDispatch().sendMessage("You clean the dirt from the " + herb.getProduct().getName().toLowerCase().replace("clean", "").trim() + " leaf.");
}