diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-09 17:52:59 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-09 17:52:59 +0000 |
commit | 015d9180fb6e9024229dfeded26cf9c3553e36d8 (patch) | |
tree | d2cbe3b0414f16f55b43cc48ee11670af61f1459 /src/game-server/npc.hpp | |
parent | ac89d3ab1425f973c6d29cbe9856873489eec69b (diff) | |
download | manaserv-015d9180fb6e9024229dfeded26cf9c3553e36d8.tar.gz manaserv-015d9180fb6e9024229dfeded26cf9c3553e36d8.tar.bz2 manaserv-015d9180fb6e9024229dfeded26cf9c3553e36d8.tar.xz manaserv-015d9180fb6e9024229dfeded26cf9c3553e36d8.zip |
Converted NPC class to scripting engine.
Diffstat (limited to 'src/game-server/npc.hpp')
-rw-r--r-- | src/game-server/npc.hpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/game-server/npc.hpp b/src/game-server/npc.hpp index 44bbf4b8..7c909d25 100644 --- a/src/game-server/npc.hpp +++ b/src/game-server/npc.hpp @@ -25,27 +25,28 @@ #include "game-server/being.hpp" +class Script; +class Character; + /** * Class describing a non-player character. */ class NPC : public Being { public: - NPC(int id): Being(OBJECT_NPC, 65535), mID(id) {} + NPC(int id, Script *); - void update() {} + void update(); /** * Prompts NPC. - * TODO: should not be virtual, should invoke a scripting engine instead. */ - virtual void prompt(Character *, bool restart) = 0; + void prompt(Character *, bool restart); /** * Selects an NPC proposition. - * TODO: should not be virtual, should invoke a scripting engine instead. */ - virtual void select(Character *, int) = 0; + void select(Character *, int); /** * Gets NPC ID. @@ -54,6 +55,7 @@ class NPC : public Being { return mID; } private: + Script *mScript; /**< Script describing NPC behavior. */ unsigned short mID; /**< ID of the NPC. */ }; |