implement card auctions
This commit is contained in:
@@ -1241,6 +1241,11 @@ DataIndex::DataIndex(const string& directory, bool debug)
|
||||
"duplicate card id: %08" PRIX32, entry->def.card_id.load()));
|
||||
}
|
||||
|
||||
// Some cards intentionally have the same name, so we just leave them
|
||||
// unindexed (they can still be looked up by ID, of course)
|
||||
string name = entry->def.en_name;
|
||||
this->card_definitions_by_name.emplace(name, entry);
|
||||
|
||||
entry->def.hp.decode_code();
|
||||
entry->def.ap.decode_code();
|
||||
entry->def.tp.decode_code();
|
||||
@@ -1320,6 +1325,11 @@ shared_ptr<const DataIndex::CardEntry> DataIndex::definition_for_card_id(
|
||||
return this->card_definitions.at(id);
|
||||
}
|
||||
|
||||
shared_ptr<const DataIndex::CardEntry> DataIndex::definition_for_card_name(
|
||||
const string& name) const {
|
||||
return this->card_definitions_by_name.at(name);
|
||||
}
|
||||
|
||||
set<uint32_t> DataIndex::all_card_ids() const {
|
||||
set<uint32_t> ret;
|
||||
for (const auto& it : this->card_definitions) {
|
||||
|
||||
Reference in New Issue
Block a user