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

pull/593/head
David Cernat 3 years ago
parent 06451c13d5
commit 7193d1dca5

@ -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;

@ -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

@ -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;

@ -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.

Loading…
Cancel
Save