Kingdom Plugin: fix throne completion state check (#5874)

Now uses the correct varp from the quest list completion state script (1358).

Additionally, allows the infobox to show if the quest is in progress to allow users to check favor during the last part of the quest. 

Closes #1980
This commit is contained in:
trimbe
2018-10-08 03:00:10 -04:00
committed by Tomas Slusny
parent 27434ebc43
commit faacd79e3a
3 changed files with 9 additions and 2 deletions

View File

@@ -47,6 +47,13 @@ public enum VarPlayer
NMZ_REWARD_POINTS(1060),
/**
* 0 : not started
* greater than 0 : in progress
* greater than 99 : completed
*/
THRONE_OF_MISCELLANIA(359),
/**
* Experience tracker goal start.
*/

View File

@@ -342,7 +342,6 @@ public enum Varbits
*/
KINGDOM_FAVOR(72),
KINGDOM_COFFER(74),
THRONE_OF_MISCELLANIA_QUEST(359),
/**
* The Hand in the Sand quest status

View File

@@ -32,6 +32,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import static net.runelite.api.ItemID.TEAK_CHEST;
import net.runelite.api.VarPlayer;
import net.runelite.api.Varbits;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.VarbitChanged;
@@ -129,7 +130,7 @@ public class KingdomPlugin extends Plugin
private boolean hasCompletedQuest()
{
return client.getVar(Varbits.THRONE_OF_MISCELLANIA_QUEST) == 1;
return client.getVar(VarPlayer.THRONE_OF_MISCELLANIA) > 0;
}
static int getFavorPercent(int favor)