1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 23:15:36 +00:00

[General] Fix issues with MechanicsHelper::getItemPtrFromStore()

This commit is contained in:
David Cernat 2018-08-11 19:00:02 +03:00
parent aec0c5bd49
commit 338efdb705
2 changed files with 3 additions and 1 deletions

View file

@ -374,4 +374,6 @@ MWWorld::Ptr MechanicsHelper::getItemPtrFromStore(const mwmp::Item& item, MWWorl
return *storeIterator; return *storeIterator;
} }
} }
return 0;
} }

View file

@ -35,7 +35,7 @@ namespace mwmp
MWWorld::Ptr &playerPtr = MWBase::Environment::get().getWorld()->getPlayerPtr(); MWWorld::Ptr &playerPtr = MWBase::Environment::get().getWorld()->getPlayerPtr();
MWWorld::InventoryStore &inventoryStore = playerPtr.getClass().getInventoryStore(playerPtr); MWWorld::InventoryStore &inventoryStore = playerPtr.getClass().getInventoryStore(playerPtr);
MWWorld::Ptr &itemPtr = MechanicsHelper::getItemPtrFromStore(player->usedItem, inventoryStore); MWWorld::Ptr itemPtr = MechanicsHelper::getItemPtrFromStore(player->usedItem, inventoryStore);
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->useItem(itemPtr); MWBase::Environment::get().getWindowManager()->getInventoryWindow()->useItem(itemPtr);
} }
} }