Use double instead of int for skill progress functions

coverity_scan^2
David Cernat 8 years ago
parent ae4950ce49
commit 56a2c70911

@ -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, );

@ -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;

Loading…
Cancel
Save