Explorar el Código

BETA: Fix for subclass certification exploit.

Patch by: d!go
Reported by: d!go, thorl2
Zoey76 hace 11 años
padre
commit
d73c850d2e

+ 9 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestAcquireSkill.java

@@ -301,6 +301,15 @@ public final class RequestAcquireSkill extends L2GameClientPacket
 					return;
 				}
 				
+				// Certification Skills - Exploit fix
+				if ((prevSkillLevel == -1) && (_level > 1))
+				{
+					// The previous level skill has not been learned.
+					activeChar.sendPacket(SystemMessageId.PREVIOUS_LEVEL_SKILL_NOT_LEARNED);
+					Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " is requesting skill Id: " + _id + " level " + _level + " without knowing it's previous level!", IllegalActionPunishmentType.NONE);
+					return;
+				}
+				
 				QuestState st = activeChar.getQuestState("SubClassSkills");
 				if (st == null)
 				{