refactor(Core/Cache): move the GlobalPlayerCache to its own class (#9166)

This commit is contained in:
Skjalf
2021-11-18 12:53:36 -03:00
committed by GitHub
parent 00dc369cb6
commit 731d256420
47 changed files with 898 additions and 595 deletions

View File

@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CharacterCache.h"
#include "Common.h"
#include "Corpse.h"
#include "DatabaseEnv.h"
@@ -179,7 +180,7 @@ bool Corpse::LoadCorpseFromDB(ObjectGuid::LowType guid, Field* fields)
bool Corpse::IsExpired(time_t t) const
{
// Deleted character
if (!sWorld->GetGlobalPlayerData(GetOwnerGUID().GetCounter()))
if (!sCharacterCache->GetCharacterCacheByGuid(GetOwnerGUID()))
return true;
if (m_type == CORPSE_BONES)