mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 11:09:41 +00:00
Use double instead of int for skill progress functions
This commit is contained in:
parent
ae4950ce49
commit
56a2c70911
2 changed files with 5 additions and 5 deletions
|
@ -386,10 +386,10 @@ void StatsFunctions::SetSkillCurrent(unsigned short pid, unsigned short skill, i
|
||||||
player->NpcStats()->mSkills[skill].mCurrent = value;
|
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;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0.0f);
|
||||||
|
|
||||||
if (skill >= Skill::Length)
|
if (skill >= Skill::Length)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -397,7 +397,7 @@ int StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) n
|
||||||
return player->NpcStats()->mSkills[skill].mProgress;
|
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;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, );
|
GET_PLAYER(pid, player, );
|
||||||
|
|
|
@ -128,8 +128,8 @@ public:
|
||||||
static void SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept;
|
static void SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept;
|
||||||
static int GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept;
|
static int GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept;
|
||||||
static void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept;
|
static void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept;
|
||||||
static int GetSkillProgress(unsigned short pid, unsigned short skill) noexcept;
|
static double GetSkillProgress(unsigned short pid, unsigned short skill) noexcept;
|
||||||
static void SetSkillProgress(unsigned short pid, unsigned short skill, int value) noexcept;
|
static void SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept;
|
||||||
|
|
||||||
static int GetSkillIncrease(unsigned short pid, unsigned int pos) noexcept;
|
static int GetSkillIncrease(unsigned short pid, unsigned int pos) noexcept;
|
||||||
static void SetSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept;
|
static void SetSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept;
|
||||||
|
|
Loading…
Reference in a new issue