mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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();
|
||||
|
|
|
|||
|
|
@ -2414,7 +2414,10 @@ void World::UpdateSessions( time_t diff )
|
|||
|
||||
///- Delete kicked sessions at add new session
|
||||
for (std::set<WorldSession*>::iterator itr = m_kicked_sessions.begin(); itr != m_kicked_sessions.end(); ++itr)
|
||||
{
|
||||
RemoveQueuedPlayer (*itr);
|
||||
delete *itr;
|
||||
}
|
||||
m_kicked_sessions.clear();
|
||||
|
||||
///- Then send an update signal to remaining ones
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ WorldSession::~WorldSession()
|
|||
WorldPacket *packet = _recvQueue.next ();
|
||||
delete packet;
|
||||
}
|
||||
|
||||
sWorld.RemoveQueuedPlayer(this);
|
||||
}
|
||||
|
||||
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue