spec plugin: only count specs on npcs

This commit is contained in:
Adam
2019-03-24 15:58:12 -04:00
parent 1db3bf577f
commit 57b600a257

View File

@@ -126,9 +126,9 @@ public class SpecialCounterPlugin extends Plugin
return; return;
} }
checkInteracting(); int interactingId = checkInteracting();
if (specialHitpointsExperience != -1 && specialUsed) if (interactingId > -1 && specialHitpointsExperience != -1 && specialUsed)
{ {
specialUsed = false; specialUsed = false;
int hpXp = client.getSkillExperience(Skill.HITPOINTS); int hpXp = client.getSkillExperience(Skill.HITPOINTS);
@@ -145,7 +145,7 @@ public class SpecialCounterPlugin extends Plugin
} }
} }
private void checkInteracting() private int checkInteracting()
{ {
Player localPlayer = client.getLocalPlayer(); Player localPlayer = client.getLocalPlayer();
Actor interacting = localPlayer.getInteracting(); Actor interacting = localPlayer.getInteracting();
@@ -168,7 +168,11 @@ public class SpecialCounterPlugin extends Plugin
} }
} }
return interactingId;
} }
return -1;
} }
@Subscribe @Subscribe