mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 21:41:04 +00:00
Update faction-owned items confiscation
This commit is contained in:
parent
3810ade67a
commit
c14536a399
@ -1029,6 +1029,13 @@ namespace MWMechanics
|
||||
owner.first = victim.getCellRef().getRefId();
|
||||
owner.second = false;
|
||||
|
||||
const std::string victimFaction = victim.getClass().getPrimaryFaction(victim);
|
||||
if (!victimFaction.empty() && Misc::StringUtils::ciEqual(item.getCellRef().getFaction(), victimFaction)) // Is the item faction-owned?
|
||||
{
|
||||
owner.first = victimFaction;
|
||||
owner.second = true;
|
||||
}
|
||||
|
||||
Misc::StringUtils::lowerCaseInPlace(owner.first);
|
||||
|
||||
// decrease count of stolen items
|
||||
|
Loading…
x
Reference in New Issue
Block a user