Skip to content
Snippets Groups Projects
Commit b2d4be48 authored by Chris Kearney's avatar Chris Kearney
Browse files

fixing this npe

parent 17901a35
No related branches found
No related tags found
No related merge requests found
......@@ -147,8 +147,10 @@ public class NpcBuilder {
public Npc createNpc() {
checkNotNull(gameManager);
if (loot.getLootGoldMin() > loot.getLootGoldMax()) {
throw new RuntimeException("Invalid loot configuration.");
if (loot != null ) {
if (loot.getLootGoldMin() > loot.getLootGoldMax()) {
throw new RuntimeException("Invalid loot configuration.");
}
}
return new Npc(gameManager, name, colorName, lastPhraseTimestamp, stats, dieMessage, temperament, roamAreas, validTriggers, loot, spawnRules, attackMessages, criticalAttackMessages, battleMessages, idleMessages);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment