浏览代码

BETA: Fixing transformation skill learning issue sometimes nothing happens when you click learn and you haven't learned Onyx Beast transformation (Added the missing message..)
* Reported by: lion

Rumen Nikiforov 12 年之前
父节点
当前提交
41456fc495

+ 1 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2Skill.java

@@ -77,6 +77,7 @@ public abstract class L2Skill implements IChanceSkillTrigger
 	public static final int SKILL_DIVINE_INSPIRATION = 1405;
 	public static final int SKILL_CLAN_LUCK = 390;
 	public static final int SKILL_NPC_RACE = 4416;
+	public static final int SKILL_ONYX_BEAST_TRANSFORMATION = 617;
 	
 	public static final boolean geoEnabled = Config.GEODATA > 0;
 	

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

@@ -409,6 +409,15 @@ public final class RequestAcquireSkill extends L2GameClientPacket
 					{
 						if (player.getSkillLevel(skill.getSkillId()) != skill.getSkillLvl())
 						{
+							if (skill.getSkillId() == L2Skill.SKILL_ONYX_BEAST_TRANSFORMATION)
+							{
+								player.sendPacket(SystemMessageId.YOU_MUST_LEARN_ONYX_BEAST_SKILL);
+							}
+							else
+							{
+								// TODO: Find retail message.
+								player.sendMessage("You must learn the " + skill.getSkill().getName() + " skill before you can acquire further skills.");
+							}
 							return false;
 						}
 					}