forked from mirror/openmw-tes3mp
Fix no punishment for stealing when taking an item with the inventory opened
This commit is contained in:
parent
eef8f71797
commit
3b8b217888
1 changed files with 2 additions and 2 deletions
|
@ -594,6 +594,8 @@ namespace MWGui
|
|||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
MWBase::Environment::get().getWorld()->breakInvisibility(player);
|
||||
|
||||
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, object, MWWorld::Ptr(), count);
|
||||
|
||||
// add to player inventory
|
||||
// can't use ActionTake here because we need an MWWorld::Ptr to the newly inserted object
|
||||
MWWorld::Ptr newObject = *player.getClass().getContainerStore (player).add (object, object.getRefData().getCount(), player);
|
||||
|
@ -612,8 +614,6 @@ namespace MWGui
|
|||
throw std::runtime_error("Added item not found");
|
||||
mDragAndDrop->startDrag(i, mSortModel, mTradeModel, mItemView, count);
|
||||
|
||||
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, newObject, MWWorld::Ptr(), count);
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->updateSpellWindow();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue