From dd171420ca8f8e3d86e02e4558a0676d4ae6a640 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 17 Nov 2020 15:22:19 +0200 Subject: [PATCH] [Server] Move rare arg to end of AddSpellActiveEffect() argument list --- apps/openmw-mp/Script/Functions/Spells.cpp | 4 ++-- apps/openmw-mp/Script/Functions/Spells.hpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Spells.cpp b/apps/openmw-mp/Script/Functions/Spells.cpp index 2535d4ab2..d9a7eb341 100644 --- a/apps/openmw-mp/Script/Functions/Spells.cpp +++ b/apps/openmw-mp/Script/Functions/Spells.cpp @@ -100,17 +100,17 @@ void SpellFunctions::AddSpellActive(unsigned short pid, const char* spellId, con 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; GET_PLAYER(pid, player, ); ESM::ActiveEffect effect; effect.mEffectId = effectId; - effect.mArg = arg; effect.mMagnitude = magnitude; effect.mDuration = duration; effect.mTimeLeft = timeLeft; + effect.mArg = arg; storedActiveEffects.push_back(effect); } diff --git a/apps/openmw-mp/Script/Functions/Spells.hpp b/apps/openmw-mp/Script/Functions/Spells.hpp index e0068c9ef..0aca316bb 100644 --- a/apps/openmw-mp/Script/Functions/Spells.hpp +++ b/apps/openmw-mp/Script/Functions/Spells.hpp @@ -131,13 +131,14 @@ public: * * \param pid The player ID whose spells active changes should be used. * \param effectId The id of the effect. - * \param arg The arg of the effect. * \param magnitude The magnitude of the effect. * \param duration The duration of 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 */ - 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.