Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership by dead actors is not cleared from picked items (Bug #4328) #1617

Merged
3 commits merged into from
Mar 7, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Prevent items in a container owned by a dead actor from being counted…
… as stolen (Bug #4328)
  • Loading branch information
Capostrophic committed Mar 3, 2018
commit d371bebb333c419c0c5589bfca090410eb25a1be
2 changes: 1 addition & 1 deletion apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ namespace MWMechanics

if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId))
{
const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true);
const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(ownerCellRef->getOwner(), true);
if (victimRef.isEmpty() || !victimRef.getClass().getCreatureStats(victimRef).isDead())
mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count;
}
Expand Down