From: <jde...@us...> - 2012-09-28 22:24:23
|
Revision: 17505 http://pcgen.svn.sourceforge.net/pcgen/?rev=17505&view=rev Author: jdempsey Date: 2012-09-28 22:24:16 +0000 (Fri, 28 Sep 2012) Log Message: ----------- PREFEAT - "TYPE="s failing to meet requirements Issue#: CODE-1685 Modified Paths: -------------- Trunk/pcgen/code/src/java/pcgen/core/prereq/PrerequisiteUtilities.java Modified: Trunk/pcgen/code/src/java/pcgen/core/prereq/PrerequisiteUtilities.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/core/prereq/PrerequisiteUtilities.java 2012-09-28 21:55:16 UTC (rev 17504) +++ Trunk/pcgen/code/src/java/pcgen/core/prereq/PrerequisiteUtilities.java 2012-09-28 22:24:16 UTC (rev 17505) @@ -31,6 +31,7 @@ import pcgen.cdom.base.CDOMObject; import pcgen.cdom.base.CDOMReference; +import pcgen.cdom.base.ChooseInformation; import pcgen.cdom.base.Constants; import pcgen.cdom.enumeration.ListKey; import pcgen.cdom.enumeration.ObjectKey; @@ -287,7 +288,7 @@ * The subKey may be prefixed with TYPE(=|.) in which case the Choice string from the * ability will be used to check for the type of chooser. Possibilities are SKILL, - * WEAPONPROFS, DOMAIN, or SPELL. A list of keys will be retrieved from the ability's + * WEAPONPROFICIENCY, DOMAIN, or SPELL. A list of keys will be retrieved from the ability's * associated object list. The objects matching these keys are retrieved and checked * for type against subKey. A count is returned (respects countMults). * @@ -410,13 +411,14 @@ { final List<String> selectedList = aPC.getAssociationList(ability); - final String aChoiceString = ability.getSafe(StringKey.CHOICE_STRING); - + ChooseInformation<?> chooseInformation = ability.getSafe(ObjectKey.CHOOSE_INFO); + final String aChoiceString = chooseInformation.getName(); + if (aChoiceString.startsWith("SKILL")) //$NON-NLS-1$ { return subKeySkill(countMults, type, selectedList); } - else if (aChoiceString.startsWith("WEAPONPROFS")) //$NON-NLS-1$ + else if (aChoiceString.startsWith("WEAPONPROFICIENCY")) //$NON-NLS-1$ { return subKeyWeaponProf(countMults, type, selectedList); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |