diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-25 22:50:59 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-25 22:50:59 +0100 |
commit | cc79f0fe21e1a2ef73cbe987d54e848b9a47142d (patch) | |
tree | edd316eb6094f0c02d6d014385865dcd88a2bc56 /src/beingmanager.h | |
parent | b0df784f1be44a657ca8092069488602270629b7 (diff) | |
parent | 99e8a3fd77b63a029fe02dcf771b6af1aad252ed (diff) | |
download | mana-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.gz mana-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.bz2 mana-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.xz mana-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.zip |
Merge branch 'eathena/master'
Conflicts:
A lot of files.
Diffstat (limited to 'src/beingmanager.h')
-rw-r--r-- | src/beingmanager.h | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/src/beingmanager.h b/src/beingmanager.h index 726a73ec..05821bcf 100644 --- a/src/beingmanager.h +++ b/src/beingmanager.h @@ -40,6 +40,8 @@ class BeingManager BeingManager(Network *network); #endif + ~BeingManager(); + /** * Sets the map on which beings are created */ @@ -56,7 +58,7 @@ class BeingManager #ifdef TMWSERV_SUPPORT Being *createBeing(int id, int type, int subtype); #else - Being *createBeing(Uint32 id, Uint16 job); + Being *createBeing(int id, Uint16 job); #endif /** @@ -67,13 +69,13 @@ class BeingManager /** * Returns a specific id Being. */ - Being* findBeing(Uint32 id); + Being *findBeing(int id); /** * Returns a being at specific coordinates. */ - Being* findBeing(Uint16 x, Uint16 y, Being::Type type = Being::UNKNOWN); - Being* findBeingByPixel(Uint16 x, Uint16 y); + Being *findBeing(int x, int y, Being::Type type = Being::UNKNOWN); + Being *findBeingByPixel(int x, int y); /** * Returns a being nearest to specific coordinates. @@ -84,21 +86,21 @@ class BeingManager * no being is returned. * @param type The type of being to look for. */ - Being* findNearestLivingBeing(Uint16 x, Uint16 y, int maxdist, + Being *findNearestLivingBeing(int x, int y, int maxdist, Being::Type type = Being::UNKNOWN); - /** - * Finds a being by name and (optionally) by type. - */ - Being* findBeingByName(std::string name, Being::Type type = Being::UNKNOWN); - - /** - * Returns a being nearest to another being. - * - * \param maxdist maximal distance. If minimal distance is larger, - * no being is returned - */ - Being* findNearestLivingBeing(Being *aroundBeing, int maxdist, + /** + * Finds a being by name and (optionally) by type. + */ + Being *findBeingByName(std::string name, Being::Type type = Being::UNKNOWN); + + /** + * Returns a being nearest to another being. + * + * \param maxdist maximal distance. If minimal distance is larger, + * no being is returned + */ + Being *findNearestLivingBeing(Being *aroundBeing, int maxdist, Being::Type type = Being::UNKNOWN); /** @@ -107,6 +109,14 @@ class BeingManager Beings& getAll(); /** + * Returns true if the given being is in the manager's list, false + * otherwise. + * + * \param being the being to search for + */ + bool hasBeing(Being *being); + + /** * Logic. */ void logic(); |