Browse Source

BETA: Typo fix for my previous commit.. seems getSkillLevel() returns -1 when skill not found

Rumen Nikiforov 14 years ago
parent
commit
0e76ed80e7

+ 1 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestAcquireSkill.java

@@ -97,11 +97,8 @@ public class RequestAcquireSkill extends L2GameClientPacket
 		// If current skill lvl + 1 is not equal to the skill lvl you wanna learn (eg: You have Aggression lvl 3 and the packet sends info that
 		// you want to learn Aggression lvl 5, thus skipping lvl 4.) or the packet sends the same level or lower (eg: Aggression lvl 3 and the
 		// packet sends info that you want to learn Aggression level 3).
-		if (player.getSkillLevel(_id) + 1 != _level && _skillType != 3)
-		{
-			// already knows the skill with this level
+		if (Math.max(player.getSkillLevel(_id), 0) + 1 != _level && _skillType != 3)
 			return;
-		}
 		
 		final L2Skill skill = SkillTable.getInstance().getInfo(_id, _level);