mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 20:45:33 +00:00
Merge pull request #2156 from Capostrophic/itemtaken
Fix redundant searchPtr call
This commit is contained in:
commit
a206f57f75
1 changed files with 1 additions and 2 deletions
|
@ -1190,8 +1190,7 @@ namespace MWMechanics
|
|||
|
||||
if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId))
|
||||
{
|
||||
const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(ownerCellRef->getOwner(), true);
|
||||
if (victimRef.isEmpty() || !victimRef.getClass().getCreatureStats(victimRef).isDead())
|
||||
if (victim.isEmpty() || (victim.getClass().isActor() && !victim.getClass().getCreatureStats(victim).isDead()))
|
||||
mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count;
|
||||
}
|
||||
if (alarm)
|
||||
|
|
Loading…
Reference in a new issue