Browse Source

Bugfix in variable name. "None" support.

combat-2
MagicBot 9 months ago
parent
commit
cf0b9a0ae0
  1. 7
      src/engine/objects/ItemTemplate.java

7
src/engine/objects/ItemTemplate.java

@ -102,7 +102,7 @@ public class ItemTemplate { @@ -102,7 +102,7 @@ public class ItemTemplate {
JSONArray eq_slots_and = (JSONArray) jsonObject.get("item_eq_slots_and");
if (eq_slots_and.isEmpty() == false)
for (Object o : eq_slots_or)
for (Object o : eq_slots_and)
item_eq_slots_and.add(Enum.ItemEquipSlotType.valueOf((String) o));
item_value = ((Long) jsonObject.get("item_value")).intValue();
@ -144,8 +144,11 @@ public class ItemTemplate { @@ -144,8 +144,11 @@ public class ItemTemplate {
JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");
if (itemflags.isEmpty() == false)
for (Object o : itemflags)
for (Object o : itemflags) {
String flag = (String) o;
if (flag.equals("None") == false)
item_flags.add(Enum.ItemFlags.valueOf((String) o));
}
JSONArray itemUseflags = (JSONArray) jsonObject.get("item_use_flags");

Loading…
Cancel
Save