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:
Aaron Kimbrell
2024-02-25 01:47:05 -06:00
committed by GitHub
parent 1328850a8d
commit e729c7f846
13 changed files with 226 additions and 97 deletions

View File

@@ -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;
}

View File

@@ -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;
};