summaryrefslogtreecommitdiff
path: root/src/scripting/script.h
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-02-20 15:34:28 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-02-20 15:34:28 +0100
commitc70c6d19c1cabf46b595591802bceab63d371788 (patch)
tree1c153d2bfe560171bad5889d528dc5cf110e8533 /src/scripting/script.h
parentd707495540581f8c1b9ab3d5007c9c4d1ab83b53 (diff)
parent587b7682e6bf7dd9e616c1d4789a5ed9aa986e6d (diff)
downloadmanaserv-c70c6d19c1cabf46b595591802bceab63d371788.tar.gz
manaserv-c70c6d19c1cabf46b595591802bceab63d371788.tar.bz2
manaserv-c70c6d19c1cabf46b595591802bceab63d371788.tar.xz
manaserv-c70c6d19c1cabf46b595591802bceab63d371788.zip
Merge branch 'master' into lpc2012
Conflicts: gameserver.cbp src/account-server/accounthandler.cpp src/game-server/attack.cpp src/game-server/attack.h src/game-server/being.cpp src/game-server/being.h src/game-server/character.cpp src/game-server/character.h src/game-server/inventory.cpp src/game-server/item.h src/game-server/monster.cpp src/game-server/monster.h
Diffstat (limited to 'src/scripting/script.h')
-rw-r--r--src/scripting/script.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/scripting/script.h b/src/scripting/script.h
index 238bc34c..8dee23a9 100644
--- a/src/scripting/script.h
+++ b/src/scripting/script.h
@@ -23,19 +23,21 @@
#include "common/inventorydata.h"
#include "common/manaserv_protocol.h"
-#include "game-server/eventlistener.h"
#include <list>
#include <string>
#include <vector>
+#include <sigc++/trackable.h>
+
+class Being;
class MapComposite;
class Entity;
/**
* Abstract interface for calling functions written in an external language.
*/
-class Script
+class Script : public sigc::trackable
{
public:
/**
@@ -216,9 +218,6 @@ class Script
MapComposite *getMap() const
{ return mMap; }
- EventListener *getScriptListener()
- { return &mEventListener; }
-
virtual void processDeathEvent(Being *entity) = 0;
virtual void processRemoveEvent(Entity *entity) = 0;
@@ -235,7 +234,6 @@ class Script
private:
MapComposite *mMap;
- EventListener mEventListener; /**< Tracking of being deaths. */
std::vector<Thread*> mThreads;
static Ref mCreateNpcDelayedCallback;
@@ -245,16 +243,4 @@ class Script
friend class Thread;
};
-struct ScriptEventDispatch: EventDispatch
-{
- ScriptEventDispatch()
- {
- typedef EventListenerFactory< Script, &Script::mEventListener > Factory;
- died = &Factory::create< Being, &Script::processDeathEvent >::function;
- removed = &Factory::create< Entity, &Script::processRemoveEvent >::function;
- }
-};
-
-static ScriptEventDispatch scriptEventDispatch;
-
#endif // SCRIPTING_SCRIPT_H