aboutsummaryrefslogtreecommitdiff
path: root/src/game/CharacterHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-31 10:03:07 -0600
committermegamage <none@none>2008-12-31 10:03:07 -0600
commitba58ddac9c302953fc15987bc84d5f858a011e56 (patch)
tree5bafa1aa17b64d7e325a347f4538eb8402b222a3 /src/game/CharacterHandler.cpp
parentaa3b89d7764c093ba87ee2cf99775e3aedc37637 (diff)
parent3885ce94d9be86616bb01e660a70087fcbfc6ffd (diff)
*Update to HG 730.
--HG-- branch : trunk
Diffstat (limited to 'src/game/CharacterHandler.cpp')
-rw-r--r--src/game/CharacterHandler.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index 121a9b0d98d..f7c1fe5090a 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -40,6 +40,8 @@
#include "Util.h"
#include "ArenaTeam.h"
#include "Language.h"
+#include "Chat.h"
+#include "SystemConfig.h"
class LoginQueryHolder : public SqlQueryHolder
{
@@ -571,6 +573,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
Player* pCurrChar = new Player(this);
pCurrChar->GetMotionMaster()->Initialize();
+ // for send server info and strings (config)
+ ChatHandler chH = ChatHandler(pCurrChar);
// "GetAccountId()==db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
if(!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
@@ -636,6 +640,12 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
SendPacket( &data );
DEBUG_LOG( "WORLD: Sent motd (SMSG_MOTD)" );
+
+ // send server info
+ if(sWorld.getConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
+ chH.PSendSysMessage(_FULLVERSION);
+
+ DEBUG_LOG( "WORLD: Sent server info" );
}
//QueryResult *result = CharacterDatabase.PQuery("SELECT guildid,rank FROM guild_member WHERE guid = '%u'",pCurrChar->GetGUIDLow());
@@ -709,7 +719,11 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
data << uint32(rEntry->CinematicSequence);
SendPacket( &data );
}
- }
+
+ // send new char string if not empty
+ if (!sWorld.GetNewCharString().empty())
+ chH.PSendSysMessage(sWorld.GetNewCharString().c_str());
+ }
}
if (!pCurrChar->GetMap()->Add(pCurrChar))