Core/Objects: ported master branch handling for properly destroying objects via out of range and destroy object opcode

# Conflicts:
#	src/server/game/Entities/Creature/Creature.cpp
This commit is contained in:
Shauren authored and Ovahlord committed 2022-02-02 16:24:42 +01:00
1 parent 284b2a23eb
commit f2b4f2208e
10 files changed
+43 -16

No files matched your search

+1
View File
@@ -645,6 +645,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
_player->SetDestroyedObject(true);
_player->CleanupsBeforeDelete();
TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d",
GetAccountId(), GetRemoteAddress().c_str(), _player->GetName().c_str(), _player->GetGUID().GetCounter(), _player->getLevel());