Update some code for 322a
--HG-- branch : trunk
This commit is contained in:
+28
-27
@@ -45,6 +45,7 @@ struct ScriptInfo;
|
||||
class SqlResultQueue;
|
||||
class QueryResult;
|
||||
class WorldSocket;
|
||||
class SystemMgr;
|
||||
|
||||
// ServerMessages.dbc
|
||||
enum ServerMessageType
|
||||
@@ -81,14 +82,8 @@ enum WorldTimers
|
||||
WUPDATE_EVENTS = 6,
|
||||
WUPDATE_CLEANDB = 7,
|
||||
WUPDATE_AUTOBROADCAST = 8,
|
||||
WUPDATE_COUNT = 9
|
||||
};
|
||||
|
||||
// States than may change after server started
|
||||
enum WorldStates
|
||||
{
|
||||
WORLDSTATE_WINTERGRASP_CONTROLING_FACTION,
|
||||
WORLDSTATE_VALUE_COUNT,
|
||||
WUPDATE_MAILBOXQUEUE = 9,
|
||||
WUPDATE_COUNT = 10
|
||||
};
|
||||
|
||||
/// Configuration elements
|
||||
@@ -261,6 +256,7 @@ enum WorldConfigs
|
||||
CONFIG_MIN_LOG_UPDATE,
|
||||
CONFIG_CHECK_DB,
|
||||
CONFIG_ENABLE_SINFO_LOGIN,
|
||||
CONFIG_PLAYER_ALLOW_COMMANDS,
|
||||
CONFIG_PET_LOS,
|
||||
CONFIG_NUMTHREADS,
|
||||
CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN,
|
||||
@@ -561,27 +557,17 @@ 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
|
||||
{
|
||||
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;
|
||||
if(index<CONFIG_VALUE_COUNT)
|
||||
return m_configs[index];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// Are we on a "Player versus Player" server?
|
||||
@@ -610,6 +596,19 @@ class World
|
||||
static float GetVisibleUnitGreyDistance() { return m_VisibleUnitGreyDistance; }
|
||||
static float GetVisibleObjectGreyDistance() { return m_VisibleObjectGreyDistance; }
|
||||
|
||||
|
||||
void SetWintergrapsTimer(uint32 timer, uint32 state)
|
||||
{
|
||||
m_WintergrapsTimer = timer;
|
||||
m_WintergrapsState = state;
|
||||
}
|
||||
|
||||
uint32 GetWintergrapsTimer() { return m_WintergrapsTimer; }
|
||||
uint32 GetWintergrapsState() { return m_WintergrapsState; }
|
||||
|
||||
uint32 m_WintergrapsTimer;
|
||||
uint32 m_WintergrapsState;
|
||||
|
||||
void ProcessCliCommands();
|
||||
void QueueCliCommand( CliCommandHolder::Print* zprintf, char const* input ) { cliCmdQueue.add(new CliCommandHolder(input, zprintf)); }
|
||||
|
||||
@@ -637,7 +636,11 @@ class World
|
||||
|
||||
void LoadAutobroadcasts();
|
||||
|
||||
void UpdateAreaDependentAuras();
|
||||
void ProcessStartEvent();
|
||||
void ProcessStopEvent();
|
||||
bool GetEventKill() { return isEventKillStart; }
|
||||
|
||||
bool isEventKillStart;
|
||||
protected:
|
||||
void _UpdateGameTime();
|
||||
// callback for UpdateRealmCharacters
|
||||
@@ -680,7 +683,6 @@ 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
|
||||
@@ -728,4 +730,3 @@ extern uint32 realmID;
|
||||
#define sWorld Trinity::Singleton<World>::Instance()
|
||||
#endif
|
||||
/// @}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user