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:
parent
bf17bfe1d9
commit
61a61d627e
2 changed files with 15 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue