MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / nextSeatId

Method nextSeatId

source/gamemap/GameMap.cpp:2596–2614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2594}
2595
2596int 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
2616std::string GameMap::nextUniqueNameCreature(const std::string& className)
2617{

Callers 1

keyPressedMethod · 0.80

Calls 1

getIdMethod · 0.45

Tested by

no test coverage detected