mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
Using less confusing names for server stat functions, part 2
This commit is contained in:
parent
69030579c1
commit
295f486a97
@ -298,7 +298,7 @@ const char *StatsFunctions::GetSkillName(unsigned short skill) noexcept
|
|||||||
return Skill::sSkillNames[skill].c_str();
|
return Skill::sSkillNames[skill].c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
int StatsFunctions::GetAttribute(unsigned short pid, unsigned short attribute) noexcept
|
int StatsFunctions::GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
@ -309,7 +309,7 @@ int StatsFunctions::GetAttribute(unsigned short pid, unsigned short attribute) n
|
|||||||
return player->CreatureStats()->mAttributes[attribute].mBase;
|
return player->CreatureStats()->mAttributes[attribute].mBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatsFunctions::SetAttribute(unsigned short pid, unsigned short attribute, int value) noexcept
|
void StatsFunctions::SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
@ -342,7 +342,7 @@ void StatsFunctions::SetAttributeCurrent(unsigned short pid, unsigned short attr
|
|||||||
player->CreatureStats()->mAttributes[attribute].mCurrent = value;
|
player->CreatureStats()->mAttributes[attribute].mCurrent = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int StatsFunctions::GetSkill(unsigned short pid, unsigned short skill) noexcept
|
int StatsFunctions::GetSkillBase(unsigned short pid, unsigned short skill) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
@ -353,7 +353,7 @@ int StatsFunctions::GetSkill(unsigned short pid, unsigned short skill) noexcept
|
|||||||
return player->NpcStats()->mSkills[skill].mBase;
|
return player->NpcStats()->mSkills[skill].mBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatsFunctions::SetSkill(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value
|
void StatsFunctions::SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
@ -34,12 +34,12 @@
|
|||||||
{"GetAttributeName", StatsFunctions::GetAttributeName},\
|
{"GetAttributeName", StatsFunctions::GetAttributeName},\
|
||||||
{"GetSkillName", StatsFunctions::GetSkillName},\
|
{"GetSkillName", StatsFunctions::GetSkillName},\
|
||||||
\
|
\
|
||||||
{"GetAttribute", StatsFunctions::GetAttribute},\
|
{"GetAttributeBase", StatsFunctions::GetAttributeBase},\
|
||||||
{"SetAttribute", StatsFunctions::SetAttribute},\
|
{"SetAttributeBase", StatsFunctions::SetAttributeBase},\
|
||||||
{"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\
|
{"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\
|
||||||
{"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\
|
{"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\
|
||||||
{"GetSkill", StatsFunctions::GetSkill},\
|
{"GetSkillBase", StatsFunctions::GetSkillBase},\
|
||||||
{"SetSkill", StatsFunctions::SetSkill},\
|
{"SetSkillBase", StatsFunctions::SetSkillBase},\
|
||||||
{"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\
|
{"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\
|
||||||
{"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\
|
{"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\
|
||||||
\
|
\
|
||||||
@ -81,9 +81,6 @@ public:
|
|||||||
static void SetRace(unsigned short pid, const char *race) noexcept;
|
static void SetRace(unsigned short pid, const char *race) noexcept;
|
||||||
static const char *GetRace(unsigned short pid) noexcept;
|
static const char *GetRace(unsigned short pid) noexcept;
|
||||||
|
|
||||||
static void SetClass(unsigned short pid, const char *name) noexcept;
|
|
||||||
static const char *GetClass(unsigned short pid) noexcept;
|
|
||||||
|
|
||||||
static void SetHead(unsigned short pid, const char *head) noexcept;
|
static void SetHead(unsigned short pid, const char *head) noexcept;
|
||||||
static const char *GetHead(unsigned short pid) noexcept;
|
static const char *GetHead(unsigned short pid) noexcept;
|
||||||
|
|
||||||
@ -118,13 +115,13 @@ public:
|
|||||||
static const char *GetAttributeName(unsigned short attribute) noexcept;
|
static const char *GetAttributeName(unsigned short attribute) noexcept;
|
||||||
static const char *GetSkillName(unsigned short skill) noexcept;
|
static const char *GetSkillName(unsigned short skill) noexcept;
|
||||||
|
|
||||||
static int GetAttribute(unsigned short pid, unsigned short attribute) noexcept;
|
static int GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept;
|
||||||
static void SetAttribute(unsigned short pid, unsigned short attribute, int value) noexcept;
|
static void SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept;
|
||||||
static int GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept;
|
static int GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept;
|
||||||
static void SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept;
|
static void SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept;
|
||||||
|
|
||||||
static int GetSkill(unsigned short pid, unsigned short skill) noexcept;
|
static int GetSkillBase(unsigned short pid, unsigned short skill) noexcept;
|
||||||
static void SetSkill(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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user