MCPcopy Create free account
hub / github.com/PCGen/pcgen / appendEqSetBonuses

Method appendEqSetBonuses

code/src/java/pcgen/io/PCGVer2Creator.java:1182–1216  ·  view source on GitHub ↗

For each EquipSet, check for a tempBonusList and if found, save each bonus @param buffer

(StringBuilder buffer)

Source from the content-addressed store, hash-verified

1180 * @param buffer
1181 */
1182 private void appendEqSetBonuses(StringBuilder buffer)
1183 {
1184 for (EquipSet eSet : charDisplay.getEquipSet())
1185 {
1186 if (eSet.useTempBonusList())
1187 {
1188 buffer.append(IOConstants.TAG_EQSETBONUS).append(':');
1189 buffer.append(eSet.getIdPath());
1190
1191 List<String> trackList = new ArrayList<>();
1192
1193 for (Map.Entry<BonusObj, BonusManager.TempBonusInfo> me : eSet.getTempBonusMap().entrySet())
1194 {
1195 //BonusObj bObj = me.getKey();
1196 TempBonusInfo tbi = me.getValue();
1197 Object cObj = tbi.source;
1198 Object tObj = tbi.target;
1199 final String aName = tempBonusName(cObj, tObj);
1200
1201 if (trackList.contains(aName))
1202 {
1203 continue;
1204 }
1205
1206 trackList.add(aName);
1207
1208 buffer.append('|');
1209 buffer.append(IOConstants.TAG_TEMPBONUSBONUS).append(':');
1210 buffer.append(EntityEncoder.encode(aName));
1211 }
1212
1213 buffer.append(IOConstants.LINE_SEP);
1214 }
1215 }
1216 }
1217
1218 private void appendEquipmentLines(StringBuilder buffer)
1219 {

Callers 1

createPCGStringMethod · 0.95

Calls 11

tempBonusNameMethod · 0.95
encodeMethod · 0.95
useTempBonusListMethod · 0.80
getValueMethod · 0.65
containsMethod · 0.65
addMethod · 0.65
getEquipSetMethod · 0.45
appendMethod · 0.45
getIdPathMethod · 0.45
entrySetMethod · 0.45
getTempBonusMapMethod · 0.45

Tested by

no test coverage detected