Refactor boon handling

This commit is contained in:
2024-03-11 00:53:14 -04:00
parent 56b89b7080
commit 15d2f2b9d8
6 changed files with 4 additions and 131 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ public class ItemTemplate {
public String item_skill_mastery_used = "";
public int item_parry_anim_id;
public float item_bulk_factor;
public HashMap<String, Integer> item_offering_info = new HashMap<>();
public HashMap<Enum.ShrineType, Integer> item_offering_info = new HashMap<>();
public int item_defense_rating;
public float item_weapon_wepspeed;
public float item_weapon_max_range;
@@ -186,7 +186,7 @@ public class ItemTemplate {
JSONObject offering_entry = (JSONObject) entry;
String offering_type = ((String) offering_entry.get("offering_type")).replaceAll("-", "");
int offering_value = ((Long) offering_entry.get("offering_value")).intValue();
item_offering_info.put(offering_type, offering_value);
item_offering_info.put(Enum.ShrineType.valueOf(offering_type), offering_value);
}
// Fields only present for ARMOR