Fix incorrect slayer kill remaining count in xp tracker (#6615)

Properly check for combat skill when trying to update NPC experience

Fixes #6614
This commit is contained in:
Davis Cook
2018-11-23 16:23:41 -05:00
committed by Tomas Slusny
parent 4bd247b5e5
commit 57711cc9ff
2 changed files with 3 additions and 2 deletions

View File

@@ -196,7 +196,8 @@ class XpStateSingle
}
else
{
// So we have a decent average off the bat, lets populate all values with what we see.
// populate all values in our action history array with this first value that we see
// so the average value of our action history starts out as this first value we see
for (int i = 0; i < action.getActionExps().length; i++)
{
action.getActionExps()[i] = actionExp;

View File

@@ -263,7 +263,7 @@ public class XpTrackerPlugin extends Plugin
state.setActionType(XpActionType.EXPERIENCE);
final Actor interacting = client.getLocalPlayer().getInteracting();
if (interacting instanceof NPC)
if (interacting instanceof NPC && COMBAT.contains(skill))
{
final NPC npc = (NPC) interacting;
xpState.updateNpcExperience(skill, npc, npcManager.getHealth(npc.getName(), npc.getCombatLevel()));