[Server] Replace getKillRefId/getKillNumber with getKill

pull/276/head
Koncord 7 years ago
parent fe2dd1bad4
commit 7717f9bece

@ -80,8 +80,7 @@ void Quests::Init(LuaState &lua)
"getJournalItem", &Quests::getJournalItem, "getJournalItem", &Quests::getJournalItem,
"addKill", &Quests::addKill, "addKill", &Quests::addKill,
"getKillRefId", &Quests::getKillRefId, "getKill", &Quests::getKill
"getKillNumber", &Quests::getKillNumber
); );
} }
@ -150,12 +149,8 @@ void Quests::addKill(const std::string &refId, int number)
changedKills = true; changedKills = true;
} }
std::string Quests::getKillRefId(unsigned int i) const std::tuple<std::string, int> Quests::getKill(unsigned int i) const
{ {
return player->killChanges.kills.at(i).refId; auto & kill = player->killChanges.kills.at(i);
} return std::make_tuple(kill.refId, kill.number);
int Quests::getKillNumber(unsigned int i) const
{
return player->killChanges.kills.at(i).number;
} }

@ -52,8 +52,7 @@ public:
JournalItem getJournalItem(unsigned int id); JournalItem getJournalItem(unsigned int id);
void addKill(const std::string &refId, int number); void addKill(const std::string &refId, int number);
std::string getKillRefId(unsigned int i) const; std::tuple<std::string, int> getKill(unsigned int i) const;
int getKillNumber(unsigned int i) const;
private: private:
Player *player; Player *player;

Loading…
Cancel
Save