mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
[Server] Add script functions for getting and setting actor dynamic stat modifiers
This commit is contained in:
parent
79351c737e
commit
f02ed0d621
2 changed files with 42 additions and 0 deletions
|
@ -113,6 +113,11 @@ double ActorFunctions::GetActorHealthCurrent(unsigned int i) noexcept
|
||||||
return readActorList->baseActors.at(i).creatureStats.mDynamic[0].mCurrent;
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[0].mCurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double ActorFunctions::GetActorHealthModified(unsigned int i) noexcept
|
||||||
|
{
|
||||||
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[0].mMod;
|
||||||
|
}
|
||||||
|
|
||||||
double ActorFunctions::GetActorMagickaBase(unsigned int i) noexcept
|
double ActorFunctions::GetActorMagickaBase(unsigned int i) noexcept
|
||||||
{
|
{
|
||||||
return readActorList->baseActors.at(i).creatureStats.mDynamic[1].mBase;
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[1].mBase;
|
||||||
|
@ -123,6 +128,11 @@ double ActorFunctions::GetActorMagickaCurrent(unsigned int i) noexcept
|
||||||
return readActorList->baseActors.at(i).creatureStats.mDynamic[1].mCurrent;
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[1].mCurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double ActorFunctions::GetActorMagickaModified(unsigned int i) noexcept
|
||||||
|
{
|
||||||
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[1].mMod;
|
||||||
|
}
|
||||||
|
|
||||||
double ActorFunctions::GetActorFatigueBase(unsigned int i) noexcept
|
double ActorFunctions::GetActorFatigueBase(unsigned int i) noexcept
|
||||||
{
|
{
|
||||||
return readActorList->baseActors.at(i).creatureStats.mDynamic[2].mBase;
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[2].mBase;
|
||||||
|
@ -133,6 +143,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double ActorFunctions::GetActorFatigueModified(unsigned int i) noexcept
|
||||||
|
{
|
||||||
|
return readActorList->baseActors.at(i).creatureStats.mDynamic[2].mMod;
|
||||||
|
}
|
||||||
|
|
||||||
const char *ActorFunctions::GetActorEquipmentItemRefId(unsigned int i, unsigned short slot) noexcept
|
const char *ActorFunctions::GetActorEquipmentItemRefId(unsigned int i, unsigned short slot) noexcept
|
||||||
{
|
{
|
||||||
return readActorList->baseActors.at(i).equipedItems[slot].refId.c_str();
|
return readActorList->baseActors.at(i).equipedItems[slot].refId.c_str();
|
||||||
|
@ -212,6 +227,11 @@ void ActorFunctions::SetActorHealthCurrent(double value) noexcept
|
||||||
tempActor.creatureStats.mDynamic[0].mCurrent = value;
|
tempActor.creatureStats.mDynamic[0].mCurrent = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActorFunctions::SetActorHealthModified(double value) noexcept
|
||||||
|
{
|
||||||
|
tempActor.creatureStats.mDynamic[0].mMod = value;
|
||||||
|
}
|
||||||
|
|
||||||
void ActorFunctions::SetActorMagickaBase(double value) noexcept
|
void ActorFunctions::SetActorMagickaBase(double value) noexcept
|
||||||
{
|
{
|
||||||
tempActor.creatureStats.mDynamic[1].mBase = value;
|
tempActor.creatureStats.mDynamic[1].mBase = value;
|
||||||
|
@ -222,6 +242,11 @@ void ActorFunctions::SetActorMagickaCurrent(double value) noexcept
|
||||||
tempActor.creatureStats.mDynamic[1].mCurrent = value;
|
tempActor.creatureStats.mDynamic[1].mCurrent = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActorFunctions::SetActorMagickaModified(double value) noexcept
|
||||||
|
{
|
||||||
|
tempActor.creatureStats.mDynamic[1].mMod = value;
|
||||||
|
}
|
||||||
|
|
||||||
void ActorFunctions::SetActorFatigueBase(double value) noexcept
|
void ActorFunctions::SetActorFatigueBase(double value) noexcept
|
||||||
{
|
{
|
||||||
tempActor.creatureStats.mDynamic[2].mBase = value;
|
tempActor.creatureStats.mDynamic[2].mBase = value;
|
||||||
|
@ -232,6 +257,11 @@ void ActorFunctions::SetActorFatigueCurrent(double value) noexcept
|
||||||
tempActor.creatureStats.mDynamic[2].mCurrent = value;
|
tempActor.creatureStats.mDynamic[2].mCurrent = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActorFunctions::SetActorFatigueModified(double value) noexcept
|
||||||
|
{
|
||||||
|
tempActor.creatureStats.mDynamic[2].mMod = value;
|
||||||
|
}
|
||||||
|
|
||||||
void ActorFunctions::EquipActorItem(unsigned short slot, const char *refId, unsigned int count, int charge) noexcept
|
void ActorFunctions::EquipActorItem(unsigned short slot, const char *refId, unsigned int count, int charge) noexcept
|
||||||
{
|
{
|
||||||
tempActor.equipedItems[slot].refId = refId;
|
tempActor.equipedItems[slot].refId = refId;
|
||||||
|
|
|
@ -23,10 +23,13 @@
|
||||||
\
|
\
|
||||||
{"GetActorHealthBase", ActorFunctions::GetActorHealthBase},\
|
{"GetActorHealthBase", ActorFunctions::GetActorHealthBase},\
|
||||||
{"GetActorHealthCurrent", ActorFunctions::GetActorHealthCurrent},\
|
{"GetActorHealthCurrent", ActorFunctions::GetActorHealthCurrent},\
|
||||||
|
{"GetActorHealthModified", ActorFunctions::GetActorHealthModified},\
|
||||||
{"GetActorMagickaBase", ActorFunctions::GetActorMagickaBase},\
|
{"GetActorMagickaBase", ActorFunctions::GetActorMagickaBase},\
|
||||||
{"GetActorMagickaCurrent", ActorFunctions::GetActorMagickaCurrent},\
|
{"GetActorMagickaCurrent", ActorFunctions::GetActorMagickaCurrent},\
|
||||||
|
{"GetActorMagickaModified", ActorFunctions::GetActorMagickaModified},\
|
||||||
{"GetActorFatigueBase", ActorFunctions::GetActorFatigueBase},\
|
{"GetActorFatigueBase", ActorFunctions::GetActorFatigueBase},\
|
||||||
{"GetActorFatigueCurrent", ActorFunctions::GetActorFatigueCurrent},\
|
{"GetActorFatigueCurrent", ActorFunctions::GetActorFatigueCurrent},\
|
||||||
|
{"GetActorFatigueModified", ActorFunctions::GetActorFatigueModified},\
|
||||||
\
|
\
|
||||||
{"GetActorEquipmentItemRefId", ActorFunctions::GetActorEquipmentItemRefId},\
|
{"GetActorEquipmentItemRefId", ActorFunctions::GetActorEquipmentItemRefId},\
|
||||||
{"GetActorEquipmentItemCount", ActorFunctions::GetActorEquipmentItemCount},\
|
{"GetActorEquipmentItemCount", ActorFunctions::GetActorEquipmentItemCount},\
|
||||||
|
@ -48,10 +51,13 @@
|
||||||
\
|
\
|
||||||
{"SetActorHealthBase", ActorFunctions::SetActorHealthBase},\
|
{"SetActorHealthBase", ActorFunctions::SetActorHealthBase},\
|
||||||
{"SetActorHealthCurrent", ActorFunctions::SetActorHealthCurrent},\
|
{"SetActorHealthCurrent", ActorFunctions::SetActorHealthCurrent},\
|
||||||
|
{"SetActorHealthModified", ActorFunctions::SetActorHealthModified},\
|
||||||
{"SetActorMagickaBase", ActorFunctions::SetActorMagickaBase},\
|
{"SetActorMagickaBase", ActorFunctions::SetActorMagickaBase},\
|
||||||
{"SetActorMagickaCurrent", ActorFunctions::SetActorMagickaCurrent},\
|
{"SetActorMagickaCurrent", ActorFunctions::SetActorMagickaCurrent},\
|
||||||
|
{"SetActorMagickaModified", ActorFunctions::SetActorMagickaModified},\
|
||||||
{"SetActorFatigueBase", ActorFunctions::SetActorFatigueBase},\
|
{"SetActorFatigueBase", ActorFunctions::SetActorFatigueBase},\
|
||||||
{"SetActorFatigueCurrent", ActorFunctions::SetActorFatigueCurrent},\
|
{"SetActorFatigueCurrent", ActorFunctions::SetActorFatigueCurrent},\
|
||||||
|
{"SetActorFatigueModified", ActorFunctions::SetActorFatigueModified},\
|
||||||
\
|
\
|
||||||
{"EquipActorItem", ActorFunctions::EquipActorItem},\
|
{"EquipActorItem", ActorFunctions::EquipActorItem},\
|
||||||
{"UnequipActorItem", ActorFunctions::UnequipActorItem},\
|
{"UnequipActorItem", ActorFunctions::UnequipActorItem},\
|
||||||
|
@ -90,10 +96,13 @@ public:
|
||||||
|
|
||||||
static double GetActorHealthBase(unsigned int i) noexcept;
|
static double GetActorHealthBase(unsigned int i) noexcept;
|
||||||
static double GetActorHealthCurrent(unsigned int i) noexcept;
|
static double GetActorHealthCurrent(unsigned int i) noexcept;
|
||||||
|
static double GetActorHealthModified(unsigned int i) noexcept;
|
||||||
static double GetActorMagickaBase(unsigned int i) noexcept;
|
static double GetActorMagickaBase(unsigned int i) noexcept;
|
||||||
static double GetActorMagickaCurrent(unsigned int i) noexcept;
|
static double GetActorMagickaCurrent(unsigned int i) noexcept;
|
||||||
|
static double GetActorMagickaModified(unsigned int i) noexcept;
|
||||||
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 double GetActorFatigueModified(unsigned int i) noexcept;
|
||||||
|
|
||||||
static const char *GetActorEquipmentItemRefId(unsigned int i, unsigned short slot) noexcept;
|
static const char *GetActorEquipmentItemRefId(unsigned int i, unsigned short slot) noexcept;
|
||||||
static int GetActorEquipmentItemCount(unsigned int i, unsigned short slot) noexcept;
|
static int GetActorEquipmentItemCount(unsigned int i, unsigned short slot) noexcept;
|
||||||
|
@ -115,10 +124,13 @@ public:
|
||||||
|
|
||||||
static void SetActorHealthBase(double value) noexcept;
|
static void SetActorHealthBase(double value) noexcept;
|
||||||
static void SetActorHealthCurrent(double value) noexcept;
|
static void SetActorHealthCurrent(double value) noexcept;
|
||||||
|
static void SetActorHealthModified(double value) noexcept;
|
||||||
static void SetActorMagickaBase(double value) noexcept;
|
static void SetActorMagickaBase(double value) noexcept;
|
||||||
static void SetActorMagickaCurrent(double value) noexcept;
|
static void SetActorMagickaCurrent(double value) noexcept;
|
||||||
|
static void SetActorMagickaModified(double value) noexcept;
|
||||||
static void SetActorFatigueBase(double value) noexcept;
|
static void SetActorFatigueBase(double value) noexcept;
|
||||||
static void SetActorFatigueCurrent(double value) noexcept;
|
static void SetActorFatigueCurrent(double value) noexcept;
|
||||||
|
static void SetActorFatigueModified(double value) noexcept;
|
||||||
|
|
||||||
static void EquipActorItem(unsigned short slot, const char* refId, unsigned int count, int charge) noexcept;
|
static void EquipActorItem(unsigned short slot, const char* refId, unsigned int count, int charge) noexcept;
|
||||||
static void UnequipActorItem(unsigned short slot) noexcept;
|
static void UnequipActorItem(unsigned short slot) noexcept;
|
||||||
|
|
Loading…
Reference in a new issue