openmw-tes3coop/apps/openmw-mp/Script/Functions/Stats.hpp

143 lines
6.7 KiB
C++
Raw Normal View History

2016-08-30 04:19:49 +00:00
//
// Created by koncord on 30.08.16.
//
#ifndef OPENMW_STATS_HPP
#define OPENMW_STATS_HPP
#define STATSFUNCTIONS \
{"GetName", StatsFunctions::GetName},\
{"SetName", StatsFunctions::SetName},\
2016-08-30 04:19:49 +00:00
\
{"GetRace", StatsFunctions::GetRace},\
{"SetRace", StatsFunctions::SetRace},\
2016-08-30 04:19:49 +00:00
\
{"GetHead", StatsFunctions::GetHead},\
{"SetHead", StatsFunctions::SetHead},\
2016-08-30 04:19:49 +00:00
\
{"GetHair", StatsFunctions::GetHairstyle},\
{"SetHair", StatsFunctions::SetHairstyle},\
2016-08-30 04:19:49 +00:00
\
{"GetIsMale", StatsFunctions::GetIsMale},\
{"SetIsMale", StatsFunctions::SetIsMale},\
2016-08-30 04:19:49 +00:00
\
{"GetLevel", StatsFunctions::GetLevel},\
{"SetLevel", StatsFunctions::SetLevel},\
2016-09-25 11:28:25 +00:00
\
{"GetBirthsign", StatsFunctions::GetBirthsign},\
{"SetBirthsign", StatsFunctions::SetBirthsign},\
2016-08-30 04:19:49 +00:00
\
{"GetAttributeCount", StatsFunctions::GetAttributeCount},\
{"GetSkillCount", StatsFunctions::GetSkillCount},\
{"GetAttributeId", StatsFunctions::GetAttributeId},\
{"GetSkillId", StatsFunctions::GetSkillId},\
{"GetAttributeName", StatsFunctions::GetAttributeName},\
{"GetSkillName", StatsFunctions::GetSkillName},\
2016-08-30 04:19:49 +00:00
\
{"GetAttributeBase", StatsFunctions::GetAttributeBase},\
{"SetAttributeBase", StatsFunctions::SetAttributeBase},\
{"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\
{"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\
{"GetSkillBase", StatsFunctions::GetSkillBase},\
{"SetSkillBase", StatsFunctions::SetSkillBase},\
{"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\
{"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\
2016-08-30 04:19:49 +00:00
\
{"GetHealthBase", StatsFunctions::GetHealthBase},\
{"SetHealthBase", StatsFunctions::SetHealthBase},\
{"GetHealthCurrent", StatsFunctions::GetHealthCurrent},\
{"SetHealthCurrent", StatsFunctions::SetHealthCurrent},\
2016-08-30 04:19:49 +00:00
\
{"GetMagickaBase", StatsFunctions::GetMagickaBase},\
{"SetMagickaBase", StatsFunctions::SetMagickaBase},\
{"GetMagickaCurrent", StatsFunctions::GetMagickaCurrent},\
{"SetMagickaCurrent", StatsFunctions::SetMagickaCurrent},\
2016-08-30 04:19:49 +00:00
\
{"SetFatigueBase", StatsFunctions::SetFatigueBase},\
{"GetFatigueBase", StatsFunctions::GetFatigueBase},\
{"SetFatigueCurrent", StatsFunctions::SetFatigueCurrent},\
{"GetFatigueCurrent", StatsFunctions::GetFatigueCurrent},\
\
{"GetSkillIncrease", StatsFunctions::GetSkillIncrease},\
{"SetSkillIncrease", StatsFunctions::SetSkillIncrease},\
2016-08-30 04:19:49 +00:00
\
{"SetCharGenStage", StatsFunctions::SetCharGenStage},\
{"Resurrect", StatsFunctions::Resurrect},\
{"SendBaseInfo", StatsFunctions::SendBaseInfo},\
2016-09-28 04:59:53 +00:00
\
{"SendDynamicStats", StatsFunctions::SendDynamicStats}, \
{"SendAttributes", StatsFunctions::SendAttributes},\
{"SendSkills", StatsFunctions::SendSkills},\
{"SendLevel", StatsFunctions::SendLevel}
2016-08-30 04:19:49 +00:00
class StatsFunctions
{
public:
static void SetName(unsigned short pid, const char *name) noexcept;
static const char *GetName(unsigned short pid) noexcept;
static void SetBirthsign(unsigned short pid, const char *name) noexcept;
static const char *GetBirthsign(unsigned short pid) noexcept;
static void SetRace(unsigned short pid, const char *race) 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 void SetHairstyle(unsigned short pid, const char *style) 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;
2016-09-25 11:28:25 +00:00
static int GetLevel(unsigned short pid) noexcept;
static void SetLevel(unsigned short pid, int value) 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 void SetHealthCurrent(unsigned short pid, double value) noexcept;
2016-08-30 04:19:49 +00:00
static double GetMagickaBase(unsigned short pid) noexcept;
static void SetMagickaBase(unsigned short pid, double value) noexcept;
static double GetMagickaCurrent(unsigned short pid) noexcept;
static void SetMagickaCurrent(unsigned short pid, double value) noexcept;
2016-08-30 04:19:49 +00:00
static double GetFatigueBase(unsigned short pid) noexcept;
static void SetFatigueBase(unsigned short pid, double value) noexcept;
static double GetFatigueCurrent(unsigned short pid) noexcept;
static void SetFatigueCurrent(unsigned short pid, double value) noexcept;
2016-08-30 04:19:49 +00:00
static int GetAttributeCount() noexcept;
static int GetSkillCount() noexcept;
2016-08-30 04:19:49 +00:00
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 void SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept;
static int GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept;
static void SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept;
2016-08-30 04:19:49 +00:00
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 void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept;
2016-08-30 04:19:49 +00:00
static int GetSkillIncrease(unsigned short pid, unsigned int pos) noexcept;
static void SetSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept;
2016-08-30 04:19:49 +00:00
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 SendDynamicStats(unsigned short pid) noexcept;
2016-08-30 04:19:49 +00:00
static void SendAttributes(unsigned short pid) noexcept;
static void SendSkills(unsigned short pid) noexcept;
2016-09-26 10:19:01 +00:00
static void SendLevel(unsigned short pid) noexcept;
2016-08-30 04:19:49 +00:00
};
#endif //OPENMW_STATS_HPP