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

0.6.1
David Cernat 8 years ago
parent fafed96bf4
commit e5e888ac21

@ -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…
Cancel
Save