Fix NPE when custom code changes a player's HP (#458)

This commit is contained in:
CanIGetaPR authored and Ronan Lana committed 2019-05-01 13:24:27 -03:00
1 parent 4df2a22422
commit 1213fff1ed
1 file changed
+2 -1
+2 -1
View File
@@ -8605,9 +8605,10 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
} }
} }
}; };
if (map != null) {
map.registerCharacterStatUpdate(r); map.registerCharacterStatUpdate(r);
} }
}
private Pair<MapleStat, Integer> calcHpRatioUpdate(int newHp, int oldHp) { private Pair<MapleStat, Integer> calcHpRatioUpdate(int newHp, int oldHp) {
int delta = newHp - oldHp; int delta = newHp - oldHp;