Support for getting Creature by ID.

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2020-08-22 13:24:08 +02:00
parent 9547b92f14
commit fcdc58176f
3 changed files with 20 additions and 3 deletions

View File

@@ -23,12 +23,12 @@ namespace CreatureLib::Library {
virtual ~BaseLibrary() noexcept { _values.Clear(); }
inline void Insert(const ArbUt::StringView& key, const T* value) {
inline virtual void Insert(const ArbUt::StringView& key, const T* value) {
AssertNotNull(value)
_values.GetStdMap().insert({key.GetHash(), std::unique_ptr<const T>(value)});
_listValues.Append(key);
}
inline void Insert(uint32_t hashedKey, const T* value) {
inline virtual void Insert(uint32_t hashedKey, const T* value) {
AssertNotNull(value)
_values.GetStdMap().insert({hashedKey, std::unique_ptr<const T>(value)});
_listValues.Append(hashedKey);