Clean up code, replace switch and try-with-resource where possible.

This commit is contained in:
Đạt Nhân Trương
2022-08-07 21:51:10 +07:00
parent f983b4dccf
commit 0ef3e69638
22 changed files with 609 additions and 589 deletions

View File

@@ -111,12 +111,15 @@ public class Quest {
if (startReqData != null) {
for (Data startReq : startReqData.getChildren()) {
QuestRequirementType type = QuestRequirementType.getByWZName(startReq.getName());
if (type.equals(QuestRequirementType.INTERVAL)) {
switch (type) {
case INTERVAL:
repeatable = true;
} else if (type.equals(QuestRequirementType.MOB)) {
break;
case MOB:
for (Data mob : startReq.getChildren()) {
relevantMobs.add(DataTool.getInt(mob.getChildByPath("id")));
}
break;
}
AbstractQuestRequirement req = this.getRequirement(type, startReq);