Build up the description of the listed equipmods for this equipment item. Takes into account if the item is a double weapon or not. @param commonList The list of common equipment modifiers. @param modList The list of eqmods on the primary head. @param altModList The
(List<EquipmentModifier> commonList, List<EquipmentModifier> modList, List<EquipmentModifier> altModList)
| 1229 | * @return The description of these equipment modifiers. |
| 1230 | */ |
| 1231 | private String buildEqModDesc(List<EquipmentModifier> commonList, List<EquipmentModifier> modList, |
| 1232 | List<EquipmentModifier> altModList) |
| 1233 | { |
| 1234 | StringBuilder desc = new StringBuilder(250); |
| 1235 | |
| 1236 | String commonDesc = getNameFromModifiers(commonList); |
| 1237 | String modDesc = getNameFromModifiers(modList); |
| 1238 | String altModDesc = getNameFromModifiers(altModList); |
| 1239 | |
| 1240 | if ((modList.isEmpty()) && (altModList.isEmpty())) |
| 1241 | { |
| 1242 | desc.append(commonDesc); |
| 1243 | } |
| 1244 | else if (!isDouble()) |
| 1245 | { |
| 1246 | desc.append(modDesc); |
| 1247 | if (!modList.isEmpty() && !commonList.isEmpty()) |
| 1248 | { |
| 1249 | desc.append('/'); |
| 1250 | } |
| 1251 | desc.append(commonDesc); |
| 1252 | } |
| 1253 | else |
| 1254 | { |
| 1255 | if (!commonDesc.isEmpty()) |
| 1256 | { |
| 1257 | desc.append(commonDesc).append(';'); |
| 1258 | } |
| 1259 | |
| 1260 | if (!modDesc.isEmpty()) |
| 1261 | { |
| 1262 | desc.append(modDesc); |
| 1263 | } |
| 1264 | else |
| 1265 | { |
| 1266 | desc.append('-'); |
| 1267 | } |
| 1268 | |
| 1269 | desc.append(';'); |
| 1270 | |
| 1271 | if (!altModDesc.isEmpty()) |
| 1272 | { |
| 1273 | desc.append(altModDesc); |
| 1274 | } |
| 1275 | else |
| 1276 | { |
| 1277 | desc.append('-'); |
| 1278 | } |
| 1279 | } |
| 1280 | return desc.toString(); |
| 1281 | } |
| 1282 | |
| 1283 | /** |
| 1284 | * OwnedItem Sets the location attribute of the Equipment object |
no test coverage detected