mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-03 21:15:36 +00:00
Reset the 'owner' field for items that were legitimately bought from an NPC.
This commit is contained in:
parent
f3c8cd2065
commit
480467b6eb
1 changed files with 6 additions and 0 deletions
|
@ -257,6 +257,12 @@ namespace MWGui
|
|||
MWBase::Environment::get().getDialogueManager()->applyTemporaryDispositionChange(iBarterSuccessDisposition);
|
||||
|
||||
// success! make the item transfer.
|
||||
MWWorld::ContainerStore& playerBoughtItems = mWindowManager.getInventoryWindow()->getBoughtItems();
|
||||
for (MWWorld::ContainerStoreIterator it = playerBoughtItems.begin(); it != playerBoughtItems.end(); ++it)
|
||||
{
|
||||
if (Misc::StringUtils::ciEqual(it->getCellRef().mOwner, MWWorld::Class::get(mPtr).getId(mPtr)))
|
||||
it->getCellRef().mOwner = "";
|
||||
}
|
||||
transferBoughtItems();
|
||||
mWindowManager.getInventoryWindow()->transferBoughtItems();
|
||||
|
||||
|
|
Loading…
Reference in a new issue