(PCTemplate template, String choice)
| 426 | } |
| 427 | |
| 428 | private void addKeyedTemplate(PCTemplate template, String choice) |
| 429 | { |
| 430 | if (ChooseActivation.hasNewChooseToken(template) && choice == null) |
| 431 | { |
| 432 | final String message = |
| 433 | "Template ignored: " + template + " as a choice was expected but none was present in character."; |
| 434 | warnings.add(message); |
| 435 | return; |
| 436 | } |
| 437 | final int preXP = thePC.getXP(); |
| 438 | templateInputFacet.importSelection(thePC.getCharID(), template, choice); |
| 439 | thePC.addTemplate(template); |
| 440 | |
| 441 | // |
| 442 | // XP written to file contains leveladjustment XP. If template modifies |
| 443 | // XP, then |
| 444 | // it will have already been added into total. Need to make sure it is |
| 445 | // not doubled. |
| 446 | // |
| 447 | if (thePC.getXP() != preXP) |
| 448 | { |
| 449 | thePC.setXP(preXP); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | private void cacheLine(String s) |
| 454 | { |
no test coverage detected