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.
This commit is contained in:
@@ -68,7 +68,6 @@ public class XpDropPlugin extends Plugin
|
||||
private boolean correctPrayer;
|
||||
private Skill lastSkill = null;
|
||||
private Map<Skill, Integer> 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();
|
||||
|
||||
Reference in New Issue
Block a user