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

[Server] Add script functions for checking what data an Actor has

This commit is contained in:
David Cernat 2017-05-01 20:55:36 +03:00
parent fafed96bf4
commit e5e888ac21
2 changed files with 16 additions and 0 deletions

View file

@ -133,6 +133,16 @@ double ActorFunctions::GetActorFatigueCurrent(unsigned int i) noexcept
return readActorList->baseActors.at(i).creatureStats.mDynamic[2].mCurrent; return readActorList->baseActors.at(i).creatureStats.mDynamic[2].mCurrent;
} }
bool ActorFunctions::DoesActorHavePosition(unsigned int i) noexcept
{
return readActorList->baseActors.at(i).hasPositionData;
}
bool ActorFunctions::DoesActorHaveStatsDynamic(unsigned int i) noexcept
{
return readActorList->baseActors.at(i).hasStatsDynamicData;
}
void ActorFunctions::SetActorListCell(const char* cellDescription) noexcept void ActorFunctions::SetActorListCell(const char* cellDescription) noexcept
{ {
writeActorList.cell = Utils::getCellFromDescription(cellDescription); writeActorList.cell = Utils::getCellFromDescription(cellDescription);

View file

@ -28,6 +28,9 @@
{"GetActorFatigueBase", ActorFunctions::GetActorFatigueBase},\ {"GetActorFatigueBase", ActorFunctions::GetActorFatigueBase},\
{"GetActorFatigueCurrent", ActorFunctions::GetActorFatigueCurrent},\ {"GetActorFatigueCurrent", ActorFunctions::GetActorFatigueCurrent},\
\ \
{"DoesActorHavePosition", ActorFunctions::DoesActorHavePosition},\
{"DoesActorHaveStatsDynamic", ActorFunctions::DoesActorHaveStatsDynamic},\
\
{"SetActorListCell", ActorFunctions::SetActorListCell},\ {"SetActorListCell", ActorFunctions::SetActorListCell},\
{"SetActorListAction", ActorFunctions::SetActorListAction},\ {"SetActorListAction", ActorFunctions::SetActorListAction},\
\ \
@ -83,6 +86,9 @@ public:
static double GetActorFatigueBase(unsigned int i) noexcept; static double GetActorFatigueBase(unsigned int i) noexcept;
static double GetActorFatigueCurrent(unsigned int i) noexcept; static double GetActorFatigueCurrent(unsigned int i) noexcept;
static bool DoesActorHavePosition(unsigned int i) noexcept;
static bool DoesActorHaveStatsDynamic(unsigned int i) noexcept;
static void SetActorListCell(const char* cellDescription) noexcept; static void SetActorListCell(const char* cellDescription) noexcept;
static void SetActorListAction(unsigned char action) noexcept; static void SetActorListAction(unsigned char action) noexcept;