- Timestamp:
- Jan 16, 2012 7:56:19 AM (4 months ago)
- Location:
- trunk/L2J_DataPack
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dist/game/data/scripts/handlers/bypasshandlers/SkillList.java (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/L2J_DataPack
- Property svn:mergeinfo changed
/branches/unstable/L2J_DataPack_BETA merged: 8407-8426,8428-8480,8482-8491,8493-8588,8590-8629
- Property svn:mergeinfo changed
-
trunk/L2J_DataPack/dist/game/data/scripts/handlers/bypasshandlers/SkillList.java
r8501 r8630 15 15 package handlers.bypasshandlers; 16 16 17 import java.util.List; 17 18 import java.util.logging.Level; 18 19 … … 39 40 { 40 41 if (!(target instanceof L2NpcInstance)) 42 { 41 43 return false; 44 } 42 45 43 46 if (Config.ALT_GAME_SKILL_LEARN) … … 48 51 if (id.length() != 0) 49 52 { 50 L2NpcInstance.showSkillList(activeChar, (L2Npc) target, ClassId.values()[Integer.parseInt(id)]);53 L2NpcInstance.showSkillList(activeChar, (L2Npc) target, ClassId.values()[Integer.parseInt(id)]); 51 54 } 52 55 else … … 54 57 boolean own_class = false; 55 58 56 ClassId[] classesToTeach = ((L2NpcInstance)target).getClassesToTeach();57 if (classesToTeach != null)59 final List<ClassId> classesToTeach = ((L2NpcInstance) target).getClassesToTeach(); 60 for (ClassId cid : classesToTeach) 58 61 { 59 for (ClassId cid : classesToTeach)62 if (cid.equalsOrChildOf(activeChar.getClassId())) 60 63 { 61 if (cid.equalsOrChildOf(activeChar.getClassId())) 62 { 63 own_class = true; 64 break; 65 } 64 own_class = true; 65 break; 66 66 } 67 67 } … … 72 72 { 73 73 String charType = activeChar.getClassId().isMage() ? "fighter" : "mage"; 74 text += 75 "Skills of your class are the easiest to learn.<br>"+ 76 "Skills of another class of your race are a little harder.<br>"+ 77 "Skills for classes of another race are extremely difficult.<br>"+ 78 "But the hardest of all to learn are the "+ charType +"skills!<br>"; 74 text += "Skills of your class are the easiest to learn.<br>" + "Skills of another class of your race are a little harder.<br>" + "Skills for classes of another race are extremely difficult.<br>" + "But the hardest of all to learn are the " + charType + "skills!<br>"; 79 75 } 80 76 81 77 // make a list of classes 82 if ( classesToTeach != null)78 if (!classesToTeach.isEmpty()) 83 79 { 84 80 int count = 0; … … 90 86 { 91 87 if (cid.level() > classCheck.level()) 88 { 92 89 continue; 90 } 93 91 94 92 if (SkillTreesData.getInstance().getAvailableSkills(activeChar, cid, false, false).isEmpty()) 93 { 95 94 continue; 95 } 96 96 97 text += "<a action=\"bypass -h npc_%objectId%_SkillList " +cid.getId()+"\">Learn "+cid+"'s class Skills</a><br>\n";97 text += "<a action=\"bypass -h npc_%objectId%_SkillList " + cid.getId() + "\">Learn " + cid + "'s class Skills</a><br>\n"; 98 98 count++; 99 99 } … … 103 103 } 104 104 else 105 { 105 106 text += "No Skills.<br>"; 106 107 } 107 108 text += "</body></html>"; 108 109 109 NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc) target).getObjectId());110 NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc) target).getObjectId()); 110 111 html.setHtml(text); 111 html.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId()));112 html.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId())); 112 113 activeChar.sendPacket(html); 113 114
Note: See TracChangeset
for help on using the changeset viewer.
