diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-13 07:29:01 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-13 07:29:01 +0000 |
commit | efe4ef65bedbaa66e35f3a4354f7422c313ce624 (patch) | |
tree | c1259e6a60e80ee5b8ba97c44f9223071aba4df7 /src/game-server/character.hpp | |
parent | 344fe375ff6e7db425da6ca266e02ea93dd7cc4d (diff) | |
download | manaserv-efe4ef65bedbaa66e35f3a4354f7422c313ce624.tar.gz manaserv-efe4ef65bedbaa66e35f3a4354f7422c313ce624.tar.bz2 manaserv-efe4ef65bedbaa66e35f3a4354f7422c313ce624.tar.xz manaserv-efe4ef65bedbaa66e35f3a4354f7422c313ce624.zip |
Implemented dynamic and selective pathblocking. Monsters are blocked by player characters and other monsters, player characters only by monsters.
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r-- | src/game-server/character.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp index b90d2b3c..62bec49d 100644 --- a/src/game-server/character.hpp +++ b/src/game-server/character.hpp @@ -50,6 +50,8 @@ class Character : public Being */ Character(MessageIn &msg); + ~Character(); + /** * recalculates the level when necessary and calls Being::update */ @@ -271,6 +273,12 @@ class Character : public Being int getCorrectionPoints() const { return mCorrectionPoints; } + /** + * Gets the way the object is blocked by other things on the map + */ + virtual unsigned char getWalkMask() const + { return 0x82; } // blocked by walls and monsters ( bin 1000 0010) + private: Character(Character const &); Character &operator=(Character const &); @@ -340,6 +348,13 @@ class Character : public Being bool mRecalculateLevel; /**< flag raised when the character level might have increased */ unsigned char mAccountLevel; /**< Account level of the user. */ TransactionType mTransaction; /**< Trade/buy/sell action the character is involved in. */ + + protected: + /** + * Gets the way the object blocks pathfinding for other objects + */ + virtual Map::BlockType getBlockType() const + { return Map::BLOCKTYPE_CHARACTER; } }; #endif // _TMWSERV_CHARACTER_HPP_ |