Prevent the extensive use of the lvl abbreviation.
This commit is contained in:
@@ -621,15 +621,15 @@ public class Config
|
||||
public static boolean ALT_MOB_AGRO_IN_PEACEZONE;
|
||||
public static boolean ALT_ATTACKABLE_NPCS;
|
||||
public static boolean ALT_GAME_VIEWNPC;
|
||||
public static boolean SHOW_NPC_LVL;
|
||||
public static boolean SHOW_NPC_LEVEL;
|
||||
public static boolean SHOW_NPC_AGGRESSION;
|
||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||
public static int MIN_NPC_LEVEL_DMG_PENALTY;
|
||||
public static float[] NPC_DMG_PENALTY;
|
||||
public static float[] NPC_CRIT_DMG_PENALTY;
|
||||
public static float[] NPC_SKILL_DMG_PENALTY;
|
||||
public static int MIN_NPC_LVL_MAGIC_PENALTY;
|
||||
public static int MIN_NPC_LEVEL_MAGIC_PENALTY;
|
||||
public static float[] NPC_SKILL_CHANCE_PENALTY;
|
||||
public static int DEFAULT_CORPSE_TIME;
|
||||
public static int SPOILED_CORPSE_EXTEND_TIME;
|
||||
@@ -978,8 +978,8 @@ public class Config
|
||||
public static int CHAMPION_FREQUENCY;
|
||||
public static String CHAMP_TITLE;
|
||||
public static boolean SHOW_CHAMPION_AURA;
|
||||
public static int CHAMP_MIN_LVL;
|
||||
public static int CHAMP_MAX_LVL;
|
||||
public static int CHAMP_MIN_LEVEL;
|
||||
public static int CHAMP_MAX_LEVEL;
|
||||
public static int CHAMPION_HP;
|
||||
public static float CHAMPION_REWARDS_EXP_SP;
|
||||
public static float CHAMPION_REWARDS_CHANCE;
|
||||
@@ -989,8 +989,8 @@ public class Config
|
||||
public static float CHAMPION_HP_REGEN;
|
||||
public static float CHAMPION_ATK;
|
||||
public static float CHAMPION_SPD_ATK;
|
||||
public static int CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;
|
||||
public static int CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;
|
||||
public static int CHAMPION_REWARD_LOWER_LEVEL_ITEM_CHANCE;
|
||||
public static int CHAMPION_REWARD_HIGHER_LEVEL_ITEM_CHANCE;
|
||||
public static int CHAMPION_REWARD_ID;
|
||||
public static int CHAMPION_REWARD_QTY;
|
||||
public static boolean CHAMPION_ENABLE_VITALITY;
|
||||
@@ -1139,7 +1139,7 @@ public class Config
|
||||
public static boolean ALLOW_ERTHEIA;
|
||||
public static boolean AUTO_POTIONS_ENABLED;
|
||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||
public static int AUTO_POTION_MIN_LVL;
|
||||
public static int AUTO_POTION_MIN_LEVEL;
|
||||
public static boolean AUTO_CP_ENABLED;
|
||||
public static boolean AUTO_HP_ENABLED;
|
||||
public static boolean AUTO_MP_ENABLED;
|
||||
@@ -2030,15 +2030,15 @@ public class Config
|
||||
ALT_MOB_AGRO_IN_PEACEZONE = NPC.getBoolean("AltMobAgroInPeaceZone", true);
|
||||
ALT_ATTACKABLE_NPCS = NPC.getBoolean("AltAttackableNpcs", true);
|
||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||
SHOW_NPC_LEVEL = NPC.getBoolean("ShowNpcLevel", false);
|
||||
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||
MIN_NPC_LEVEL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||
NPC_DMG_PENALTY = parseConfigLine(NPC.getString("DmgPenaltyForLvLDifferences", "0.7, 0.6, 0.6, 0.55"));
|
||||
NPC_CRIT_DMG_PENALTY = parseConfigLine(NPC.getString("CritDmgPenaltyForLvLDifferences", "0.75, 0.65, 0.6, 0.58"));
|
||||
NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62"));
|
||||
MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78);
|
||||
MIN_NPC_LEVEL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78);
|
||||
NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5"));
|
||||
DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7);
|
||||
SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10);
|
||||
@@ -2399,7 +2399,7 @@ public class Config
|
||||
final PropertiesParser AutoPotions = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
||||
AUTO_POTIONS_ENABLED = AutoPotions.getBoolean("AutoPotionsEnabled", false);
|
||||
AUTO_POTIONS_IN_OLYMPIAD = AutoPotions.getBoolean("AutoPotionsInOlympiad", false);
|
||||
AUTO_POTION_MIN_LVL = AutoPotions.getInt("AutoPotionMinimumLevel", 1);
|
||||
AUTO_POTION_MIN_LEVEL = AutoPotions.getInt("AutoPotionMinimumLevel", 1);
|
||||
AUTO_CP_ENABLED = AutoPotions.getBoolean("AutoCpEnabled", true);
|
||||
AUTO_HP_ENABLED = AutoPotions.getBoolean("AutoHpEnabled", true);
|
||||
AUTO_MP_ENABLED = AutoPotions.getBoolean("AutoMpEnabled", true);
|
||||
@@ -2471,8 +2471,8 @@ public class Config
|
||||
CHAMPION_FREQUENCY = ChampionMonster.getInt("ChampionFrequency", 0);
|
||||
CHAMP_TITLE = ChampionMonster.getString("ChampionTitle", "Champion");
|
||||
SHOW_CHAMPION_AURA = ChampionMonster.getBoolean("ChampionAura", true);
|
||||
CHAMP_MIN_LVL = ChampionMonster.getInt("ChampionMinLevel", 20);
|
||||
CHAMP_MAX_LVL = ChampionMonster.getInt("ChampionMaxLevel", 60);
|
||||
CHAMP_MIN_LEVEL = ChampionMonster.getInt("ChampionMinLevel", 20);
|
||||
CHAMP_MAX_LEVEL = ChampionMonster.getInt("ChampionMaxLevel", 60);
|
||||
CHAMPION_HP = ChampionMonster.getInt("ChampionHp", 7);
|
||||
CHAMPION_HP_REGEN = ChampionMonster.getFloat("ChampionHpRegen", 1);
|
||||
CHAMPION_REWARDS_EXP_SP = ChampionMonster.getFloat("ChampionRewardsExpSp", 8);
|
||||
@@ -2482,8 +2482,8 @@ public class Config
|
||||
CHAMPION_ADENAS_REWARDS_AMOUNT = ChampionMonster.getFloat("ChampionAdenasRewardsAmount", 1);
|
||||
CHAMPION_ATK = ChampionMonster.getFloat("ChampionAtk", 1);
|
||||
CHAMPION_SPD_ATK = ChampionMonster.getFloat("ChampionSpdAtk", 1);
|
||||
CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = ChampionMonster.getInt("ChampionRewardLowerLvlItemChance", 0);
|
||||
CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = ChampionMonster.getInt("ChampionRewardHigherLvlItemChance", 0);
|
||||
CHAMPION_REWARD_LOWER_LEVEL_ITEM_CHANCE = ChampionMonster.getInt("ChampionRewardLowerLvlItemChance", 0);
|
||||
CHAMPION_REWARD_HIGHER_LEVEL_ITEM_CHANCE = ChampionMonster.getInt("ChampionRewardHigherLvlItemChance", 0);
|
||||
CHAMPION_REWARD_ID = ChampionMonster.getInt("ChampionRewardItemID", 6393);
|
||||
CHAMPION_REWARD_QTY = ChampionMonster.getInt("ChampionRewardItemQty", 1);
|
||||
CHAMPION_ENABLE_VITALITY = ChampionMonster.getBoolean("ChampionEnableVitality", false);
|
||||
|
@@ -172,7 +172,7 @@ public class InitialShortcutData implements IXmlReader
|
||||
case SKILL:
|
||||
{
|
||||
d1 = parseInteger(attrs, "skillId"); // Skill ID
|
||||
d2 = parseInteger(attrs, "skillLvl", 0); // Skill level
|
||||
d2 = parseInteger(attrs, "skillLevel", 0); // Skill level
|
||||
break;
|
||||
}
|
||||
case ACTION:
|
||||
|
@@ -761,22 +761,22 @@ public class NpcData implements IXmlReader
|
||||
|
||||
/**
|
||||
* Gets the all of level.
|
||||
* @param lvls of all the templates to get.
|
||||
* @param levels of all the templates to get.
|
||||
* @return the template list for the given level.
|
||||
*/
|
||||
public List<NpcTemplate> getAllOfLevel(int... lvls)
|
||||
public List<NpcTemplate> getAllOfLevel(int... levels)
|
||||
{
|
||||
return getTemplates(template -> CommonUtil.contains(lvls, template.getLevel()));
|
||||
return getTemplates(template -> CommonUtil.contains(levels, template.getLevel()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the all monsters of level.
|
||||
* @param lvls of all the monster templates to get.
|
||||
* @param levels of all the monster templates to get.
|
||||
* @return the template list for the given level.
|
||||
*/
|
||||
public List<NpcTemplate> getAllMonstersOfLevel(int... lvls)
|
||||
public List<NpcTemplate> getAllMonstersOfLevel(int... levels)
|
||||
{
|
||||
return getTemplates(template -> CommonUtil.contains(lvls, template.getLevel()) && template.isType("Monster"));
|
||||
return getTemplates(template -> CommonUtil.contains(levels, template.getLevel()) && template.isType("Monster"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -105,7 +105,7 @@ public class PetDataTable implements IXmlReader
|
||||
if (s.getNodeName().equals("skill"))
|
||||
{
|
||||
attrs = s.getAttributes();
|
||||
data.addNewSkill(parseInteger(attrs, "skillId"), parseInteger(attrs, "skillLvl"), parseInteger(attrs, "minLvl"));
|
||||
data.addNewSkill(parseInteger(attrs, "skillId"), parseInteger(attrs, "skillLevel"), parseInteger(attrs, "minLevel"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ public class PetSkillData implements IXmlReader
|
||||
final NamedNodeMap attrs = d.getAttributes();
|
||||
final int npcId = parseInteger(attrs, "npcId");
|
||||
final int skillId = parseInteger(attrs, "skillId");
|
||||
final int skillLvl = parseInteger(attrs, "skillLvl");
|
||||
final int skillLevel = parseInteger(attrs, "skillLevel");
|
||||
Map<Long, SkillHolder> skillTree = _skillTrees.get(npcId);
|
||||
if (skillTree == null)
|
||||
{
|
||||
@@ -74,13 +74,13 @@ public class PetSkillData implements IXmlReader
|
||||
_skillTrees.put(npcId, skillTree);
|
||||
}
|
||||
|
||||
if (SkillData.getInstance().getSkill(skillId, skillLvl == 0 ? 1 : skillLvl) != null)
|
||||
if (SkillData.getInstance().getSkill(skillId, skillLevel == 0 ? 1 : skillLevel) != null)
|
||||
{
|
||||
skillTree.put(SkillData.getSkillHashCode(skillId, skillLvl + 1), new SkillHolder(skillId, skillLvl));
|
||||
skillTree.put(SkillData.getSkillHashCode(skillId, skillLevel + 1), new SkillHolder(skillId, skillLevel));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not find skill with id " + skillId + ", level " + skillLvl + " for NPC " + npcId + ".");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not find skill with id " + skillId + ", level " + skillLevel + " for NPC " + npcId + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,11 +90,11 @@ public class PetSkillData implements IXmlReader
|
||||
|
||||
public int getAvailableLevel(Summon pet, int skillId)
|
||||
{
|
||||
int lvl = 0;
|
||||
int level = 0;
|
||||
if (!_skillTrees.containsKey(pet.getId()))
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Pet id " + pet.getId() + " does not have any skills assigned.");
|
||||
return lvl;
|
||||
return level;
|
||||
}
|
||||
|
||||
for (SkillHolder skillHolder : _skillTrees.get(pet.getId()).values())
|
||||
@@ -107,32 +107,32 @@ public class PetSkillData implements IXmlReader
|
||||
{
|
||||
if (pet.getLevel() < 70)
|
||||
{
|
||||
lvl = pet.getLevel() / 10;
|
||||
if (lvl <= 0)
|
||||
level = pet.getLevel() / 10;
|
||||
if (level <= 0)
|
||||
{
|
||||
lvl = 1;
|
||||
level = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lvl = 7 + ((pet.getLevel() - 70) / 5);
|
||||
level = 7 + ((pet.getLevel() - 70) / 5);
|
||||
}
|
||||
|
||||
// formula usable for skill that have 10 or more skill levels
|
||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skillHolder.getSkillId());
|
||||
if (lvl > maxLvl)
|
||||
final int maxLevel = SkillData.getInstance().getMaxLevel(skillHolder.getSkillId());
|
||||
if (level > maxLevel)
|
||||
{
|
||||
lvl = maxLvl;
|
||||
level = maxLevel;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if ((1 <= pet.getLevel()) && (skillHolder.getSkillLevel() > lvl))
|
||||
else if ((1 <= pet.getLevel()) && (skillHolder.getSkillLevel() > level))
|
||||
{
|
||||
lvl = skillHolder.getSkillLevel();
|
||||
level = skillHolder.getSkillLevel();
|
||||
}
|
||||
}
|
||||
|
||||
return lvl;
|
||||
return level;
|
||||
}
|
||||
|
||||
public List<Integer> getAvailableSkills(Summon pet)
|
||||
|
@@ -163,12 +163,12 @@ public class SkillData implements IXmlReader
|
||||
}
|
||||
|
||||
// skill/level not found, fix for transformation scripts
|
||||
final int maxLvl = getMaxLevel(skillId);
|
||||
final int maxLevel = getMaxLevel(skillId);
|
||||
// requested level too high
|
||||
if ((maxLvl > 0) && (level > maxLvl))
|
||||
if ((maxLevel > 0) && (level > maxLevel))
|
||||
{
|
||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Call to unexisting skill level id: " + skillId + " requested level: " + level + " max level: " + maxLvl + ".", new Throwable());
|
||||
return _skills.get(getSkillHashCode(skillId, maxLvl));
|
||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Call to unexisting skill level id: " + skillId + " requested level: " + level + " max level: " + maxLevel + ".", new Throwable());
|
||||
return _skills.get(getSkillHashCode(skillId, maxLevel));
|
||||
}
|
||||
|
||||
LOGGER.warning(getClass().getSimpleName() + ": No skill info found for skill id " + skillId + " and skill level " + level);
|
||||
|
@@ -819,8 +819,8 @@ public class SkillTreeData implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getSkillId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getSkillId(), maxLvl);
|
||||
final int maxLevel = SkillData.getInstance().getMaxLevel(skill.getSkillId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getSkillId(), maxLevel);
|
||||
if (skill.isAutoGet() && (player.getLevel() >= skill.getGetLevel()))
|
||||
{
|
||||
final Skill oldSkill = player.getKnownSkill(skill.getSkillId());
|
||||
@@ -1466,8 +1466,8 @@ public class SkillTreeData implements IXmlReader
|
||||
{
|
||||
for (Skill skill : player.getAllSkills())
|
||||
{
|
||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), maxLvl);
|
||||
final int maxLevel = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), maxLevel);
|
||||
if (!isCurrentClassSkillNoParent(player.getClassId(), hashCode) && !isRemoveSkill(player.getClassId(), skill.getId()) && !isAwakenSaveSkill(player.getClassId(), skill.getId()) && !isAlchemySkill(skill.getId(), skill.getLevel()))
|
||||
{
|
||||
// Do not remove equipped item skills.
|
||||
@@ -1697,8 +1697,8 @@ public class SkillTreeData implements IXmlReader
|
||||
return true;
|
||||
}
|
||||
|
||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
||||
final int maxLevel = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLevel));
|
||||
if (Arrays.binarySearch(_skillsByClassIdHashCodes.get(player.getClassId().getId()), hashCode) >= 0)
|
||||
{
|
||||
return true;
|
||||
@@ -1715,13 +1715,13 @@ public class SkillTreeData implements IXmlReader
|
||||
}
|
||||
|
||||
// Exclude Transfer Skills from this check.
|
||||
if (getTransferSkill(skill.getId(), Math.min(skill.getLevel(), maxLvl), player.getClassId()) != null)
|
||||
if (getTransferSkill(skill.getId(), Math.min(skill.getLevel(), maxLevel), player.getClassId()) != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Exclude Race skills from this check.
|
||||
if (getRaceSkill(skill.getId(), Math.min(skill.getLevel(), maxLvl), player.getRace()) != null)
|
||||
if (getRaceSkill(skill.getId(), Math.min(skill.getLevel(), maxLevel), player.getRace()) != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ public class MatchingRoomManager
|
||||
for (MatchingRoom room : _rooms.get(MatchingRoomType.PARTY).values())
|
||||
{
|
||||
if (((location < 0) || (room.getLocation() == location)) //
|
||||
&& ((type == PartyMatchingRoomLevelType.ALL) || ((room.getMinLvl() >= requestorLevel) && (room.getMaxLvl() <= requestorLevel))))
|
||||
&& ((type == PartyMatchingRoomLevelType.ALL) || ((room.getMinLevel() >= requestorLevel) && (room.getMaxLevel() <= requestorLevel))))
|
||||
{
|
||||
result.add(room);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class MatchingRoomManager
|
||||
for (MatchingRoom room : _rooms.get(MatchingRoomType.COMMAND_CHANNEL).values())
|
||||
{
|
||||
if ((room.getLocation() == location) //
|
||||
&& ((room.getMinLvl() <= level) && (room.getMaxLvl() >= level)))
|
||||
&& ((room.getMinLevel() <= level) && (room.getMaxLevel() >= level)))
|
||||
{
|
||||
result.add(room);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public class MatchingRoomManager
|
||||
for (MatchingRoom room : _rooms.get(MatchingRoomType.PARTY).values())
|
||||
{
|
||||
if ((room.getLocation() == location) //
|
||||
&& ((room.getMinLvl() <= level) && (room.getMaxLvl() >= level)))
|
||||
&& ((room.getMinLevel() <= level) && (room.getMaxLevel() >= level)))
|
||||
{
|
||||
return room;
|
||||
}
|
||||
|
@@ -108,9 +108,9 @@ public class Elementals
|
||||
|
||||
public int _maxLevel;
|
||||
|
||||
ElementalItemType(int maxLvl)
|
||||
ElementalItemType(int maxLevel)
|
||||
{
|
||||
_maxLevel = maxLvl;
|
||||
_maxLevel = maxLevel;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -914,10 +914,10 @@ public class Party extends AbstractPlayerGroup
|
||||
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))
|
||||
{
|
||||
int i = 0;
|
||||
final int lvlDiff = topLvl - player.getLevel();
|
||||
final int levelDiff = topLvl - player.getLevel();
|
||||
for (int[] gap : Config.PARTY_XP_CUTOFF_GAPS)
|
||||
{
|
||||
if ((lvlDiff >= gap[0]) && (lvlDiff <= gap[1]))
|
||||
if ((levelDiff >= gap[0]) && (levelDiff <= gap[1]))
|
||||
{
|
||||
xp = (addExp * Config.PARTY_XP_CUTOFF_GAP_PERCENTS[i]) / 100;
|
||||
sp = (addSp * Config.PARTY_XP_CUTOFF_GAP_PERCENTS[i]) / 100;
|
||||
|
@@ -37,8 +37,8 @@ public class PetData
|
||||
private final int _itemId;
|
||||
private int _load = 20000;
|
||||
private int _hungryLimit = 1;
|
||||
private int _minlvl = Byte.MAX_VALUE;
|
||||
private int _maxlvl = 0;
|
||||
private int _minLevel = Byte.MAX_VALUE;
|
||||
private int _maxLevel = 0;
|
||||
private boolean _syncLevel = false;
|
||||
private final List<Integer> _food = new ArrayList<>();
|
||||
|
||||
@@ -70,13 +70,13 @@ public class PetData
|
||||
*/
|
||||
public void addNewStat(int level, PetLevelData data)
|
||||
{
|
||||
if (_minlvl > level)
|
||||
if (_minLevel > level)
|
||||
{
|
||||
_minlvl = level;
|
||||
_minLevel = level;
|
||||
}
|
||||
if (_maxlvl < (level - 1))
|
||||
if (_maxLevel < (level - 1))
|
||||
{
|
||||
_maxlvl = level - 1;
|
||||
_maxLevel = level - 1;
|
||||
}
|
||||
_levelStats.put(level, data);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class PetData
|
||||
*/
|
||||
public int getMinLevel()
|
||||
{
|
||||
return _minlvl;
|
||||
return _minLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ public class PetData
|
||||
*/
|
||||
public int getMaxLevel()
|
||||
{
|
||||
return _maxlvl;
|
||||
return _maxLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,12 +174,12 @@ public class PetData
|
||||
|
||||
/**
|
||||
* @param skillId the skill Id to add.
|
||||
* @param skillLvl the skill level.
|
||||
* @param skillLevel the skill level.
|
||||
* @param petLvl the pet's level when this skill is available.
|
||||
*/
|
||||
public void addNewSkill(int skillId, int skillLvl, int petLvl)
|
||||
public void addNewSkill(int skillId, int skillLevel, int petLvl)
|
||||
{
|
||||
_skills.add(new PetSkillLearn(skillId, skillLvl, petLvl));
|
||||
_skills.add(new PetSkillLearn(skillId, skillLevel, petLvl));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,10 +215,10 @@ public class PetData
|
||||
}
|
||||
|
||||
// formula usable for skill that have 10 or more skill levels
|
||||
final int maxLvl = SkillData.getInstance().getMaxLevel(temp.getSkillId());
|
||||
if (lvl > maxLvl)
|
||||
final int maxLevel = SkillData.getInstance().getMaxLevel(temp.getSkillId());
|
||||
if (lvl > maxLevel)
|
||||
{
|
||||
lvl = maxLvl;
|
||||
lvl = maxLevel;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -249,12 +249,12 @@ public class PetData
|
||||
/**
|
||||
* @param id the skill Id.
|
||||
* @param lvl the skill level.
|
||||
* @param minLvl the minimum level when this skill is available.
|
||||
* @param minLevel the minimum level when this skill is available.
|
||||
*/
|
||||
public PetSkillLearn(int id, int lvl, int minLvl)
|
||||
public PetSkillLearn(int id, int lvl, int minLevel)
|
||||
{
|
||||
super(id, lvl);
|
||||
_minLevel = minLvl;
|
||||
_minLevel = minLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
||||
* Updates the shortcut bars with the new skill.
|
||||
* @param skillId the skill Id to search and update.
|
||||
* @param skillLevel the skill level to update.
|
||||
* @param skillSubLevel the skill sub level to update.
|
||||
* @param skillSubLevel the skill sub level to update.
|
||||
*/
|
||||
public synchronized void updateShortCuts(int skillId, int skillLevel, int skillSubLevel)
|
||||
public synchronized void updateShortCuts(int skillId, int skillLevel, int skillSubLevel )
|
||||
{
|
||||
// Update all the shortcuts for this skill
|
||||
for (Shortcut sc : _shortCuts.values())
|
||||
{
|
||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
||||
{
|
||||
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
|
||||
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel , 1);
|
||||
_owner.sendPacket(new ShortCutRegister(newsc));
|
||||
_owner.registerShortCut(newsc);
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ public class SkillLearn
|
||||
{
|
||||
private final String _skillName;
|
||||
private final int _skillId;
|
||||
private final int _skillLvl;
|
||||
private final int _skillLevel;
|
||||
private final int _getLevel;
|
||||
private final int _getDualClassLevel;
|
||||
private final boolean _autoGet;
|
||||
@@ -62,7 +62,7 @@ public class SkillLearn
|
||||
{
|
||||
_skillName = set.getString("skillName");
|
||||
_skillId = set.getInt("skillId");
|
||||
_skillLvl = set.getInt("skillLvl");
|
||||
_skillLevel = set.getInt("skillLevel");
|
||||
_getLevel = set.getInt("getLevel");
|
||||
_getDualClassLevel = set.getInt("getDualClassLevel", 0);
|
||||
_autoGet = set.getBoolean("autoGet", false);
|
||||
@@ -97,7 +97,7 @@ public class SkillLearn
|
||||
*/
|
||||
public int getSkillLevel()
|
||||
{
|
||||
return _skillLvl;
|
||||
return _skillLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -277,7 +277,7 @@ public class SkillLearn
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLvl);
|
||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel);
|
||||
return "[" + skill + " treeId: " + _treeId + " row: " + _row + " column: " + _column + " pointsRequired:" + _pointsRequired + "]";
|
||||
}
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ public class TimeStamp
|
||||
* Gets the skill level.
|
||||
* @return the skill level
|
||||
*/
|
||||
public int getSkillLvl()
|
||||
public int getSkillLevel()
|
||||
{
|
||||
return _id2;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
||||
* Gets the skill sub level.
|
||||
* @return the skill level
|
||||
*/
|
||||
public int getSkillSubLvl()
|
||||
public int getSkillSubLevel ()
|
||||
{
|
||||
return _id3;
|
||||
}
|
||||
|
@@ -1491,7 +1491,7 @@ public class Attackable extends Npc
|
||||
_champion = false;
|
||||
|
||||
// Set champion on next spawn
|
||||
if (Config.CHAMPION_ENABLE && isMonster() && !isQuestMonster() && !getTemplate().isUndying() && !_isRaid && !_isRaidMinion && (Config.CHAMPION_FREQUENCY > 0) && (getLevel() >= Config.CHAMP_MIN_LVL) && (getLevel() <= Config.CHAMP_MAX_LVL) && (Config.CHAMPION_ENABLE_IN_INSTANCES || (getInstanceId() == 0)))
|
||||
if (Config.CHAMPION_ENABLE && isMonster() && !isQuestMonster() && !getTemplate().isUndying() && !_isRaid && !_isRaidMinion && (Config.CHAMPION_FREQUENCY > 0) && (getLevel() >= Config.CHAMP_MIN_LEVEL) && (getLevel() <= Config.CHAMP_MAX_LEVEL) && (Config.CHAMPION_ENABLE_IN_INSTANCES || (getInstanceId() == 0)))
|
||||
{
|
||||
if (Rnd.get(100) < Config.CHAMPION_FREQUENCY)
|
||||
{
|
||||
@@ -1602,7 +1602,7 @@ public class Attackable extends Npc
|
||||
}
|
||||
}
|
||||
|
||||
// hi-lvl mobs bonus
|
||||
// hi-level mobs bonus
|
||||
final int diff = getLevel() - _seed.getLevel() - 5;
|
||||
if (diff > 0)
|
||||
{
|
||||
|
@@ -2236,10 +2236,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
public String getTitle()
|
||||
{
|
||||
// Custom level titles
|
||||
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||
if (isMonster() && (Config.SHOW_NPC_LEVEL || Config.SHOW_NPC_AGGRESSION))
|
||||
{
|
||||
String t1 = "";
|
||||
if (Config.SHOW_NPC_LVL)
|
||||
if (Config.SHOW_NPC_LEVEL)
|
||||
{
|
||||
t1 += "Lv " + getLevel();
|
||||
}
|
||||
@@ -5168,12 +5168,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isIgnoringSkillEffects(int skillId, int skillLvl)
|
||||
public boolean isIgnoringSkillEffects(int skillId, int skillLevel)
|
||||
{
|
||||
if (_ignoreSkillEffects != null)
|
||||
{
|
||||
final SkillHolder holder = getIgnoreSkillEffects().get(skillId);
|
||||
return ((holder != null) && ((holder.getSkillLevel() < 1) || (holder.getSkillLevel() == skillLvl)));
|
||||
return ((holder != null) && ((holder.getSkillLevel() < 1) || (holder.getSkillLevel() == skillLevel)));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -720,8 +720,8 @@ public class FortManagerInstance extends MerchantInstance
|
||||
return;
|
||||
}
|
||||
}
|
||||
final int lvl = Integer.parseInt(val);
|
||||
switch (lvl)
|
||||
final int level = Integer.parseInt(val);
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@@ -740,7 +740,7 @@ public class FortManagerInstance extends MerchantInstance
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_TELEPORT, lvl, fee, Config.FS_TELE_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_TELEPORT) == null)))
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_TELEPORT, level, fee, Config.FS_TELE_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_TELEPORT) == null)))
|
||||
{
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -767,8 +767,8 @@ public class FortManagerInstance extends MerchantInstance
|
||||
return;
|
||||
}
|
||||
}
|
||||
final int lvl = Integer.parseInt(val);
|
||||
switch (lvl)
|
||||
final int level = Integer.parseInt(val);
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@@ -787,7 +787,7 @@ public class FortManagerInstance extends MerchantInstance
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_SUPPORT, lvl, fee, Config.FS_SUPPORT_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_SUPPORT) == null)))
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_SUPPORT, level, fee, Config.FS_SUPPORT_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_SUPPORT) == null)))
|
||||
{
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -872,12 +872,12 @@ public class FortManagerInstance extends MerchantInstance
|
||||
return;
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
int skillLvl = 0;
|
||||
int skillLevel = 0;
|
||||
if (st.countTokens() >= 1)
|
||||
{
|
||||
skillLvl = Integer.parseInt(st.nextToken());
|
||||
skillLevel = Integer.parseInt(st.nextToken());
|
||||
}
|
||||
skill = SkillData.getInstance().getSkill(skillId, skillLvl);
|
||||
skill = SkillData.getInstance().getSkill(skillId, skillLevel);
|
||||
if (skill.hasEffectType(EffectType.SUMMON))
|
||||
{
|
||||
player.doCast(skill);
|
||||
|
@@ -1150,11 +1150,11 @@ public class PetInstance extends Summon
|
||||
{
|
||||
// TODO: Need Correct Penalty
|
||||
|
||||
final int lvl = getStat().getLevel();
|
||||
final double percentLost = (-0.07 * lvl) + 6.5;
|
||||
final int level = getStat().getLevel();
|
||||
final double percentLost = (-0.07 * level) + 6.5;
|
||||
|
||||
// Calculate the Experience loss
|
||||
final long lostExp = Math.round(((getStat().getExpForLevel(lvl + 1) - getStat().getExpForLevel(lvl)) * percentLost) / 100);
|
||||
final long lostExp = Math.round(((getStat().getExpForLevel(level + 1) - getStat().getExpForLevel(level)) * percentLost) / 100);
|
||||
|
||||
// Get the Experience before applying penalty
|
||||
_expBeforeDeath = getStat().getExp();
|
||||
@@ -1233,8 +1233,8 @@ public class PetInstance extends Summon
|
||||
return 0;
|
||||
}
|
||||
|
||||
final int lvl = getLevel();
|
||||
return lvl > 70 ? 7 + ((lvl - 70) / 5) : lvl / 10;
|
||||
final int level = getLevel();
|
||||
return level > 70 ? 7 + ((level - 70) / 5) : level / 10;
|
||||
}
|
||||
|
||||
public void updateRefOwner(PlayerInstance owner)
|
||||
|
@@ -93,7 +93,7 @@ public class PetManagerInstance extends MerchantInstance
|
||||
boolean ok = false;
|
||||
switch (val)
|
||||
{
|
||||
// Info evolve(player, "curent pet summon item", "new pet summon item", "lvl required to evolve")
|
||||
// Info evolve(player, "curent pet summon item", "new pet summon item", "level required to evolve")
|
||||
// To ignore evolve just put value 0 where do you like example: evolve(player, 0, 9882, 55);
|
||||
case 1:
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public class PetManagerInstance extends MerchantInstance
|
||||
boolean ok = false;
|
||||
switch (val)
|
||||
{
|
||||
// Info evolve(player, "curent pet summon item", "new pet summon item", "lvl required to evolve")
|
||||
// Info evolve(player, "curent pet summon item", "new pet summon item", "level required to evolve")
|
||||
case 1:
|
||||
{
|
||||
ok = Evolve.doRestore(player, this, 10307, 9882, 55);
|
||||
|
@@ -1558,11 +1558,11 @@ public class PlayerInstance extends Playable
|
||||
* Updates the shortcut bars with the new skill.
|
||||
* @param skillId the skill Id to search and update.
|
||||
* @param skillLevel the skill level to update.
|
||||
* @param skillSubLevel the skill sub level to update.
|
||||
* @param skillSubLevel the skill sub level to update.
|
||||
*/
|
||||
public void updateShortCuts(int skillId, int skillLevel, int skillSubLevel)
|
||||
public void updateShortCuts(int skillId, int skillLevel, int skillSubLevel )
|
||||
{
|
||||
_shortCuts.updateShortCuts(skillId, skillLevel, skillSubLevel);
|
||||
_shortCuts.updateShortCuts(skillId, skillLevel, skillSubLevel );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7225,8 +7225,8 @@ public class PlayerInstance extends Playable
|
||||
|
||||
statement.setInt(1, getObjectId());
|
||||
statement.setInt(2, t.getSkillId());
|
||||
statement.setInt(3, t.getSkillLvl());
|
||||
statement.setInt(4, t.getSkillSubLvl());
|
||||
statement.setInt(3, t.getSkillLevel());
|
||||
statement.setInt(4, t.getSkillSubLevel ());
|
||||
statement.setInt(5, -1);
|
||||
statement.setLong(6, t.getReuse());
|
||||
statement.setDouble(7, t.getStamp());
|
||||
@@ -12587,22 +12587,22 @@ public class PlayerInstance extends Playable
|
||||
learn = SkillTreeData.getInstance().getClassSkill(e.getKey(), e.getValue().getLevel() % 100, getClassId());
|
||||
if (learn != null)
|
||||
{
|
||||
final int lvlDiff = e.getKey() == CommonSkill.EXPERTISE.getId() ? 0 : 9;
|
||||
if (getLevel() < (learn.getGetLevel() - lvlDiff))
|
||||
final int levelDiff = e.getKey() == CommonSkill.EXPERTISE.getId() ? 0 : 9;
|
||||
if (getLevel() < (learn.getGetLevel() - levelDiff))
|
||||
{
|
||||
deacreaseSkillLevel(e.getValue(), lvlDiff);
|
||||
deacreaseSkillLevel(e.getValue(), levelDiff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void deacreaseSkillLevel(Skill skill, int lvlDiff)
|
||||
private void deacreaseSkillLevel(Skill skill, int levelDiff)
|
||||
{
|
||||
int nextLevel = -1;
|
||||
final Map<Long, SkillLearn> skillTree = SkillTreeData.getInstance().getCompleteClassSkillTree(getClassId());
|
||||
for (SkillLearn sl : skillTree.values())
|
||||
{
|
||||
if ((sl.getSkillId() == skill.getId()) && (nextLevel < sl.getSkillLevel()) && (getLevel() >= (sl.getGetLevel() - lvlDiff)))
|
||||
if ((sl.getSkillId() == skill.getId()) && (nextLevel < sl.getSkillLevel()) && (getLevel() >= (sl.getGetLevel() - levelDiff)))
|
||||
{
|
||||
nextLevel = sl.getSkillLevel(); // next possible skill level
|
||||
}
|
||||
|
@@ -756,11 +756,11 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
||||
// champion extra drop
|
||||
if (victim.isChampion())
|
||||
{
|
||||
if ((victim.getLevel() < killer.getLevel()) && (Rnd.get(100) < Config.CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE))
|
||||
if ((victim.getLevel() < killer.getLevel()) && (Rnd.get(100) < Config.CHAMPION_REWARD_LOWER_LEVEL_ITEM_CHANCE))
|
||||
{
|
||||
return calculatedDrops;
|
||||
}
|
||||
if ((victim.getLevel() > killer.getLevel()) && (Rnd.get(100) < Config.CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE))
|
||||
if ((victim.getLevel() > killer.getLevel()) && (Rnd.get(100) < Config.CHAMPION_REWARD_HIGHER_LEVEL_ITEM_CHANCE))
|
||||
{
|
||||
return calculatedDrops;
|
||||
}
|
||||
|
@@ -224,7 +224,7 @@ public enum EventType
|
||||
ON_PLAYER_CLAN_JOIN(OnPlayerClanJoin.class, void.class),
|
||||
ON_PLAYER_CLAN_LEADER_CHANGE(OnPlayerClanLeaderChange.class, void.class),
|
||||
ON_PLAYER_CLAN_LEFT(OnPlayerClanLeft.class, void.class),
|
||||
ON_PLAYER_CLAN_LVLUP(OnPlayerClanLvlUp.class, void.class),
|
||||
ON_PLAYER_CLAN_LEVELUP(OnPlayerClanLvlUp.class, void.class),
|
||||
// Clan warehouse events
|
||||
ON_PLAYER_CLAN_WH_ITEM_ADD(OnPlayerClanWHItemAdd.class, void.class),
|
||||
ON_PLAYER_CLAN_WH_ITEM_DESTROY(OnPlayerClanWHItemDestroy.class, void.class),
|
||||
|
@@ -48,6 +48,6 @@ public class OnPlayerClanLvlUp implements IBaseEvent
|
||||
@Override
|
||||
public EventType getType()
|
||||
{
|
||||
return EventType.ON_PLAYER_CLAN_LVLUP;
|
||||
return EventType.ON_PLAYER_CLAN_LEVELUP;
|
||||
}
|
||||
}
|
||||
|
@@ -31,9 +31,9 @@ public class ArmorsetSkillHolder extends SkillHolder
|
||||
private final int _minEnchant;
|
||||
private final boolean _isOptional;
|
||||
|
||||
public ArmorsetSkillHolder(int skillId, int skillLvl, int minimumPieces, int minEnchant, boolean isOptional)
|
||||
public ArmorsetSkillHolder(int skillId, int skillLevel, int minimumPieces, int minEnchant, boolean isOptional)
|
||||
{
|
||||
super(skillId, skillLvl);
|
||||
super(skillId, skillLevel);
|
||||
_minimumPieces = minimumPieces;
|
||||
_minEnchant = minEnchant;
|
||||
_isOptional = isOptional;
|
||||
|
@@ -25,7 +25,7 @@ import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
public class EffectDurationHolder
|
||||
{
|
||||
private final int _skillId;
|
||||
private final int _skillLvl;
|
||||
private final int _skillLevel;
|
||||
private final int _duration;
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ public class EffectDurationHolder
|
||||
public EffectDurationHolder(Skill skill, int duration)
|
||||
{
|
||||
_skillId = skill.getDisplayId();
|
||||
_skillLvl = skill.getDisplayLevel();
|
||||
_skillLevel = skill.getDisplayLevel();
|
||||
_duration = duration;
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ public class EffectDurationHolder
|
||||
* Get the effect's skill level.
|
||||
* @return the skill level
|
||||
*/
|
||||
public int getSkillLvl()
|
||||
public int getSkillLevel()
|
||||
{
|
||||
return _skillLvl;
|
||||
return _skillLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,9 +27,9 @@ public class ItemSkillHolder extends SkillHolder
|
||||
private final int _chance;
|
||||
private final int _value;
|
||||
|
||||
public ItemSkillHolder(int skillId, int skillLvl, ItemSkillType type, int chance, int value)
|
||||
public ItemSkillHolder(int skillId, int skillLevel, ItemSkillType type, int chance, int value)
|
||||
{
|
||||
super(skillId, skillLvl);
|
||||
super(skillId, skillLevel);
|
||||
_type = type;
|
||||
_chance = chance;
|
||||
_value = value;
|
||||
|
@@ -27,22 +27,22 @@ public class SkillHolder
|
||||
{
|
||||
private final int _skillId;
|
||||
private final int _skillLevel;
|
||||
private final int _skillSubLevel;
|
||||
private final int _skillSubLevel ;
|
||||
private Skill _skill;
|
||||
|
||||
public SkillHolder(int skillId, int skillLevel)
|
||||
{
|
||||
_skillId = skillId;
|
||||
_skillLevel = skillLevel;
|
||||
_skillSubLevel = 0;
|
||||
_skillSubLevel = 0;
|
||||
_skill = null;
|
||||
}
|
||||
|
||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
||||
{
|
||||
_skillId = skillId;
|
||||
_skillLevel = skillLevel;
|
||||
_skillSubLevel = skillSubLevel;
|
||||
_skillSubLevel = skillSubLevel ;
|
||||
_skill = null;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
||||
{
|
||||
_skillId = skill.getId();
|
||||
_skillLevel = skill.getLevel();
|
||||
_skillSubLevel = skill.getSubLevel();
|
||||
_skillSubLevel = skill.getSubLevel();
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
||||
return _skillLevel;
|
||||
}
|
||||
|
||||
public int getSkillSubLevel()
|
||||
public int getSkillSubLevel ()
|
||||
{
|
||||
return _skillSubLevel;
|
||||
return _skillSubLevel ;
|
||||
}
|
||||
|
||||
public Skill getSkill()
|
||||
{
|
||||
if (_skill == null)
|
||||
{
|
||||
_skill = SkillData.getInstance().getSkill(_skillId, Math.max(_skillLevel, 1), _skillSubLevel);
|
||||
_skill = SkillData.getInstance().getSkill(_skillId, Math.max(_skillLevel, 1), _skillSubLevel );
|
||||
}
|
||||
return _skill;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
||||
}
|
||||
|
||||
final SkillHolder holder = (SkillHolder) obj;
|
||||
return (holder.getSkillId() == _skillId) && (holder.getSkillLevel() == _skillLevel) && (holder.getSkillSubLevel() == _skillSubLevel);
|
||||
return (holder.getSkillId() == _skillId) && (holder.getSkillLevel() == _skillLevel) && (holder.getSkillSubLevel () == _skillSubLevel );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
||||
int result = 1;
|
||||
result = (prime * result) + _skillId;
|
||||
result = (prime * result) + _skillLevel;
|
||||
result = (prime * result) + _skillSubLevel;
|
||||
result = (prime * result) + _skillSubLevel ;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -36,9 +36,9 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
*/
|
||||
public class CommandChannelMatchingRoom extends MatchingRoom
|
||||
{
|
||||
public CommandChannelMatchingRoom(String title, int loot, int minlvl, int maxlvl, int maxmem, PlayerInstance leader)
|
||||
public CommandChannelMatchingRoom(String title, int loot, int minLevel, int maxLevel, int maxmem, PlayerInstance leader)
|
||||
{
|
||||
super(title, loot, minlvl, maxlvl, maxmem, leader);
|
||||
super(title, loot, minLevel, maxLevel, maxmem, leader);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -36,19 +36,19 @@ public abstract class MatchingRoom implements IIdentifiable
|
||||
private final int _id;
|
||||
private String _title;
|
||||
private int _loot;
|
||||
private int _minLvl;
|
||||
private int _maxLvl;
|
||||
private int _minLevel;
|
||||
private int _maxLevel;
|
||||
private int _maxCount;
|
||||
private Set<PlayerInstance> _members;
|
||||
private PlayerInstance _leader;
|
||||
|
||||
public MatchingRoom(String title, int loot, int minlvl, int maxlvl, int maxmem, PlayerInstance leader)
|
||||
public MatchingRoom(String title, int loot, int minLevel, int maxLevel, int maxmem, PlayerInstance leader)
|
||||
{
|
||||
_id = MatchingRoomManager.getInstance().addMatchingRoom(this);
|
||||
_title = title;
|
||||
_loot = loot;
|
||||
_minLvl = minlvl;
|
||||
_maxLvl = maxlvl;
|
||||
_minLevel = minLevel;
|
||||
_maxLevel = maxLevel;
|
||||
_maxCount = maxmem;
|
||||
_leader = leader;
|
||||
addMember(_leader);
|
||||
@@ -72,7 +72,7 @@ public abstract class MatchingRoom implements IIdentifiable
|
||||
|
||||
public void addMember(PlayerInstance player)
|
||||
{
|
||||
if ((player.getLevel() < _minLvl) || (player.getLevel() > _maxLvl) || ((_members != null) && (_members.size() >= _maxCount)))
|
||||
if ((player.getLevel() < _minLevel) || (player.getLevel() > _maxLevel) || ((_members != null) && (_members.size() >= _maxCount)))
|
||||
{
|
||||
notifyInvalidCondition(player);
|
||||
return;
|
||||
@@ -128,14 +128,14 @@ public abstract class MatchingRoom implements IIdentifiable
|
||||
return _loot;
|
||||
}
|
||||
|
||||
public int getMinLvl()
|
||||
public int getMinLevel()
|
||||
{
|
||||
return _minLvl;
|
||||
return _minLevel;
|
||||
}
|
||||
|
||||
public int getMaxLvl()
|
||||
public int getMaxLevel()
|
||||
{
|
||||
return _maxLvl;
|
||||
return _maxLevel;
|
||||
}
|
||||
|
||||
public int getLocation()
|
||||
@@ -168,14 +168,14 @@ public abstract class MatchingRoom implements IIdentifiable
|
||||
return player == _leader;
|
||||
}
|
||||
|
||||
public void setMinLvl(int minLvl)
|
||||
public void setMinLevel(int minLevel)
|
||||
{
|
||||
_minLvl = minLvl;
|
||||
_minLevel = minLevel;
|
||||
}
|
||||
|
||||
public void setMaxLvl(int maxLvl)
|
||||
public void setMaxLevel(int maxLevel)
|
||||
{
|
||||
_maxLvl = maxLvl;
|
||||
_maxLevel = maxLevel;
|
||||
}
|
||||
|
||||
public void setLootType(int loot)
|
||||
|
@@ -35,9 +35,9 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
*/
|
||||
public class PartyMatchingRoom extends MatchingRoom
|
||||
{
|
||||
public PartyMatchingRoom(String title, int loot, int minlvl, int maxlvl, int maxmem, PlayerInstance leader)
|
||||
public PartyMatchingRoom(String title, int loot, int minLevel, int maxLevel, int maxmem, PlayerInstance leader)
|
||||
{
|
||||
super(title, loot, minlvl, maxlvl, maxmem, leader);
|
||||
super(title, loot, minLevel, maxLevel, maxmem, leader);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -28,13 +28,13 @@ public class OptionsSkillHolder extends SkillHolder
|
||||
|
||||
/**
|
||||
* @param skillId
|
||||
* @param skillLvl
|
||||
* @param skillLevel
|
||||
* @param type
|
||||
* @param chance
|
||||
*/
|
||||
public OptionsSkillHolder(int skillId, int skillLvl, double chance, OptionsSkillType type)
|
||||
public OptionsSkillHolder(int skillId, int skillLevel, double chance, OptionsSkillType type)
|
||||
{
|
||||
super(skillId, skillLvl);
|
||||
super(skillId, skillLevel);
|
||||
_chance = chance;
|
||||
_type = type;
|
||||
}
|
||||
|
@@ -652,9 +652,9 @@ public class Formulas
|
||||
public static double calcLvlBonusMod(Creature attacker, Creature target, Skill skill)
|
||||
{
|
||||
final int attackerLvl = skill.getMagicLevel() > 0 ? skill.getMagicLevel() : attacker.getLevel();
|
||||
final double skillLvlBonusRateMod = 1 + (skill.getLvlBonusRate() / 100.);
|
||||
final double skillLevelBonusRateMod = 1 + (skill.getLvlBonusRate() / 100.);
|
||||
final double lvlMod = 1 + ((attackerLvl - target.getLevel()) / 100.);
|
||||
return skillLvlBonusRateMod * lvlMod;
|
||||
return skillLevelBonusRateMod * lvlMod;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -803,16 +803,16 @@ public class Formulas
|
||||
{
|
||||
lvlModifier = Math.pow(1.3, target.getLevel() - (skill.getMagicLevel() > 0 ? skill.getMagicLevel() : attacker.getLevel()));
|
||||
|
||||
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
|
||||
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LEVEL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
|
||||
{
|
||||
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
|
||||
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
|
||||
final int levelDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
|
||||
if (levelDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
|
||||
{
|
||||
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
|
||||
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[levelDiff];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1616,16 +1616,16 @@ public class Formulas
|
||||
final double pveRaidDefense;
|
||||
|
||||
double pvePenalty = 1;
|
||||
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
|
||||
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LEVEL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
|
||||
{
|
||||
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
|
||||
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
|
||||
final int levelDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
|
||||
if (levelDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
|
||||
{
|
||||
pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
|
||||
pvePenalty = Config.NPC_SKILL_DMG_PENALTY[levelDiff];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ public class MEvasionRateFinalizer implements IStatFunction
|
||||
final int level = creature.getLevel();
|
||||
if (creature.isPlayer())
|
||||
{
|
||||
// [Square(WIT)] * 3 + lvl;
|
||||
// [Square(WIT)] * 3 + level;
|
||||
baseValue += (Math.sqrt(creature.getWIT()) * 3) + (level * 2);
|
||||
|
||||
// Enchanted helm bonus
|
||||
@@ -47,7 +47,7 @@ public class MEvasionRateFinalizer implements IStatFunction
|
||||
}
|
||||
else
|
||||
{
|
||||
// [Square(DEX)] * 6 + lvl;
|
||||
// [Square(DEX)] * 6 + level;
|
||||
baseValue += (Math.sqrt(creature.getWIT()) * 3) + (level * 2);
|
||||
if (level > 69)
|
||||
{
|
||||
|
@@ -36,7 +36,7 @@ public class PAccuracyFinalizer implements IStatFunction
|
||||
|
||||
double baseValue = calcWeaponPlusBaseValue(creature, stat);
|
||||
|
||||
// [Square(DEX)] * 5 + lvl + weapon hitbonus;
|
||||
// [Square(DEX)] * 5 + level + weapon hitbonus;
|
||||
final int level = creature.getLevel();
|
||||
baseValue += (Math.sqrt(creature.getDEX()) * 5) + level;
|
||||
if (level > 69)
|
||||
|
@@ -39,7 +39,7 @@ public class PEvasionRateFinalizer implements IStatFunction
|
||||
final int level = creature.getLevel();
|
||||
if (creature.isPlayer())
|
||||
{
|
||||
// [Square(DEX)] * 5 + lvl;
|
||||
// [Square(DEX)] * 5 + level;
|
||||
baseValue += (Math.sqrt(creature.getDEX()) * 5) + level;
|
||||
if (level > 69)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class PEvasionRateFinalizer implements IStatFunction
|
||||
}
|
||||
else
|
||||
{
|
||||
// [Square(DEX)] * 5 + lvl;
|
||||
// [Square(DEX)] * 5 + level;
|
||||
baseValue += (Math.sqrt(creature.getDEX()) * 5) + level;
|
||||
if (level > 69)
|
||||
{
|
||||
|
@@ -53,8 +53,8 @@ public abstract class ZoneType extends ListenersContainer
|
||||
/** Parameters to affect specific characters */
|
||||
private boolean _checkAffected = false;
|
||||
private String _name = null;
|
||||
private int _minLvl;
|
||||
private int _maxLvl;
|
||||
private int _minLevel;
|
||||
private int _maxLevel;
|
||||
private int[] _race;
|
||||
private int[] _class;
|
||||
private char _classType;
|
||||
@@ -68,8 +68,8 @@ public abstract class ZoneType extends ListenersContainer
|
||||
protected ZoneType(int id)
|
||||
{
|
||||
_id = id;
|
||||
_minLvl = 0;
|
||||
_maxLvl = 0xFF;
|
||||
_minLevel = 0;
|
||||
_maxLevel = 0xFF;
|
||||
_classType = 0;
|
||||
_race = null;
|
||||
_class = null;
|
||||
@@ -102,12 +102,12 @@ public abstract class ZoneType extends ListenersContainer
|
||||
// Minimum level
|
||||
else if (name.equals("affectedLvlMin"))
|
||||
{
|
||||
_minLvl = Integer.parseInt(value);
|
||||
_minLevel = Integer.parseInt(value);
|
||||
}
|
||||
// Maximum level
|
||||
else if (name.equals("affectedLvlMax"))
|
||||
{
|
||||
_maxLvl = Integer.parseInt(value);
|
||||
_maxLevel = Integer.parseInt(value);
|
||||
}
|
||||
// Affected Races
|
||||
else if (name.equals("affectedRace"))
|
||||
@@ -211,8 +211,8 @@ public abstract class ZoneType extends ListenersContainer
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check lvl
|
||||
if ((creature.getLevel() < _minLvl) || (creature.getLevel() > _maxLvl))
|
||||
// Check level
|
||||
if ((creature.getLevel() < _minLevel) || (creature.getLevel() > _maxLevel))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -194,9 +194,9 @@ public class EffectZone extends ZoneType
|
||||
return _chance;
|
||||
}
|
||||
|
||||
public void addSkill(int skillId, int skillLvL)
|
||||
public void addSkill(int skillId, int skillLevel)
|
||||
{
|
||||
if (skillLvL < 1) // remove skill
|
||||
if (skillLevel < 1) // remove skill
|
||||
{
|
||||
removeSkill(skillId);
|
||||
return;
|
||||
@@ -212,7 +212,7 @@ public class EffectZone extends ZoneType
|
||||
}
|
||||
}
|
||||
}
|
||||
_skills.put(skillId, skillLvL);
|
||||
_skills.put(skillId, skillLevel);
|
||||
}
|
||||
|
||||
public void removeSkill(int skillId)
|
||||
|
@@ -240,14 +240,14 @@ public class SiegeZone extends ZoneType
|
||||
// debuff participants only if they die inside siege zone
|
||||
if (getSettings().isActiveSiege() && creature.isPlayer() && creature.getActingPlayer().isRegisteredOnThisSiegeField(getSettings().getSiegeableId()))
|
||||
{
|
||||
int lvl = 1;
|
||||
int level = 1;
|
||||
final BuffInfo info = creature.getEffectList().getBuffInfoBySkillId(5660);
|
||||
if (info != null)
|
||||
{
|
||||
lvl = Math.min(lvl + info.getSkill().getLevel(), 5);
|
||||
level = Math.min(level + info.getSkill().getLevel(), 5);
|
||||
}
|
||||
|
||||
final Skill skill = SkillData.getInstance().getSkill(5660, lvl);
|
||||
final Skill skill = SkillData.getInstance().getSkill(5660, level);
|
||||
if (skill != null)
|
||||
{
|
||||
skill.applyEffects(creature, creature);
|
||||
|
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
||||
private int _objectId;
|
||||
private int _skillId;
|
||||
private int _skillLevel;
|
||||
private int _skillSubLevel;
|
||||
private int _skillSubLevel ;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
||||
_objectId = packet.readD();
|
||||
_skillId = packet.readD();
|
||||
_skillLevel = packet.readH();
|
||||
_skillSubLevel = packet.readH();
|
||||
_skillSubLevel = packet.readH();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
||||
if (skill == null)
|
||||
{
|
||||
return;
|
||||
|
@@ -138,7 +138,7 @@ public class RequestExAskJoinMPCC implements IClientIncomingPacket
|
||||
boolean hasRight = false;
|
||||
if (requestor.isClanLeader() && (requestor.getClan().getLevel() >= 5))
|
||||
{
|
||||
// Clan leader of lvl5 Clan or higher.
|
||||
// Clan leader of level5 Clan or higher.
|
||||
hasRight = true;
|
||||
}
|
||||
else if (requestor.getInventory().getItemByItemId(8871) != null)
|
||||
|
@@ -48,8 +48,8 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
|
||||
private SkillEnchantType _type;
|
||||
private int _skillId;
|
||||
private int _skillLvl;
|
||||
private int _skillSubLvl;
|
||||
private int _skillLevel;
|
||||
private int _skillSubLevel ;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
@@ -63,15 +63,15 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
|
||||
_type = SkillEnchantType.values()[type];
|
||||
_skillId = packet.readD();
|
||||
_skillLvl = packet.readH();
|
||||
_skillSubLvl = packet.readH();
|
||||
_skillLevel = packet.readH();
|
||||
_skillSubLevel = packet.readH();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
if ((_skillId <= 0) || (_skillLvl <= 0) || (_skillSubLvl < 0))
|
||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (skill.getLevel() != _skillLvl)
|
||||
if (skill.getLevel() != _skillLevel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
{
|
||||
if (_type == SkillEnchantType.CHANGE)
|
||||
{
|
||||
final int group1 = (_skillSubLvl % 1000);
|
||||
final int group1 = (_skillSubLevel % 1000);
|
||||
final int group2 = (skill.getSubLevel() % 1000);
|
||||
if (group1 != group2)
|
||||
{
|
||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ((skill.getSubLevel() + 1) != _skillSubLvl)
|
||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
||||
{
|
||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLvl + " expected: " + (skill.getSubLevel() + 1));
|
||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLvl % 1000);
|
||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||
|
||||
// Verify if player has all the ingredients
|
||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
{
|
||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||
{
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLvl, _skillSubLvl);
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
||||
if (Config.LOG_SKILL_ENCHANTS)
|
||||
{
|
||||
LOGGER_ENCHANT.log(Level.INFO, "Success, Character:" + player.getName() + " [" + player.getObjectId() + "] Account:" + player.getAccountName() + " IP:" + player.getIPAddress() + ", +" + enchantedSkill.getLevel() + " " + enchantedSkill.getSubLevel() + " - " + enchantedSkill.getName() + " (" + enchantedSkill.getId() + "), " + enchantSkillHolder.getChance(_type));
|
||||
@@ -195,7 +195,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
else
|
||||
{
|
||||
final int newSubLevel = ((skill.getSubLevel() > 0) && (enchantSkillHolder.getEnchantFailLevel() > 0)) ? ((skill.getSubLevel() - (skill.getSubLevel() % 1000)) + enchantSkillHolder.getEnchantFailLevel()) : 0;
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLvl, _type == SkillEnchantType.NORMAL ? newSubLevel : skill.getSubLevel());
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _type == SkillEnchantType.NORMAL ? newSubLevel : skill.getSubLevel());
|
||||
if (_type == SkillEnchantType.NORMAL)
|
||||
{
|
||||
player.addSkill(enchantedSkill, true);
|
||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
{
|
||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||
{
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLvl, _skillSubLvl);
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
||||
if (Config.LOG_SKILL_ENCHANTS)
|
||||
{
|
||||
LOGGER_ENCHANT.info("Success, Character:" + player.getName() + " [" + player.getObjectId() + "] Account:" + player.getAccountName() + " IP:" + player.getIPAddress() + ", +" + enchantedSkill.getLevel() + " " + enchantedSkill.getSubLevel() + " - " + enchantedSkill.getName() + " (" + enchantedSkill.getId() + "), " + enchantSkillHolder.getChance(_type));
|
||||
@@ -233,7 +233,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLvl, enchantSkillHolder.getEnchantFailLevel());
|
||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, enchantSkillHolder.getEnchantFailLevel());
|
||||
player.addSkill(enchantedSkill, true);
|
||||
player.sendPacket(SystemMessageId.SKILL_ENCHANT_FAILED_THE_SKILL_WILL_BE_INITIALIZED);
|
||||
player.sendPacket(ExEnchantSkillResult.STATIC_PACKET_FALSE);
|
||||
|
@@ -28,28 +28,28 @@ import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExEnchantSkillInfo;
|
||||
|
||||
/**
|
||||
* Format (ch) dd c: (id) 0xD0 h: (subid) 0x06 d: skill id d: skill lvl
|
||||
* Format (ch) dd c: (id) 0xD0 h: (subid) 0x06 d: skill id d: skill level
|
||||
* @author -Wooden-
|
||||
*/
|
||||
public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
||||
{
|
||||
private int _skillId;
|
||||
private int _skillLvl;
|
||||
private int _skillSubLvl;
|
||||
private int _skillLevel;
|
||||
private int _skillSubLevel ;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_skillId = packet.readD();
|
||||
_skillLvl = packet.readH();
|
||||
_skillSubLvl = packet.readH();
|
||||
_skillLevel = packet.readH();
|
||||
_skillSubLevel = packet.readH();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
if ((_skillId <= 0) || (_skillLvl <= 0) || (_skillSubLvl < 0))
|
||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -65,25 +65,25 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLvl, _skillSubLvl);
|
||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
||||
if ((skill == null) || (skill.getId() != _skillId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
final Set<Integer> route = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLvl);
|
||||
final Set<Integer> route = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||
if (route.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||
if ((playerSkill.getLevel() != _skillLvl) || (playerSkill.getSubLevel() != _skillSubLvl))
|
||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLvl, _skillSubLvl, playerSkill.getSubLevel()));
|
||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLvl, _skillSubLvl, activeChar));
|
||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||
}
|
||||
}
|
@@ -29,23 +29,23 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
||||
{
|
||||
private SkillEnchantType _type;
|
||||
private int _skillId;
|
||||
private int _skillLvl;
|
||||
private int _skillSubLvl;
|
||||
private int _skillLevel;
|
||||
private int _skillSubLevel ;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_type = SkillEnchantType.values()[packet.readD()];
|
||||
_skillId = packet.readD();
|
||||
_skillLvl = packet.readH();
|
||||
_skillSubLvl = packet.readH();
|
||||
_skillLevel = packet.readH();
|
||||
_skillSubLevel = packet.readH();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
if ((_skillId <= 0) || (_skillLvl <= 0) || (_skillSubLvl < 0))
|
||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLvl, _skillSubLvl, player));
|
||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
||||
}
|
||||
}
|
||||
|
@@ -65,8 +65,8 @@ public class RequestExManageMpccRoom implements IClientIncomingPacket
|
||||
|
||||
room.setTitle(_title);
|
||||
room.setMaxMembers(_maxMembers);
|
||||
room.setMinLvl(_minLevel);
|
||||
room.setMaxLvl(_maxLevel);
|
||||
room.setMinLevel(_minLevel);
|
||||
room.setMaxLevel(_maxLevel);
|
||||
|
||||
room.getMembers().forEach(p -> p.sendPacket(new ExMPCCRoomInfo((CommandChannelMatchingRoom) room)));
|
||||
player.sendPacket(SystemMessageId.THE_COMMAND_CHANNEL_MATCHING_ROOM_INFORMATION_WAS_EDITED);
|
||||
|
@@ -68,8 +68,8 @@ public class RequestPartyMatchList implements IClientIncomingPacket
|
||||
if ((room.getId() == _roomId) && (room.getRoomType() == MatchingRoomType.PARTY) && room.isLeader(player))
|
||||
{
|
||||
room.setLootType(_lootType);
|
||||
room.setMinLvl(_minLevel);
|
||||
room.setMaxLvl(_maxLevel);
|
||||
room.setMinLevel(_minLevel);
|
||||
room.setMaxLevel(_maxLevel);
|
||||
room.setMaxMembers(_maxMembers);
|
||||
room.setTitle(_roomTitle);
|
||||
|
||||
|
@@ -28,8 +28,8 @@ public class RequestShortCutReg implements IClientIncomingPacket
|
||||
private int _id;
|
||||
private int _slot;
|
||||
private int _page;
|
||||
private int _lvl;
|
||||
private int _subLvl;
|
||||
private int _level;
|
||||
private int _subLevel;
|
||||
private int _characterType; // 1 - player, 2 - pet
|
||||
|
||||
@Override
|
||||
@@ -41,8 +41,8 @@ public class RequestShortCutReg implements IClientIncomingPacket
|
||||
_slot = slot % 12;
|
||||
_page = slot / 12;
|
||||
_id = packet.readD();
|
||||
_lvl = packet.readH();
|
||||
_subLvl = packet.readH(); // Sublevel
|
||||
_level = packet.readH();
|
||||
_subLevel = packet.readH(); // Sublevel
|
||||
_characterType = packet.readD();
|
||||
return true;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class RequestShortCutReg implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _lvl, _subLvl, _characterType);
|
||||
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
|
||||
client.getPlayer().registerShortCut(sc);
|
||||
client.sendPacket(new ShortCutRegister(sc));
|
||||
}
|
||||
|
@@ -343,7 +343,7 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
charInfopackage.setHtmlPrefix("data/lang/" + lang + "/");
|
||||
}
|
||||
|
||||
// if is in subclass, load subclass exp, sp, lvl info
|
||||
// if is in subclass, load subclass exp, sp, level info
|
||||
if (baseClassId != activeClassId)
|
||||
{
|
||||
loadCharacterSubclassInfo(charInfopackage, objectId, activeClassId);
|
||||
|
@@ -42,8 +42,8 @@ public class EtcStatusUpdate implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.ETC_STATUS_UPDATE.writeId(packet);
|
||||
|
||||
packet.writeC(_player.getCharges()); // 1-7 increase force, lvl
|
||||
packet.writeD(_player.getWeightPenalty()); // 1-4 weight penalty, lvl (1=50%, 2=66.6%, 3=80%, 4=100%)
|
||||
packet.writeC(_player.getCharges()); // 1-7 increase force, level
|
||||
packet.writeD(_player.getWeightPenalty()); // 1-4 weight penalty, level (1=50%, 2=66.6%, 3=80%, 4=100%)
|
||||
packet.writeC(_player.getExpertiseWeaponPenalty()); // Weapon Grade Penalty [1-4]
|
||||
packet.writeC(_player.getExpertiseArmorPenalty()); // Armor Grade Penalty [1-4]
|
||||
packet.writeC(0); // Death Penalty [1-15, 0 = disabled)], not used anymore in Ertheia
|
||||
|
@@ -28,14 +28,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
||||
|
||||
private final int _skillId;
|
||||
private final int _skillLevel;
|
||||
private final int _skillSubLevel;
|
||||
private final int _skillSubLevel ;
|
||||
private final int _currentSubLevel;
|
||||
|
||||
public ExEnchantSkillInfo(int skillId, int skillLevel, int skillSubLevel, int currentSubLevel)
|
||||
public ExEnchantSkillInfo(int skillId, int skillLevel, int skillSubLevel , int currentSubLevel)
|
||||
{
|
||||
_skillId = skillId;
|
||||
_skillLevel = skillLevel;
|
||||
_skillSubLevel = skillSubLevel;
|
||||
_skillSubLevel = skillSubLevel ;
|
||||
_currentSubLevel = currentSubLevel;
|
||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||
}
|
||||
@@ -46,14 +46,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||
packet.writeD(_skillId);
|
||||
packet.writeH(_skillLevel);
|
||||
packet.writeH(_skillSubLevel);
|
||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||
packet.writeH(_skillSubLevel );
|
||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||
packet.writeD(_routes.size());
|
||||
_routes.forEach(route ->
|
||||
{
|
||||
final int routeId = route / 1000;
|
||||
final int currentRouteId = _skillSubLevel / 1000;
|
||||
final int currentRouteId = _skillSubLevel / 1000;
|
||||
final int subLevel = _currentSubLevel > 0 ? (route + (_currentSubLevel % 1000)) - 1 : route;
|
||||
packet.writeH(_skillLevel);
|
||||
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
||||
|
@@ -33,17 +33,17 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
||||
{
|
||||
private final SkillEnchantType _type;
|
||||
private final int _skillId;
|
||||
private final int _skillLvl;
|
||||
private final int _skillSubLvl;
|
||||
private final int _skillLevel;
|
||||
private final int _skillSubLevel ;
|
||||
private final EnchantSkillHolder _enchantSkillHolder;
|
||||
|
||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLvl, int skillSubLvl, PlayerInstance player)
|
||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
||||
{
|
||||
_type = type;
|
||||
_skillId = skillId;
|
||||
_skillLvl = skillLvl;
|
||||
_skillSubLvl = skillSubLvl;
|
||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLvl % 1000);
|
||||
_skillLevel = skillLevel;
|
||||
_skillSubLevel = skillSubLevel ;
|
||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,8 +53,8 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
||||
|
||||
packet.writeD(_type.ordinal());
|
||||
packet.writeD(_skillId);
|
||||
packet.writeH(_skillLvl);
|
||||
packet.writeH(_skillSubLvl);
|
||||
packet.writeH(_skillLevel);
|
||||
packet.writeH(_skillSubLevel );
|
||||
if (_enchantSkillHolder != null)
|
||||
{
|
||||
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
||||
|
@@ -61,8 +61,8 @@ public class ExListMpccWaiting implements IClientOutgoingPacket
|
||||
packet.writeD(room.getId());
|
||||
packet.writeS(room.getTitle());
|
||||
packet.writeD(room.getMembersCount());
|
||||
packet.writeD(room.getMinLvl());
|
||||
packet.writeD(room.getMaxLvl());
|
||||
packet.writeD(room.getMinLevel());
|
||||
packet.writeD(room.getMaxLevel());
|
||||
packet.writeD(room.getLocation());
|
||||
packet.writeD(room.getMaxMembers());
|
||||
packet.writeS(room.getLeader().getName());
|
||||
|
@@ -39,8 +39,8 @@ public class ExMPCCRoomInfo implements IClientOutgoingPacket
|
||||
|
||||
packet.writeD(_room.getId());
|
||||
packet.writeD(_room.getMaxMembers());
|
||||
packet.writeD(_room.getMinLvl());
|
||||
packet.writeD(_room.getMaxLvl());
|
||||
packet.writeD(_room.getMinLevel());
|
||||
packet.writeD(_room.getMaxLevel());
|
||||
packet.writeD(_room.getLootType());
|
||||
packet.writeD(_room.getLocation());
|
||||
packet.writeS(_room.getTitle());
|
||||
|
@@ -65,8 +65,8 @@ public class ListPartyWaiting implements IClientOutgoingPacket
|
||||
packet.writeD(room.getId());
|
||||
packet.writeS(room.getTitle());
|
||||
packet.writeD(room.getLocation());
|
||||
packet.writeD(room.getMinLvl());
|
||||
packet.writeD(room.getMaxLvl());
|
||||
packet.writeD(room.getMinLevel());
|
||||
packet.writeD(room.getMaxLevel());
|
||||
packet.writeD(room.getMaxMembers());
|
||||
packet.writeS(room.getLeader().getName());
|
||||
packet.writeD(room.getMembersCount());
|
||||
|
@@ -167,7 +167,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
addComponentType(NpcInfoType.NAME);
|
||||
}
|
||||
|
||||
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LEVEL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||
{
|
||||
addComponentType(NpcInfoType.TITLE);
|
||||
}
|
||||
|
@@ -39,8 +39,8 @@ public class PartyRoomInfo implements IClientOutgoingPacket
|
||||
|
||||
packet.writeD(_room.getId());
|
||||
packet.writeD(_room.getMaxMembers());
|
||||
packet.writeD(_room.getMinLvl());
|
||||
packet.writeD(_room.getMaxLvl());
|
||||
packet.writeD(_room.getMinLevel());
|
||||
packet.writeD(_room.getMaxLevel());
|
||||
packet.writeD(_room.getLootType());
|
||||
packet.writeD(_room.getLocation());
|
||||
packet.writeS(_room.getTitle());
|
||||
|
@@ -149,7 +149,7 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_summon.getMaxMp()); // max mp
|
||||
|
||||
packet.writeQ(_summon.getStat().getSp()); // sp
|
||||
packet.writeC(_summon.getLevel()); // lvl
|
||||
packet.writeC(_summon.getLevel()); // level
|
||||
packet.writeQ(_summon.getStat().getExp());
|
||||
|
||||
if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
|
||||
|
@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
public class PledgeShowMemberListAdd implements IClientOutgoingPacket
|
||||
{
|
||||
private final String _name;
|
||||
private final int _lvl;
|
||||
private final int _level;
|
||||
private final int _classId;
|
||||
private final int _isOnline;
|
||||
private final int _pledgeType;
|
||||
@@ -32,7 +32,7 @@ public class PledgeShowMemberListAdd implements IClientOutgoingPacket
|
||||
public PledgeShowMemberListAdd(PlayerInstance player)
|
||||
{
|
||||
_name = player.getName();
|
||||
_lvl = player.getLevel();
|
||||
_level = player.getLevel();
|
||||
_classId = player.getClassId().getId();
|
||||
_isOnline = (player.isOnline() ? player.getObjectId() : 0);
|
||||
_pledgeType = player.getPledgeType();
|
||||
@@ -41,7 +41,7 @@ public class PledgeShowMemberListAdd implements IClientOutgoingPacket
|
||||
public PledgeShowMemberListAdd(ClanMember cm)
|
||||
{
|
||||
_name = cm.getName();
|
||||
_lvl = cm.getLevel();
|
||||
_level = cm.getLevel();
|
||||
_classId = cm.getClassId();
|
||||
_isOnline = (cm.isOnline() ? cm.getObjectId() : 0);
|
||||
_pledgeType = cm.getPledgeType();
|
||||
@@ -53,7 +53,7 @@ public class PledgeShowMemberListAdd implements IClientOutgoingPacket
|
||||
OutgoingPackets.PLEDGE_SHOW_MEMBER_LIST_ADD.writeId(packet);
|
||||
|
||||
packet.writeS(_name);
|
||||
packet.writeD(_lvl);
|
||||
packet.writeD(_level);
|
||||
packet.writeD(_classId);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x01);
|
||||
|
@@ -33,13 +33,13 @@ public class PledgeSkillList implements IClientOutgoingPacket
|
||||
{
|
||||
int _subType;
|
||||
int _skillId;
|
||||
int _skillLvl;
|
||||
int _skillLevel;
|
||||
|
||||
public SubPledgeSkill(int subType, int skillId, int skillLvl)
|
||||
public SubPledgeSkill(int subType, int skillId, int skillLevel)
|
||||
{
|
||||
_subType = subType;
|
||||
_skillId = skillId;
|
||||
_skillLvl = skillLvl;
|
||||
_skillLevel = skillLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PledgeSkillList implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(sk._subType); // Clan Sub-unit types
|
||||
packet.writeD(sk._skillId);
|
||||
packet.writeH(sk._skillLvl);
|
||||
packet.writeH(sk._skillLevel);
|
||||
packet.writeH(0x00); // Sub level
|
||||
}
|
||||
return true;
|
||||
|
@@ -25,12 +25,12 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
public class PledgeSkillListAdd implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _id;
|
||||
private final int _lvl;
|
||||
private final int _level;
|
||||
|
||||
public PledgeSkillListAdd(int id, int lvl)
|
||||
public PledgeSkillListAdd(int id, int level)
|
||||
{
|
||||
_id = id;
|
||||
_lvl = lvl;
|
||||
_level = level;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +39,7 @@ public class PledgeSkillListAdd implements IClientOutgoingPacket
|
||||
OutgoingPackets.PLEDGE_SKILL_LIST_ADD.writeId(packet);
|
||||
|
||||
packet.writeD(_id);
|
||||
packet.writeD(_lvl);
|
||||
packet.writeD(_level);
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -24,15 +24,15 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
||||
public static final ShortBuffStatusUpdate RESET_SHORT_BUFF = new ShortBuffStatusUpdate(0, 0, 0, 0);
|
||||
|
||||
private final int _skillId;
|
||||
private final int _skillLvl;
|
||||
private final int _skillSubLvl;
|
||||
private final int _skillLevel;
|
||||
private final int _skillSubLevel ;
|
||||
private final int _duration;
|
||||
|
||||
public ShortBuffStatusUpdate(int skillId, int skillLvl, int skillSubLvl, int duration)
|
||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
||||
{
|
||||
_skillId = skillId;
|
||||
_skillLvl = skillLvl;
|
||||
_skillSubLvl = skillSubLvl;
|
||||
_skillLevel = skillLevel;
|
||||
_skillSubLevel = skillSubLevel ;
|
||||
_duration = duration;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
||||
OutgoingPackets.SHORT_BUFF_STATUS_UPDATE.writeId(packet);
|
||||
|
||||
packet.writeD(_skillId);
|
||||
packet.writeH(_skillLvl);
|
||||
packet.writeH(_skillSubLvl);
|
||||
packet.writeH(_skillLevel);
|
||||
packet.writeH(_skillSubLevel );
|
||||
packet.writeD(_duration);
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
||||
_currentTime = System.currentTimeMillis();
|
||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||
{
|
||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLvl(), ts.getSkillSubLvl()).isNotBroadcastable())
|
||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
||||
{
|
||||
_skillReuseTimeStamps.add(ts);
|
||||
}
|
||||
|
@@ -296,13 +296,13 @@ public class SystemMessage implements IClientOutgoingPacket
|
||||
return addSkillName(id, 1, 0);
|
||||
}
|
||||
|
||||
public SystemMessage addSkillName(int id, int lvl, int subLvl)
|
||||
public SystemMessage addSkillName(int id, int lvl, int subLevel)
|
||||
{
|
||||
append(new SMParam(TYPE_SKILL_NAME, new int[]
|
||||
{
|
||||
id,
|
||||
lvl,
|
||||
subLvl
|
||||
subLevel
|
||||
}));
|
||||
return this;
|
||||
}
|
||||
|
@@ -46,9 +46,9 @@ public class Evolve
|
||||
{
|
||||
protected static final Logger LOGGER = Logger.getLogger(Evolve.class.getName());
|
||||
|
||||
public static boolean doEvolve(PlayerInstance player, Npc npc, int itemIdtake, int itemIdgive, int petminlvl)
|
||||
public static boolean doEvolve(PlayerInstance player, Npc npc, int itemIdtake, int itemIdgive, int petminLevel)
|
||||
{
|
||||
if ((itemIdtake == 0) || (itemIdgive == 0) || (petminlvl == 0))
|
||||
if ((itemIdtake == 0) || (itemIdgive == 0) || (petminLevel == 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class Evolve
|
||||
}
|
||||
|
||||
final int oldnpcID = oldData.getNpcId();
|
||||
if ((currentPet.getStat().getLevel() < petminlvl) || (currentPet.getId() != oldnpcID))
|
||||
if ((currentPet.getStat().getLevel() < petminLevel) || (currentPet.getId() != oldnpcID))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class Evolve
|
||||
}
|
||||
|
||||
// Fix for non-linear baby pet exp
|
||||
final long _minimumexp = petSummon.getStat().getExpForLevel(petminlvl);
|
||||
final long _minimumexp = petSummon.getStat().getExpForLevel(petminLevel);
|
||||
if (petexp < _minimumexp)
|
||||
{
|
||||
petexp = _minimumexp;
|
||||
@@ -147,9 +147,9 @@ public class Evolve
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean doRestore(PlayerInstance player, Npc npc, int itemIdtake, int itemIdgive, int petminlvl)
|
||||
public static boolean doRestore(PlayerInstance player, Npc npc, int itemIdtake, int itemIdgive, int petminLevel)
|
||||
{
|
||||
if ((itemIdtake == 0) || (itemIdgive == 0) || (petminlvl == 0))
|
||||
if ((itemIdtake == 0) || (itemIdgive == 0) || (petminLevel == 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -161,9 +161,9 @@ public class Evolve
|
||||
}
|
||||
|
||||
int oldpetlvl = item.getEnchantLevel();
|
||||
if (oldpetlvl < petminlvl)
|
||||
if (oldpetlvl < petminLevel)
|
||||
{
|
||||
oldpetlvl = petminlvl;
|
||||
oldpetlvl = petminLevel;
|
||||
}
|
||||
|
||||
final PetData oldData = PetDataTable.getInstance().getPetDataByItemId(itemIdtake);
|
||||
|
Reference in New Issue
Block a user