From 9a03bb1e5f8eeb5b9f85cc31db343fbf3d5ee8d5 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 4 Apr 2009 20:31:29 -0600 Subject: *Backport some contents from TC2. --HG-- branch : trunk --- src/game/WorldSession.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/game/WorldSession.cpp') diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 6065e491993..5b1261e664a 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS + * Copyright (C) 2005-2009 MaNGOS * - * Copyright (C) 2008 Trinity + * Copyright (C) 2008-2009 Trinity * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,12 +22,11 @@ \ingroup u2w */ -#include "WorldSocket.h" +#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it #include "Common.h" #include "Database/DatabaseEnv.h" #include "Log.h" #include "Opcodes.h" -#include "WorldSocket.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Player.h" @@ -374,7 +373,7 @@ void WorldSession::LogoutPlayer(bool Save) // the player may not be in the world when logging out // e.g if he got disconnected during a transfer to another map // calls to GetMap in this case may cause crashes - if(_player->IsInWorld()) MapManager::Instance().GetMap(_player->GetMapId(), _player)->Remove(_player, false); + if(_player->IsInWorld()) _player->GetMap()->Remove(_player, false); // RemoveFromWorld does cleanup that requires the player to be in the accessor ObjectAccessor::Instance().RemoveObject(_player); -- cgit v1.2.3