Browse Source

rune_skill_grant parsed

combat-2
MagicBot 8 months ago
parent
commit
0966b82d5f
  1. 5
      src/engine/objects/ItemTemplate.java

5
src/engine/objects/ItemTemplate.java

@ -103,7 +103,7 @@ public class ItemTemplate { @@ -103,7 +103,7 @@ public class ItemTemplate {
public HashMap<Enum.AttributeType, Integer> rune_attr_adj = new HashMap<>();
public HashMap<Enum.AttributeType, Integer> rune_max_attr_adj = new HashMap<>();
public HashMap<Enum.AttributeType, Integer> rune_skill_grant = new HashMap<>();
public HashMap<String, Integer> rune_skill_grant = new HashMap<>();
public ItemTemplate(JSONObject jsonObject) {
@ -436,9 +436,8 @@ public class ItemTemplate { @@ -436,9 +436,8 @@ public class ItemTemplate {
for (Object o : skill_grant_json) {
JSONObject skill_granted = (JSONObject) o;
String typeString = (String) skill_granted.get("skill_type");
Enum.AttributeType attributeType = Enum.AttributeType.valueOf(typeString);
int skill_level = ((Long) skill_granted.get("skill_value")).intValue();
rune_skill_grant.put(attributeType, skill_level);
rune_skill_grant.put(typeString, skill_level);
}
}

Loading…
Cancel
Save