diff --git a/apps/openmw-mp/Quests.cpp b/apps/openmw-mp/Quests.cpp index 4a767e8ac..7cffd80a8 100644 --- a/apps/openmw-mp/Quests.cpp +++ b/apps/openmw-mp/Quests.cpp @@ -80,8 +80,7 @@ void Quests::Init(LuaState &lua) "getJournalItem", &Quests::getJournalItem, "addKill", &Quests::addKill, - "getKillRefId", &Quests::getKillRefId, - "getKillNumber", &Quests::getKillNumber + "getKill", &Quests::getKill ); } @@ -150,12 +149,8 @@ void Quests::addKill(const std::string &refId, int number) changedKills = true; } -std::string Quests::getKillRefId(unsigned int i) const +std::tuple Quests::getKill(unsigned int i) const { - return player->killChanges.kills.at(i).refId; -} - -int Quests::getKillNumber(unsigned int i) const -{ - return player->killChanges.kills.at(i).number; + auto & kill = player->killChanges.kills.at(i); + return std::make_tuple(kill.refId, kill.number); } diff --git a/apps/openmw-mp/Quests.hpp b/apps/openmw-mp/Quests.hpp index eef3d0b1f..c71237664 100644 --- a/apps/openmw-mp/Quests.hpp +++ b/apps/openmw-mp/Quests.hpp @@ -52,8 +52,7 @@ public: JournalItem getJournalItem(unsigned int id); void addKill(const std::string &refId, int number); - std::string getKillRefId(unsigned int i) const; - int getKillNumber(unsigned int i) const; + std::tuple getKill(unsigned int i) const; private: Player *player;