Minor update to keyset() usages

This commit is contained in:
2024-04-26 15:37:37 -04:00
parent 1b20201f8d
commit 46f35f0b10
+5 -7
View File
@@ -181,8 +181,7 @@ public class ItemTemplate {
JSONObject obj_sparse_json = jsonObject.getJSONObject("obj_sparse_data");
for (Object key : obj_sparse_json.keySet()) {
String sparseType = key.toString();
for (String sparseType : obj_sparse_json.keySet()) {
Object sparseValue = obj_sparse_json.get(sparseType);
obj_sparse_data.put(sparseType, sparseValue.toString());
}
@@ -202,9 +201,9 @@ public class ItemTemplate {
JSONObject resist_json = jsonObject.getJSONObject("combat_attack_resist");
for (String key : resist_json.keySet()) {
float resist = resist_json.getFloat(key);
combat_attack_resist.put(key, resist);
for (String resistType : resist_json.keySet()) {
float resistValue = resist_json.getFloat(resistType);
combat_attack_resist.put(resistType, resistValue);
}
// Parsing an enum
@@ -554,8 +553,7 @@ public class ItemTemplate {
JSONObject rune_sparse_json = jsonObject.getJSONObject("rune_sparse_data");
for (Object key : rune_sparse_json.keySet()) {
String sparseType = key.toString();
for (String sparseType : rune_sparse_json.keySet()) {
Object sparseValue = rune_sparse_json.get(sparseType);
rune_sparse_data.put(sparseType, sparseValue.toString());
}