Browse Source

Both sparse fields parsed

combat-2
MagicBot 9 months ago
parent
commit
1043c84b9d
  1. 6
      src/engine/objects/ItemTemplate.java

6
src/engine/objects/ItemTemplate.java

@ -127,7 +127,7 @@ public class ItemTemplate { @@ -127,7 +127,7 @@ public class ItemTemplate {
public int rune_group_role_set;
public boolean rune_renderable = false;
public int rune_natural_power_attack;
public HashMap<String, Integer> rune_sparse_data = new HashMap<>();
public HashMap<String, String> rune_sparse_data = new HashMap<>();
public ItemTemplate(JSONObject jsonObject) {
@ -169,7 +169,7 @@ public class ItemTemplate { @@ -169,7 +169,7 @@ public class ItemTemplate {
for (Object key : obj_sparse_json.keySet()) {
String sparseType = (String) key;
String sparseValue = (String) obj_sparse_json.get(key);
String sparseValue = (String) obj_sparse_json.get(sparseType);
obj_sparse_data.put(sparseType, sparseValue);
}
@ -499,7 +499,7 @@ public class ItemTemplate { @@ -499,7 +499,7 @@ public class ItemTemplate {
for (Object key : rune_sparse_json.keySet()) {
String sparseType = (String) key;
int sparseValue = ((Long) rune_sparse_json.get("sparseType")).intValue();
String sparseValue = (String) rune_sparse_json.get(sparseType);
rune_sparse_data.put(sparseType, sparseValue);
}

Loading…
Cancel
Save