fix(Core/LFG): Hide XP from max players (#18103)

* Cherry-pick Player::IsMaxLevel from TrinityCore
* Correctly hide XP reward for max level players in LFG
* Closes #18101
This commit is contained in:
Kitzunu
2024-01-03 19:47:26 +01:00
committed by GitHub
parent da6ff31056
commit 6202835cff
4 changed files with 11 additions and 2 deletions

View File

@@ -188,7 +188,10 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
uint8 playerLevel = GetPlayer() ? GetPlayer()->GetLevel() : 0;
data << uint8(done);
data << uint32(quest->GetRewOrReqMoney(playerLevel));
data << uint32(quest->XPValue(playerLevel));
if (!GetPlayer()->IsMaxLevel())
data << uint32(quest->XPValue(playerLevel));
else
data << uint32(0);
data << uint32(0);
data << uint32(0);
data << uint8(quest->GetRewItemsCount());