mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Fixied crash at .pinfo command use from console.
Also apply mangos code style to related code.
This commit is contained in:
parent
a26b72411a
commit
0bf682fdbd
3 changed files with 54 additions and 52 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue