Minor code format.
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1577,11 +1577,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7253,7 +7253,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+12
-12
@@ -50,7 +50,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -62,12 +62,12 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
if (level < 100)
|
if (level < 100)
|
||||||
{
|
{
|
||||||
_skillLevel = level;
|
_skillLevel = level;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_skillLevel = client.getPlayer().getKnownSkill(_skillId).getLevel();
|
_skillLevel = client.getPlayer().getKnownSkill(_skillId).getLevel();
|
||||||
_skillSubLevel = SkillEnchantConverter.levelToUnderground(level);
|
_skillSubLevel = SkillEnchantConverter.levelToUnderground(level);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -139,14 +139,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((_type != SkillEnchantType.UNTRAIN) && ((skill.getSubLevel() + 1) != _skillSubLevel ))
|
else if ((_type != SkillEnchantType.UNTRAIN) && ((skill.getSubLevel() + 1) != _skillSubLevel))
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
if (_type != SkillEnchantType.UNTRAIN) // TODO: Fix properly
|
if (_type != SkillEnchantType.UNTRAIN) // TODO: Fix properly
|
||||||
{
|
{
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
@@ -185,7 +185,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -224,7 +224,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -256,14 +256,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
// TODO: Fix properly
|
// TODO: Fix properly
|
||||||
final Skill enchantedSkill;
|
final Skill enchantedSkill;
|
||||||
final SystemMessage sm;
|
final SystemMessage sm;
|
||||||
if ((_skillSubLevel % 1000) < 1)
|
if ((_skillSubLevel % 1000) < 1)
|
||||||
{
|
{
|
||||||
enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel);
|
enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel);
|
||||||
sm = new SystemMessage(SystemMessageId.UNTRAIN_OF_ENCHANT_SKILL_WAS_SUCCESSFUL_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_BECAME_0_AND_ENCHANT_SKILL_WILL_BE_INITIALIZED);
|
sm = new SystemMessage(SystemMessageId.UNTRAIN_OF_ENCHANT_SKILL_WAS_SUCCESSFUL_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_BECAME_0_AND_ENCHANT_SKILL_WILL_BE_INITIALIZED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
sm = new SystemMessage(SystemMessageId.UNTRAIN_OF_ENCHANT_SKILL_WAS_SUCCESSFUL_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_HAS_BEEN_DECREASED_BY_1);
|
sm = new SystemMessage(SystemMessageId.UNTRAIN_OF_ENCHANT_SKILL_WAS_SUCCESSFUL_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_HAS_BEEN_DECREASED_BY_1);
|
||||||
}
|
}
|
||||||
player.removeSkill(enchantedSkill);
|
player.removeSkill(enchantedSkill);
|
||||||
|
|||||||
+7
-7
@@ -36,7 +36,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -46,12 +46,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
if (level < 100)
|
if (level < 100)
|
||||||
{
|
{
|
||||||
_skillLevel = level;
|
_skillLevel = level;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_skillLevel = client.getPlayer().getKnownSkill(_skillId).getLevel();
|
_skillLevel = client.getPlayer().getKnownSkill(_skillId).getLevel();
|
||||||
_skillSubLevel = SkillEnchantConverter.levelToUnderground(level);
|
_skillSubLevel = SkillEnchantConverter.levelToUnderground(level);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -87,12 +87,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -31,7 +31,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -42,12 +42,12 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
if (level < 100)
|
if (level < 100)
|
||||||
{
|
{
|
||||||
_skillLevel = level;
|
_skillLevel = level;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_skillLevel = client.getPlayer().getKnownSkill(_skillId).getLevel();
|
_skillLevel = client.getPlayer().getKnownSkill(_skillId).getLevel();
|
||||||
_skillSubLevel = SkillEnchantConverter.levelToUnderground(level);
|
_skillSubLevel = SkillEnchantConverter.levelToUnderground(level);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,6 +65,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -29,14 +29,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _currentSubLevel;
|
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;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_currentSubLevel = currentSubLevel;
|
_currentSubLevel = currentSubLevel;
|
||||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||||
}
|
}
|
||||||
@@ -47,9 +47,9 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? SkillEnchantConverter.levelToErtheia(_skillSubLevel ) : _skillLevel);
|
packet.writeD(_skillSubLevel > 1000 ? SkillEnchantConverter.levelToErtheia(_skillSubLevel) : _skillLevel);
|
||||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||||
packet.writeD(_routes.size());
|
packet.writeD(_routes.size());
|
||||||
_routes.forEach(route ->
|
_routes.forEach(route ->
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -34,12 +34,12 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final EnchantSkillHolder _enchantSkillHolder;
|
private final EnchantSkillHolder _enchantSkillHolder;
|
||||||
|
|
||||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillSubLevel > 1000 ? SkillEnchantConverter.levelToErtheia(skillSubLevel ) : skillLevel;
|
_skillLevel = skillSubLevel > 1000 ? SkillEnchantConverter.levelToErtheia(skillSubLevel) : skillLevel;
|
||||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+4
-4
@@ -25,14 +25,14 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _duration;
|
private final int _duration;
|
||||||
|
|
||||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel, int duration)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD(_duration);
|
packet.writeD(_duration);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
|||||||
_currentTime = System.currentTimeMillis();
|
_currentTime = System.currentTimeMillis();
|
||||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||||
{
|
{
|
||||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel()).isNotBroadcastable())
|
||||||
{
|
{
|
||||||
_skillReuseTimeStamps.add(ts);
|
_skillReuseTimeStamps.add(ts);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ public class ExBRBuyProduct implements IClientOutgoingPacket
|
|||||||
NOT_DAY_OF_WEEK(-12),
|
NOT_DAY_OF_WEEK(-12),
|
||||||
NOT_TIME_OF_DAY(-13),
|
NOT_TIME_OF_DAY(-13),
|
||||||
SOLD_OUT(-14);
|
SOLD_OUT(-14);
|
||||||
|
|
||||||
private final int _id;
|
private final int _id;
|
||||||
|
|
||||||
ExBrProductReplyType(int id)
|
ExBrProductReplyType(int id)
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1583,11 +1583,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7260,7 +7260,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+9
-9
@@ -49,7 +49,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -64,14 +64,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[type];
|
_type = SkillEnchantType.values()[type];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
else if ((skill.getSubLevel() + 1) != _skillSubLevel)
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
|
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
|
|||||||
+6
-6
@@ -35,21 +35,21 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -77,12 +77,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -38,14 +38,14 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[packet.readD()];
|
_type = SkillEnchantType.values()[packet.readD()];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -28,14 +28,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _currentSubLevel;
|
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;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_currentSubLevel = currentSubLevel;
|
_currentSubLevel = currentSubLevel;
|
||||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||||
}
|
}
|
||||||
@@ -46,14 +46,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||||
packet.writeD(_routes.size());
|
packet.writeD(_routes.size());
|
||||||
_routes.forEach(route ->
|
_routes.forEach(route ->
|
||||||
{
|
{
|
||||||
final int routeId = route / 1000;
|
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;
|
final int subLevel = _currentSubLevel > 0 ? (route + (_currentSubLevel % 1000)) - 1 : route;
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
||||||
|
|||||||
+5
-5
@@ -34,16 +34,16 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
private final SkillEnchantType _type;
|
private final SkillEnchantType _type;
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final EnchantSkillHolder _enchantSkillHolder;
|
private final EnchantSkillHolder _enchantSkillHolder;
|
||||||
|
|
||||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,7 +54,7 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
packet.writeD(_type.ordinal());
|
packet.writeD(_type.ordinal());
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
if (_enchantSkillHolder != null)
|
if (_enchantSkillHolder != null)
|
||||||
{
|
{
|
||||||
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
||||||
|
|||||||
+4
-4
@@ -25,14 +25,14 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _duration;
|
private final int _duration;
|
||||||
|
|
||||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel, int duration)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD(_duration);
|
packet.writeD(_duration);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
|||||||
_currentTime = System.currentTimeMillis();
|
_currentTime = System.currentTimeMillis();
|
||||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||||
{
|
{
|
||||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel()).isNotBroadcastable())
|
||||||
{
|
{
|
||||||
_skillReuseTimeStamps.add(ts);
|
_skillReuseTimeStamps.add(ts);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ public class ExBRBuyProduct implements IClientOutgoingPacket
|
|||||||
NOT_DAY_OF_WEEK(-12),
|
NOT_DAY_OF_WEEK(-12),
|
||||||
NOT_TIME_OF_DAY(-13),
|
NOT_TIME_OF_DAY(-13),
|
||||||
SOLD_OUT(-14);
|
SOLD_OUT(-14);
|
||||||
|
|
||||||
private final int _id;
|
private final int _id;
|
||||||
|
|
||||||
ExBrProductReplyType(int id)
|
ExBrProductReplyType(int id)
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1585,11 +1585,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7262,7 +7262,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+9
-9
@@ -49,7 +49,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -64,14 +64,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[type];
|
_type = SkillEnchantType.values()[type];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
else if ((skill.getSubLevel() + 1) != _skillSubLevel)
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
|
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
|
|||||||
+6
-6
@@ -35,21 +35,21 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -77,12 +77,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -38,14 +38,14 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[packet.readD()];
|
_type = SkillEnchantType.values()[packet.readD()];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -28,14 +28,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _currentSubLevel;
|
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;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_currentSubLevel = currentSubLevel;
|
_currentSubLevel = currentSubLevel;
|
||||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||||
}
|
}
|
||||||
@@ -46,14 +46,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||||
packet.writeD(_routes.size());
|
packet.writeD(_routes.size());
|
||||||
_routes.forEach(route ->
|
_routes.forEach(route ->
|
||||||
{
|
{
|
||||||
final int routeId = route / 1000;
|
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;
|
final int subLevel = _currentSubLevel > 0 ? (route + (_currentSubLevel % 1000)) - 1 : route;
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
||||||
|
|||||||
+5
-5
@@ -34,16 +34,16 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
private final SkillEnchantType _type;
|
private final SkillEnchantType _type;
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final EnchantSkillHolder _enchantSkillHolder;
|
private final EnchantSkillHolder _enchantSkillHolder;
|
||||||
|
|
||||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,7 +54,7 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
packet.writeD(_type.ordinal());
|
packet.writeD(_type.ordinal());
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
if (_enchantSkillHolder != null)
|
if (_enchantSkillHolder != null)
|
||||||
{
|
{
|
||||||
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
||||||
|
|||||||
+4
-4
@@ -25,14 +25,14 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _duration;
|
private final int _duration;
|
||||||
|
|
||||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel, int duration)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD(_duration);
|
packet.writeD(_duration);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
|||||||
_currentTime = System.currentTimeMillis();
|
_currentTime = System.currentTimeMillis();
|
||||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||||
{
|
{
|
||||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel()).isNotBroadcastable())
|
||||||
{
|
{
|
||||||
_skillReuseTimeStamps.add(ts);
|
_skillReuseTimeStamps.add(ts);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ public class ExBRBuyProduct implements IClientOutgoingPacket
|
|||||||
NOT_DAY_OF_WEEK(-12),
|
NOT_DAY_OF_WEEK(-12),
|
||||||
NOT_TIME_OF_DAY(-13),
|
NOT_TIME_OF_DAY(-13),
|
||||||
SOLD_OUT(-14);
|
SOLD_OUT(-14);
|
||||||
|
|
||||||
private final int _id;
|
private final int _id;
|
||||||
|
|
||||||
ExBrProductReplyType(int id)
|
ExBrProductReplyType(int id)
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1595,11 +1595,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7257,7 +7257,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+9
-9
@@ -49,7 +49,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -64,14 +64,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[type];
|
_type = SkillEnchantType.values()[type];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
else if ((skill.getSubLevel() + 1) != _skillSubLevel)
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
|
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
|
|||||||
+6
-6
@@ -35,21 +35,21 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -77,12 +77,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -38,14 +38,14 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[packet.readD()];
|
_type = SkillEnchantType.values()[packet.readD()];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -28,14 +28,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _currentSubLevel;
|
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;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_currentSubLevel = currentSubLevel;
|
_currentSubLevel = currentSubLevel;
|
||||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||||
}
|
}
|
||||||
@@ -46,14 +46,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||||
packet.writeD(_routes.size());
|
packet.writeD(_routes.size());
|
||||||
_routes.forEach(route ->
|
_routes.forEach(route ->
|
||||||
{
|
{
|
||||||
final int routeId = route / 1000;
|
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;
|
final int subLevel = _currentSubLevel > 0 ? (route + (_currentSubLevel % 1000)) - 1 : route;
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
||||||
|
|||||||
+5
-5
@@ -34,16 +34,16 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
private final SkillEnchantType _type;
|
private final SkillEnchantType _type;
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final EnchantSkillHolder _enchantSkillHolder;
|
private final EnchantSkillHolder _enchantSkillHolder;
|
||||||
|
|
||||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,7 +54,7 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
packet.writeD(_type.ordinal());
|
packet.writeD(_type.ordinal());
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
if (_enchantSkillHolder != null)
|
if (_enchantSkillHolder != null)
|
||||||
{
|
{
|
||||||
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
||||||
|
|||||||
+4
-4
@@ -25,14 +25,14 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _duration;
|
private final int _duration;
|
||||||
|
|
||||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel, int duration)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD(_duration);
|
packet.writeD(_duration);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
|||||||
_currentTime = System.currentTimeMillis();
|
_currentTime = System.currentTimeMillis();
|
||||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||||
{
|
{
|
||||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel()).isNotBroadcastable())
|
||||||
{
|
{
|
||||||
_skillReuseTimeStamps.add(ts);
|
_skillReuseTimeStamps.add(ts);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ public class ExBRBuyProduct implements IClientOutgoingPacket
|
|||||||
NOT_DAY_OF_WEEK(-12),
|
NOT_DAY_OF_WEEK(-12),
|
||||||
NOT_TIME_OF_DAY(-13),
|
NOT_TIME_OF_DAY(-13),
|
||||||
SOLD_OUT(-14);
|
SOLD_OUT(-14);
|
||||||
|
|
||||||
private final int _id;
|
private final int _id;
|
||||||
|
|
||||||
ExBrProductReplyType(int id)
|
ExBrProductReplyType(int id)
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1588,11 +1588,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7236,7 +7236,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+9
-9
@@ -49,7 +49,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -64,14 +64,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[type];
|
_type = SkillEnchantType.values()[type];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
else if ((skill.getSubLevel() + 1) != _skillSubLevel)
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
|
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
|
|||||||
+6
-6
@@ -35,21 +35,21 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -77,12 +77,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -38,14 +38,14 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[packet.readD()];
|
_type = SkillEnchantType.values()[packet.readD()];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -28,14 +28,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _currentSubLevel;
|
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;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_currentSubLevel = currentSubLevel;
|
_currentSubLevel = currentSubLevel;
|
||||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||||
}
|
}
|
||||||
@@ -46,14 +46,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||||
packet.writeD(_routes.size());
|
packet.writeD(_routes.size());
|
||||||
_routes.forEach(route ->
|
_routes.forEach(route ->
|
||||||
{
|
{
|
||||||
final int routeId = route / 1000;
|
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;
|
final int subLevel = _currentSubLevel > 0 ? (route + (_currentSubLevel % 1000)) - 1 : route;
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
||||||
|
|||||||
+5
-5
@@ -34,16 +34,16 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
private final SkillEnchantType _type;
|
private final SkillEnchantType _type;
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final EnchantSkillHolder _enchantSkillHolder;
|
private final EnchantSkillHolder _enchantSkillHolder;
|
||||||
|
|
||||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,7 +54,7 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
packet.writeD(_type.ordinal());
|
packet.writeD(_type.ordinal());
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
if (_enchantSkillHolder != null)
|
if (_enchantSkillHolder != null)
|
||||||
{
|
{
|
||||||
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
||||||
|
|||||||
+4
-4
@@ -25,14 +25,14 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _duration;
|
private final int _duration;
|
||||||
|
|
||||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel, int duration)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD(_duration);
|
packet.writeD(_duration);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
|||||||
_currentTime = System.currentTimeMillis();
|
_currentTime = System.currentTimeMillis();
|
||||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||||
{
|
{
|
||||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel()).isNotBroadcastable())
|
||||||
{
|
{
|
||||||
_skillReuseTimeStamps.add(ts);
|
_skillReuseTimeStamps.add(ts);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ public class ExBRBuyProduct implements IClientOutgoingPacket
|
|||||||
NOT_DAY_OF_WEEK(-12),
|
NOT_DAY_OF_WEEK(-12),
|
||||||
NOT_TIME_OF_DAY(-13),
|
NOT_TIME_OF_DAY(-13),
|
||||||
SOLD_OUT(-14);
|
SOLD_OUT(-14);
|
||||||
|
|
||||||
private final int _id;
|
private final int _id;
|
||||||
|
|
||||||
ExBrProductReplyType(int id)
|
ExBrProductReplyType(int id)
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1588,11 +1588,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7236,7 +7236,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+9
-9
@@ -49,7 +49,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -64,14 +64,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[type];
|
_type = SkillEnchantType.values()[type];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
else if ((skill.getSubLevel() + 1) != _skillSubLevel)
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
|
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
|
|||||||
+6
-6
@@ -35,21 +35,21 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -77,12 +77,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -38,14 +38,14 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[packet.readD()];
|
_type = SkillEnchantType.values()[packet.readD()];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -28,14 +28,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _currentSubLevel;
|
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;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_currentSubLevel = currentSubLevel;
|
_currentSubLevel = currentSubLevel;
|
||||||
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
_routes = EnchantSkillGroupsData.getInstance().getRouteForSkill(_skillId, _skillLevel);
|
||||||
}
|
}
|
||||||
@@ -46,14 +46,14 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
|||||||
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
OutgoingPackets.EX_ENCHANT_SKILL_INFO.writeId(packet);
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
packet.writeD((_skillSubLevel % 1000) == EnchantSkillGroupsData.MAX_ENCHANT_LEVEL ? 0 : 1);
|
||||||
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
packet.writeD(_skillSubLevel > 1000 ? 1 : 0);
|
||||||
packet.writeD(_routes.size());
|
packet.writeD(_routes.size());
|
||||||
_routes.forEach(route ->
|
_routes.forEach(route ->
|
||||||
{
|
{
|
||||||
final int routeId = route / 1000;
|
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;
|
final int subLevel = _currentSubLevel > 0 ? (route + (_currentSubLevel % 1000)) - 1 : route;
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
packet.writeH(currentRouteId != routeId ? subLevel : Math.min(subLevel + 1, route + (EnchantSkillGroupsData.MAX_ENCHANT_LEVEL - 1)));
|
||||||
|
|||||||
+5
-5
@@ -34,16 +34,16 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
private final SkillEnchantType _type;
|
private final SkillEnchantType _type;
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final EnchantSkillHolder _enchantSkillHolder;
|
private final EnchantSkillHolder _enchantSkillHolder;
|
||||||
|
|
||||||
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel , PlayerInstance player)
|
public ExEnchantSkillInfoDetail(SkillEnchantType type, int skillId, int skillLevel, int skillSubLevel, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
_enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(skillSubLevel % 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,7 +54,7 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
|||||||
packet.writeD(_type.ordinal());
|
packet.writeD(_type.ordinal());
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
if (_enchantSkillHolder != null)
|
if (_enchantSkillHolder != null)
|
||||||
{
|
{
|
||||||
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
packet.writeQ(_enchantSkillHolder.getSp(_type));
|
||||||
|
|||||||
+4
-4
@@ -25,14 +25,14 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private final int _duration;
|
private final int _duration;
|
||||||
|
|
||||||
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel , int duration)
|
public ShortBuffStatusUpdate(int skillId, int skillLevel, int skillSubLevel, int duration)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class ShortBuffStatusUpdate implements IClientOutgoingPacket
|
|||||||
|
|
||||||
packet.writeD(_skillId);
|
packet.writeD(_skillId);
|
||||||
packet.writeH(_skillLevel);
|
packet.writeH(_skillLevel);
|
||||||
packet.writeH(_skillSubLevel );
|
packet.writeH(_skillSubLevel);
|
||||||
packet.writeD(_duration);
|
packet.writeD(_duration);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SkillCoolTime implements IClientOutgoingPacket
|
|||||||
_currentTime = System.currentTimeMillis();
|
_currentTime = System.currentTimeMillis();
|
||||||
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
for (TimeStamp ts : player.getSkillReuseTimeStamps().values())
|
||||||
{
|
{
|
||||||
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel ()).isNotBroadcastable())
|
if ((_currentTime < ts.getStamp()) && !SkillData.getInstance().getSkill(ts.getSkillId(), ts.getSkillLevel(), ts.getSkillSubLevel()).isNotBroadcastable())
|
||||||
{
|
{
|
||||||
_skillReuseTimeStamps.add(ts);
|
_skillReuseTimeStamps.add(ts);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ public class ExBRBuyProduct implements IClientOutgoingPacket
|
|||||||
NOT_DAY_OF_WEEK(-12),
|
NOT_DAY_OF_WEEK(-12),
|
||||||
NOT_TIME_OF_DAY(-13),
|
NOT_TIME_OF_DAY(-13),
|
||||||
SOLD_OUT(-14);
|
SOLD_OUT(-14);
|
||||||
|
|
||||||
private final int _id;
|
private final int _id;
|
||||||
|
|
||||||
ExBrProductReplyType(int id)
|
ExBrProductReplyType(int id)
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ public class CallSkill extends AbstractEffect
|
|||||||
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
final int knownLevel = effector.getSkillLevel(_skill.getSkillId());
|
||||||
if (knownLevel > 0)
|
if (knownLevel > 0)
|
||||||
{
|
{
|
||||||
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel ());
|
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), knownLevel, _skill.getSkillSubLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class ShortCuts implements IRestorable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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
|
// Update all the shortcuts for this skill
|
||||||
for (Shortcut sc : _shortCuts.values())
|
for (Shortcut sc : _shortCuts.values())
|
||||||
{
|
{
|
||||||
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
|
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.sendPacket(new ShortCutRegister(newsc));
|
||||||
_owner.registerShortCut(newsc);
|
_owner.registerShortCut(newsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TimeStamp
|
|||||||
* Gets the skill sub level.
|
* Gets the skill sub level.
|
||||||
* @return the skill level
|
* @return the skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _id3;
|
return _id3;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1588,11 +1588,11 @@ public class PlayerInstance extends Playable
|
|||||||
* Updates the shortcut bars with the new skill.
|
* Updates the shortcut bars with the new skill.
|
||||||
* @param skillId the skill Id to search and update.
|
* @param skillId the skill Id to search and update.
|
||||||
* @param skillLevel the skill level to 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7237,7 +7237,7 @@ public class PlayerInstance extends Playable
|
|||||||
statement.setInt(1, getObjectId());
|
statement.setInt(1, getObjectId());
|
||||||
statement.setInt(2, t.getSkillId());
|
statement.setInt(2, t.getSkillId());
|
||||||
statement.setInt(3, t.getSkillLevel());
|
statement.setInt(3, t.getSkillLevel());
|
||||||
statement.setInt(4, t.getSkillSubLevel ());
|
statement.setInt(4, t.getSkillSubLevel());
|
||||||
statement.setInt(5, -1);
|
statement.setInt(5, -1);
|
||||||
statement.setLong(6, t.getReuse());
|
statement.setLong(6, t.getReuse());
|
||||||
statement.setDouble(7, t.getStamp());
|
statement.setDouble(7, t.getStamp());
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ public enum AnnouncementType
|
|||||||
EVENT,
|
EVENT,
|
||||||
AUTO_NORMAL,
|
AUTO_NORMAL,
|
||||||
AUTO_CRITICAL;
|
AUTO_CRITICAL;
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AnnouncementType.class.getName());
|
||||||
|
|
||||||
public static AnnouncementType findById(int id)
|
public static AnnouncementType findById(int id)
|
||||||
|
|||||||
+10
-10
@@ -27,22 +27,22 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
private final int _skillId;
|
private final int _skillId;
|
||||||
private final int _skillLevel;
|
private final int _skillLevel;
|
||||||
private final int _skillSubLevel ;
|
private final int _skillSubLevel;
|
||||||
private Skill _skill;
|
private Skill _skill;
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel)
|
public SkillHolder(int skillId, int skillLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = 0;
|
_skillSubLevel = 0;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillHolder(int skillId, int skillLevel, int skillSubLevel )
|
public SkillHolder(int skillId, int skillLevel, int skillSubLevel)
|
||||||
{
|
{
|
||||||
_skillId = skillId;
|
_skillId = skillId;
|
||||||
_skillLevel = skillLevel;
|
_skillLevel = skillLevel;
|
||||||
_skillSubLevel = skillSubLevel ;
|
_skillSubLevel = skillSubLevel;
|
||||||
_skill = null;
|
_skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class SkillHolder
|
|||||||
{
|
{
|
||||||
_skillId = skill.getId();
|
_skillId = skill.getId();
|
||||||
_skillLevel = skill.getLevel();
|
_skillLevel = skill.getLevel();
|
||||||
_skillSubLevel = skill.getSubLevel();
|
_skillSubLevel = skill.getSubLevel();
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ public class SkillHolder
|
|||||||
return _skillLevel;
|
return _skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSkillSubLevel ()
|
public int getSkillSubLevel()
|
||||||
{
|
{
|
||||||
return _skillSubLevel ;
|
return _skillSubLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Skill getSkill()
|
public Skill getSkill()
|
||||||
{
|
{
|
||||||
if (_skill == null)
|
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;
|
return _skill;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class SkillHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SkillHolder holder = (SkillHolder) obj;
|
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
|
@Override
|
||||||
@@ -102,7 +102,7 @@ public class SkillHolder
|
|||||||
int result = 1;
|
int result = 1;
|
||||||
result = (prime * result) + _skillId;
|
result = (prime * result) + _skillId;
|
||||||
result = (prime * result) + _skillLevel;
|
result = (prime * result) + _skillLevel;
|
||||||
result = (prime * result) + _skillSubLevel ;
|
result = (prime * result) + _skillSubLevel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
private int _objectId;
|
private int _objectId;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -41,7 +41,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
_objectId = packet.readD();
|
_objectId = packet.readD();
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class RequestDispel implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+9
-9
@@ -49,7 +49,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -64,14 +64,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[type];
|
_type = SkillEnchantType.values()[type];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (_type == SkillEnchantType.CHANGE)
|
if (_type == SkillEnchantType.CHANGE)
|
||||||
{
|
{
|
||||||
final int group1 = (_skillSubLevel % 1000);
|
final int group1 = (_skillSubLevel % 1000);
|
||||||
final int group2 = (skill.getSubLevel() % 1000);
|
final int group2 = (skill.getSubLevel() % 1000);
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,14 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((skill.getSubLevel() + 1) != _skillSubLevel )
|
else if ((skill.getSubLevel() + 1) != _skillSubLevel)
|
||||||
{
|
{
|
||||||
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Client: " + client + " send incorrect sub level: " + _skillSubLevel + " expected: " + (skill.getSubLevel() + 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
final EnchantSkillHolder enchantSkillHolder = EnchantSkillGroupsData.getInstance().getEnchantSkillHolder(_skillSubLevel % 1000);
|
||||||
|
|
||||||
// Verify if player has all the ingredients
|
// Verify if player has all the ingredients
|
||||||
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
for (ItemHolder holder : enchantSkillHolder.getRequiredItems(_type))
|
||||||
@@ -179,7 +179,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
@@ -218,7 +218,7 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
if (Rnd.get(100) <= enchantSkillHolder.getChance(_type))
|
||||||
{
|
{
|
||||||
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill enchantedSkill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if (Config.LOG_SKILL_ENCHANTS)
|
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));
|
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));
|
||||||
|
|||||||
+6
-6
@@ -35,21 +35,21 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel );
|
final Skill skill = SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel);
|
||||||
if ((skill == null) || (skill.getId() != _skillId))
|
if ((skill == null) || (skill.getId() != _skillId))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -77,12 +77,12 @@ public class RequestExEnchantSkillInfo implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Skill playerSkill = player.getKnownSkill(_skillId);
|
final Skill playerSkill = player.getKnownSkill(_skillId);
|
||||||
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel ))
|
if ((playerSkill.getLevel() != _skillLevel) || (playerSkill.getSubLevel() != _skillSubLevel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel , playerSkill.getSubLevel()));
|
client.sendPacket(new ExEnchantSkillInfo(_skillId, _skillLevel, _skillSubLevel, playerSkill.getSubLevel()));
|
||||||
// ExEnchantSkillInfoDetail - not really necessary I think
|
// ExEnchantSkillInfoDetail - not really necessary I think
|
||||||
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
// client.sendPacket(new ExEnchantSkillInfoDetail(SkillEnchantType.NORMAL, _skillId, _skillLevel, _skillSubLevel , activeChar));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
private SkillEnchantType _type;
|
private SkillEnchantType _type;
|
||||||
private int _skillId;
|
private int _skillId;
|
||||||
private int _skillLevel;
|
private int _skillLevel;
|
||||||
private int _skillSubLevel ;
|
private int _skillSubLevel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
@@ -38,14 +38,14 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
_type = SkillEnchantType.values()[packet.readD()];
|
_type = SkillEnchantType.values()[packet.readD()];
|
||||||
_skillId = packet.readD();
|
_skillId = packet.readD();
|
||||||
_skillLevel = packet.readH();
|
_skillLevel = packet.readH();
|
||||||
_skillSubLevel = packet.readH();
|
_skillSubLevel = packet.readH();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
if ((_skillId <= 0) || (_skillLevel <= 0) || (_skillSubLevel < 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel , player));
|
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLevel, _skillSubLevel, player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user