[Server] Clean up order for StatsFunctions

pull/176/merge
David Cernat 8 years ago
parent 03c56e01f9
commit 9d7142f684

@ -15,77 +15,73 @@
using namespace std; using namespace std;
using namespace ESM; using namespace ESM;
void StatsFunctions::SetName(unsigned short pid, const char *name) noexcept int StatsFunctions::GetAttributeCount() noexcept
{ {
Player *player; return Attribute::Length;
GET_PLAYER(pid, player,);
if (player->npc.mName == name)
return;
player->npc.mName = name;
} }
const char *StatsFunctions::GetName(unsigned short pid) noexcept int StatsFunctions::GetSkillCount() noexcept
{ {
return Skill::Length;
Player *player;
GET_PLAYER(pid, player, 0);
return player->npc.mName.c_str();
} }
void StatsFunctions::SetBirthsign(unsigned short pid, const char *sign) noexcept int StatsFunctions::GetAttributeId(const char *name) noexcept
{ {
Player *player; for (int x = 0; x < Attribute::Length; x++)
GET_PLAYER(pid, player,); {
if (Misc::StringUtils::ciEqual(name, Attribute::sAttributeNames[x]))
if (player->birthsign == sign) {
return; return x;
}
}
player->birthsign = sign; return -1;
} }
const char *StatsFunctions::GetBirthsign(unsigned short pid) noexcept int StatsFunctions::GetSkillId(const char *name) noexcept
{ {
for (int x = 0; x < Skill::Length; x++)
{
if (Misc::StringUtils::ciEqual(name, Skill::sSkillNames[x]))
{
return x;
}
}
Player *player; return -1;
GET_PLAYER(pid, player, 0);
return player->birthsign.c_str();
} }
void StatsFunctions::SetRace(unsigned short pid, const char *race) noexcept const char *StatsFunctions::GetAttributeName(unsigned short attribute) noexcept
{ {
Player *player; if (attribute >= Attribute::Length)
GET_PLAYER(pid, player,); return "invalid";
if (player->npc.mRace == race) return Attribute::sAttributeNames[attribute].c_str();
return; }
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Setting race for %s: %s -> %s", player->npc.mName.c_str(), const char *StatsFunctions::GetSkillName(unsigned short skill) noexcept
player->npc.mRace.c_str(), race); {
if (skill >= Skill::Length)
return "invalid";
player->npc.mRace = race; return Skill::sSkillNames[skill].c_str();
} }
const char *StatsFunctions::GetRace(unsigned short pid) noexcept const char *StatsFunctions::GetName(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
return player->npc.mRace.c_str(); return player->npc.mName.c_str();
} }
void StatsFunctions::SetHead(unsigned short pid, const char *head) noexcept const char *StatsFunctions::GetRace(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0);
if (player->npc.mHead == head)
return;
player->npc.mHead = head; return player->npc.mRace.c_str();
} }
const char *StatsFunctions::GetHead(unsigned short pid) noexcept const char *StatsFunctions::GetHead(unsigned short pid) noexcept
@ -96,17 +92,6 @@ const char *StatsFunctions::GetHead(unsigned short pid) noexcept
return player->npc.mHead.c_str(); return player->npc.mHead.c_str();
} }
void StatsFunctions::SetHairstyle(unsigned short pid, const char *style) noexcept
{
Player *player;
GET_PLAYER(pid, player,);
if (player->npc.mHair == style)
return;
player->npc.mHair = style;
}
const char *StatsFunctions::GetHairstyle(unsigned short pid) noexcept const char *StatsFunctions::GetHairstyle(unsigned short pid) noexcept
{ {
Player *player; Player *player;
@ -118,17 +103,18 @@ const char *StatsFunctions::GetHairstyle(unsigned short pid) noexcept
int StatsFunctions::GetIsMale(unsigned short pid) noexcept int StatsFunctions::GetIsMale(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,false); GET_PLAYER(pid, player, false);
return player->npc.isMale(); return player->npc.isMale();
} }
void StatsFunctions::SetIsMale(unsigned short pid, int value) noexcept const char *StatsFunctions::GetBirthsign(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0);
player->npc.setIsMale(value == true); return player->birthsign.c_str();
} }
int StatsFunctions::GetLevel(unsigned short pid) noexcept int StatsFunctions::GetLevel(unsigned short pid) noexcept
@ -139,256 +125,289 @@ int StatsFunctions::GetLevel(unsigned short pid) noexcept
return player->creatureStats.mLevel; return player->creatureStats.mLevel;
} }
void StatsFunctions::SetLevel(unsigned short pid, int value) noexcept int StatsFunctions::GetLevelProgress(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, 0);
player->creatureStats.mLevel = value; return player->npcStats.mLevelProgress;
} }
int StatsFunctions::GetLevelProgress(unsigned short pid) noexcept double StatsFunctions::GetHealthBase(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0.0f);
return player->npcStats.mLevelProgress; return player->creatureStats.mDynamic[0].mBase;
} }
void StatsFunctions::SetLevelProgress(unsigned short pid, int value) noexcept double StatsFunctions::GetHealthCurrent(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, 0.0f);
player->npcStats.mLevelProgress = value; return player->creatureStats.mDynamic[0].mCurrent;
} }
double StatsFunctions::GetHealthBase(unsigned short pid) noexcept double StatsFunctions::GetMagickaBase(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
return player->creatureStats.mDynamic[0].mBase; return player->creatureStats.mDynamic[1].mBase;
} }
void StatsFunctions::SetHealthBase(unsigned short pid, double value) noexcept double StatsFunctions::GetMagickaCurrent(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0.0f);
player->creatureStats.mDynamic[0].mBase = value; return player->creatureStats.mDynamic[1].mCurrent;
} }
double StatsFunctions::GetHealthCurrent(unsigned short pid) noexcept double StatsFunctions::GetFatigueBase(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
return player->creatureStats.mDynamic[0].mCurrent; return player->creatureStats.mDynamic[2].mBase;
} }
void StatsFunctions::SetHealthCurrent(unsigned short pid, double value) noexcept double StatsFunctions::GetFatigueCurrent(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0.0f);
player->creatureStats.mDynamic[0].mCurrent = value; return player->creatureStats.mDynamic[2].mCurrent;
} }
double StatsFunctions::GetMagickaBase(unsigned short pid) noexcept int StatsFunctions::GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0);
return player->creatureStats.mDynamic[1].mBase; if (attribute >= Attribute::Length)
return 0;
return player->creatureStats.mAttributes[attribute].mBase;
} }
void StatsFunctions::SetMagickaBase(unsigned short pid, double value) noexcept int StatsFunctions::GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0);
player->creatureStats.mDynamic[1].mBase = value; if (attribute >= Attribute::Length)
return 0;
return player->creatureStats.mAttributes[attribute].mCurrent;
} }
double StatsFunctions::GetMagickaCurrent(unsigned short pid) noexcept int StatsFunctions::GetSkillBase(unsigned short pid, unsigned short skill) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0);
return player->creatureStats.mDynamic[1].mCurrent; if (skill >= Skill::Length)
return 0;
return player->npcStats.mSkills[skill].mBase;
} }
void StatsFunctions::SetMagickaCurrent(unsigned short pid, double value) noexcept int StatsFunctions::GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0);
player->creatureStats.mDynamic[1].mCurrent = value; if (skill >= Skill::Length)
return 0;
return player->npcStats.mSkills[skill].mCurrent;
} }
double StatsFunctions::GetFatigueBase(unsigned short pid) noexcept double StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
return player->creatureStats.mDynamic[2].mBase; if (skill >= Skill::Length)
return 0;
return player->npcStats.mSkills[skill].mProgress;
} }
void StatsFunctions::SetFatigueBase(unsigned short pid, double value) noexcept int StatsFunctions::GetSkillIncrease(unsigned short pid, unsigned int attribute) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player, 0);
player->creatureStats.mDynamic[2].mBase = value; if (attribute > Attribute::Length)
return 0;
return player->npcStats.mSkillIncrease[attribute];
} }
double StatsFunctions::GetFatigueCurrent(unsigned short pid) noexcept int StatsFunctions::GetBounty(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0);
return player->creatureStats.mDynamic[2].mCurrent; return player->npcStats.mBounty;
} }
void StatsFunctions::SetFatigueCurrent(unsigned short pid, double value) noexcept void StatsFunctions::SetName(unsigned short pid, const char *name) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
player->creatureStats.mDynamic[2].mCurrent = value; if (player->npc.mName == name)
return;
player->npc.mName = name;
} }
int StatsFunctions::GetAttributeCount() noexcept void StatsFunctions::SetRace(unsigned short pid, const char *race) noexcept
{ {
return Attribute::Length; Player *player;
GET_PLAYER(pid, player,);
if (player->npc.mRace == race)
return;
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Setting race for %s: %s -> %s", player->npc.mName.c_str(),
player->npc.mRace.c_str(), race);
player->npc.mRace = race;
} }
int StatsFunctions::GetSkillCount() noexcept void StatsFunctions::SetHead(unsigned short pid, const char *head) noexcept
{ {
return Skill::Length; Player *player;
GET_PLAYER(pid, player,);
if (player->npc.mHead == head)
return;
player->npc.mHead = head;
} }
int StatsFunctions::GetAttributeId(const char *name) noexcept void StatsFunctions::SetHairstyle(unsigned short pid, const char *style) noexcept
{ {
for (int x = 0; x < Attribute::Length; x++) Player *player;
{ GET_PLAYER(pid, player,);
if (Misc::StringUtils::ciEqual(name, Attribute::sAttributeNames[x]))
{
return x;
}
}
return -1; if (player->npc.mHair == style)
return;
player->npc.mHair = style;
} }
int StatsFunctions::GetSkillId(const char *name) noexcept void StatsFunctions::SetIsMale(unsigned short pid, int value) noexcept
{ {
for (int x = 0; x < Skill::Length; x++) Player *player;
{ GET_PLAYER(pid, player,);
if (Misc::StringUtils::ciEqual(name, Skill::sSkillNames[x]))
{
return x;
}
}
return -1; player->npc.setIsMale(value == true);
} }
const char *StatsFunctions::GetAttributeName(unsigned short attribute) noexcept void StatsFunctions::SetBirthsign(unsigned short pid, const char *sign) noexcept
{ {
if (attribute >= Attribute::Length) Player *player;
return "invalid"; GET_PLAYER(pid, player, );
return Attribute::sAttributeNames[attribute].c_str(); if (player->birthsign == sign)
return;
player->birthsign = sign;
} }
const char *StatsFunctions::GetSkillName(unsigned short skill) noexcept void StatsFunctions::SetLevel(unsigned short pid, int value) noexcept
{ {
if (skill >= Skill::Length) Player *player;
return "invalid"; GET_PLAYER(pid, player, );
return Skill::sSkillNames[skill].c_str(); player->creatureStats.mLevel = value;
} }
int StatsFunctions::GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept void StatsFunctions::SetLevelProgress(unsigned short pid, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, );
if (attribute >= Attribute::Length)
return 0;
return player->creatureStats.mAttributes[attribute].mBase; player->npcStats.mLevelProgress = value;
} }
void StatsFunctions::SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept void StatsFunctions::SetHealthBase(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
if (attribute >= Attribute::Length) player->creatureStats.mDynamic[0].mBase = value;
return;
player->creatureStats.mAttributes[attribute].mBase = value;
} }
int StatsFunctions::GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept void StatsFunctions::SetHealthCurrent(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player,);
if (attribute >= Attribute::Length)
return 0;
return player->creatureStats.mAttributes[attribute].mCurrent; player->creatureStats.mDynamic[0].mCurrent = value;
} }
void StatsFunctions::SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept void StatsFunctions::SetMagickaBase(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
if (attribute >= Attribute::Length) player->creatureStats.mDynamic[1].mBase = value;
return; }
player->creatureStats.mAttributes[attribute].mCurrent = value; void StatsFunctions::SetMagickaCurrent(unsigned short pid, double value) noexcept
{
Player *player;
GET_PLAYER(pid, player,);
player->creatureStats.mDynamic[1].mCurrent = value;
} }
int StatsFunctions::GetSkillBase(unsigned short pid, unsigned short skill) noexcept void StatsFunctions::SetFatigueBase(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player,);
if (skill >= Skill::Length) player->creatureStats.mDynamic[2].mBase = value;
return 0; }
return player->npcStats.mSkills[skill].mBase; void StatsFunctions::SetFatigueCurrent(unsigned short pid, double value) noexcept
{
Player *player;
GET_PLAYER(pid, player,);
player->creatureStats.mDynamic[2].mCurrent = value;
} }
void StatsFunctions::SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value void StatsFunctions::SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
if (skill >= Skill::Length) if (attribute >= Attribute::Length)
return; return;
player->npcStats.mSkills[skill].mBase = value; player->creatureStats.mAttributes[attribute].mBase = value;
} }
int StatsFunctions::GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept void StatsFunctions::SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player,);
if (skill >= Skill::Length) if (attribute >= Attribute::Length)
return 0; return;
return player->npcStats.mSkills[skill].mCurrent; player->creatureStats.mAttributes[attribute].mCurrent = value;
} }
void StatsFunctions::SetSkillCurrent(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,);
@ -396,18 +415,18 @@ void StatsFunctions::SetSkillCurrent(unsigned short pid, unsigned short skill, i
if (skill >= Skill::Length) if (skill >= Skill::Length)
return; return;
player->npcStats.mSkills[skill].mCurrent = value; player->npcStats.mSkills[skill].mBase = value;
} }
double StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) noexcept void StatsFunctions::SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player,);
if (skill >= Skill::Length) if (skill >= Skill::Length)
return 0; return;
return player->npcStats.mSkills[skill].mProgress; player->npcStats.mSkills[skill].mCurrent = value;
} }
void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept
@ -421,17 +440,6 @@ void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skill,
player->npcStats.mSkills[skill].mProgress = value; player->npcStats.mSkills[skill].mProgress = value;
} }
int StatsFunctions::GetSkillIncrease(unsigned short pid, unsigned int attribute) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
if (attribute > Attribute::Length)
return 0;
return player->npcStats.mSkillIncrease[attribute];
}
void StatsFunctions::SetSkillIncrease(unsigned short pid, unsigned int attribute, int value) noexcept void StatsFunctions::SetSkillIncrease(unsigned short pid, unsigned int attribute, int value) noexcept
{ {
Player *player; Player *player;
@ -443,14 +451,6 @@ void StatsFunctions::SetSkillIncrease(unsigned short pid, unsigned int attribute
player->npcStats.mSkillIncrease[attribute] = value; player->npcStats.mSkillIncrease[attribute] = value;
} }
int StatsFunctions::GetBounty(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
return player->npcStats.mBounty;
}
void StatsFunctions::SetBounty(unsigned short pid, int value) noexcept void StatsFunctions::SetBounty(unsigned short pid, int value) noexcept
{ {
Player *player; Player *player;

@ -6,70 +6,70 @@
#define OPENMW_STATAPI_HPP #define OPENMW_STATAPI_HPP
#define STATAPI \ #define STATAPI \
{"GetName", StatsFunctions::GetName},\ {"GetAttributeCount", StatsFunctions::GetAttributeCount},\
{"SetName", StatsFunctions::SetName},\ {"GetSkillCount", StatsFunctions::GetSkillCount},\
{"GetAttributeId", StatsFunctions::GetAttributeId},\
{"GetSkillId", StatsFunctions::GetSkillId},\
{"GetAttributeName", StatsFunctions::GetAttributeName},\
{"GetSkillName", StatsFunctions::GetSkillName},\
\ \
{"GetName", StatsFunctions::GetName},\
{"GetRace", StatsFunctions::GetRace},\ {"GetRace", StatsFunctions::GetRace},\
{"SetRace", StatsFunctions::SetRace},\
\
{"GetHead", StatsFunctions::GetHead},\ {"GetHead", StatsFunctions::GetHead},\
{"SetHead", StatsFunctions::SetHead},\
\
{"GetHair", StatsFunctions::GetHairstyle},\ {"GetHair", StatsFunctions::GetHairstyle},\
{"SetHair", StatsFunctions::SetHairstyle},\
\
{"GetIsMale", StatsFunctions::GetIsMale},\ {"GetIsMale", StatsFunctions::GetIsMale},\
{"SetIsMale", StatsFunctions::SetIsMale},\ {"GetBirthsign", StatsFunctions::GetBirthsign},\
\ \
{"GetLevel", StatsFunctions::GetLevel},\ {"GetLevel", StatsFunctions::GetLevel},\
{"SetLevel", StatsFunctions::SetLevel},\
{"GetLevelProgress", StatsFunctions::GetLevelProgress},\ {"GetLevelProgress", StatsFunctions::GetLevelProgress},\
{"SetLevelProgress", StatsFunctions::SetLevelProgress},\
\ \
{"GetBirthsign", StatsFunctions::GetBirthsign},\ {"GetHealthBase", StatsFunctions::GetHealthBase},\
{"SetBirthsign", StatsFunctions::SetBirthsign},\ {"GetHealthCurrent", StatsFunctions::GetHealthCurrent},\
\ \
{"GetAttributeCount", StatsFunctions::GetAttributeCount},\ {"GetMagickaBase", StatsFunctions::GetMagickaBase},\
{"GetSkillCount", StatsFunctions::GetSkillCount},\ {"GetMagickaCurrent", StatsFunctions::GetMagickaCurrent},\
{"GetAttributeId", StatsFunctions::GetAttributeId},\ \
{"GetSkillId", StatsFunctions::GetSkillId},\ {"GetFatigueBase", StatsFunctions::GetFatigueBase},\
{"GetAttributeName", StatsFunctions::GetAttributeName},\ {"GetFatigueCurrent", StatsFunctions::GetFatigueCurrent},\
{"GetSkillName", StatsFunctions::GetSkillName},\
\ \
{"GetAttributeBase", StatsFunctions::GetAttributeBase},\ {"GetAttributeBase", StatsFunctions::GetAttributeBase},\
{"SetAttributeBase", StatsFunctions::SetAttributeBase},\
{"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\ {"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\
{"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\
\ \
{"GetSkillBase", StatsFunctions::GetSkillBase},\ {"GetSkillBase", StatsFunctions::GetSkillBase},\
{"SetSkillBase", StatsFunctions::SetSkillBase},\
{"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\ {"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\
{"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\
{"GetSkillProgress", StatsFunctions::GetSkillProgress},\ {"GetSkillProgress", StatsFunctions::GetSkillProgress},\
{"SetSkillProgress", StatsFunctions::SetSkillProgress},\ {"GetSkillIncrease", StatsFunctions::GetSkillIncrease},\
\
{"GetBounty", StatsFunctions::GetBounty},\
\
{"SetName", StatsFunctions::SetName},\
{"SetRace", StatsFunctions::SetRace},\
{"SetHead", StatsFunctions::SetHead},\
{"SetHair", StatsFunctions::SetHairstyle},\
{"SetIsMale", StatsFunctions::SetIsMale},\
{"SetBirthsign", StatsFunctions::SetBirthsign},\
\
{"SetLevel", StatsFunctions::SetLevel},\
{"SetLevelProgress", StatsFunctions::SetLevelProgress},\
\ \
{"GetHealthBase", StatsFunctions::GetHealthBase},\
{"SetHealthBase", StatsFunctions::SetHealthBase},\ {"SetHealthBase", StatsFunctions::SetHealthBase},\
{"GetHealthCurrent", StatsFunctions::GetHealthCurrent},\
{"SetHealthCurrent", StatsFunctions::SetHealthCurrent},\ {"SetHealthCurrent", StatsFunctions::SetHealthCurrent},\
\
{"GetMagickaBase", StatsFunctions::GetMagickaBase},\
{"SetMagickaBase", StatsFunctions::SetMagickaBase},\ {"SetMagickaBase", StatsFunctions::SetMagickaBase},\
{"GetMagickaCurrent", StatsFunctions::GetMagickaCurrent},\
{"SetMagickaCurrent", StatsFunctions::SetMagickaCurrent},\ {"SetMagickaCurrent", StatsFunctions::SetMagickaCurrent},\
\
{"GetFatigueBase", StatsFunctions::GetFatigueBase},\
{"SetFatigueBase", StatsFunctions::SetFatigueBase},\ {"SetFatigueBase", StatsFunctions::SetFatigueBase},\
{"GetFatigueCurrent", StatsFunctions::GetFatigueCurrent},\
{"SetFatigueCurrent", StatsFunctions::SetFatigueCurrent},\ {"SetFatigueCurrent", StatsFunctions::SetFatigueCurrent},\
\ \
{"GetSkillIncrease", StatsFunctions::GetSkillIncrease},\ {"SetAttributeBase", StatsFunctions::SetAttributeBase},\
{"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\
\
{"SetSkillBase", StatsFunctions::SetSkillBase},\
{"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\
{"SetSkillProgress", StatsFunctions::SetSkillProgress},\
{"SetSkillIncrease", StatsFunctions::SetSkillIncrease},\ {"SetSkillIncrease", StatsFunctions::SetSkillIncrease},\
\ \
{"GetBounty", StatsFunctions::GetBounty},\
{"SetBounty", StatsFunctions::SetBounty},\ {"SetBounty", StatsFunctions::SetBounty},\
\
{"SetCharGenStage", StatsFunctions::SetCharGenStage},\ {"SetCharGenStage", StatsFunctions::SetCharGenStage},\
\
{"Resurrect", StatsFunctions::Resurrect},\ {"Resurrect", StatsFunctions::Resurrect},\
{"SendBaseInfo", StatsFunctions::SendBaseInfo},\ {"SendBaseInfo", StatsFunctions::SendBaseInfo},\
\ \
@ -82,71 +82,69 @@
class StatsFunctions class StatsFunctions
{ {
public: public:
static void SetName(unsigned short pid, const char *name) noexcept; static int GetAttributeCount() noexcept;
static const char *GetName(unsigned short pid) noexcept; static int GetSkillCount() noexcept;
static int GetAttributeId(const char *name) noexcept;
static void SetBirthsign(unsigned short pid, const char *name) noexcept; static int GetSkillId(const char *name) noexcept;
static const char *GetBirthsign(unsigned short pid) noexcept; static const char *GetAttributeName(unsigned short attribute) noexcept;
static const char *GetSkillName(unsigned short skill) noexcept;
static void SetRace(unsigned short pid, const char *race) noexcept; static const char *GetName(unsigned short pid) noexcept;
static const char *GetRace(unsigned short pid) noexcept; static const char *GetRace(unsigned short pid) 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;
static void SetHairstyle(unsigned short pid, const char *style) noexcept;
static const char *GetHairstyle(unsigned short pid) noexcept; static const char *GetHairstyle(unsigned short pid) noexcept;
static void SetIsMale(unsigned short pid, int male) noexcept;
static int GetIsMale(unsigned short pid) noexcept; static int GetIsMale(unsigned short pid) noexcept;
static const char *GetBirthsign(unsigned short pid) noexcept;
static int GetLevel(unsigned short pid) noexcept; static int GetLevel(unsigned short pid) noexcept;
static void SetLevel(unsigned short pid, int value) noexcept;
static int GetLevelProgress(unsigned short pid) noexcept; static int GetLevelProgress(unsigned short pid) noexcept;
static void SetLevelProgress(unsigned short pid, int value) noexcept;
static double GetHealthBase(unsigned short pid) noexcept; static double GetHealthBase(unsigned short pid) noexcept;
static void SetHealthBase(unsigned short pid, double value) noexcept;
static double GetHealthCurrent(unsigned short pid) noexcept; static double GetHealthCurrent(unsigned short pid) noexcept;
static void SetHealthCurrent(unsigned short pid, double value) noexcept;
static double GetMagickaBase(unsigned short pid) noexcept; static double GetMagickaBase(unsigned short pid) noexcept;
static void SetMagickaBase(unsigned short pid, double value) noexcept;
static double GetMagickaCurrent(unsigned short pid) noexcept; static double GetMagickaCurrent(unsigned short pid) noexcept;
static void SetMagickaCurrent(unsigned short pid, double value) noexcept;
static double GetFatigueBase(unsigned short pid) noexcept; static double GetFatigueBase(unsigned short pid) noexcept;
static void SetFatigueBase(unsigned short pid, double value) noexcept;
static double GetFatigueCurrent(unsigned short pid) noexcept; static double GetFatigueCurrent(unsigned short pid) noexcept;
static void SetFatigueCurrent(unsigned short pid, double value) noexcept;
static int GetAttributeCount() noexcept;
static int GetSkillCount() noexcept;
static int GetAttributeId(const char *name) noexcept;
static int GetSkillId(const char *name) noexcept;
static const char *GetAttributeName(unsigned short attribute) noexcept;
static const char *GetSkillName(unsigned short skill) noexcept;
static int GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept; static int GetAttributeBase(unsigned short pid, unsigned short attribute) 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 int GetSkillBase(unsigned short pid, unsigned short skill) noexcept; static int GetSkillBase(unsigned short pid, unsigned short skill) 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 double 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, 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 int GetBounty(unsigned short pid) noexcept; static int GetBounty(unsigned short pid) noexcept;
static void SetName(unsigned short pid, const char *name) noexcept;
static void SetRace(unsigned short pid, const char *race) noexcept;
static void SetHead(unsigned short pid, const char *head) noexcept;
static void SetHairstyle(unsigned short pid, const char *style) noexcept;
static void SetIsMale(unsigned short pid, int male) noexcept;
static void SetBirthsign(unsigned short pid, const char *name) noexcept;
static void SetLevel(unsigned short pid, int value) noexcept;
static void SetLevelProgress(unsigned short pid, int value) noexcept;
static void SetHealthBase(unsigned short pid, double value) noexcept;
static void SetHealthCurrent(unsigned short pid, double value) noexcept;
static void SetMagickaBase(unsigned short pid, double value) noexcept;
static void SetMagickaCurrent(unsigned short pid, double value) noexcept;
static void SetFatigueBase(unsigned short pid, double value) noexcept;
static void SetFatigueCurrent(unsigned short pid, double value) noexcept;
static void SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept;
static void SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) 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;
static void SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept;
static void SetSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept;
static void SetBounty(unsigned short pid, int value) noexcept; static void SetBounty(unsigned short pid, int value) noexcept;
static void SetCharGenStage(unsigned short pid, int start, int end) noexcept;
static void Resurrect(unsigned short pid); static void Resurrect(unsigned short pid);
static void SetCharGenStage(unsigned short pid, int start, int end) noexcept;
static void SendBaseInfo(unsigned short pid) noexcept; static void SendBaseInfo(unsigned short pid) noexcept;
static void SendStatsDynamic(unsigned short pid) noexcept; static void SendStatsDynamic(unsigned short pid) noexcept;

Loading…
Cancel
Save