From 1c0adc47ee9e0267883bdccc4af4fb1949dedbfe Mon Sep 17 00:00:00 2001 From: Koncord Date: Thu, 31 Aug 2017 20:46:39 +0800 Subject: [PATCH] [Server] Fix [get/set]MajorSkills and [get/set]MinorSkills --- apps/openmw-mp/CharClass.cpp | 14 ++++++++------ apps/openmw-mp/CharClass.hpp | 8 ++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/apps/openmw-mp/CharClass.cpp b/apps/openmw-mp/CharClass.cpp index 49e7a1b51..c6a3d4980 100644 --- a/apps/openmw-mp/CharClass.cpp +++ b/apps/openmw-mp/CharClass.cpp @@ -109,35 +109,37 @@ void CharClass::setSpecialization(int spec) changed = true; } -std::tuple CharClass::getMinorSkills() const +std::tuple CharClass::getMinorSkills() const { const auto &data = player->charClass.mData; - return make_tuple( data.mSkills[0][0], data.mSkills[1][0], data.mSkills[2][0], data.mSkills[3][0]); + return make_tuple( data.mSkills[0][0], data.mSkills[1][0], data.mSkills[2][0], data.mSkills[3][0], data.mSkills[4][0]); } -void CharClass::setMinorSkills(int fisrt, int second, int third, int fourth) +void CharClass::setMinorSkills(int fisrt, int second, int third, int fourth, int fifth) { auto &data = player->charClass.mData; data.mSkills[0][0] = fisrt; data.mSkills[1][0] = second; data.mSkills[2][0] = third; data.mSkills[3][0] = fourth; + data.mSkills[4][0] = fifth; changed = true; } -std::tuple CharClass::getMajorSkills() const +std::tuple CharClass::getMajorSkills() const { const auto &data = player->charClass.mData; - return make_tuple( data.mSkills[0][1], data.mSkills[1][1], data.mSkills[2][1], data.mSkills[3][1]); + return make_tuple( data.mSkills[0][1], data.mSkills[1][1], data.mSkills[2][1], data.mSkills[3][1], data.mSkills[4][1]); } -void CharClass::setMajorSkills(int fisrt, int second, int third, int fourth) +void CharClass::setMajorSkills(int fisrt, int second, int third, int fourth, int fifth) { auto &data = player->charClass.mData; data.mSkills[0][1] = fisrt; data.mSkills[1][1] = second; data.mSkills[2][1] = third; data.mSkills[3][1] = fourth; + data.mSkills[4][1] = fifth; changed = true; } diff --git a/apps/openmw-mp/CharClass.hpp b/apps/openmw-mp/CharClass.hpp index 65c8bc33b..5905a9631 100644 --- a/apps/openmw-mp/CharClass.hpp +++ b/apps/openmw-mp/CharClass.hpp @@ -36,11 +36,11 @@ public: int getSpecialization() const; void setSpecialization(int spec); - std::tuple getMinorSkills() const; - void setMinorSkills(int fisrt, int second, int third, int fourth); + std::tuple getMinorSkills() const; + void setMinorSkills(int fisrt, int second, int third, int fourth, int fifth); - std::tuple getMajorSkills() const; - void setMajorSkills(int fisrt, int second, int third, int fourth); + std::tuple getMajorSkills() const; + void setMajorSkills(int fisrt, int second, int third, int fourth, int fifth); private: // not controlled pointer Player *player;