From: <th...@us...> - 2008-10-09 01:45:25
|
Revision: 7998 http://pcgen.svn.sourceforge.net/pcgen/?rev=7998&view=rev Author: thpr Date: 2008-10-09 01:45:15 +0000 (Thu, 09 Oct 2008) Log Message: ----------- [ 2150470 ] Skill points error - no discernable source atm Issue#: 2150470 Modified Paths: -------------- Trunk/pcgen/code/src/java/pcgen/io/exporttoken/SkillpointsToken.java Modified: Trunk/pcgen/code/src/java/pcgen/io/exporttoken/SkillpointsToken.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/io/exporttoken/SkillpointsToken.java 2008-10-08 21:30:31 UTC (rev 7997) +++ Trunk/pcgen/code/src/java/pcgen/io/exporttoken/SkillpointsToken.java 2008-10-09 01:45:15 UTC (rev 7998) @@ -33,6 +33,7 @@ import pcgen.base.util.NamedValue; import pcgen.cdom.enumeration.AssociationKey; import pcgen.cdom.enumeration.AssociationListKey; +import pcgen.cdom.enumeration.SkillCost; import pcgen.core.PCClass; import pcgen.core.PlayerCharacter; import pcgen.core.Skill; @@ -218,12 +219,19 @@ if ((SkillRankControl.getRank(pc, aSkill).doubleValue() > 0) || (outputIndex != null && outputIndex != 0)) { - for (NamedValue sd : pc.getAssocList(aSkill, AssociationListKey.SKILL_RANK)) + List<NamedValue> assocList = pc.getAssocList(aSkill, + AssociationListKey.SKILL_RANK); + if (assocList != null) { - PCClass pcClass = pc.getClassKeyed(sd.name); - if (targetClass == pcClass) + for (NamedValue sd : assocList) { - usedPoints += (sd.getWeight() * pc.getSkillCostForClass(aSkill, pcClass).getCost()); + PCClass pcClass = pc.getClassKeyed(sd.name); + if (targetClass == pcClass) + { + SkillCost skillCost = pc.getSkillCostForClass( + aSkill, pcClass); + usedPoints += (sd.getWeight() * skillCost.getCost()); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |