| 233 | } |
| 234 | |
| 235 | private static String replaceCostCharges(String costFormula, final String listEntry) |
| 236 | { |
| 237 | String modChoice = ""; |
| 238 | |
| 239 | while (costFormula.contains("%" + S_CHARGES)) |
| 240 | { |
| 241 | final int idx = costFormula.indexOf("%" + S_CHARGES); |
| 242 | |
| 243 | if (modChoice.isEmpty()) |
| 244 | { |
| 245 | modChoice = Integer.toString(EqModSpellInfo.getSpellInfo(listEntry, S_CHARGES)); |
| 246 | } |
| 247 | |
| 248 | costFormula = costFormula.substring(0, idx) + modChoice + costFormula.substring(idx + 8); |
| 249 | } |
| 250 | |
| 251 | return costFormula; |
| 252 | } |
| 253 | |
| 254 | private static String replaceCostSpellCost(String costFormula, final String listEntry) |
| 255 | { |