mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-10 00:21:35 +00:00
[Server] Replace getKillRefId/getKillNumber with getKill
This commit is contained in:
parent
fe2dd1bad4
commit
7717f9bece
2 changed files with 5 additions and 11 deletions
|
@ -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…
Reference in a new issue