diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java index be4374cfdb..acd6da9538 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -1080,6 +1080,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2406,6 +2407,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java index 92ccbe7104..bd6028964b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -1087,6 +1087,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2422,6 +2423,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java index 5bf2f1c049..f08f5794a1 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -1095,6 +1095,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2437,6 +2438,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java index acbf78a495..682b586da0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -1088,6 +1088,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2423,6 +2424,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java index acbf78a495..682b586da0 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java @@ -1088,6 +1088,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2423,6 +2424,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java index acbf78a495..682b586da0 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java @@ -1088,6 +1088,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2423,6 +2424,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/CommunityBoard.ini index 47213a2af2..b6eb51c791 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/CommunityBoard.ini @@ -30,6 +30,10 @@ CommunityEnableHeal = True # Default: False CommunityEnableDelevel = False +# Remove all ability skills upon delevel. +# Default: False +DelevelRemoveAbilities = False + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 357584411a..97c402ecbc 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -37,9 +37,11 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData; import com.l2jmobius.gameserver.data.xml.impl.ExperienceData; import com.l2jmobius.gameserver.data.xml.impl.MultisellData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.instancemanager.PremiumManager; +import com.l2jmobius.gameserver.model.L2SkillLearn; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -50,6 +52,7 @@ import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; +import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList; /** * Home board. @@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler activeChar.getStat().setLevel((byte) newLevel); activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp()); activeChar.setCurrentCp(activeChar.getMaxCp()); + if (Config.COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES) + { + for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values()) + { + final Skill skill = activeChar.getKnownSkill(sk.getSkillId()); + if (skill != null) + { + activeChar.removeSkill(skill); + } + } + activeChar.setAbilityPointsUsed(0); + activeChar.sendPacket(new ExAcquireAPSkillList(activeChar)); + } activeChar.broadcastUserInfo(); activeChar.checkPlayerSkills(); // Adjust skills according to new level. returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html"); + activeChar.sendMessage("Your level is set to " + newLevel + "!"); } } else if (command.startsWith("_bbspremium")) diff --git a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/Config.java b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/Config.java index 8b9adfbaed..56d67a3284 100644 --- a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/Config.java @@ -1094,6 +1094,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_BUFFS; public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static boolean COMMUNITYBOARD_ENABLE_DELEVEL; + public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2434,6 +2435,7 @@ public final class Config COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true); COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false); + COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false); COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);