small changes based on review

This commit is contained in:
Player Name 2026-07-14 12:58:48 +02:00
parent 7bd8a8b3e9
commit 9daaeb780c
3 changed files with 5 additions and 7 deletions

View file

@ -73,7 +73,6 @@ public final class StaircasePlugin extends OptionHandler {
SceneryBuilder.replace(object, object.transform(object.getId() - 3));
return true;
case "remove-room":
int currentZ = player.getLocation().getZ();
int chunkX = player.getLocation().getChunkX();
int chunkY = player.getLocation().getChunkY();
@ -91,7 +90,7 @@ public final class StaircasePlugin extends OptionHandler {
// From ground floor (z=0), stairs could lead to 1st floor (z=1) or the dungeon (z=3)
} else {
// garden dungeon entrance and oubliette ladders don't need a height selection
if(node.getId() == 13409 || node.getId() == 13675 || node.getId() == 13676 || node.getId() == 13677 || node.getId() == 13678 || node.getId() == 13679 || node.getId() == 13680) {
if (node.getId() == 13409 || node.getId() == 13675 || node.getId() == 13676 || node.getId() == 13677 || node.getId() == 13678 || node.getId() == 13679 || node.getId() == 13680) {
player.getDialogueInterpreter().open("con:remove", null, new int[]{chunkX, chunkY}, 3);
} else {
player.getDialogueInterpreter().sendOptions("Remove which room?", "Room Above", "Room Below", "Cancel");
@ -111,7 +110,6 @@ public final class StaircasePlugin extends OptionHandler {
}
return true;
case "climb":
if (HouseManager.isInDungeon(player)) {
climb(player, 1, house, object);
@ -475,4 +473,4 @@ public final class StaircasePlugin extends OptionHandler {
}
}
}
}

View file

@ -283,7 +283,7 @@ class TFTInteractionListeners : InteractionListener {
val objects = player.location.region.assembleObjectList(player.location.z)
objects.shuffle()
for (o in objects) {
if (o.id == 5138) {
if (o.id == Scenery.PORTAL_5138) {
return o.location
}
}

View file

@ -101,7 +101,7 @@ class AlomoneDialogue(player: Player? = null) : DialoguePlugin(player) {
26 -> {
end()
removeItem(player, HAZEEL_SCROLL)
val hazeel = player.findNpcInViewport(NPCs.HAZEEL_892)
val hazeel = player.findNearbyNPC(NPCs.HAZEEL_892)
hazeel?.clear()
removeAttribute(player,"hazeelSpawned")
finishQuest(player, Quests.HAZEEL_CULT)
@ -130,7 +130,7 @@ class AlomoneDialogue(player: Player? = null) : DialoguePlugin(player) {
// this has the potential to remove other players' hazeels, but the player could still complete the quest by either continuing their
// active dialogue or speaking to alomone, and just dealing with the fact that their hazeel is not on the map. relogging and restarting
// the dialogue would get these players a new hazeel.
private fun Player.findNpcInViewport(npcId: Int): NPC? {
private fun Player.findNearbyNPC(npcId: Int): NPC? {
for (npc in RegionManager.getLocalNPCs(location)) {
if (npc.id == npcId) {
return npc