From b01670e1e4566d55336a194fe477d812eeb9debd Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 17 Jul 2023 03:36:45 +0200 Subject: [PATCH] Correct fields being validated --- Source/pack.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/pack.cpp b/Source/pack.cpp index d671708c2..a47eb1d93 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -509,9 +509,9 @@ bool UnPackNetPlayer(const PlayerNetPack &packed, Player &player) ValidateFields(baseMana, baseManaMax, baseMana <= baseManaMax); ValidateFields(packed.pClass, packed.pBaseStr, packed.pBaseStr <= player.GetMaximumAttributeValue(CharacterAttribute::Strength)); - ValidateFields(packed.pClass, packed.pBaseMag, packed.pBaseStr <= player.GetMaximumAttributeValue(CharacterAttribute::Magic)); - ValidateFields(packed.pClass, packed.pBaseDex, packed.pBaseStr <= player.GetMaximumAttributeValue(CharacterAttribute::Dexterity)); - ValidateFields(packed.pClass, packed.pBaseVit, packed.pBaseStr <= player.GetMaximumAttributeValue(CharacterAttribute::Vitality)); + ValidateFields(packed.pClass, packed.pBaseMag, packed.pBaseMag <= player.GetMaximumAttributeValue(CharacterAttribute::Magic)); + ValidateFields(packed.pClass, packed.pBaseDex, packed.pBaseDex <= player.GetMaximumAttributeValue(CharacterAttribute::Dexterity)); + ValidateFields(packed.pClass, packed.pBaseVit, packed.pBaseVit <= player.GetMaximumAttributeValue(CharacterAttribute::Vitality)); ValidateField(packed._pNumInv, packed._pNumInv < InventoryGridCells);