Fixed disappearing treasure trails caskets

Re-enabled and fixed treasure trails wizard spawning
This commit is contained in:
MatthewGould123 2022-08-18 23:59:15 +00:00 committed by Ryan
parent 21d334a989
commit 50e0fe9400
3 changed files with 6 additions and 8 deletions

View file

@ -78,7 +78,7 @@ public abstract class ClueScrollPlugin extends MapZone implements Plugin<Object>
/**
* Rewards the player with a casket.
* @param player the player.
* @param casket if we give a ckaset.
* @param casket if we give a casket.
*/
public void reward(Player player, boolean casket) {
Item clue = player.getInventory().getItem(new Item(getClueId()));

View file

@ -61,17 +61,17 @@ public abstract class CoordinateClueScroll extends MapClueScroll {
@Override
public void dig(Player player) {
/*int killed = player.getAttribute("killed-wizard", -1);
if (getLevel() == ClueLevel.HARD && killed == -1) {
int killedWizardClueId = player.getAttribute("killed-wizard", -1);
if (getLevel() == ClueLevel.HARD && (killedWizardClueId == -1 || killedWizardClueId != getClueId())) {
NPC wizard = player.getAttribute("t-wizard", null);
if (wizard != null && wizard.isActive()) {
return;
}
spawnWizard(player);
return;
}*/
}
super.dig(player);
//player.removeAttribute("killed-wizard");
player.removeAttribute("killed-wizard");
}
/**
@ -98,5 +98,4 @@ public abstract class CoordinateClueScroll extends MapClueScroll {
public String getClue() {
return clue;
}
}

View file

@ -61,8 +61,7 @@ public abstract class MapClueScroll extends ClueScrollPlugin {
p.sendMessage("Nothing interesting happens.");
return false;
}
reward(p, false);
level.open(p, null);
reward(p);
return true;
}
}