Fixed bug blocking entry to Black Knights' Fortress

This commit is contained in:
Sam
2023-03-16 03:45:06 +00:00
committed by Ryan
parent 8b62e42323
commit ab2842af14
@@ -16,6 +16,9 @@ import core.game.world.repository.Repository;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import org.rs09.consts.Items;
import static core.api.ContentAPIKt.isEquipped;
/**
* Represents the black knights fortress node option plugin.
@@ -137,9 +140,10 @@ public final class BKFortressPlugin extends OptionHandler {
case 2337: // Guard Door - only check for uniform from outside
switch (player.getLocation().getY()) {
case 3514: // Outside constant Y location, block the player for checks
if(!player.getEquipment().containsAtLeastOneItem(1139) || !player.getEquipment().containsAtLeastOneItem(1101)){
player.getDialogueInterpreter().open(4605, Repository.findNPC(4604), true);
if(isEquipped(player, Items.BRONZE_MED_HELM_1139) && isEquipped(player, Items.IRON_CHAINBODY_1101)){
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
}
else player.getDialogueInterpreter().open(4605, Repository.findNPC(4604), true);
break;
case 3515: //Inside constant Y location, let the player through
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);