diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index fd9216469..4a18208e0 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -431,7 +431,7 @@ void StatsFunctions::SetAttributeBase(unsigned short pid, unsigned short attribu player->creatureStats.mAttributes[attribute].mBase = value; } -void StatsFunctions::SetAttributeModifier(unsigned short pid, unsigned short attribute, int value) noexcept +void StatsFunctions::ClearAttributeModifier(unsigned short pid, unsigned short attribute) noexcept { Player *player; GET_PLAYER(pid, player,); @@ -439,7 +439,7 @@ void StatsFunctions::SetAttributeModifier(unsigned short pid, unsigned short att if (attribute >= Attribute::Length) return; - player->creatureStats.mAttributes[attribute].mMod = value; + player->creatureStats.mAttributes[attribute].mMod = 0; } void StatsFunctions::SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value diff --git a/apps/openmw-mp/Script/Functions/Stats.hpp b/apps/openmw-mp/Script/Functions/Stats.hpp index 6f844aeed..9259b4df4 100644 --- a/apps/openmw-mp/Script/Functions/Stats.hpp +++ b/apps/openmw-mp/Script/Functions/Stats.hpp @@ -64,7 +64,7 @@ {"SetFatigueCurrent", StatsFunctions::SetFatigueCurrent},\ \ {"SetAttributeBase", StatsFunctions::SetAttributeBase},\ - {"SetAttributeModifier", StatsFunctions::SetAttributeModifier},\ + {"ClearAttributeModifier", StatsFunctions::ClearAttributeModifier},\ \ {"SetSkillBase", StatsFunctions::SetSkillBase},\ {"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\ @@ -141,7 +141,7 @@ public: static void SetFatigueCurrent(unsigned short pid, double value) noexcept; static void SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept; - static void SetAttributeModifier(unsigned short pid, unsigned short attribute, int value) noexcept; + static void ClearAttributeModifier(unsigned short pid, unsigned short attribute) noexcept; static void SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept; static void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept;