Fixed bug preventing Quests with no quest stages from loading.

This commit is contained in:
Zukero
2017-08-18 11:51:48 +02:00
parent ec3afaaf36
commit cfb38c33d6

View File

@@ -99,8 +99,8 @@ public class Quest extends JSONElement {
public void parse(Map questJson) {
this.visible_in_log = JSONElement.getInteger((Number) questJson.get("showInLog"));
List questStagesJson = (List) questJson.get("stages");
this.stages = new ArrayList<QuestStage>();
if (questStagesJson != null && !questStagesJson.isEmpty()) {
this.stages = new ArrayList<QuestStage>();
for (Object questStageJsonObj : questStagesJson) {
Map questStageJson = (Map)questStageJsonObj;
QuestStage questStage = new QuestStage(this);