Bane rank loaded from template

This commit is contained in:
2024-04-10 17:22:45 -04:00
parent f6c53e51ed
commit 7f579e5268
2 changed files with 22 additions and 6 deletions
+7
View File
@@ -133,6 +133,7 @@ public class ItemTemplate {
public final EnumSet<mbEnums.MonsterType> rune_not_enemy_monster_types = EnumSet.noneOf(mbEnums.MonsterType.class);
public final ArrayList<Integer> rune_groupee_monster_types = new ArrayList<>();
public final ArrayList<Integer> rune_helper_monster_types = new ArrayList<>();
public int item_bane_rank;
public ItemTemplate(JSONObject jsonObject) {
@@ -178,6 +179,12 @@ public class ItemTemplate {
obj_sparse_data.put(sparseType, sparseValue.toString());
}
// Banes are defined by their sparse data field
if (obj_sparse_data.entrySet().contains("ACTIONRESPONSE"))
if (obj_sparse_data.get("ACTIONRESPONSE").equals("4250517122"))
item_bane_rank = ((Long) jsonObject.get("item_bane_rank")).intValue();
// Reading float values
combat_health_current = ((Double) jsonObject.get("combat_health_current")).floatValue();