This commit is contained in:
1 file changed
+3
-1
@@ -8,7 +8,9 @@ namespace PkmnLib::Library {
|
||||
public:
|
||||
inline std::optional<ArbUt::BorrowedPtr<const Item>> TryGet(const ArbUt::BasicStringView& name) const {
|
||||
auto res = CreatureLib::Library::ItemLibrary::TryGet(name.GetHash());
|
||||
return reinterpret_cast<const std::optional<ArbUt::BorrowedPtr<const Item>>&>(res);
|
||||
if (!res.has_value())
|
||||
return {};
|
||||
return res.value().ForceAs<const Item>();
|
||||
}
|
||||
|
||||
inline ArbUt::BorrowedPtr<const Item> Get(const ArbUt::BasicStringView& name) const {
|
||||
|
||||
Reference in new issue
Block a user