From eeac0299a8b48e9996cede9500c65b2d1486fda9 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 18 Nov 2021 12:55:11 -0300 Subject: [PATCH] fix(AZS): Update module after cache updates (#15) --- modules/mod-playerstats/src/scripts/PlayerStats.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mod-playerstats/src/scripts/PlayerStats.cpp b/modules/mod-playerstats/src/scripts/PlayerStats.cpp index 152616a..a144234 100644 --- a/modules/mod-playerstats/src/scripts/PlayerStats.cpp +++ b/modules/mod-playerstats/src/scripts/PlayerStats.cpp @@ -25,10 +25,10 @@ uint32 AzthPlayer::normalizeLvl(uint32 level) { for (Group::member_citerator mitr = group->GetMemberSlots().begin(); mitr != group->GetMemberSlots().end(); ++mitr) { - if (const GlobalPlayerData* gpd = sWorld->GetGlobalPlayerData(mitr->guid.GetCounter())) + if (CharacterCacheEntry const* gpd = sCharacterCache->GetCharacterCacheByGuid(mitr->guid)) { - if (groupLevel < gpd->level) - rLevel = gpd->level; + if (groupLevel < gpd->Level) + rLevel = gpd->Level; } } }