Check if any experience was gained in skill before tracking action

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-11-08 20:12:02 +01:00
parent 2ef18df1c7
commit aaf390324e
2 changed files with 1 additions and 2 deletions

View File

@@ -199,7 +199,6 @@ class XpPanel extends PluginPanel
} }
} }
void updateTotal(XpSnapshotTotal xpSnapshotTotal) void updateTotal(XpSnapshotTotal xpSnapshotTotal)
{ {
// if player has gained exp and hasn't switched displays yet, hide error panel and show overall info // if player has gained exp and hasn't switched displays yet, hide error panel and show overall info

View File

@@ -187,7 +187,7 @@ class XpState
{ {
XpStateSingle state = getSkill(skill); XpStateSingle state = getSkill(skill);
if (state.getStartXp() == -1 || npcHealth == null || npc != interactedNPC) if (state.getXpGained() <= 0 || npcHealth == null || npc != interactedNPC)
{ {
return XpUpdateResult.NO_CHANGE; return XpUpdateResult.NO_CHANGE;
} }