#pragma once #include #include #include #include #include #include #include "ItemParameterTable.hh" #include "Types.hh" #include "Version.hh" class ItemTranslationTable { public: ItemTranslationTable( const phosg::JSON& json, const std::array, NUM_VERSIONS>& item_parameter_tables); ~ItemTranslationTable() = default; phosg::JSON json() const; uint32_t translate(uint32_t primary_identifier, Version from_version, Version to_version) const; private: struct Entry { std::array id_for_version; std::string name; explicit Entry(const phosg::JSON& json); phosg::JSON json() const; }; std::vector entries; std::array, NUM_NON_PATCH_VERSIONS> entry_index_for_version; };