|
|
@ -13,7 +13,6 @@ import org.json.simple.JSONArray; |
|
|
|
import org.json.simple.JSONObject; |
|
|
|
import org.json.simple.JSONObject; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -64,9 +63,13 @@ public class ItemTemplate { |
|
|
|
combat_attack_resist.put((String) key, resist); |
|
|
|
combat_attack_resist.put((String) key, resist); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reading arraylist of ints
|
|
|
|
|
|
|
|
|
|
|
|
JSONArray combat_json = (JSONArray) jsonObject.get("combat_powers"); |
|
|
|
JSONArray combat_json = (JSONArray) jsonObject.get("combat_powers"); |
|
|
|
combatPowers = (ArrayList) Arrays.asList(combat_json.toArray()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (combat_json.isEmpty() == false) |
|
|
|
|
|
|
|
for (Object o : combat_json) |
|
|
|
|
|
|
|
combatPowers.add(o); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|