Fixied crash at .pinfo command use from console.

Also apply mangos code style to related code.
This commit is contained in:
VladimirMangos 2008-10-30 21:04:51 +03:00
parent a26b72411a
commit 0bf682fdbd
3 changed files with 54 additions and 52 deletions

View file

@ -1794,7 +1794,8 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
else
{
accId = objmgr.GetPlayerAccountIdByGUID(targetGUID);
Player plr(m_session); // use current session for temporary load
WorldSession session(0,NULL,SEC_PLAYER,0,0,LOCALE_enUS);
Player plr(&session); // use fake session for temporary load
plr.MinimalLoadFromDB(NULL, targetGUID);
money = plr.GetMoney();
total_player_time = plr.GetTotalPlayedTime();