mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 19:45:33 +00:00
Update faction-owned items confiscation
This commit is contained in:
parent
3810ade67a
commit
c14536a399
1 changed files with 7 additions and 0 deletions
|
@ -1029,6 +1029,13 @@ namespace MWMechanics
|
||||||
owner.first = victim.getCellRef().getRefId();
|
owner.first = victim.getCellRef().getRefId();
|
||||||
owner.second = false;
|
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);
|
Misc::StringUtils::lowerCaseInPlace(owner.first);
|
||||||
|
|
||||||
// decrease count of stolen items
|
// decrease count of stolen items
|
||||||
|
|
Loading…
Reference in a new issue