Browse Source

Merge remote-tracking branch 'origin/feature-json6' into feature-json6

combat-2
FatBoy-DOTC 8 months ago
parent
commit
f3d4a2becc
  1. 2
      src/engine/gameManager/CombatManager.java
  2. 6
      src/engine/objects/ItemTemplate.java

2
src/engine/gameManager/CombatManager.java

@ -312,7 +312,7 @@ public enum CombatManager {
//get Weapon //get Weapon
boolean isWeapon = true; boolean isWeapon = true;
Item weapon = equipped.get(slot); Item weapon = equipped.get(weaponSlot);
ItemBase wb = null; ItemBase wb = null;
if (weapon == null) if (weapon == null)

6
src/engine/objects/ItemTemplate.java

@ -166,8 +166,10 @@ public class ItemTemplate {
Object skill_used = jsonObject.get("item_skill_used"); Object skill_used = jsonObject.get("item_skill_used");
if (skill_used instanceof String) if (skill_used instanceof String) {
if (skill_used.equals("Cloth") == false)
item_skill_used = (String) skill_used; item_skill_used = (String) skill_used;
}
Object mastery_used = jsonObject.get("item_skill_mastery_used"); Object mastery_used = jsonObject.get("item_skill_mastery_used");
@ -265,6 +267,8 @@ public class ItemTemplate {
JSONObject skill_req = (JSONObject) o; JSONObject skill_req = (JSONObject) o;
String skill_type = (String) skill_req.get("skill_type"); String skill_type = (String) skill_req.get("skill_type");
int skill_level = ((Long) skill_req.get("skill_level")).intValue(); int skill_level = ((Long) skill_req.get("skill_level")).intValue();
if (skill_type.equals("Cloth") == false)
item_skill_required.put(skill_type, skill_level); item_skill_required.put(skill_type, skill_level);
} }

Loading…
Cancel
Save