(StringBuilder buffer)
| 765 | * ############################################################### |
| 766 | */ |
| 767 | private void appendClassLines(StringBuilder buffer) |
| 768 | { |
| 769 | Cache specials = new Cache(); |
| 770 | |
| 771 | for (PCClass pcClass : charDisplay.getClassSet()) |
| 772 | { |
| 773 | int classLevel = charDisplay.getLevel(pcClass); |
| 774 | |
| 775 | buffer.append(IOConstants.TAG_CLASS).append(':'); |
| 776 | buffer.append(EntityEncoder.encode(pcClass.getKeyName())); |
| 777 | |
| 778 | final String subClassKey = charDisplay.getSubClassName(pcClass); |
| 779 | |
| 780 | if (subClassKey != null && !Constants.EMPTY_STRING.equals(subClassKey)) |
| 781 | { |
| 782 | buffer.append('|'); |
| 783 | buffer.append(IOConstants.TAG_SUBCLASS).append(':'); |
| 784 | buffer.append(EntityEncoder.encode(subClassKey)); |
| 785 | } |
| 786 | |
| 787 | buffer.append('|'); |
| 788 | buffer.append(IOConstants.TAG_LEVEL).append(':'); |
| 789 | buffer.append(classLevel); |
| 790 | buffer.append('|'); |
| 791 | buffer.append(IOConstants.TAG_SKILLPOOL).append(':'); |
| 792 | Integer currentPool = thePC.getSkillPool(pcClass); |
| 793 | buffer.append(currentPool == null ? 0 : currentPool); |
| 794 | |
| 795 | // determine if this class can cast spells |
| 796 | boolean isCaster = false; |
| 797 | |
| 798 | if (!thePC.getSpellSupport(pcClass).canCastSpells(thePC)) |
| 799 | { |
| 800 | isCaster = true; |
| 801 | } |
| 802 | |
| 803 | boolean isPsionic = thePC.getSpellSupport(pcClass).hasKnownList() && !isCaster; |
| 804 | |
| 805 | if (isCaster || isPsionic) |
| 806 | { |
| 807 | buffer.append('|'); |
| 808 | buffer.append(IOConstants.TAG_SPELLBASE).append(':'); |
| 809 | buffer.append(EntityEncoder.encode(pcClass.getSpellBaseStat())); |
| 810 | buffer.append('|'); |
| 811 | buffer.append(IOConstants.TAG_CANCASTPERDAY).append(':'); |
| 812 | buffer.append(StringUtil.join(thePC.getSpellSupport(pcClass).getCastListForLevel(classLevel), ",")); |
| 813 | } |
| 814 | |
| 815 | Collection<? extends SpellProhibitor> prohib = charDisplay.getProhibitedSchools(pcClass); |
| 816 | if (prohib != null) |
| 817 | { |
| 818 | Set<String> set = new TreeSet<>(); |
| 819 | for (SpellProhibitor sp : prohib) |
| 820 | { |
| 821 | set.addAll(sp.getValueList()); |
| 822 | } |
| 823 | if (!set.isEmpty()) |
| 824 | { |
no test coverage detected