slayer plugin: add check for cachedXp when xp changes

This commit is contained in:
Seth
2018-02-09 21:53:19 -06:00
parent 3465fb7288
commit 6f0c7c7431

View File

@@ -264,14 +264,22 @@ public class SlayerPlugin extends Plugin
return; return;
} }
int slayerExp = client.getSkillExperience(SLAYER);
if (slayerExp <= cachedXp)
{
return;
}
if (cachedXp == 0) if (cachedXp == 0)
{ {
// this is the initial xp sent on login // this is the initial xp sent on login
cachedXp = client.getSkillExperience(SLAYER); cachedXp = slayerExp;
return; return;
} }
killedOne(); killedOne();
cachedXp = slayerExp;
} }
@Subscribe @Subscribe