Get the value of the token. @param tokenSource The full source of the token @param pc The character to retrieve the value for. @param eh The ExportHandler that is managing the export. @return The value of the token.
(String tokenSource, PlayerCharacter pc, ExportHandler eh)
| 54 | * @return The value of the token. |
| 55 | */ |
| 56 | @Override |
| 57 | public String getToken(String tokenSource, PlayerCharacter pc, ExportHandler eh) |
| 58 | { |
| 59 | StringTokenizer aTok = new StringTokenizer(tokenSource, ".", false); |
| 60 | //Weaponp Token |
| 61 | aTok.nextToken(); |
| 62 | |
| 63 | if (pc.getDisplay().hasPrimaryWeapons()) |
| 64 | { |
| 65 | Equipment eq = pc.getDisplay().getPrimaryWeapons().iterator().next(); |
| 66 | return getWeaponToken(pc, eq, aTok, tokenSource); |
| 67 | } |
| 68 | else if (eh != null && eh.getExistsOnly()) |
| 69 | { |
| 70 | eh.setNoMoreItems(true); |
| 71 | if (eh.getCheckBefore()) |
| 72 | { |
| 73 | eh.setCanWrite(false); |
| 74 | } |
| 75 | } |
| 76 | return ""; |
| 77 | } |
| 78 | } |
nothing calls this directly
no test coverage detected