Configuration for removing all ability skills upon delevel.
This commit is contained in:
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1080,6 +1080,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2406,6 +2407,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1087,6 +1087,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2422,6 +2423,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1095,6 +1095,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2437,6 +2438,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1088,6 +1088,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2423,6 +2424,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1088,6 +1088,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2423,6 +2424,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1088,6 +1088,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2423,6 +2424,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
@@ -30,6 +30,10 @@ CommunityEnableHeal = True
|
|||||||
# Default: False
|
# Default: False
|
||||||
CommunityEnableDelevel = False
|
CommunityEnableDelevel = False
|
||||||
|
|
||||||
|
# Remove all ability skills upon delevel.
|
||||||
|
# Default: False
|
||||||
|
DelevelRemoveAbilities = False
|
||||||
|
|
||||||
# Price for Teleports.
|
# Price for Teleports.
|
||||||
# Default: 0 (free)
|
# Default: 0 (free)
|
||||||
CommunityTeleportPrice = 0
|
CommunityTeleportPrice = 0
|
||||||
|
@@ -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.ExperienceData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
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.CommunityBoardHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
import com.l2jmobius.gameserver.handler.IParseBoardHandler;
|
||||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
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.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.ExBuySellList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home board.
|
* Home board.
|
||||||
@@ -283,9 +286,23 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
activeChar.getStat().setLevel((byte) newLevel);
|
activeChar.getStat().setLevel((byte) newLevel);
|
||||||
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
|
||||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
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.broadcastUserInfo();
|
||||||
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
activeChar.checkPlayerSkills(); // Adjust skills according to new level.
|
||||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/delevel/complete.html");
|
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"))
|
else if (command.startsWith("_bbspremium"))
|
||||||
|
@@ -1094,6 +1094,7 @@ public final class Config
|
|||||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
public static boolean COMMUNITYBOARD_ENABLE_HEAL;
|
||||||
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
public static boolean COMMUNITYBOARD_ENABLE_DELEVEL;
|
||||||
|
public static boolean COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES;
|
||||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||||
@@ -2434,6 +2435,7 @@ public final class Config
|
|||||||
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
COMMUNITYBOARD_ENABLE_BUFFS = CommunityBoard.getBoolean("CommunityEnableBuffs", true);
|
||||||
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
COMMUNITYBOARD_ENABLE_HEAL = CommunityBoard.getBoolean("CommunityEnableHeal", true);
|
||||||
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
COMMUNITYBOARD_ENABLE_DELEVEL = CommunityBoard.getBoolean("CommunityEnableDelevel", false);
|
||||||
|
COMMUNITYBOARD_DELEVEL_REMOVE_ABILITIES = CommunityBoard.getBoolean("DelevelRemoveAbilities", false);
|
||||||
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0);
|
||||||
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0);
|
||||||
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0);
|
||||||
|
Reference in New Issue
Block a user