diff --git a/apps/openmw-mp/Script/Functions/CharClass.cpp b/apps/openmw-mp/Script/Functions/CharClass.cpp index a2e4e7fbb..0a9af0a84 100644 --- a/apps/openmw-mp/Script/Functions/CharClass.cpp +++ b/apps/openmw-mp/Script/Functions/CharClass.cpp @@ -32,7 +32,7 @@ const char *CharClassFunctions::GetClassDesc(unsigned short pid) noexcept return player->charClass.mDescription.c_str(); } -int CharClassFunctions::GetClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept +int CharClassFunctions::GetClassMajorAttribute(unsigned short pid, unsigned char slot) { Player *player; GET_PLAYER(pid, player, 0); @@ -51,7 +51,7 @@ int CharClassFunctions::GetClassSpecialization(unsigned short pid) noexcept return player->charClass.mData.mSpecialization; } -int CharClassFunctions::GetClassMajorSkill(unsigned short pid, unsigned char slot) noexcept +int CharClassFunctions::GetClassMajorSkill(unsigned short pid, unsigned char slot) { Player *player; GET_PLAYER(pid, player, 0); @@ -62,7 +62,7 @@ int CharClassFunctions::GetClassMajorSkill(unsigned short pid, unsigned char slo return player->charClass.mData.mSkills[slot][1]; } -int CharClassFunctions::GetClassMinorSkill(unsigned short pid, unsigned char slot) noexcept +int CharClassFunctions::GetClassMinorSkill(unsigned short pid, unsigned char slot) { Player *player; GET_PLAYER(pid, player, 0); @@ -103,7 +103,7 @@ void CharClassFunctions::SetClassDesc(unsigned short pid, const char *desc) noex player->charClass.mDescription = desc; } -void CharClassFunctions::SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept +void CharClassFunctions::SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) { Player *player; GET_PLAYER(pid, player,); @@ -121,7 +121,7 @@ void CharClassFunctions::SetClassSpecialization(unsigned short pid, int spec) no player->charClass.mData.mSpecialization = spec; } -void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept +void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) { Player *player; GET_PLAYER(pid, player,); @@ -131,7 +131,7 @@ void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char sl player->charClass.mData.mSkills[slot][1] = skillId; } -void CharClassFunctions::SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept +void CharClassFunctions::SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) { Player *player; GET_PLAYER(pid, player,); diff --git a/apps/openmw-mp/Script/Functions/CharClass.hpp b/apps/openmw-mp/Script/Functions/CharClass.hpp index 81eea0331..25ab0229d 100644 --- a/apps/openmw-mp/Script/Functions/CharClass.hpp +++ b/apps/openmw-mp/Script/Functions/CharClass.hpp @@ -59,7 +59,7 @@ public: * \param slot The slot of the major attribute (0 or 1). * \return The ID of the major attribute. */ - static int GetClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept; + static int GetClassMajorAttribute(unsigned short pid, unsigned char slot); /** * \brief Get the specialization ID of the custom class used by a player. @@ -76,7 +76,7 @@ public: * \param slot The slot of the major skill (0 to 4). * \return The ID of the major skill. */ - static int GetClassMajorSkill(unsigned short pid, unsigned char slot) noexcept; + static int GetClassMajorSkill(unsigned short pid, unsigned char slot); /** * \brief Get the ID of one of the five minor skills of a custom class used by a player. @@ -85,7 +85,7 @@ public: * \param slot The slot of the minor skill (0 to 4). * \return The ID of the minor skill. */ - static int GetClassMinorSkill(unsigned short pid, unsigned char slot) noexcept; + static int GetClassMinorSkill(unsigned short pid, unsigned char slot); /** * \brief Check whether the player is using a default class instead of a custom one. @@ -132,7 +132,7 @@ public: * \param attrId The ID to use for the attribute. * \return void */ - static void SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept; + static void SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId); /** * \brief Set the specialization of the custom class used by a player. @@ -151,7 +151,7 @@ public: * \param skillId The ID to use for the skill. * \return void */ - static void SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept; + static void SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId); /** * \brief Set the ID of one of the five minor skills of the custom class used by a player. @@ -161,7 +161,7 @@ public: * \param skillId The ID to use for the skill. * \return void */ - static void SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept; + static void SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId); /** * \brief Send a PlayerCharClass packet about a player. diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index a4a92ed50..9ee77e3e4 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -327,7 +327,7 @@ void StatsFunctions::SetIsMale(unsigned short pid, int state) noexcept Player *player; GET_PLAYER(pid, player,); - player->npc.setIsMale(state == true); + player->npc.setIsMale(state > 0 ? true : false); } void StatsFunctions::SetBirthsign(unsigned short pid, const char *sign) noexcept