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

Method getCreaturesByAlliedSeat

source/gamemap/GameMap.cpp:552–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552std::vector<Creature*> GameMap::getCreaturesByAlliedSeat(const Seat* seat) const
553{
554 std::vector<Creature*> tempVector;
555
556 // Loop over all the creatures in the GameMap and add them to the temp vector if their seat matches the one in parameter.
557 for (Creature* creature : mCreatures)
558 {
559 if (seat->isAlliedSeat(creature->getSeat()) && creature->isAlive())
560 tempVector.push_back(creature);
561 }
562
563 return tempVector;
564}
565
566std::vector<Creature*> GameMap::getCreaturesBySeat(const Seat* seat) const
567{

Callers 1

handleDefenseMethod · 0.80

Calls 3

isAlliedSeatMethod · 0.80
isAliveMethod · 0.80
getSeatMethod · 0.45

Tested by

no test coverage detected