*Added Server into at login and new char string with conf settings - by XTZGZoReX

--HG--
branch : trunk
This commit is contained in:
Blaymoira committed 2008-12-31 11:06:52 +01:00
1 parent 1fa33c2bfd
commit 8e812a2ca6
4 files changed
+41

No files matched your search

+14
View File
@@ -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());
}
}