final List<SkillLearn> skills = SkillTreeData.getInstance().getAvailableSkills(player, ClassId.getClassId(classId), true, true, true);
final StringBuilder loop_builder = new StringBuilder();
final int start = (page - 1) * 5;
final int end = Math.min(page * 5, skills.size());
for (int i = start; i < end; ++i) {
String list = skill_template;
final SkillLearn data = skills.get(i);
final Skill skill = SkillData.getInstance().getSkill(data.getSkillId(), data.getSkillLevel());
String bypass = "_bbsclasslearn _ %id% _ %level% _ " + classId + " _ " + page;
list = list.replace("%bypass%", bypass);
list = list.replace("%name%", String.valueOf(data.getName()));
list = list.replace("%icon%", skill.getIcon());
list = list.replace("%level%", String.valueOf(data.getSkillLevel()));
list = list.replace("%id%", String.valueOf(data.getSkillId()));
list = list.replace("%sp%", String.valueOf(data.getLevelUpSp()));
loop_builder.append(list);
}
html = html.replace("%skills%", loop_builder.toString());
html = html.replace("%pagination%", pagination(player, skills.size(), page, "_bbsclassid _ " + classId + " _ "));