Added config check for destroy

This commit is contained in:
Ceikry
2021-04-08 15:30:25 -05:00
parent 8f8d8b53a2
commit 0570094e5f
2 changed files with 3 additions and 2 deletions
@@ -7,6 +7,7 @@ import core.game.node.entity.player.link.audio.Audio;
import core.game.node.item.GroundItemManager;
import core.game.node.item.Item;
import rs09.game.system.SystemLogger;
import rs09.game.system.config.ItemConfigParser;
import rs09.game.world.GameWorld;
/**
@@ -37,7 +38,7 @@ public final class DropItemHandler {
}
player.getDialogueInterpreter().close();
player.getPulseManager().clear();
if (option.equalsIgnoreCase("destroy") || option.equalsIgnoreCase("dissolve")) {
if (option.equalsIgnoreCase("destroy") || option.equalsIgnoreCase("dissolve") || (boolean) item.getDefinition().getHandlers().getOrDefault(ItemConfigParser.DESTROY,false)) {
player.getDialogueInterpreter().open(9878, item);
return true;
}
@@ -60,7 +60,7 @@ class EasterEvent : WorldEvent("easter") {
override fun checkActive(): Boolean {
val isApril = Calendar.getInstance().get(Calendar.MONTH) == Calendar.APRIL
val isBefore9th = Calendar.getInstance().get(Calendar.DAY_OF_MONTH) < 9
return (isApril && isBefore9th)
return false
}
override fun initialize() {