| 2594 | } |
| 2595 | |
| 2596 | int GameMap::nextSeatId(int SeatId) |
| 2597 | { |
| 2598 | int firstSeatId = -1; |
| 2599 | bool useNext = false; |
| 2600 | for(Seat* seat : mSeats) |
| 2601 | { |
| 2602 | if(useNext) |
| 2603 | return seat->getId(); |
| 2604 | |
| 2605 | if(firstSeatId == -1) |
| 2606 | firstSeatId = seat->getId(); |
| 2607 | |
| 2608 | if(seat->getId() == SeatId) |
| 2609 | useNext = true; |
| 2610 | } |
| 2611 | |
| 2612 | // If we reach here, that means that we have to last seat id. We return the first one we could find |
| 2613 | return firstSeatId; |
| 2614 | } |
| 2615 | |
| 2616 | std::string GameMap::nextUniqueNameCreature(const std::string& className) |
| 2617 | { |