diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-13 07:29:30 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-13 07:29:30 +0000 |
commit | fe474eb4fae9d89e3797d0ceaae6613798ce491f (patch) | |
tree | 2a91b2f17636ae7b20eea06a28a89942f6f36d39 /src/monster.h | |
parent | 3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf (diff) | |
download | mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.tar.gz mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.tar.bz2 mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.tar.xz mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.zip |
Synchronized pathfinding algorithmns with those used by the server to avoid asynchronisation.
Diffstat (limited to 'src/monster.h')
-rw-r--r-- | src/monster.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/monster.h b/src/monster.h index 585f6f09..ecf7ad51 100644 --- a/src/monster.h +++ b/src/monster.h @@ -33,6 +33,8 @@ class Monster : public Being public: Monster(Uint16 id, Uint16 job, Map *map); + virtual ~Monster(); + virtual void setAction(Action action, int attackType); virtual Type getType() const; @@ -58,6 +60,19 @@ class Monster : public Being */ const MonsterInfo& getInfo() const; + + /** + * Gets the way the monster is blocked for other objects + */ + virtual unsigned char getWalkMask() const + { return 0x83; } // blocked walls, other monsters and players ( bin 1000 0011) + + protected: + /** + * Gets the way the monster blocks pathfinding for other objects + */ + virtual Map::BlockType getBlockType() const + { return Map::BLOCKTYPE_MONSTER; } }; #endif |