diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-28 17:03:44 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-28 17:03:44 +0000 |
commit | e678c7cc1574d5739f83da2b0d493b44e3a7a42e (patch) | |
tree | a184372b02622d82bc85a9827a835de186b0e2ed /src/account-server/serverhandler.cpp | |
parent | c4a2cd54d72f776d6e37eae7a8c67caa81269f4f (diff) | |
download | manaserv-e678c7cc1574d5739f83da2b0d493b44e3a7a42e.tar.gz manaserv-e678c7cc1574d5739f83da2b0d493b44e3a7a42e.tar.xz manaserv-e678c7cc1574d5739f83da2b0d493b44e3a7a42e.zip |
Implemented quest variables.
Diffstat (limited to 'src/account-server/serverhandler.cpp')
-rw-r--r-- | src/account-server/serverhandler.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/account-server/serverhandler.cpp b/src/account-server/serverhandler.cpp index 9e53356..6c428e4 100644 --- a/src/account-server/serverhandler.cpp +++ b/src/account-server/serverhandler.cpp @@ -189,6 +189,27 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) } break; + case GAMSG_GET_QUEST: + { + int id = msg.readLong(); + std::string name = msg.readString(); + Storage &store = Storage::instance("tmw"); + std::string value = store.getQuestVar(id, name); + result.writeShort(AGMSG_GET_QUEST_RESPONSE); + result.writeLong(id); + result.writeString(name); + result.writeString(value); + } break; + + case GAMSG_SET_QUEST: + { + int id = msg.readLong(); + std::string name = msg.readString(); + std::string value = msg.readString(); + Storage &store = Storage::instance("tmw"); + store.setQuestVar(id, name, value); + } break; + #if 0 case GAMSG_GUILD_CREATE: { |