Merge pull request #561 from Sethtroll/fixslayerplugin

slayer plugin: add check for cachedXp when xp changes
This commit is contained in:
Tomas Slusny
2018-02-11 03:25:59 +01:00
committed by GitHub

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