| 528 | } |
| 529 | |
| 530 | CreatureDefinition* GameMap::getClassDescriptionForTuning(const std::string& name) |
| 531 | { |
| 532 | for (std::pair<const CreatureDefinition*,CreatureDefinition*>& def : mClassDescriptions) |
| 533 | { |
| 534 | if(def.second != nullptr) |
| 535 | { |
| 536 | if (def.second->getClassName().compare(name) == 0) |
| 537 | return def.second; |
| 538 | } |
| 539 | else if(def.first->getClassName().compare(name) == 0) |
| 540 | { |
| 541 | def.second = new CreatureDefinition(*def.first); |
| 542 | return def.second; |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | // It is a new definition |
| 547 | CreatureDefinition* def = new CreatureDefinition(name); |
| 548 | mClassDescriptions.push_back(std::pair<const CreatureDefinition*,CreatureDefinition*>(nullptr, def)); |
| 549 | return def; |
| 550 | } |
| 551 | |
| 552 | std::vector<Creature*> GameMap::getCreaturesByAlliedSeat(const Seat* seat) const |
| 553 | { |
no outgoing calls
no test coverage detected