From e086a1155b426f0fa38ca784314e739c9ee3e6c6 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 11 Jul 2020 11:46:22 -0400 Subject: [PATCH] xpdrops: fix recoloring xpdrops when prayer is flicked on the previous tick Previously the widget hidden event would not run until the next client tick, due to it being on a timer, and the game tick event being deferred until the next frame. Now that we are hooking to the script being executed it fires prior to the game tick event being fired. --- .../runelite/client/plugins/experiencedrop/XpDropPlugin.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/experiencedrop/XpDropPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/experiencedrop/XpDropPlugin.java index 987f5fffb2..4d2bac8f29 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/experiencedrop/XpDropPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/experiencedrop/XpDropPlugin.java @@ -68,7 +68,6 @@ public class XpDropPlugin extends Plugin private boolean correctPrayer; private Skill lastSkill = null; private Map previousSkillExpTable = new EnumMap<>(Skill.class); - private PrayerType currentTickPrayer; @Provides XpDropConfig provideConfig(ConfigManager configManager) @@ -103,7 +102,7 @@ public class XpDropPlugin extends Plugin xpdrop.setChildren(Arrays.copyOf(children, 1)); } - PrayerType prayer = currentTickPrayer; + PrayerType prayer = getActivePrayerType(); if (prayer == null) { resetTextColor(text); @@ -176,7 +175,6 @@ public class XpDropPlugin extends Plugin @Subscribe public void onGameTick(GameTick tick) { - currentTickPrayer = getActivePrayerType(); correctPrayer = false; final int fakeTickDelay = config.fakeXpDropDelay();