From 358a50fd2f46a152f4787d023036846c11bfa67c Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 19 Oct 2017 00:47:01 +0000 Subject: [PATCH] Retail behavior for premium hennas. --- .../dist/game/config/Custom/PremiumSystem.ini | 1 - .../game/data/buylists/custom/0009900.xml | 26 +++- .../dist/game/data/stats/hennaList.xml | 120 +++++++++--------- .../dist/game/data/xsd/hennaList.xsd | 1 + .../instancemanager/PremiumManager.java | 12 -- .../model/actor/instance/L2PcInstance.java | 4 +- .../gameserver/model/items/L2Henna.java | 10 ++ .../network/clientpackets/EnterWorld.java | 9 +- .../dist/game/config/Custom/PremiumSystem.ini | 1 - .../game/data/buylists/custom/0009900.xml | 27 +++- .../dist/game/data/stats/hennaList.xml | 120 +++++++++--------- .../dist/game/data/xsd/hennaList.xsd | 1 + .../instancemanager/PremiumManager.java | 12 -- .../model/actor/instance/L2PcInstance.java | 4 +- .../gameserver/model/items/L2Henna.java | 10 ++ .../network/clientpackets/EnterWorld.java | 9 +- .../dist/game/config/Custom/PremiumSystem.ini | 1 - .../game/data/buylists/custom/0009900.xml | 27 +++- .../dist/game/data/stats/hennaList.xml | 120 +++++++++--------- .../dist/game/data/xsd/hennaList.xsd | 1 + .../instancemanager/PremiumManager.java | 12 -- .../model/actor/instance/L2PcInstance.java | 4 +- .../gameserver/model/items/L2Henna.java | 10 ++ .../network/clientpackets/EnterWorld.java | 9 +- 24 files changed, 284 insertions(+), 267 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/PremiumSystem.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/PremiumSystem.ini index fb77a76e7a..e829ed42fe 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/PremiumSystem.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/PremiumSystem.ini @@ -39,6 +39,5 @@ EnablePremiumHennaSlot = True # Draw any henna at premium slot. # Also premium henna drawn at normal slots. -# Premium Henna ids are 23825 to 23830. # Retail: False EnableAnyHennaAtPremiumSlot = False diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/buylists/custom/0009900.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/buylists/custom/0009900.xml index c5ff39d906..3262cd74ff 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/buylists/custom/0009900.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/buylists/custom/0009900.xml @@ -90,10 +90,24 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/hennaList.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/hennaList.xml index bd7b440e99..f8287c648f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/hennaList.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/hennaList.xml @@ -20289,9 +20289,9 @@ 188 189 - - - + + + @@ -20332,9 +20332,9 @@ 188 189 - - - + + + @@ -20375,9 +20375,9 @@ 188 189 - - - + + + @@ -20418,9 +20418,9 @@ 188 189 - - - + + + @@ -20461,9 +20461,9 @@ 188 189 - - - + + + @@ -20504,9 +20504,9 @@ 188 189 - - - + + + @@ -20547,9 +20547,9 @@ 188 189 - - - + + + 148 @@ -20589,9 +20589,9 @@ 188 189 - - - + + + 148 @@ -20631,9 +20631,9 @@ 188 189 - - - + + + 148 @@ -20673,9 +20673,9 @@ 188 189 - - - + + + 148 @@ -20715,9 +20715,9 @@ 188 189 - - - + + + 148 @@ -20757,9 +20757,9 @@ 188 189 - - - + + + 148 @@ -20799,9 +20799,9 @@ 188 189 - - - + + + 148 @@ -20841,9 +20841,9 @@ 188 189 - - - + + + 148 @@ -20883,9 +20883,9 @@ 188 189 - - - + + + 148 @@ -20925,9 +20925,9 @@ 188 189 - - - + + + 148 @@ -20967,9 +20967,9 @@ 188 189 - - - + + + 148 @@ -21009,9 +21009,9 @@ 188 189 - - - + + + 148 @@ -21051,9 +21051,9 @@ 188 189 - - - + + + 148 @@ -21093,9 +21093,9 @@ 188 189 - - - + + + 148 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/hennaList.xsd b/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/hennaList.xsd index 3ffb90e948..d7f6389a32 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/hennaList.xsd +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/hennaList.xsd @@ -54,6 +54,7 @@ + diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java index 52e757914c..93eca615a9 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java @@ -66,10 +66,6 @@ public class PremiumManager { player.setPremiumStatus(false); player.sendPacket(new ExBrPremiumState(player)); - if (player.getHenna(4) != null) - { - player.removeHenna(4); - } } } @@ -95,10 +91,6 @@ public class PremiumManager { startExpireTask(player, premiumExpiration - now); } - else if (player.getHenna(4) != null) - { - player.removeHenna(4); - } }; private final Consumer playerLogoutEvent = (event) -> @@ -211,10 +203,6 @@ public class PremiumManager playerOnline.setPremiumStatus(false); playerOnline.sendPacket(new ExBrPremiumState(playerOnline)); stopExpireTask(playerOnline); - if (playerOnline.getHenna(4) != null) - { - playerOnline.removeHenna(4); - } } // UPDATE CACHE diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index f4912c0f28..f15a65b3c1 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -7945,12 +7945,12 @@ public final class L2PcInstance extends L2Playable { if (i == 4) { - if ((_henna[3] != null) || (henna.getDyeItemId() < 23825) || (henna.getDyeItemId() > 23830)) + if ((_henna[3] != null) || !henna.isPremium()) { return false; } } - else if ((henna.getDyeItemId() > 23824) && (henna.getDyeItemId() < 23831)) + else if (henna.isPremium()) { continue; } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/items/L2Henna.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/items/L2Henna.java index 01c41a95db..7aacc1d578 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/items/L2Henna.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/items/L2Henna.java @@ -36,6 +36,7 @@ public class L2Henna private final int _dyeId; private final String _dyeName; private final int _dyeItemId; + private final boolean _isPremium; private final Map _baseStats = new HashMap<>(); private final int _wear_fee; private final int _wear_count; @@ -50,6 +51,7 @@ public class L2Henna _dyeId = set.getInt("dyeId"); _dyeName = set.getString("dyeName"); _dyeItemId = set.getInt("dyeItemId"); + _isPremium = set.getBoolean("isPremium", false); _baseStats.put(BaseStats.STR, set.getInt("str", 0)); _baseStats.put(BaseStats.CON, set.getInt("con", 0)); _baseStats.put(BaseStats.DEX, set.getInt("dex", 0)); @@ -91,6 +93,14 @@ public class L2Henna return _dyeItemId; } + /** + * @return true if this dye is premium. + */ + public boolean isPremium() + { + return _isPremium; + } + public int getBaseStats(Stats stat) { return _baseStats.getOrDefault(stat, 0); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index f61c8dfe5d..4bb46d7ff7 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -358,14 +358,7 @@ public class EnterWorld implements IClientIncomingPacket // activeChar.queryGameGuard(); // Send Dye Information - if (!Config.PREMIUM_SYSTEM_ENABLED && (activeChar.getHenna(4) != null)) - { - activeChar.removeHenna(4); - } - else - { - activeChar.sendPacket(new HennaInfo(activeChar)); - } + activeChar.sendPacket(new HennaInfo(activeChar)); // Send Skill list activeChar.sendSkillList(); diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/PremiumSystem.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/PremiumSystem.ini index fb77a76e7a..e829ed42fe 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/PremiumSystem.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/PremiumSystem.ini @@ -39,6 +39,5 @@ EnablePremiumHennaSlot = True # Draw any henna at premium slot. # Also premium henna drawn at normal slots. -# Premium Henna ids are 23825 to 23830. # Retail: False EnableAnyHennaAtPremiumSlot = False diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/buylists/custom/0009900.xml b/L2J_Mobius_2.5_Underground/dist/game/data/buylists/custom/0009900.xml index c5ff39d906..4e16e68634 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/buylists/custom/0009900.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/buylists/custom/0009900.xml @@ -90,10 +90,25 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/hennaList.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/hennaList.xml index bd7b440e99..f8287c648f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/hennaList.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/hennaList.xml @@ -20289,9 +20289,9 @@ 188 189 - - - + + + @@ -20332,9 +20332,9 @@ 188 189 - - - + + + @@ -20375,9 +20375,9 @@ 188 189 - - - + + + @@ -20418,9 +20418,9 @@ 188 189 - - - + + + @@ -20461,9 +20461,9 @@ 188 189 - - - + + + @@ -20504,9 +20504,9 @@ 188 189 - - - + + + @@ -20547,9 +20547,9 @@ 188 189 - - - + + + 148 @@ -20589,9 +20589,9 @@ 188 189 - - - + + + 148 @@ -20631,9 +20631,9 @@ 188 189 - - - + + + 148 @@ -20673,9 +20673,9 @@ 188 189 - - - + + + 148 @@ -20715,9 +20715,9 @@ 188 189 - - - + + + 148 @@ -20757,9 +20757,9 @@ 188 189 - - - + + + 148 @@ -20799,9 +20799,9 @@ 188 189 - - - + + + 148 @@ -20841,9 +20841,9 @@ 188 189 - - - + + + 148 @@ -20883,9 +20883,9 @@ 188 189 - - - + + + 148 @@ -20925,9 +20925,9 @@ 188 189 - - - + + + 148 @@ -20967,9 +20967,9 @@ 188 189 - - - + + + 148 @@ -21009,9 +21009,9 @@ 188 189 - - - + + + 148 @@ -21051,9 +21051,9 @@ 188 189 - - - + + + 148 @@ -21093,9 +21093,9 @@ 188 189 - - - + + + 148 diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/xsd/hennaList.xsd b/L2J_Mobius_2.5_Underground/dist/game/data/xsd/hennaList.xsd index 3ffb90e948..d7f6389a32 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/xsd/hennaList.xsd +++ b/L2J_Mobius_2.5_Underground/dist/game/data/xsd/hennaList.xsd @@ -54,6 +54,7 @@ + diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java index 52e757914c..93eca615a9 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java @@ -66,10 +66,6 @@ public class PremiumManager { player.setPremiumStatus(false); player.sendPacket(new ExBrPremiumState(player)); - if (player.getHenna(4) != null) - { - player.removeHenna(4); - } } } @@ -95,10 +91,6 @@ public class PremiumManager { startExpireTask(player, premiumExpiration - now); } - else if (player.getHenna(4) != null) - { - player.removeHenna(4); - } }; private final Consumer playerLogoutEvent = (event) -> @@ -211,10 +203,6 @@ public class PremiumManager playerOnline.setPremiumStatus(false); playerOnline.sendPacket(new ExBrPremiumState(playerOnline)); stopExpireTask(playerOnline); - if (playerOnline.getHenna(4) != null) - { - playerOnline.removeHenna(4); - } } // UPDATE CACHE diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 0f2d6a1942..0b7c910e52 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -7945,12 +7945,12 @@ public final class L2PcInstance extends L2Playable { if (i == 4) { - if ((_henna[3] != null) || (henna.getDyeItemId() < 23825) || (henna.getDyeItemId() > 23830)) + if ((_henna[3] != null) || !henna.isPremium()) { return false; } } - else if ((henna.getDyeItemId() > 23824) && (henna.getDyeItemId() < 23831)) + else if (henna.isPremium()) { continue; } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/items/L2Henna.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/items/L2Henna.java index 01c41a95db..7aacc1d578 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/items/L2Henna.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/items/L2Henna.java @@ -36,6 +36,7 @@ public class L2Henna private final int _dyeId; private final String _dyeName; private final int _dyeItemId; + private final boolean _isPremium; private final Map _baseStats = new HashMap<>(); private final int _wear_fee; private final int _wear_count; @@ -50,6 +51,7 @@ public class L2Henna _dyeId = set.getInt("dyeId"); _dyeName = set.getString("dyeName"); _dyeItemId = set.getInt("dyeItemId"); + _isPremium = set.getBoolean("isPremium", false); _baseStats.put(BaseStats.STR, set.getInt("str", 0)); _baseStats.put(BaseStats.CON, set.getInt("con", 0)); _baseStats.put(BaseStats.DEX, set.getInt("dex", 0)); @@ -91,6 +93,14 @@ public class L2Henna return _dyeItemId; } + /** + * @return true if this dye is premium. + */ + public boolean isPremium() + { + return _isPremium; + } + public int getBaseStats(Stats stat) { return _baseStats.getOrDefault(stat, 0); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index a28f650d1a..eceb525b7a 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -361,14 +361,7 @@ public class EnterWorld implements IClientIncomingPacket // activeChar.queryGameGuard(); // Send Dye Information - if (!Config.PREMIUM_SYSTEM_ENABLED && (activeChar.getHenna(4) != null)) - { - activeChar.removeHenna(4); - } - else - { - activeChar.sendPacket(new HennaInfo(activeChar)); - } + activeChar.sendPacket(new HennaInfo(activeChar)); // Send Skill list activeChar.sendSkillList(); diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/PremiumSystem.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/PremiumSystem.ini index fb77a76e7a..e829ed42fe 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/PremiumSystem.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/PremiumSystem.ini @@ -39,6 +39,5 @@ EnablePremiumHennaSlot = True # Draw any henna at premium slot. # Also premium henna drawn at normal slots. -# Premium Henna ids are 23825 to 23830. # Retail: False EnableAnyHennaAtPremiumSlot = False diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/buylists/custom/0009900.xml b/L2J_Mobius_3.0_Helios/dist/game/data/buylists/custom/0009900.xml index c5ff39d906..4e16e68634 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/buylists/custom/0009900.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/buylists/custom/0009900.xml @@ -90,10 +90,25 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/hennaList.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/hennaList.xml index bd7b440e99..f8287c648f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/hennaList.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/hennaList.xml @@ -20289,9 +20289,9 @@ 188 189 - - - + + + @@ -20332,9 +20332,9 @@ 188 189 - - - + + + @@ -20375,9 +20375,9 @@ 188 189 - - - + + + @@ -20418,9 +20418,9 @@ 188 189 - - - + + + @@ -20461,9 +20461,9 @@ 188 189 - - - + + + @@ -20504,9 +20504,9 @@ 188 189 - - - + + + @@ -20547,9 +20547,9 @@ 188 189 - - - + + + 148 @@ -20589,9 +20589,9 @@ 188 189 - - - + + + 148 @@ -20631,9 +20631,9 @@ 188 189 - - - + + + 148 @@ -20673,9 +20673,9 @@ 188 189 - - - + + + 148 @@ -20715,9 +20715,9 @@ 188 189 - - - + + + 148 @@ -20757,9 +20757,9 @@ 188 189 - - - + + + 148 @@ -20799,9 +20799,9 @@ 188 189 - - - + + + 148 @@ -20841,9 +20841,9 @@ 188 189 - - - + + + 148 @@ -20883,9 +20883,9 @@ 188 189 - - - + + + 148 @@ -20925,9 +20925,9 @@ 188 189 - - - + + + 148 @@ -20967,9 +20967,9 @@ 188 189 - - - + + + 148 @@ -21009,9 +21009,9 @@ 188 189 - - - + + + 148 @@ -21051,9 +21051,9 @@ 188 189 - - - + + + 148 @@ -21093,9 +21093,9 @@ 188 189 - - - + + + 148 diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/xsd/hennaList.xsd b/L2J_Mobius_3.0_Helios/dist/game/data/xsd/hennaList.xsd index 3ffb90e948..d7f6389a32 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/xsd/hennaList.xsd +++ b/L2J_Mobius_3.0_Helios/dist/game/data/xsd/hennaList.xsd @@ -54,6 +54,7 @@ + diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java index 52e757914c..93eca615a9 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/PremiumManager.java @@ -66,10 +66,6 @@ public class PremiumManager { player.setPremiumStatus(false); player.sendPacket(new ExBrPremiumState(player)); - if (player.getHenna(4) != null) - { - player.removeHenna(4); - } } } @@ -95,10 +91,6 @@ public class PremiumManager { startExpireTask(player, premiumExpiration - now); } - else if (player.getHenna(4) != null) - { - player.removeHenna(4); - } }; private final Consumer playerLogoutEvent = (event) -> @@ -211,10 +203,6 @@ public class PremiumManager playerOnline.setPremiumStatus(false); playerOnline.sendPacket(new ExBrPremiumState(playerOnline)); stopExpireTask(playerOnline); - if (playerOnline.getHenna(4) != null) - { - playerOnline.removeHenna(4); - } } // UPDATE CACHE diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 9df9350a31..f16a478867 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -7947,12 +7947,12 @@ public final class L2PcInstance extends L2Playable { if (i == 4) { - if ((_henna[3] != null) || (henna.getDyeItemId() < 23825) || (henna.getDyeItemId() > 23830)) + if ((_henna[3] != null) || !henna.isPremium()) { return false; } } - else if ((henna.getDyeItemId() > 23824) && (henna.getDyeItemId() < 23831)) + else if (henna.isPremium()) { continue; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/items/L2Henna.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/items/L2Henna.java index 01c41a95db..7aacc1d578 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/items/L2Henna.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/items/L2Henna.java @@ -36,6 +36,7 @@ public class L2Henna private final int _dyeId; private final String _dyeName; private final int _dyeItemId; + private final boolean _isPremium; private final Map _baseStats = new HashMap<>(); private final int _wear_fee; private final int _wear_count; @@ -50,6 +51,7 @@ public class L2Henna _dyeId = set.getInt("dyeId"); _dyeName = set.getString("dyeName"); _dyeItemId = set.getInt("dyeItemId"); + _isPremium = set.getBoolean("isPremium", false); _baseStats.put(BaseStats.STR, set.getInt("str", 0)); _baseStats.put(BaseStats.CON, set.getInt("con", 0)); _baseStats.put(BaseStats.DEX, set.getInt("dex", 0)); @@ -91,6 +93,14 @@ public class L2Henna return _dyeItemId; } + /** + * @return true if this dye is premium. + */ + public boolean isPremium() + { + return _isPremium; + } + public int getBaseStats(Stats stat) { return _baseStats.getOrDefault(stat, 0); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index a28f650d1a..eceb525b7a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -361,14 +361,7 @@ public class EnterWorld implements IClientIncomingPacket // activeChar.queryGameGuard(); // Send Dye Information - if (!Config.PREMIUM_SYSTEM_ENABLED && (activeChar.getHenna(4) != null)) - { - activeChar.removeHenna(4); - } - else - { - activeChar.sendPacket(new HennaInfo(activeChar)); - } + activeChar.sendPacket(new HennaInfo(activeChar)); // Send Skill list activeChar.sendSkillList();