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:
@@ -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;
|
||||
|
||||
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user