1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00

[Server] Add and implement "look like creature" functions

This commit is contained in:
Koncord 2017-05-01 21:15:12 +08:00
parent 9c7c0f9989
commit 6ddab0d323
2 changed files with 32 additions and 0 deletions

View file

@ -117,6 +117,22 @@ const char *StatsFunctions::GetBirthsign(unsigned short pid) noexcept
return player->birthsign.c_str(); return player->birthsign.c_str();
} }
const char *StatsFunctions::GetCreatureModel(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
return player->creatureModel.c_str();
}
bool StatsFunctions::IsCreatureName(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
return player->useCreatureName;
}
int StatsFunctions::GetLevel(unsigned short pid) noexcept int StatsFunctions::GetLevel(unsigned short pid) noexcept
{ {
Player *player; Player *player;
@ -321,6 +337,16 @@ void StatsFunctions::SetBirthsign(unsigned short pid, const char *sign) noexcept
player->birthsign = sign; player->birthsign = sign;
} }
void StatsFunctions::SetCreatureModel(unsigned short pid, const char *name, bool useCreatureName) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->creatureModel = name;
player->useCreatureName = useCreatureName;
}
void StatsFunctions::SetLevel(unsigned short pid, int value) noexcept void StatsFunctions::SetLevel(unsigned short pid, int value) noexcept
{ {
Player *player; Player *player;

View file

@ -19,6 +19,8 @@
{"GetHair", StatsFunctions::GetHairstyle},\ {"GetHair", StatsFunctions::GetHairstyle},\
{"GetIsMale", StatsFunctions::GetIsMale},\ {"GetIsMale", StatsFunctions::GetIsMale},\
{"GetBirthsign", StatsFunctions::GetBirthsign},\ {"GetBirthsign", StatsFunctions::GetBirthsign},\
{"GetCreatureModel", StatsFunctions::GetCreatureModel},\
{"IsCreatureName", StatsFunctions::IsCreatureName},\
\ \
{"GetLevel", StatsFunctions::GetLevel},\ {"GetLevel", StatsFunctions::GetLevel},\
{"GetLevelProgress", StatsFunctions::GetLevelProgress},\ {"GetLevelProgress", StatsFunctions::GetLevelProgress},\
@ -48,6 +50,7 @@
{"SetHair", StatsFunctions::SetHairstyle},\ {"SetHair", StatsFunctions::SetHairstyle},\
{"SetIsMale", StatsFunctions::SetIsMale},\ {"SetIsMale", StatsFunctions::SetIsMale},\
{"SetBirthsign", StatsFunctions::SetBirthsign},\ {"SetBirthsign", StatsFunctions::SetBirthsign},\
{"SetCreatureModel", StatsFunctions::SetCreatureModel},\
\ \
{"SetLevel", StatsFunctions::SetLevel},\ {"SetLevel", StatsFunctions::SetLevel},\
{"SetLevelProgress", StatsFunctions::SetLevelProgress},\ {"SetLevelProgress", StatsFunctions::SetLevelProgress},\
@ -95,6 +98,8 @@ public:
static const char *GetHairstyle(unsigned short pid) noexcept; static const char *GetHairstyle(unsigned short pid) noexcept;
static int GetIsMale(unsigned short pid) noexcept; static int GetIsMale(unsigned short pid) noexcept;
static const char *GetBirthsign(unsigned short pid) noexcept; static const char *GetBirthsign(unsigned short pid) noexcept;
static const char *GetCreatureModel(unsigned short pid) noexcept;
static bool IsCreatureName(unsigned short pid) noexcept;
static int GetLevel(unsigned short pid) noexcept; static int GetLevel(unsigned short pid) noexcept;
static int GetLevelProgress(unsigned short pid) noexcept; static int GetLevelProgress(unsigned short pid) noexcept;
@ -122,6 +127,7 @@ public:
static void SetHairstyle(unsigned short pid, const char *style) noexcept; static void SetHairstyle(unsigned short pid, const char *style) noexcept;
static void SetIsMale(unsigned short pid, int male) noexcept; static void SetIsMale(unsigned short pid, int male) noexcept;
static void SetBirthsign(unsigned short pid, const char *name) noexcept; static void SetBirthsign(unsigned short pid, const char *name) noexcept;
static void SetCreatureModel(unsigned short pid, const char *name, bool useCreatureName) noexcept;
static void SetLevel(unsigned short pid, int value) noexcept; static void SetLevel(unsigned short pid, int value) noexcept;
static void SetLevelProgress(unsigned short pid, int value) noexcept; static void SetLevelProgress(unsigned short pid, int value) noexcept;