Should add these to the hash map to prevent a NPE

Fixes #2333
This commit is contained in:
TfT_02 2014-10-25 17:33:55 +02:00
parent 5d246d2701
commit 0188629fe2

View File

@ -34,6 +34,8 @@ public final class HardcoreManager {
int playerSkillXpLevel = playerProfile.getSkillXpLevel(skillType); int playerSkillXpLevel = playerProfile.getSkillXpLevel(skillType);
if (playerSkillLevel <= 0 || playerSkillLevel <= levelThreshold) { if (playerSkillLevel <= 0 || playerSkillLevel <= levelThreshold) {
levelChanged.put(skillType.toString(), 0);
experienceChanged.put(skillType.toString(), 0F);
continue; continue;
} }
@ -75,6 +77,8 @@ public final class HardcoreManager {
int victimSkillLevel = victimProfile.getSkillLevel(skillType); int victimSkillLevel = victimProfile.getSkillLevel(skillType);
if (victimSkillLevel <= 0 || victimSkillLevel < killerSkillLevel / 2 || victimSkillLevel <= levelThreshold) { if (victimSkillLevel <= 0 || victimSkillLevel < killerSkillLevel / 2 || victimSkillLevel <= levelThreshold) {
levelChanged.put(skillType.toString(), 0);
experienceChanged.put(skillType.toString(), 0F);
continue; continue;
} }