diff --git a/apps/openmw-mp/Script/Functions/Actors.cpp b/apps/openmw-mp/Script/Functions/Actors.cpp index 8dbe8b6ba..c236e992e 100644 --- a/apps/openmw-mp/Script/Functions/Actors.cpp +++ b/apps/openmw-mp/Script/Functions/Actors.cpp @@ -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; diff --git a/apps/openmw-mp/Script/Functions/Actors.hpp b/apps/openmw-mp/Script/Functions/Actors.hpp index 80ff88e47..0b492476f 100644 --- a/apps/openmw-mp/Script/Functions/Actors.hpp +++ b/apps/openmw-mp/Script/Functions/Actors.hpp @@ -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 diff --git a/apps/openmw-mp/Script/Functions/Spells.cpp b/apps/openmw-mp/Script/Functions/Spells.cpp index a78d035c5..4fd9c1754 100644 --- a/apps/openmw-mp/Script/Functions/Spells.cpp +++ b/apps/openmw-mp/Script/Functions/Spells.cpp @@ -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; diff --git a/apps/openmw-mp/Script/Functions/Spells.hpp b/apps/openmw-mp/Script/Functions/Spells.hpp index f72e77983..869b7e720 100644 --- a/apps/openmw-mp/Script/Functions/Spells.hpp +++ b/apps/openmw-mp/Script/Functions/Spells.hpp @@ -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.