mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
This commit is contained in:
parent
40b0a2cd92
commit
d7ae5e3af0
20 changed files with 135 additions and 132 deletions
|
|
@ -71,13 +71,7 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accid)
|
|||
uint64 guid = MAKE_NEW_GUID(guidlo, 0, HIGHGUID_PLAYER);
|
||||
|
||||
// kick if player currently
|
||||
if(Player* p = ObjectAccessor::GetObjectInWorld(guid, (Player*)NULL))
|
||||
{
|
||||
WorldSession* s = p->GetSession();
|
||||
s->KickPlayer(); // mark session to remove at next session list update
|
||||
s->LogoutPlayer(false); // logout player without waiting next session list update
|
||||
}
|
||||
|
||||
ObjectAccessor::KickPlayer(guid);
|
||||
Player::DeleteFromDB(guid, accid, false); // no need to update realm characters
|
||||
} while (result->NextRow());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue