From 2c7704bfe06d9c472b069ee44bb98eb53b60bcd7 Mon Sep 17 00:00:00 2001 From: Eric Robinson <68359262+kphoenix137@users.noreply.github.com> Date: Sun, 9 Jul 2023 20:43:33 -0400 Subject: [PATCH] Validate Base Life and Mana (#6289) --- Source/pack.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/pack.cpp b/Source/pack.cpp index 8719424df..ea2d54c95 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -495,6 +495,10 @@ bool UnPackNetPlayer(const PlayerNetPack &packed, Player &player) return false; if (player._pILMaxDam != SDL_SwapLE32(packed.pILMaxDam)) return false; + if (player._pMaxHPBase > player.calculateBaseLife()) + return false; + if (player._pMaxManaBase > player.calculateBaseMana()) + return false; return true; }