diff --git a/src/game/World.cpp b/src/game/World.cpp index 6694d430f..22ae03fc9 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -75,16 +75,6 @@ float World::m_MaxVisibleDistanceInFlight = DEFAULT_VISIBILITY_DISTANCE; float World::m_VisibleUnitGreyDistance = 0; float World::m_VisibleObjectGreyDistance = 0; -// ServerMessages.dbc -enum ServerMessageType -{ - SERVER_MSG_SHUTDOWN_TIME = 1, - SERVER_MSG_RESTART_TIME = 2, - SERVER_MSG_STRING = 3, - SERVER_MSG_SHUTDOWN_CANCELLED = 4, - SERVER_MSG_RESTART_CANCELLED = 5 -}; - struct ScriptAction { uint64 sourceGUID; @@ -2638,7 +2628,7 @@ void World::ShutdownMsg(bool show, Player* player) { std::string str = secsToTimeString(m_ShutdownTimer); - uint32 msgid = (m_ShutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_TIME : SERVER_MSG_SHUTDOWN_TIME; + ServerMessageType msgid = (m_ShutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_TIME : SERVER_MSG_SHUTDOWN_TIME; SendServerMessage(msgid,str.c_str(),player); DEBUG_LOG("Server is %s in %s",(m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"),str.c_str()); @@ -2652,7 +2642,7 @@ void World::ShutdownCancel() if(!m_ShutdownTimer || m_stopEvent) return; - uint32 msgid = (m_ShutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_CANCELLED : SERVER_MSG_SHUTDOWN_CANCELLED; + ServerMessageType msgid = (m_ShutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_CANCELLED : SERVER_MSG_SHUTDOWN_CANCELLED; m_ShutdownMask = 0; m_ShutdownTimer = 0; @@ -2663,7 +2653,7 @@ void World::ShutdownCancel() } /// Send a server message to the user(s) -void World::SendServerMessage(uint32 type, const char *text, Player* player) +void World::SendServerMessage(ServerMessageType type, const char *text, Player* player) { WorldPacket data(SMSG_SERVER_MESSAGE, 50); // guess size data << uint32(type); diff --git a/src/game/World.h b/src/game/World.h index ef2d99426..cfd99a78d 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -43,6 +43,16 @@ class SqlResultQueue; class QueryResult; class WorldSocket; +// ServerMessages.dbc +enum ServerMessageType +{ + SERVER_MSG_SHUTDOWN_TIME = 1, + SERVER_MSG_RESTART_TIME = 2, + SERVER_MSG_STRING = 3, + SERVER_MSG_SHUTDOWN_CANCELLED = 4, + SERVER_MSG_RESTART_CANCELLED = 5 +}; + enum ShutdownMask { SHUTDOWN_MASK_RESTART = 1, @@ -423,7 +433,7 @@ class World void SendGlobalMessage(WorldPacket *packet, WorldSession *self = 0, uint32 team = 0); void SendZoneMessage(uint32 zone, WorldPacket *packet, WorldSession *self = 0, uint32 team = 0); void SendZoneText(uint32 zone, const char *text, WorldSession *self = 0, uint32 team = 0); - void SendServerMessage(uint32 type, const char *text = "", Player* player = NULL); + void SendServerMessage(ServerMessageType type, const char *text = "", Player* player = NULL); /// Are we in the middle of a shutdown? bool IsShutdowning() const { return m_ShutdownTimer > 0; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 268c1a985..5137fd193 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7571" + #define REVISION_NR "7572" #endif // __REVISION_NR_H__