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:
parent
aec0c5bd49
commit
338efdb705
2 changed files with 3 additions and 1 deletions
|
@ -374,4 +374,6 @@ MWWorld::Ptr MechanicsHelper::getItemPtrFromStore(const mwmp::Item& item, MWWorl
|
||||||
return *storeIterator;
|
return *storeIterator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue