summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/being.h b/src/being.h
index ec933d90..3a68e0ac 100644
--- a/src/being.h
+++ b/src/being.h
@@ -46,6 +46,13 @@ struct PATH_NODE {
class Being
{
public:
+ enum Type {
+ UNKNOWN,
+ PLAYER,
+ NPC,
+ MONSTER
+ };
+
unsigned short job; /**< Job (player job, npc, monster, ) */
unsigned short x, y; /**< Tile coordinates */
unsigned char direction; /**< Facing direction */
@@ -142,19 +149,9 @@ class Being
void drawSpeech(Graphics *graphics);
/**
- * Checks if the being is a player.
- */
- bool isPlayer();
-
- /**
- * Checks if the being is a npc.
+ * Returns the type of the being.
*/
- bool isNpc();
-
- /**
- * Checks if the being is a monster.
- */
- bool isMonster();
+ Type getType();
// ACCES METHODS
@@ -222,6 +219,9 @@ Being *findNode(unsigned int id);
/** Return a being at specific coordinates */
Being *findNode(unsigned short x, unsigned short y);
+/** Return a being at specific coordinates with specific type*/
+Being *findNode(unsigned short x, unsigned short y, Being::Type type);
+
/** Remove a Being */
void remove_node(unsigned int id);