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

pull/249/merge
Koncord 8 years ago
parent 9c7c0f9989
commit 6ddab0d323

@ -117,6 +117,22 @@ const char *StatsFunctions::GetBirthsign(unsigned short pid) noexcept
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
{
Player *player;
@ -321,6 +337,16 @@ void StatsFunctions::SetBirthsign(unsigned short pid, const char *sign) noexcept
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
{
Player *player;

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

Loading…
Cancel
Save