diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index dbe108a52..d748fd68b 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -386,10 +386,10 @@ void StatsFunctions::SetSkillCurrent(unsigned short pid, unsigned short skill, i player->NpcStats()->mSkills[skill].mCurrent = value; } -int StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) noexcept +double StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) noexcept { Player *player; - GET_PLAYER(pid, player, 0); + GET_PLAYER(pid, player, 0.0f); if (skill >= Skill::Length) return 0; @@ -397,7 +397,7 @@ int StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) n return player->NpcStats()->mSkills[skill].mProgress; } -void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skill, int value) noexcept +void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept { Player *player; GET_PLAYER(pid, player, ); diff --git a/apps/openmw-mp/Script/Functions/Stats.hpp b/apps/openmw-mp/Script/Functions/Stats.hpp index 15bc1439a..d456294c1 100644 --- a/apps/openmw-mp/Script/Functions/Stats.hpp +++ b/apps/openmw-mp/Script/Functions/Stats.hpp @@ -128,8 +128,8 @@ public: static void SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept; static int GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept; static void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept; - static int GetSkillProgress(unsigned short pid, unsigned short skill) noexcept; - static void SetSkillProgress(unsigned short pid, unsigned short skill, int value) noexcept; + static double GetSkillProgress(unsigned short pid, unsigned short skill) noexcept; + static void SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept; static int GetSkillIncrease(unsigned short pid, unsigned int pos) noexcept; static void SetSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept;