diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/AbilityPoints.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/AbilityPoints.xml deleted file mode 100644 index e1336618eb..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/AbilityPoints.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java index 001f3d2573..a8284b0735 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java @@ -25,7 +25,6 @@ import com.l2jmobius.Config; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.data.sql.impl.CrestTable; import com.l2jmobius.gameserver.data.sql.impl.TeleportLocationTable; -import com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData; import com.l2jmobius.gameserver.data.xml.impl.AdminData; import com.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import com.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; @@ -267,12 +266,6 @@ public class AdminReload implements IAdminCommandHandler AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded Prime Shop data."); break; } - case "ability": - { - AbilityPointsData.getInstance().load(); - AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded ability points data."); - break; - } case "appearance": { AppearanceItemData.getInstance().load(); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java index e04142f6aa..4b89003708 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java @@ -25,7 +25,6 @@ import com.l2jmobius.Config; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.data.sql.impl.CrestTable; import com.l2jmobius.gameserver.data.sql.impl.TeleportLocationTable; -import com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData; import com.l2jmobius.gameserver.data.xml.impl.AdminData; import com.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import com.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; @@ -222,11 +221,6 @@ public class Reload implements ITelnetCommand ItemCrystalizationData.getInstance().load(); return AdminData.getInstance().broadcastMessageToGMs("Telnet Admin: Reloaded item crystalization data."); } - case "ability": - { - AbilityPointsData.getInstance().load(); - return AdminData.getInstance().broadcastMessageToGMs("Telnet Admin: Reloaded ability points data."); - } case "appearance": { AppearanceItemData.getInstance().load(); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java index 4ca346dac5..1b627c9522 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java @@ -39,7 +39,6 @@ import com.l2jmobius.gameserver.data.sql.impl.ClanTable; import com.l2jmobius.gameserver.data.sql.impl.CrestTable; import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable; import com.l2jmobius.gameserver.data.sql.impl.TeleportLocationTable; -import com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData; import com.l2jmobius.gameserver.data.xml.impl.ActionData; import com.l2jmobius.gameserver.data.xml.impl.AdminData; import com.l2jmobius.gameserver.data.xml.impl.AlchemyData; @@ -207,7 +206,6 @@ public class GameServer ActionData.getInstance(); CategoryData.getInstance(); SecondaryAuthData.getInstance(); - AbilityPointsData.getInstance(); SayuneData.getInstance(); ClanRewardData.getInstance(); DailyMissionHandler.getInstance().executeScript(); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/AbilityPointsData.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/AbilityPointsData.java deleted file mode 100644 index a8d5526d01..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/AbilityPointsData.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.data.xml.impl; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Logger; - -import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -import com.l2jmobius.commons.util.IGameXmlReader; -import com.l2jmobius.gameserver.model.holders.RangeAbilityPointsHolder; - -/** - * @author UnAfraid - */ -public final class AbilityPointsData implements IGameXmlReader -{ - private static final Logger LOGGER = Logger.getLogger(AbilityPointsData.class.getName()); - private final List _points = new ArrayList<>(); - - protected AbilityPointsData() - { - load(); - } - - @Override - public synchronized void load() - { - _points.clear(); - parseDatapackFile("config/AbilityPoints.xml"); - LOGGER.info(getClass().getSimpleName() + ": Loaded " + _points.size() + " range fees."); - } - - @Override - public void parseDocument(Document doc, File f) - { - for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) - { - if ("list".equalsIgnoreCase(n.getNodeName())) - { - for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) - { - if ("points".equalsIgnoreCase(d.getNodeName())) - { - final NamedNodeMap attrs = d.getAttributes(); - final int from = parseInteger(attrs, "from"); - final int to = parseInteger(attrs, "to"); - final int costs = parseInteger(attrs, "costs"); - _points.add(new RangeAbilityPointsHolder(from, to, costs)); - } - } - } - } - } - - public RangeAbilityPointsHolder getHolder(int points) - { - for (RangeAbilityPointsHolder holder : _points) - { - if ((holder.getMin() <= points) && (holder.getMax() >= points)) - { - return holder; - } - } - return null; - } - - public long getPrice(int points) - { - points++; // for next point - final RangeAbilityPointsHolder holder = getHolder(points); - if (holder == null) - { - final RangeAbilityPointsHolder prevHolder = getHolder(points - 1); - if (prevHolder != null) - { - return prevHolder.getSP(); - } - - // No data found - return points >= 13 ? 1_000_000_000 : points >= 9 ? 750_000_000 : points >= 5 ? 500_000_000 : 250_000_000; - } - return holder.getSP(); - } - - public static AbilityPointsData getInstance() - { - return SingletonHolder._instance; - } - - private static class SingletonHolder - { - protected static final AbilityPointsData _instance = new AbilityPointsData(); - } -} diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 83bcb9f31a..71d41e4e9e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -13475,16 +13475,8 @@ public final class L2PcInstance extends L2Playable */ public int getAbilityPoints() { - return getVariables().getInt(isDualClassActive() ? PlayerVariables.ABILITY_POINTS_DUAL_CLASS : PlayerVariables.ABILITY_POINTS_MAIN_CLASS, 0); - } - - /** - * Sets the amount of ability points player can spend on learning skills. - * @param points - */ - public void setAbilityPoints(int points) - { - getVariables().set(isDualClassActive() ? PlayerVariables.ABILITY_POINTS_DUAL_CLASS : PlayerVariables.ABILITY_POINTS_MAIN_CLASS, points); + // Grand Crusade: 1 point per level after 84 + return getLevel() - 84; } /**