mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-22 20:10:16 -04:00
[Server] Add stackingState arg to script functions adding active spells
This commit is contained in:
parent
06451c13d5
commit
7193d1dca5
@ -489,10 +489,11 @@ void ActorFunctions::UnequipActorItem(unsigned short slot) noexcept
|
|||||||
ActorFunctions::EquipActorItem(slot, "", 0, -1, -1);
|
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;
|
mwmp::ActiveSpell spell;
|
||||||
spell.id = spellId;
|
spell.id = spellId;
|
||||||
|
spell.isStackingSpell = stackingState;
|
||||||
spell.params.mDisplayName = displayName;
|
spell.params.mDisplayName = displayName;
|
||||||
spell.params.mEffects = storedActorActiveEffects;
|
spell.params.mEffects = storedActorActiveEffects;
|
||||||
|
|
||||||
|
@ -879,9 +879,10 @@ public:
|
|||||||
*
|
*
|
||||||
* \param spellId The spellId of the spell.
|
* \param spellId The spellId of the spell.
|
||||||
* \param displayName The displayName of the spell.
|
* \param displayName The displayName of the spell.
|
||||||
|
* \param stackingState Whether the spell should stack with other instances of itself.
|
||||||
* \return void
|
* \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
|
* \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);
|
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;
|
Player* player;
|
||||||
GET_PLAYER(pid, player, );
|
GET_PLAYER(pid, player, );
|
||||||
|
|
||||||
mwmp::ActiveSpell spell;
|
mwmp::ActiveSpell spell;
|
||||||
spell.id = spellId;
|
spell.id = spellId;
|
||||||
|
spell.isStackingSpell = stackingState;
|
||||||
spell.params.mDisplayName = displayName;
|
spell.params.mDisplayName = displayName;
|
||||||
spell.params.mEffects = storedActiveEffects;
|
spell.params.mEffects = storedActiveEffects;
|
||||||
|
|
||||||
|
@ -155,9 +155,10 @@ public:
|
|||||||
* \param pid The player ID whose spells active changes should be used.
|
* \param pid The player ID whose spells active changes should be used.
|
||||||
* \param spellId The spellId of the spell.
|
* \param spellId The spellId of the spell.
|
||||||
* \param displayName The displayName of the spell.
|
* \param displayName The displayName of the spell.
|
||||||
|
* \param stackingState Whether the spell should stack with other instances of itself.
|
||||||
* \return void
|
* \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.
|
* \brief Add a new effect to the next active spell that will be added to a player.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user