1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

[Server] Fix [get/set]MajorSkills and [get/set]MinorSkills

This commit is contained in:
Koncord 2017-08-31 20:46:39 +08:00
parent 66fdba957b
commit 1c0adc47ee
2 changed files with 12 additions and 10 deletions

View file

@ -109,35 +109,37 @@ void CharClass::setSpecialization(int spec)
changed = true;
}
std::tuple<int, int, int, int> CharClass::getMinorSkills() const
std::tuple<int, int, int, int, int> 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<int, int, int, int> CharClass::getMajorSkills() const
std::tuple<int, int, int, int, int> 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;
}

View file

@ -36,11 +36,11 @@ public:
int getSpecialization() const;
void setSpecialization(int spec);
std::tuple<int, int, int, int> getMinorSkills() const;
void setMinorSkills(int fisrt, int second, int third, int fourth);
std::tuple<int, int, int, int, int> getMinorSkills() const;
void setMinorSkills(int fisrt, int second, int third, int fourth, int fifth);
std::tuple<int, int, int, int> getMajorSkills() const;
void setMajorSkills(int fisrt, int second, int third, int fourth);
std::tuple<int, int, int, int, int> getMajorSkills() const;
void setMajorSkills(int fisrt, int second, int third, int fourth, int fifth);
private:
// not controlled pointer
Player *player;