Fishing Guild & Edgeville Fixes

This commit is contained in:
downthecrop
2022-01-11 06:25:42 +00:00
committed by Ryan
parent fb4296debd
commit 8f4a003db8
4 changed files with 12 additions and 11 deletions
@@ -30,12 +30,11 @@ public final class FishingGuild extends OptionHandler {
@Override
public boolean handle(Player player, Node node, String option) {
final int id = ((Scenery) node).getId();
switch (option) {
case "open":
switch (id) {
switch (node.getId()) {
case 2025:
if (player.getSkills().getStaticLevel(Skills.FISHING) < 68 && player.getLocation().withinDistance(new Location(2611, 3394, 0))) {
if (player.getSkills().getDynamicLevels()[Skills.FISHING] < 68 && player.getLocation().withinDistance(new Location(2611, 3394, 0))) {
player.getDialogueInterpreter().sendDialogues(308, null, "Hello, I'm afraid only the top fishers are allowed to use", "our premier fishing facilities.");
return true;
}
@@ -45,8 +45,7 @@ public final class EdgevilleNodePlugin extends OptionHandler {
@Override
public boolean handle(Player player, Node node, String option) {
int id = ((Scenery) node).getId();
switch (id) {
switch (node.getId()) {
case 9262:
case 9261:
case 30806:
@@ -82,14 +81,14 @@ public final class EdgevilleNodePlugin extends OptionHandler {
case 29319:
case 29320: // Edgeville Dungeon wilderness entrance
if (option.equalsIgnoreCase("open") && player.getLocation().getY() < 9918) {
Location endLocation = new Location(player.getLocation().getX(),player.getLocation().getY()+1);
player.getInterfaceManager().open(new Component(382));
player.getInterfaceManager().openComponent(382);
player.setAttribute("wildy_gate", node);
player.setAttribute("wildy_gate_loc",endLocation);
player.setAttribute("wildy_gate_loc",
Location.create(player.getLocation().getX(),player.getLocation().getY()+1));
}
else{ // Leaving the wilderness
Location endLocation = new Location(player.getLocation().getX(),player.getLocation().getY()-1);
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node,endLocation);
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node,
Location.create(player.getLocation().getX(),player.getLocation().getY()-1));
}
}
return true;