mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
feat: achievement vendor and vendor feedback (#1461)
* Groundwork * movie buying logic out of gm handler make transaction result more useful * Full implementation Cleanup and fix some calls in gamemessages * Load the component in the entity Patch Auth * new line at eof * cache lookups * remove sort * fix includes
This commit is contained in:
@@ -79,7 +79,6 @@ void CDMissionsTable::LoadValuesFromDatabase() {
|
||||
entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
|
||||
Default.id = -1;
|
||||
@@ -118,3 +117,12 @@ const CDMissions& CDMissionsTable::GetByMissionID(uint32_t missionID, bool& foun
|
||||
return Default;
|
||||
}
|
||||
|
||||
const std::set<int32_t> CDMissionsTable::GetMissionsForReward(LOT lot) {
|
||||
std::set<int32_t> toReturn {};
|
||||
for (const auto& entry : GetEntries()) {
|
||||
if (lot == entry.reward_item1 || lot == entry.reward_item2 || lot == entry.reward_item3 || lot == entry.reward_item4) {
|
||||
toReturn.insert(entry.id);
|
||||
}
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
@@ -70,6 +70,9 @@ public:
|
||||
|
||||
const CDMissions& GetByMissionID(uint32_t missionID, bool& found) const;
|
||||
|
||||
const std::set<int32_t> GetMissionsForReward(LOT lot);
|
||||
|
||||
|
||||
static CDMissions Default;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user