Merge branch 'master' into 310

Conflicts:
	src/game/Unit.cpp
	src/shared/Database/SQLStorage.cpp
This commit is contained in:
tomrus88 2009-03-30 15:01:04 +04:00
commit abae3cac91
50 changed files with 468 additions and 150 deletions

View file

@ -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;
@ -2640,7 +2630,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());
@ -2654,7 +2644,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;
@ -2665,7 +2655,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);