From 1dccd7523821564f60858411c64925d2ea4aa5b9 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 17 Nov 2020 15:28:02 +0200 Subject: [PATCH] [Server] Return signed int for GetSpellsActiveEffectArg() --- apps/openmw-mp/Script/Functions/Spells.cpp | 2 +- apps/openmw-mp/Script/Functions/Spells.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Spells.cpp b/apps/openmw-mp/Script/Functions/Spells.cpp index d9a7eb341..64bf88704 100644 --- a/apps/openmw-mp/Script/Functions/Spells.cpp +++ b/apps/openmw-mp/Script/Functions/Spells.cpp @@ -170,7 +170,7 @@ unsigned int SpellFunctions::GetSpellsActiveEffectId(unsigned short pid, unsigne return player->spellsActiveChanges.activeSpells.at(spellIndex).params.mEffects.at(effectIndex).mEffectId; } -unsigned int SpellFunctions::GetSpellsActiveEffectArg(unsigned short pid, unsigned int spellIndex, unsigned int effectIndex) noexcept +int SpellFunctions::GetSpellsActiveEffectArg(unsigned short pid, unsigned int spellIndex, unsigned int effectIndex) noexcept { Player* player; GET_PLAYER(pid, player, 0); diff --git a/apps/openmw-mp/Script/Functions/Spells.hpp b/apps/openmw-mp/Script/Functions/Spells.hpp index 0aca316bb..a7f72950e 100644 --- a/apps/openmw-mp/Script/Functions/Spells.hpp +++ b/apps/openmw-mp/Script/Functions/Spells.hpp @@ -194,7 +194,7 @@ public: * \param effectIndex The index of the effect. * \return The arg of the effect. */ - static unsigned int GetSpellsActiveEffectArg(unsigned short pid, unsigned int spellIndex, unsigned int effectIndex) noexcept; + static int GetSpellsActiveEffectArg(unsigned short pid, unsigned int spellIndex, unsigned int effectIndex) noexcept; /** * \brief Get the magnitude for an effect index at a spell index in a player's latest spells active changes.