[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,
"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<std::string, int> 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);
}

@ -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<std::string, int> getKill(unsigned int i) const;
private:
Player *player;

Loading…
Cancel
Save