aboutsummaryrefslogtreecommitdiff
path: root/src/game/World.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-28 17:56:15 -0600
committermegamage <none@none>2009-03-28 17:56:15 -0600
commit65814974115e234111fb113e4bac1429a58caf55 (patch)
treed1336b426381a57c4deb7b023f801bcde04aa63a /src/game/World.cpp
parentbf1cb43b3aebb217b9d0a957348b0ea6b306e33e (diff)
[7572] Use enum type instead int for World::SendServerMessage arg Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r--src/game/World.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 387ce2655b2..52e8752afd7 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -83,16 +83,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;
@@ -3010,7 +3000,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());
@@ -3024,7 +3014,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;
@@ -3035,7 +3025,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);