From ac48741739437ddde1ed9719427e18f396c93571 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Thu, 17 Aug 2017 19:45:20 +0000
Subject: [PATCH] More skill enchant improvements.
---
.../dist/game/data/EnchantSkillGroups.xml | 18 +++++++--------
.../util/SkillEnchantConverter.java | 23 ++-----------------
2 files changed, 11 insertions(+), 30 deletions(-)
diff --git a/L2J_Mobius_Ertheia/dist/game/data/EnchantSkillGroups.xml b/L2J_Mobius_Ertheia/dist/game/data/EnchantSkillGroups.xml
index 0383cfd617..67278c7ad1 100644
--- a/L2J_Mobius_Ertheia/dist/game/data/EnchantSkillGroups.xml
+++ b/L2J_Mobius_Ertheia/dist/game/data/EnchantSkillGroups.xml
@@ -31,7 +31,7 @@
-
+
@@ -51,7 +51,7 @@
-
+
@@ -71,7 +71,7 @@
-
+
@@ -91,7 +91,7 @@
-
+
@@ -111,7 +111,7 @@
-
+
@@ -131,7 +131,7 @@
-
+
@@ -151,7 +151,7 @@
-
+
@@ -171,7 +171,7 @@
-
+
@@ -191,7 +191,7 @@
-
+
diff --git a/L2J_Mobius_Ertheia/java/com/l2jmobius/gameserver/util/SkillEnchantConverter.java b/L2J_Mobius_Ertheia/java/com/l2jmobius/gameserver/util/SkillEnchantConverter.java
index 25e9df19c6..379c6730d5 100644
--- a/L2J_Mobius_Ertheia/java/com/l2jmobius/gameserver/util/SkillEnchantConverter.java
+++ b/L2J_Mobius_Ertheia/java/com/l2jmobius/gameserver/util/SkillEnchantConverter.java
@@ -24,30 +24,11 @@ public class SkillEnchantConverter
{
public static int levelToErtheia(int enchantLevel)
{
- final String original = "" + enchantLevel;
- String output = "";
- for (int i = 0; i < original.length(); i++)
- {
- if (i != 1) // skip extra digit
- {
- output += original.charAt(i);
- }
- }
- return Integer.valueOf(output);
+ return ((enchantLevel % 1000) + ((enchantLevel / 1000) * 100));
}
public static int levelToUnderground(int enchantLevel)
{
- final String original = "" + enchantLevel;
- String output = "";
- for (int i = 0; i < original.length(); i++)
- {
- output += original.charAt(i);
- if (i == 0) // add extra digit
- {
- output += "0";
- }
- }
- return Integer.valueOf(output);
+ return ((enchantLevel % 100) + ((enchantLevel / 100) * 1000));
}
}