diff options
| author | Blaymoira <none@none> | 2008-12-31 11:06:52 +0100 |
|---|---|---|
| committer | Blaymoira <none@none> | 2008-12-31 11:06:52 +0100 |
| commit | 8e812a2ca651ad1f7c7f6192c422aaf966094047 (patch) | |
| tree | 24ae0c23e12e7e2cad5a5e1ba86f572c77b18602 /src/game/CharacterHandler.cpp | |
| parent | 1fa33c2bfd2e9531ce786285b7095af7a5a5b513 (diff) | |
*Added Server into at login and new char string with conf settings - by XTZGZoReX
--HG--
branch : trunk
Diffstat (limited to 'src/game/CharacterHandler.cpp')
| -rw-r--r-- | src/game/CharacterHandler.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index aa884ddd2df..1190a45d050 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 { @@ -487,6 +489,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)) @@ -550,6 +554,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()); @@ -615,6 +625,10 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) data.Initialize( SMSG_TRIGGER_CINEMATIC,4 ); data << uint32(rEntry->startmovie); SendPacket( &data ); + + // send new char string if not empty + if (!sWorld.GetNewCharString().empty()) + chH.PSendSysMessage(sWorld.GetNewCharString().c_str()); } } |
