From 54d5f7e577db0639e42b18beae4b5c87af6d6843 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Fri, 4 Mar 2011 18:35:17 +0100 Subject: 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 --- src/account-server/storage.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/account-server/storage.h') 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 @@ -338,6 +338,13 @@ class Storage void setWorldStateVar(const std::string &name, int mapId, 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 getAllWorldStateVars(int mapId); + /** * Set the level on an account. * -- cgit v1.2.3-60-g2f50