Merge pull request #561 from Sethtroll/fixslayerplugin
slayer plugin: add check for cachedXp when xp changes
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user