diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java index 5210edae27c0675d20d3947ee8ca6bc508af6b17..08a93fdeb1062375d554e72db3f72a9525dd87e6 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/AttackTrait.java @@ -38,7 +38,7 @@ public class AttackTrait extends L2Effect { private static final Logger _log = Logger.getLogger(AttackTrait.class.getName()); - private final Map<TraitType, Float> _attackTraits = new HashMap<>(); + private final Map<TraitType, Integer> _attackTraits = new HashMap<>(); /** * @param env @@ -54,12 +54,12 @@ public class AttackTrait extends L2Effect try { final TraitType traitType = TraitType.valueOf(param.getKey()); - final float value = (Float.parseFloat((String) param.getValue()) + 100) / 100; + final int value = Integer.parseInt((String) param.getValue()); _attackTraits.put(traitType, value); } catch (NumberFormatException e) { - _log.warning(getClass().getSimpleName() + ": value of " + param.getKey() + " enum must be float value " + param.getValue() + " found."); + _log.warning(getClass().getSimpleName() + ": value of " + param.getKey() + " enum must be int value " + param.getValue() + " found."); } catch (Exception e) { @@ -85,9 +85,14 @@ public class AttackTrait extends L2Effect final CharStat charStat = getEffected().getStat(); synchronized (charStat.getAttackTraits()) { - for (Entry<TraitType, Float> trait : _attackTraits.entrySet()) + for (Entry<TraitType, Integer> trait : _attackTraits.entrySet()) { - charStat.getAttackTraits()[trait.getKey().getId()] *= trait.getValue(); + if (trait.getValue() == 0) + { + continue; + } + + charStat.getAttackTraits()[trait.getKey().getId()] *= (trait.getValue() + 100) / 100f; charStat.getAttackTraitsCount()[trait.getKey().getId()]++; } } @@ -100,9 +105,14 @@ public class AttackTrait extends L2Effect final CharStat charStat = getEffected().getStat(); synchronized (charStat.getAttackTraits()) { - for (Entry<TraitType, Float> trait : _attackTraits.entrySet()) + for (Entry<TraitType, Integer> trait : _attackTraits.entrySet()) { - charStat.getAttackTraits()[trait.getKey().getId()] /= trait.getValue(); + if (trait.getValue() == 0) + { + continue; + } + + charStat.getAttackTraits()[trait.getKey().getId()] /= (trait.getValue() + 100) / 100f; charStat.getAttackTraitsCount()[trait.getKey().getId()]--; } } diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java index fb4617dce1894823c90af0a0fa2ac75ff78569fb..190a6bd663bb589afd9f19400f1f66875d99e4e2 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DefenceTrait.java @@ -38,7 +38,7 @@ public class DefenceTrait extends L2Effect { private static final Logger _log = Logger.getLogger(DefenceTrait.class.getName()); - private final Map<TraitType, Float> _defenceTraits = new HashMap<>(); + private final Map<TraitType, Integer> _defenceTraits = new HashMap<>(); /** * @param env @@ -54,12 +54,12 @@ public class DefenceTrait extends L2Effect try { final TraitType traitType = TraitType.valueOf(param.getKey()); - final float value = (Float.parseFloat((String) param.getValue()) + 100) / 100; + final int value = Integer.parseInt((String) param.getValue()); _defenceTraits.put(traitType, value); } catch (NumberFormatException e) { - _log.warning(getClass().getSimpleName() + ": value of " + param.getKey() + " enum must be float value " + param.getValue() + " found."); + _log.warning(getClass().getSimpleName() + ": value of " + param.getKey() + " enum must be int value " + param.getValue() + " found."); } catch (Exception e) { @@ -85,11 +85,15 @@ public class DefenceTrait extends L2Effect final CharStat charStat = getEffected().getStat(); synchronized (charStat.getDefenceTraits()) { - for (Entry<TraitType, Float> trait : _defenceTraits.entrySet()) + for (Entry<TraitType, Integer> trait : _defenceTraits.entrySet()) { - if (trait.getValue() < 2.0f) + if (trait.getValue() == 0) { - charStat.getDefenceTraits()[trait.getKey().getId()] *= trait.getValue(); + continue; + } + else if (trait.getValue() < 100) + { + charStat.getDefenceTraits()[trait.getKey().getId()] *= (trait.getValue() + 100) / 100f; charStat.getDefenceTraitsCount()[trait.getKey().getId()]++; } else @@ -107,11 +111,15 @@ public class DefenceTrait extends L2Effect final CharStat charStat = getEffected().getStat(); synchronized (charStat.getDefenceTraits()) { - for (Entry<TraitType, Float> trait : _defenceTraits.entrySet()) + for (Entry<TraitType, Integer> trait : _defenceTraits.entrySet()) { - if (trait.getValue() < 2.0f) + if (trait.getValue() == 0) + { + continue; + } + else if (trait.getValue() < 100) { - charStat.getDefenceTraits()[trait.getKey().getId()] /= trait.getValue(); + charStat.getDefenceTraits()[trait.getKey().getId()] /= (trait.getValue() + 100) / 100f; charStat.getDefenceTraitsCount()[trait.getKey().getId()]--; } else diff --git a/L2J_DataPack_BETA/dist/game/data/stats/skills/04400-04499.xml b/L2J_DataPack_BETA/dist/game/data/stats/skills/04400-04499.xml index 5c9456745c280f2c50f8e2a4282cd0ed4f9d48ca..75b197f76de8d8397bc953355842dd75ab9f01fa 100644 --- a/L2J_DataPack_BETA/dist/game/data/stats/skills/04400-04499.xml +++ b/L2J_DataPack_BETA/dist/game/data/stats/skills/04400-04499.xml @@ -258,18 +258,18 @@ <skill id="4416" levels="25" name="Races"> <!-- Confirmed CT2.5 --> <table name="#icons"> icon.skill4290 icon.skill4291 icon.skill4292 icon.skill4293 icon.skill4294 icon.skill4295 icon.skill4296 icon.skill4297 icon.skill4298 icon.skill4299 icon.skill4300 icon.skill4301 icon.skill4302 icon.skill4416_human icon.skill4416_elf icon.skill4416_darkelf icon.skill4416_orc icon.skill4416_dwarf icon.skill4416_etc icon.skill4416_none icon.skill4416_siegeweapon icon.skill4416_castleguard icon.skill4416_mercenary icon.skill4416_none icon.skill4296 </table> - <table name="#pDefAnimals"> 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefBeasts"> 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefBlunts"> 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefBows"> 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefBugs"> 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefDragons"> 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefDuals"> 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefGiants"> 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefMagicCreatures"> 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefPlants"> 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefAnimals"> 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefBeasts"> 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefBlunts"> 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefBows"> 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefBugs"> 0 0 0 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefDragons"> 0 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefDuals"> 0 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefGiants"> 0 0 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefMagicCreatures"> 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefPlants"> 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> <table name="#pDefShocks"> 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> - <table name="#pDefSwords"> 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> + <table name="#pDefSwords"> 0 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </table> <set name="icon" val="#icons" /> <set name="magicLvl" val="1" /> <set name="operateType" val="P" /> @@ -295,8 +295,8 @@ <!-- Confirmed CT2.5 --> <table name="#icons"> icon.skill4293 icon.skill4292 icon.skill4292 icon.skill4292 icon.skill4292 icon.skill4301 icon.skill4301 icon.skill4301 icon.skill4291 icon.skill4291 icon.skill4291 icon.skill4298 icon.skill4298 icon.skill4298 icon.skill4297 icon.skill4297 icon.skill4297 icon.skill4299 icon.skill4296 icon.skill4296 icon.skill4296 icon.skill4296 icon.skill4296 icon.skill4302 icon.skill4300 icon.skill4295 icon.skill4295 icon.skill4295 icon.skill4295 icon.skill4295 icon.skill4295 icon.skill4295 icon.skill4294 icon.skill4290 icon.skill4290 icon.skill4290 icon.skill4290 icon.skill4290 </table> <table name="#pDefBleed"> 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 </table> - <table name="#pDefBlunts"> 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 </table> - <table name="#pDefBows"> 0 0 15 15 15 0 0 15 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 </table> + <table name="#pDefBlunts"> 0 0 0 0 0 0 0 0 0 -15 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 </table> + <table name="#pDefBows"> 0 0 -15 -15 -15 0 0 -15 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 </table> <table name="#pDefDagger"> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 </table> <table name="#pDefDualDagger"> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 </table> <table name="#pDefHold"> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 </table>