forked from MagicBane/Server
Bane rank loaded from template
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user