1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-06 04:19:42 +00:00

[Server] Add GetActorSpellsActiveStackingState() script function

This commit is contained in:
David Cernat 2021-08-17 19:22:08 +02:00
parent bf17bfe1d9
commit 61a61d627e
2 changed files with 15 additions and 0 deletions

View file

@ -245,6 +245,11 @@ const char* ActorFunctions::GetActorSpellsActiveDisplayName(unsigned int actorIn
return readActorList->baseActors.at(actorIndex).spellsActiveChanges.activeSpells.at(spellIndex).params.mDisplayName.c_str();
}
bool ActorFunctions::GetActorSpellsActiveStackingState(unsigned int actorIndex, unsigned int spellIndex) noexcept
{
return readActorList->baseActors.at(actorIndex).spellsActiveChanges.activeSpells.at(spellIndex).isStackingSpell;
}
unsigned int ActorFunctions::GetActorSpellsActiveEffectCount(unsigned int actorIndex, unsigned int spellIndex) noexcept
{
return readActorList->baseActors.at(actorIndex).spellsActiveChanges.activeSpells.at(spellIndex).params.mEffects.size();

View file

@ -52,6 +52,7 @@
{"GetActorSpellsActiveChangesAction", ActorFunctions::GetActorSpellsActiveChangesAction},\
{"GetActorSpellsActiveId", ActorFunctions::GetActorSpellsActiveId},\
{"GetActorSpellsActiveDisplayName", ActorFunctions::GetActorSpellsActiveDisplayName},\
{"GetActorSpellsActiveStackingState", ActorFunctions::GetActorSpellsActiveStackingState},\
{"GetActorSpellsActiveEffectCount", ActorFunctions::GetActorSpellsActiveEffectCount},\
{"GetActorSpellsActiveEffectId", ActorFunctions::GetActorSpellsActiveEffectId},\
{"GetActorSpellsActiveEffectArg", ActorFunctions::GetActorSpellsActiveEffectArg},\
@ -464,6 +465,15 @@ public:
*/
static const char* GetActorSpellsActiveDisplayName(unsigned int actorIndex, unsigned int spellIndex) noexcept;
/**
* \brief Get the spell stacking state at a certain index in an actor's latest spells active changes.
*
* \param actorIndex The index of the actor.
* \param spellIndex The index of the spell.
* \return The spell stacking state.
*/
static bool GetActorSpellsActiveStackingState(unsigned int actorIndex, unsigned int spellIndex) noexcept;
/**
* \brief Get the number of effects at an index in an actor's latest spells active changes.
*