| 487 | } |
| 488 | |
| 489 | int RPGStats::GetOrCreateConditions(STDString const& conditions) |
| 490 | { |
| 491 | if (conditions.empty()) { |
| 492 | return -1; |
| 493 | } |
| 494 | |
| 495 | for (unsigned i = 0; i < Conditions.Size(); i++) { |
| 496 | if (Conditions[i] == conditions) { |
| 497 | return (int)i; |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | Conditions.push_back(conditions); |
| 502 | return (int)Conditions.Size() - 1; |
| 503 | } |
| 504 | |
| 505 | Modifier * RPGStats::GetModifierInfo(FixedString const& modifierListName, FixedString const& modifierName) |
| 506 | { |