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

[Server] Add stackingState arg to script functions adding active spells

This commit is contained in:
David Cernat 2021-10-03 01:39:07 +02:00
parent 06451c13d5
commit 7193d1dca5
4 changed files with 8 additions and 4 deletions

View file

@ -489,10 +489,11 @@ void ActorFunctions::UnequipActorItem(unsigned short slot) noexcept
ActorFunctions::EquipActorItem(slot, "", 0, -1, -1);
}
void ActorFunctions::AddActorSpellActive(const char* spellId, const char* displayName) noexcept
void ActorFunctions::AddActorSpellActive(const char* spellId, const char* displayName, bool stackingState) noexcept
{
mwmp::ActiveSpell spell;
spell.id = spellId;
spell.isStackingSpell = stackingState;
spell.params.mDisplayName = displayName;
spell.params.mEffects = storedActorActiveEffects;

View file

@ -879,9 +879,10 @@ public:
*
* \param spellId The spellId of the spell.
* \param displayName The displayName of the spell.
* \param stackingState Whether the spell should stack with other instances of itself.
* \return void
*/
static void AddActorSpellActive(const char* spellId, const char* displayName) noexcept;
static void AddActorSpellActive(const char* spellId, const char* displayName, bool stackingState) noexcept;
/**
* \brief Add a new effect to the next active spell that will be added to the temporary actor

View file

@ -101,13 +101,14 @@ void SpellFunctions::AddSpell(unsigned short pid, const char* spellId) noexcept
player->spellbookChanges.spells.push_back(spell);
}
void SpellFunctions::AddSpellActive(unsigned short pid, const char* spellId, const char* displayName) noexcept
void SpellFunctions::AddSpellActive(unsigned short pid, const char* spellId, const char* displayName, bool stackingState) noexcept
{
Player* player;
GET_PLAYER(pid, player, );
mwmp::ActiveSpell spell;
spell.id = spellId;
spell.isStackingSpell = stackingState;
spell.params.mDisplayName = displayName;
spell.params.mEffects = storedActiveEffects;

View file

@ -155,9 +155,10 @@ public:
* \param pid The player ID whose spells active changes should be used.
* \param spellId The spellId of the spell.
* \param displayName The displayName of the spell.
* \param stackingState Whether the spell should stack with other instances of itself.
* \return void
*/
static void AddSpellActive(unsigned short pid, const char* spellId, const char* displayName) noexcept;
static void AddSpellActive(unsigned short pid, const char* spellId, const char* displayName, bool stackingState) noexcept;
/**
* \brief Add a new effect to the next active spell that will be added to a player.