Grand Crusade Ability point changes.
This commit is contained in:
@@ -831,6 +831,6 @@ GoDVideoIntro = True
|
|||||||
# Default: 16
|
# Default: 16
|
||||||
AbilityMaxPoints = 16
|
AbilityMaxPoints = 16
|
||||||
|
|
||||||
# Adena needed to reset used ability point.
|
# SP needed to reset used ability point.
|
||||||
# Default: 10000000
|
# Default: 500000000
|
||||||
AbilityPointsResetAdena = 10000000
|
AbilityPointsResetSP = 500000000
|
||||||
|
@@ -577,7 +577,7 @@ public final class Config
|
|||||||
public static boolean HBCE_FAIR_PLAY;
|
public static boolean HBCE_FAIR_PLAY;
|
||||||
public static int PLAYER_MOVEMENT_BLOCK_TIME;
|
public static int PLAYER_MOVEMENT_BLOCK_TIME;
|
||||||
public static int ABILITY_MAX_POINTS;
|
public static int ABILITY_MAX_POINTS;
|
||||||
public static long ABILITY_POINTS_RESET_ADENA;
|
public static long ABILITY_POINTS_RESET_SP;
|
||||||
public static int NORMAL_ENCHANT_COST_MULTIPLIER;
|
public static int NORMAL_ENCHANT_COST_MULTIPLIER;
|
||||||
public static int SAFE_ENCHANT_COST_MULTIPLIER;
|
public static int SAFE_ENCHANT_COST_MULTIPLIER;
|
||||||
public static boolean BOTREPORT_ENABLE;
|
public static boolean BOTREPORT_ENABLE;
|
||||||
@@ -1695,7 +1695,7 @@ public final class Config
|
|||||||
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
||||||
PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000;
|
PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000;
|
||||||
ABILITY_MAX_POINTS = Character.getInt("AbilityMaxPoints", 16);
|
ABILITY_MAX_POINTS = Character.getInt("AbilityMaxPoints", 16);
|
||||||
ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10_000_000);
|
ABILITY_POINTS_RESET_SP = Character.getLong("AbilityPointsResetSP", 500000000);
|
||||||
|
|
||||||
// Load Telnet config file (if exists)
|
// Load Telnet config file (if exists)
|
||||||
final PropertiesParser telnetSettings = new PropertiesParser(TELNET_CONFIG_FILE);
|
final PropertiesParser telnetSettings = new PropertiesParser(TELNET_CONFIG_FILE);
|
||||||
|
@@ -11890,8 +11890,8 @@ public final class SystemMessageId
|
|||||||
@ClientString(id = 4194, message = "Ability Points: $s1")
|
@ClientString(id = 4194, message = "Ability Points: $s1")
|
||||||
public static SystemMessageId ABILITY_POINTS_S1;
|
public static SystemMessageId ABILITY_POINTS_S1;
|
||||||
|
|
||||||
@ClientString(id = 4195, message = "Abilities can be used by Noblesse/Exalted Lv. 99 or above.")
|
@ClientString(id = 4195, message = "Reach level 85 to use the ability.")
|
||||||
public static SystemMessageId ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE;
|
public static SystemMessageId REACH_LEVEL_85_TO_USE_THE_ABILITY;
|
||||||
|
|
||||||
@ClientString(id = 4196, message = "The requested operation has failed. Please try again.")
|
@ClientString(id = 4196, message = "The requested operation has failed. Please try again.")
|
||||||
public static SystemMessageId THE_REQUESTED_OPERATION_HAS_FAILED_PLEASE_TRY_AGAIN;
|
public static SystemMessageId THE_REQUESTED_OPERATION_HAS_FAILED_PLEASE_TRY_AGAIN;
|
||||||
|
@@ -48,9 +48,9 @@ public class RequestAbilityList implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((activeChar.getLevel() < 99) || (activeChar.getNobleLevel() == 0))
|
if (activeChar.getLevel() < 85)
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE);
|
activeChar.sendPacket(SystemMessageId.REACH_LEVEL_85_TO_USE_THE_ABILITY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,9 +44,9 @@ public class RequestAbilityWndClose implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((activeChar.getLevel() < 99) || (activeChar.getNobleLevel() == 0))
|
if (activeChar.getLevel() < 85)
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE);
|
activeChar.sendPacket(SystemMessageId.REACH_LEVEL_85_TO_USE_THE_ABILITY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,9 +44,9 @@ public class RequestAbilityWndOpen implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((activeChar.getLevel() < 99) || (activeChar.getNobleLevel() == 0))
|
if (activeChar.getLevel() < 85)
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE);
|
activeChar.sendPacket(SystemMessageId.REACH_LEVEL_85_TO_USE_THE_ABILITY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -90,9 +90,9 @@ public class RequestAcquireAbilityList implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((activeChar.getLevel() < 99) || (activeChar.getNobleLevel() == 0))
|
if (activeChar.getLevel() < 85)
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE);
|
activeChar.sendPacket(SystemMessageId.REACH_LEVEL_85_TO_USE_THE_ABILITY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (activeChar.isInOlympiadMode() || activeChar.isOnEvent(CeremonyOfChaosEvent.class))
|
else if (activeChar.isInOlympiadMode() || activeChar.isOnEvent(CeremonyOfChaosEvent.class))
|
||||||
@@ -186,5 +186,6 @@ public class RequestAcquireAbilityList implements IClientIncomingPacket
|
|||||||
activeChar.setAbilityPointsUsed(activeChar.getAbilityPointsUsed() + points);
|
activeChar.setAbilityPointsUsed(activeChar.getAbilityPointsUsed() + points);
|
||||||
}
|
}
|
||||||
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
|
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
|
||||||
|
activeChar.broadcastUserInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -16,22 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.clientpackets.ability;
|
package com.l2jmobius.gameserver.network.clientpackets.ability;
|
||||||
|
|
||||||
import com.l2jmobius.Config;
|
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData;
|
|
||||||
import com.l2jmobius.gameserver.enums.UserInfoType;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.ceremonyofchaos.CeremonyOfChaosEvent;
|
|
||||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public class RequestChangeAbilityPoint implements IClientIncomingPacket
|
public class RequestChangeAbilityPoint implements IClientIncomingPacket
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@@ -43,56 +31,6 @@ public class RequestChangeAbilityPoint implements IClientIncomingPacket
|
|||||||
@Override
|
@Override
|
||||||
public void run(L2GameClient client)
|
public void run(L2GameClient client)
|
||||||
{
|
{
|
||||||
final L2PcInstance activeChar = client.getActiveChar();
|
// removed
|
||||||
if (activeChar == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeChar.isSubClassActive() && !activeChar.isDualClassActive())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((activeChar.getLevel() < 99) || (activeChar.getNobleLevel() == 0))
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(SystemMessageId.ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeChar.getAbilityPoints() >= Config.ABILITY_MAX_POINTS)
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_ACQUIRE_ANY_MORE_ABILITY_POINTS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeChar.isInOlympiadMode() || activeChar.isOnEvent(CeremonyOfChaosEvent.class))
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (activeChar.isOnEvent()) // custom event message
|
|
||||||
{
|
|
||||||
activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final long spRequired = AbilityPointsData.getInstance().getPrice(activeChar.getAbilityPoints());
|
|
||||||
if (spRequired > activeChar.getSp())
|
|
||||||
{
|
|
||||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_NEED_S1_SP_TO_CONVERT_TO1_ABILITY_POINT);
|
|
||||||
sm.addLong(spRequired);
|
|
||||||
activeChar.sendPacket(sm);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeChar.getStat().removeSp(spRequired))
|
|
||||||
{
|
|
||||||
activeChar.setAbilityPoints(activeChar.getAbilityPoints() + 1);
|
|
||||||
final UserInfo info = new UserInfo(activeChar, false);
|
|
||||||
info.addComponentType(UserInfoType.SLOTS, UserInfoType.CURRENT_HPMPCP_EXP_SP);
|
|
||||||
activeChar.sendPacket(info);
|
|
||||||
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,9 +58,9 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ((activeChar.getLevel() < 99) || (activeChar.getNobleLevel() == 0))
|
else if (activeChar.getLevel() < 85)
|
||||||
{
|
{
|
||||||
client.sendPacket(SystemMessageId.ABILITIES_CAN_BE_USED_BY_NOBLESSE_EXALTED_LV_99_OR_ABOVE);
|
client.sendPacket(SystemMessageId.REACH_LEVEL_85_TO_USE_THE_ABILITY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (activeChar.isInOlympiadMode() || activeChar.isOnEvent(CeremonyOfChaosEvent.class))
|
else if (activeChar.isInOlympiadMode() || activeChar.isOnEvent(CeremonyOfChaosEvent.class))
|
||||||
@@ -83,14 +83,13 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket
|
|||||||
activeChar.sendMessage("You haven't used your ability points yet!");
|
activeChar.sendMessage("You haven't used your ability points yet!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (activeChar.getAdena() < Config.ABILITY_POINTS_RESET_ADENA)
|
else if (activeChar.getSp() < Config.ABILITY_POINTS_RESET_SP)
|
||||||
{
|
{
|
||||||
client.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
|
client.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_FOR_THIS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
activeChar.setSp(activeChar.getSp() - Config.ABILITY_POINTS_RESET_SP);
|
||||||
|
|
||||||
if (activeChar.reduceAdena("AbilityPointsReset", Config.ABILITY_POINTS_RESET_ADENA, activeChar, true))
|
|
||||||
{
|
|
||||||
for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values())
|
for (L2SkillLearn sk : SkillTreesData.getInstance().getAbilitySkillTree().values())
|
||||||
{
|
{
|
||||||
final Skill skill = activeChar.getKnownSkill(sk.getSkillId());
|
final Skill skill = activeChar.getKnownSkill(sk.getSkillId());
|
||||||
@@ -100,7 +99,7 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
activeChar.setAbilityPointsUsed(0);
|
activeChar.setAbilityPointsUsed(0);
|
||||||
client.sendPacket(new ExAcquireAPSkillList(activeChar));
|
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
|
||||||
}
|
activeChar.broadcastUserInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,7 @@ public class ExAcquireAPSkillList implements IClientOutgoingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_enable = (!activeChar.isSubClassActive() || activeChar.isDualClassActive()) && (activeChar.getLevel() >= 99) && (activeChar.getNobleLevel() > 0);
|
_enable = (!activeChar.isSubClassActive() || activeChar.isDualClassActive()) && (activeChar.getLevel() >= 85);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -63,7 +63,7 @@ public class ExAcquireAPSkillList implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ACQUIRE_AP_SKILL_LIST.writeId(packet);
|
OutgoingPackets.EX_ACQUIRE_AP_SKILL_LIST.writeId(packet);
|
||||||
|
|
||||||
packet.writeD(_enable ? 1 : 0);
|
packet.writeD(_enable ? 1 : 0);
|
||||||
packet.writeQ(Config.ABILITY_POINTS_RESET_ADENA);
|
packet.writeQ(Config.ABILITY_POINTS_RESET_SP); // Changed to from Adena to SP on Grand Crusade
|
||||||
// packet.writeQ(_price); Removed on Grand Crusade
|
// packet.writeQ(_price); Removed on Grand Crusade
|
||||||
// packet.writeD(Config.ABILITY_MAX_POINTS); Removed on Grand Crusade
|
// packet.writeD(Config.ABILITY_MAX_POINTS); Removed on Grand Crusade
|
||||||
packet.writeD(_abilityPoints);
|
packet.writeD(_abilityPoints);
|
||||||
|
Reference in New Issue
Block a user