Added config check for destroy
This commit is contained in:
@@ -7,6 +7,7 @@ import core.game.node.entity.player.link.audio.Audio;
|
|||||||
import core.game.node.item.GroundItemManager;
|
import core.game.node.item.GroundItemManager;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import rs09.game.system.SystemLogger;
|
import rs09.game.system.SystemLogger;
|
||||||
|
import rs09.game.system.config.ItemConfigParser;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,7 +38,7 @@ public final class DropItemHandler {
|
|||||||
}
|
}
|
||||||
player.getDialogueInterpreter().close();
|
player.getDialogueInterpreter().close();
|
||||||
player.getPulseManager().clear();
|
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);
|
player.getDialogueInterpreter().open(9878, item);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ class EasterEvent : WorldEvent("easter") {
|
|||||||
override fun checkActive(): Boolean {
|
override fun checkActive(): Boolean {
|
||||||
val isApril = Calendar.getInstance().get(Calendar.MONTH) == Calendar.APRIL
|
val isApril = Calendar.getInstance().get(Calendar.MONTH) == Calendar.APRIL
|
||||||
val isBefore9th = Calendar.getInstance().get(Calendar.DAY_OF_MONTH) < 9
|
val isBefore9th = Calendar.getInstance().get(Calendar.DAY_OF_MONTH) < 9
|
||||||
return (isApril && isBefore9th)
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initialize() {
|
override fun initialize() {
|
||||||
|
|||||||
Reference in New Issue
Block a user