Applies a change in the given number of levels of the given PCClass to the given PlayerCharacter. If the number of levels is greater than zero, then levels are added to the given PlayerCharacter, if less than zero, levels are removed from the given PlayerCharacter. @param pc The PlayerCh
(PlayerCharacter pc, PCClass pcClass, int levels)
| 168 | * if the given PlayerCharacter is null |
| 169 | */ |
| 170 | private void apply(PlayerCharacter pc, PCClass pcClass, int levels) |
| 171 | { |
| 172 | boolean tempShowHP = SettingsHandler.getShowHPDialogAtLevelUp(); |
| 173 | SettingsHandler.setShowHPDialogAtLevelUp(false); |
| 174 | int tempChoicePref = UIPropertyContext.getSingleChoiceAction(); |
| 175 | UIPropertyContext.setSingleChoiceAction(Constants.CHOOSER_SINGLE_CHOICE_METHOD_SELECT_EXIT); |
| 176 | |
| 177 | pc.incrementClassLevel(levels, pcClass, true, true); |
| 178 | |
| 179 | UIPropertyContext.setSingleChoiceAction(tempChoicePref); |
| 180 | SettingsHandler.setShowHPDialogAtLevelUp(tempShowHP); |
| 181 | } |
| 182 | |
| 183 | public void setTemplateFacet(TemplateFacet templateFacet) |
| 184 | { |
no test coverage detected