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;
}
int slayerExp = client.getSkillExperience(SLAYER);
if (slayerExp <= cachedXp)
{
return;
}
if (cachedXp == 0)
{
// this is the initial xp sent on login
cachedXp = client.getSkillExperience(SLAYER);
cachedXp = slayerExp;
return;
}
killedOne();
cachedXp = slayerExp;
}
@Subscribe