summaryrefslogtreecommitdiff
path: root/src/account-server/storage.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2011-03-04 18:35:17 +0100
committerPhilipp Sehmisch <mana@crushnet.org>2011-03-04 18:36:17 +0100
commit54d5f7e577db0639e42b18beae4b5c87af6d6843 (patch)
tree2a667f208be4191a54d08131d7c3984cdfd74132 /src/account-server/storage.h
parentbc5a0495ba7fbf992a1733850cbbe1cfb14c7c8d (diff)
downloadmanaserv-54d5f7e577db0639e42b18beae4b5c87af6d6843.tar.gz
manaserv-54d5f7e577db0639e42b18beae4b5c87af6d6843.tar.bz2
manaserv-54d5f7e577db0639e42b18beae4b5c87af6d6843.tar.xz
manaserv-54d5f7e577db0639e42b18beae4b5c87af6d6843.zip
Implemented persistent world and map variables
The gameserver now receive a copy of all world state variables when they are accepted by the accountserver and receive a copy of all map state variables of a map when they register it successfully. Implemented LUA script bindings for getting and setting these variables. When such a variable is set, the accountserver is notified about this change. Changes to world state variables are then propagated to all gameservers by the accountserver. Be aware that when a gameserver is updating a map, there is no check if it is actually responsible for said map. But I consider this not a security flaw, because authenticated game servers are considered to be trustworthy in a lot of other situations, too. Also renamed "quest" to "character variable" in the sourcecode. Reviewed-by: Bertram
Diffstat (limited to 'src/account-server/storage.h')
-rw-r--r--src/account-server/storage.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/account-server/storage.h b/src/account-server/storage.h
index 8e7f90f3..a44156a4 100644
--- a/src/account-server/storage.h
+++ b/src/account-server/storage.h
@@ -339,6 +339,13 @@ class Storage
const std::string &value);
/**
+ * Gets the value of all world state variable of a specific map.
+ *
+ * @param mapId ID of the specific map
+ */
+ std::map<std::string, std::string> getAllWorldStateVars(int mapId);
+
+ /**
* Set the level on an account.
*
* @param id The id of the account