Support for long SP value learn requirements.
This commit is contained in:
@ -39,7 +39,7 @@ public final class L2SkillLearn
|
||||
private final int _getLevel;
|
||||
private final int _getDualClassLevel;
|
||||
private final boolean _autoGet;
|
||||
private final int _levelUpSp;
|
||||
private final long _levelUpSp;
|
||||
private final List<ItemHolder> _requiredItems = new ArrayList<>();
|
||||
private final List<Race> _races = new ArrayList<>();
|
||||
private final List<SkillHolder> _preReqSkills = new ArrayList<>();
|
||||
@ -66,7 +66,7 @@ public final class L2SkillLearn
|
||||
_getLevel = set.getInt("getLevel");
|
||||
_getDualClassLevel = set.getInt("getDualClassLevel", 0);
|
||||
_autoGet = set.getBoolean("autoGet", false);
|
||||
_levelUpSp = set.getInt("levelUpSp", 0);
|
||||
_levelUpSp = set.getLong("levelUpSp", 0);
|
||||
_residenceSkill = set.getBoolean("residenceSkill", false);
|
||||
_learnedByNpc = set.getBoolean("learnedByNpc", false);
|
||||
_learnedByFS = set.getBoolean("learnedByFS", false);
|
||||
@ -119,7 +119,7 @@ public final class L2SkillLearn
|
||||
/**
|
||||
* @return the amount of SP/Clan Reputation to acquire this skill.
|
||||
*/
|
||||
public int getLevelUpSp()
|
||||
public long getLevelUpSp()
|
||||
{
|
||||
return _levelUpSp;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ public final class RequestAcquireSkill implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
final L2Clan clan = activeChar.getClan();
|
||||
final int repCost = s.getLevelUpSp();
|
||||
final int repCost = (int) s.getLevelUpSp(); // Hopefully not greater that max int.
|
||||
if (clan.getReputationScore() >= repCost)
|
||||
{
|
||||
if (Config.LIFE_CRYSTAL_NEEDED)
|
||||
@ -254,7 +254,7 @@ public final class RequestAcquireSkill implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final int repCost = s.getLevelUpSp();
|
||||
final int repCost = (int) s.getLevelUpSp(); // Hopefully not greater that max int.
|
||||
if (clan.getReputationScore() < repCost)
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.THE_ATTEMPT_TO_ACQUIRE_THE_SKILL_HAS_FAILED_BECAUSE_OF_AN_INSUFFICIENT_CLAN_REPUTATION);
|
||||
@ -590,7 +590,7 @@ public final class RequestAcquireSkill implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// First it checks that the skill require SP and the player has enough SP to learn it.
|
||||
final int levelUpSp = skillLearn.getLevelUpSp();
|
||||
final long levelUpSp = skillLearn.getLevelUpSp();
|
||||
if ((levelUpSp > 0) && (levelUpSp > player.getSp()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_TO_LEARN_THIS_SKILL);
|
||||
|
@ -36,7 +36,7 @@ public class AcquireSkillInfo implements IClientOutgoingPacket
|
||||
private final AcquireSkillType _type;
|
||||
private final int _id;
|
||||
private final int _level;
|
||||
private final int _spCost;
|
||||
private final long _spCost;
|
||||
private final List<Req> _reqs;
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ public class ExAcquireSkillInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final int _level;
|
||||
private final int _dualClassLevel;
|
||||
private final int _spCost;
|
||||
private final long _spCost;
|
||||
private final int _minLevel;
|
||||
private final List<ItemHolder> _itemReq;
|
||||
private final List<Skill> _skillRem;
|
||||
|
Reference in New Issue
Block a user