clue plugin: add support for league hotcold clues

This commit is contained in:
Adam
2019-11-16 14:56:49 -05:00
parent 7052977448
commit 1fd7ea1f92

View File

@@ -68,6 +68,10 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
"Jorral",
"Speak to Jorral to receive a strange device.",
new WorldPoint(2436, 3347, 0));
private static final HotColdClue MASTER_CLUE_LEAGUE = new HotColdClue("Buried beneath the ground, who knows where it's found. Lucky for you, A man called Watson may have a clue.",
"Watson",
"Speak to Watson to receive a strange device.",
new WorldPoint(1645, 3572, 0));
private final String text;
private final String npc;
@@ -89,6 +93,11 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
MASTER_CLUE.reset();
return MASTER_CLUE;
}
else if (MASTER_CLUE_LEAGUE.text.equalsIgnoreCase(text))
{
MASTER_CLUE_LEAGUE.reset();
return MASTER_CLUE_LEAGUE;
}
return null;
}
@@ -272,11 +281,11 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
final Set<HotColdTemperature> temperatureSet;
if (this.equals(BEGINNER_CLUE))
if (this == BEGINNER_CLUE)
{
temperatureSet = HotColdTemperature.BEGINNER_HOT_COLD_TEMPERATURES;
}
else if (this.equals(MASTER_CLUE))
else if (this == MASTER_CLUE || this == MASTER_CLUE_LEAGUE)
{
temperatureSet = HotColdTemperature.MASTER_HOT_COLD_TEMPERATURES;
}
@@ -300,8 +309,9 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
return false;
}
if ((this.equals(BEGINNER_CLUE) && temperature == HotColdTemperature.BEGINNER_VISIBLY_SHAKING)
|| (this.equals(MASTER_CLUE) && temperature == HotColdTemperature.MASTER_VISIBLY_SHAKING))
boolean master = this == MASTER_CLUE || this == MASTER_CLUE_LEAGUE;
if ((this == BEGINNER_CLUE && temperature == HotColdTemperature.BEGINNER_VISIBLY_SHAKING)
|| (master && temperature == HotColdTemperature.MASTER_VISIBLY_SHAKING))
{
markFinalSpot(localWorld);
}
@@ -327,11 +337,11 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
{
final boolean isBeginner;
if (this.equals(BEGINNER_CLUE))
if (this == BEGINNER_CLUE)
{
isBeginner = true;
}
else if (this.equals(MASTER_CLUE))
else if (this == MASTER_CLUE || this == MASTER_CLUE_LEAGUE)
{
isBeginner = false;
}