mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:23:52 +00:00
[Server] Add script functions for checking what data an Actor has
This commit is contained in:
parent
fafed96bf4
commit
e5e888ac21
2 changed files with 16 additions and 0 deletions
|
@ -133,6 +133,16 @@ double ActorFunctions::GetActorFatigueCurrent(unsigned int i) noexcept
|
|||
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
|
||||
{
|
||||
writeActorList.cell = Utils::getCellFromDescription(cellDescription);
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
{"GetActorFatigueBase", ActorFunctions::GetActorFatigueBase},\
|
||||
{"GetActorFatigueCurrent", ActorFunctions::GetActorFatigueCurrent},\
|
||||
\
|
||||
{"DoesActorHavePosition", ActorFunctions::DoesActorHavePosition},\
|
||||
{"DoesActorHaveStatsDynamic", ActorFunctions::DoesActorHaveStatsDynamic},\
|
||||
\
|
||||
{"SetActorListCell", ActorFunctions::SetActorListCell},\
|
||||
{"SetActorListAction", ActorFunctions::SetActorListAction},\
|
||||
\
|
||||
|
@ -83,6 +86,9 @@ public:
|
|||
static double GetActorFatigueBase(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 SetActorListAction(unsigned char action) noexcept;
|
||||
|
||||
|
|
Loading…
Reference in a new issue