summaryrefslogtreecommitdiff
path: root/src/game-server/npc.hpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-09 17:52:59 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-09 17:52:59 +0000
commit015d9180fb6e9024229dfeded26cf9c3553e36d8 (patch)
treed2cbe3b0414f16f55b43cc48ee11670af61f1459 /src/game-server/npc.hpp
parentac89d3ab1425f973c6d29cbe9856873489eec69b (diff)
downloadmanaserv-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.hpp14
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. */
};