diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-01 21:54:04 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-02 22:57:47 +0100 |
commit | c0c208d4c29ff49f940e8a6c54adb26cc4e5eba3 (patch) | |
tree | 8de105c5e154912acf354bbe1bbf8509ac44e25a /src/game-server/postman.h | |
parent | ba5b55f3eba0aa3898c5fe42de9838b22473c24a (diff) | |
download | manaserv-c0c208d4c29ff49f940e8a6c54adb26cc4e5eba3.tar.gz manaserv-c0c208d4c29ff49f940e8a6c54adb26cc4e5eba3.tar.bz2 manaserv-c0c208d4c29ff49f940e8a6c54adb26cc4e5eba3.tar.xz manaserv-c0c208d4c29ff49f940e8a6c54adb26cc4e5eba3.zip |
Converted functions called by LuaScript to callbacks
This includes the quest reply, post reply, death notification and
remove notification.
Also, Script::Ref was changed from a typedef to a small class,
automating initialization and making the check for validness clearer.
Reviewed-by: Erik Schilling
Diffstat (limited to 'src/game-server/postman.h')
-rw-r--r-- | src/game-server/postman.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game-server/postman.h b/src/game-server/postman.h index 82b7a5a7..5669ebef 100644 --- a/src/game-server/postman.h +++ b/src/game-server/postman.h @@ -25,12 +25,13 @@ #include <string> class Character; +class Script; struct PostCallback { void (*handler)(Character *, const std::string &sender, - const std::string &letter, void *data); - void *data; + const std::string &letter, Script *script); + Script *script; }; class PostMan @@ -64,7 +65,7 @@ public: std::map<Character*, PostCallback>::iterator itr = mCallbacks.find(player); if (itr != mCallbacks.end()) { - itr->second.handler(player, sender, letter, itr->second.data); + itr->second.handler(player, sender, letter, itr->second.script); } } |