Jump to content
  • 0

acis 370 pws mporo na to fix


Question

Posted
 java/net/sf/l2j/gameserver/network/clientpackets/RequestAcquireSkillInfo.java	(revision 4)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestAcquireSkillInfo.java	(working copy)
@@ -17,8 +17,8 @@
 import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.datatables.SkillTable;
 import net.sf.l2j.gameserver.datatables.SkillTreeTable;
-import net.sf.l2j.gameserver.datatables.SpellbookTable;
 import net.sf.l2j.gameserver.model.L2PledgeSkillLearn;
+import net.sf.l2j.gameserver.model.L2RebirthSkillLearn;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.L2SkillLearn;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
@@ -62,7 +62,7 @@
 		
 		switch (_skillType)
 		{
-			// General skills
+			// Trance's Rebirth skills.
 			case 0:
 				int skillLvl = activeChar.getSkillLevel(_skillId);
 				if (skillLvl >= _skillLevel)
@@ -74,14 +74,13 @@
 				if (!trainer.getTemplate().canTeach(activeChar.getSkillLearningClassId()))
 					return;
 					
-				for (L2SkillLearn sl : SkillTreeTable.getInstance().getAvailableSkills(activeChar, activeChar.getSkillLearningClassId()))
+				for (L2RebirthSkillLearn rsl : SkillTreeTable.getInstance().getAvailableRebirthSkills(activeChar, activeChar.getSkillLearningClassId()))
 				{
-					if (sl.getId() == _skillId && sl.getLevel() == _skillLevel)
+					if (rsl.getId() == _skillId && rsl.getLevel() == _skillLevel)
 					{
-						AcquireSkillInfo asi = new AcquireSkillInfo(_skillId, _skillLevel, sl.getSpCost(), 0);
-						int spellbookItemId = SpellbookTable.getInstance().getBookForSkill(_skillId, _skillLevel);
-						if (spellbookItemId != 0)
-							asi.addRequirement(99, spellbookItemId, 1, 50);
+						AcquireSkillInfo asi = new AcquireSkillInfo(_skillId, _skillLevel, rsl.getCostSp(), 0);
+						if (Config.LIFE_CRYSTAL_NEEDED && rsl.getItemId() != 0)
+							asi.addRequirement(1, rsl.getItemId(), 1, 0);
 						sendPacket(asi);
 						break;
 					}

 

    acis  rev 370   to pano einai to palio  eno to katw  einai to new   

{
			// General skills
			case 0:
				// Player already has such skill with same or higher level.
				int skillLvl = player.getSkillLevel(_skillId);
				if (skillLvl >= _skillLevel)
					return;
				
				// Requested skill must be 1 level higher than existing skill.
				if (skillLvl != _skillLevel - 1)
					return;
				
				if (!folk.getTemplate().canTeach(player.getClassId()))
					return;
				
				// Search if the asked skill exists on player template.
				final GeneralSkillNode gsn = player.getTemplate().findSkill(_skillId, _skillLevel);
				if (gsn != null)
				{
					asi = new AcquireSkillInfo(_skillId, _skillLevel, gsn.getCorrectedCost(), 0);
					final int bookId = SpellbookData.getInstance().getBookForSkill(_skillId, _skillLevel);
					if (bookId != 0)
						asi.addRequirement(99, bookId, 1, 50);
					sendPacket(asi);
				}
				break;

 

 

 

 

einai  gia to rebirth system   pws mporo na to peraso sto  new   

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...