#include <mapcomposite.hpp>
Public Member Functions | |
MapComposite (int id, const std::string &name) | |
Constructor. | |
~MapComposite () | |
Destructor. | |
void | setMap (Map *) |
Sets the underlying pathfinding map. | |
Map * | getMap () const |
Gets the underlying pathfinding map. | |
void | setScript (Script *s) |
Sets the associated script. | |
Script * | getScript () const |
Gets the associated script. | |
bool | isActive () const |
Returns whether the map is active on this server or not. | |
int | getID () const |
Gets the game ID of this map. | |
const std::string & | getName () const |
Gets the name of this map. | |
bool | insert (Thing *) |
Inserts a thing on the map. | |
void | remove (Thing *) |
Removes a thing from the map. | |
void | update () |
Updates zones of every moving beings. | |
PvPRules | getPvP () const |
Gets the PvP rules on the map. | |
ZoneIterator | getWholeMapIterator () const |
Gets an iterator on the objects of the whole map. | |
ZoneIterator | getInsideRectangleIterator (const Rectangle &) const |
Gets an iterator on the objects inside a given rectangle. | |
ZoneIterator | getAroundPointIterator (const Point &, int radius) const |
Gets an iterator on the objects around a given point. | |
ZoneIterator | getAroundActorIterator (Actor *, int radius) const |
Gets an iterator on the objects around a given actor. | |
ZoneIterator | getAroundBeingIterator (Being *, int radius) const |
Gets an iterator on the objects around the old and new positions of a character (including the ones that were but are now elsewhere). | |
const std::vector< Thing * > & | getEverything () const |
Gets everything related to the map. |
Definition at line 229 of file mapcomposite.hpp.
void MapComposite::setMap | ( | Map * | m | ) |
Sets the underlying pathfinding map.
Can be done only once.
Definition at line 542 of file mapcomposite.cpp.
References Map::getProperty().
Referenced by MapReader::readMap().
bool MapComposite::insert | ( | Thing * | ptr | ) |
Inserts a thing on the map.
Sets its public ID if relevant.
Definition at line 495 of file mapcomposite.cpp.
References MapContent::allocate(), Thing::canMove(), Actor::getPosition(), MapContent::getZone(), Thing::isVisible(), Thing::setMap(), and MapContent::things.
Referenced by MapReader::readMap().