aboutsummaryrefslogtreecommitdiff
path: root/src/game/World.h
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-17 14:06:20 +0100
committern0n4m3 <none@none>2009-12-17 14:06:20 +0100
commiteccf162be2e8cb821087f49dfd9a0885e6c0e73c (patch)
tree9c52c4f530cc864538278167a93601463629eb0e /src/game/World.h
parent89656d5749f72803edbdd5f9840ba6b4c21f3987 (diff)
Fixed compile errors and some typos
--HG-- branch : trunk
Diffstat (limited to 'src/game/World.h')
-rw-r--r--src/game/World.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/src/game/World.h b/src/game/World.h
index bf5e5eae497..79c621d9a51 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -86,6 +86,13 @@ enum WorldTimers
WUPDATE_COUNT = 10
};
+// States than may change after server started
+enum WorldStates
+{
+ WORLDSTATE_WINTERGRASP_CONTROLING_FACTION,
+ WORLDSTATE_VALUE_COUNT,
+};
+
/// Configuration elements
enum WorldConfigs
{
@@ -557,17 +564,27 @@ class World
/// Set a server configuration element (see #WorldConfigs)
void setConfig(uint32 index,uint32 value)
{
- if(index<CONFIG_VALUE_COUNT)
- m_configs[index]=value;
+ if (index < CONFIG_VALUE_COUNT)
+ m_configs[index] = value;
}
/// Get a server configuration element (see #WorldConfigs)
uint32 getConfig(uint32 index) const
{
- if(index<CONFIG_VALUE_COUNT)
- return m_configs[index];
- else
- return 0;
+ return index < CONFIG_VALUE_COUNT ? m_configs[index] : 0;
+ }
+
+ // Set a server state - Those general values that can change after server have been setup
+ void setState(uint32 index, uint32 value)
+ {
+ if (index < WORLDSTATE_VALUE_COUNT)
+ m_states[index] = value;
+ }
+
+ // Get a server state element
+ uint32 getState(uint32 index) const
+ {
+ return index < WORLDSTATE_VALUE_COUNT ? m_states[index] : 0;
}
/// Are we on a "Player versus Player" server?
@@ -636,11 +653,13 @@ class World
void LoadAutobroadcasts();
- void ProcessStartEvent();
- void ProcessStopEvent();
- bool GetEventKill() { return isEventKillStart; }
+ void UpdateAreaDependentAuras();
+
+ void ProcessStartEvent();
+ void ProcessStopEvent();
+ bool GetEventKill() { return isEventKillStart; }
- bool isEventKillStart;
+ bool isEventKillStart;
protected:
void _UpdateGameTime();
// callback for UpdateRealmCharacters
@@ -683,6 +702,7 @@ class World
float rate_values[MAX_RATES];
uint32 m_configs[CONFIG_VALUE_COUNT];
+ uint32 m_states[WORLDSTATE_VALUE_COUNT];
int32 m_playerLimit;
AccountTypes m_allowedSecurityLevel;
LocaleConstant m_defaultDbcLocale; // from config for one from loaded DBC locales