Make HeldItem OptionalBorrowedPtr.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ Creature* CreateCreature::Create() {
|
||||
if (gender == static_cast<Library::Gender>(-1)) {
|
||||
gender = species->GetRandomGender(rand);
|
||||
}
|
||||
ArbUt::BorrowedPtr<const Library::Item> heldItem;
|
||||
ArbUt::OptionalBorrowedPtr<const Library::Item> heldItem;
|
||||
if (!this->_heldItem.IsEmpty()) {
|
||||
auto val = _library->GetItemLibrary()->TryGet(this->_heldItem.GetHash());
|
||||
if (!val.has_value()) {
|
||||
|
||||
Reference in New Issue
Block a user