[Server] Move rare arg to end of AddSpellActiveEffect() argument list

This commit is contained in:
David Cernat 2020-11-17 15:22:19 +02:00
parent 58c04530e7
commit dd171420ca
2 changed files with 5 additions and 4 deletions

View File

@ -100,17 +100,17 @@ void SpellFunctions::AddSpellActive(unsigned short pid, const char* spellId, con
storedActiveEffects.clear(); storedActiveEffects.clear();
} }
void SpellFunctions::AddSpellActiveEffect(unsigned short pid, int effectId, int arg, double magnitude, double duration, double timeLeft) noexcept void SpellFunctions::AddSpellActiveEffect(unsigned short pid, int effectId, double magnitude, double duration, double timeLeft, int arg) noexcept
{ {
Player* player; Player* player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
ESM::ActiveEffect effect; ESM::ActiveEffect effect;
effect.mEffectId = effectId; effect.mEffectId = effectId;
effect.mArg = arg;
effect.mMagnitude = magnitude; effect.mMagnitude = magnitude;
effect.mDuration = duration; effect.mDuration = duration;
effect.mTimeLeft = timeLeft; effect.mTimeLeft = timeLeft;
effect.mArg = arg;
storedActiveEffects.push_back(effect); storedActiveEffects.push_back(effect);
} }

View File

@ -131,13 +131,14 @@ 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 effectId The id of the effect. * \param effectId The id of the effect.
* \param arg The arg of the effect.
* \param magnitude The magnitude of the effect. * \param magnitude The magnitude of the effect.
* \param duration The duration of the effect. * \param duration The duration of the effect.
* \param timeLeft The timeLeft for the effect. * \param timeLeft The timeLeft for the effect.
* \param arg The arg of the effect when applicable, e.g. the skill used for Fortify Skill or the attribute
* used for Fortify Attribute.
* \return void * \return void
*/ */
static void AddSpellActiveEffect(unsigned short pid, int effectId, int arg, double magnitude, double duration, double timeLeft) noexcept; static void AddSpellActiveEffect(unsigned short pid, int effectId, double magnitude, double duration, double timeLeft, int arg) noexcept;
/** /**
* \brief Get the spell id at a certain index in a player's latest spellbook changes. * \brief Get the spell id at a certain index in a player's latest spellbook changes.