mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 21:45:38 +00:00
Fix a potential exploit that made it possible to reset the owner of any item
This commit is contained in:
parent
a6e1d7ffd6
commit
bac4d875df
1 changed files with 4 additions and 1 deletions
|
@ -64,7 +64,10 @@ void InventoryItemModel::moveItem(const ItemStack &item, size_t count, ItemModel
|
|||
bool setNewOwner = false;
|
||||
|
||||
// Are you dead? Then you wont need that anymore
|
||||
if (mActor.getClass().isActor() && mActor.getClass().getCreatureStats(mActor).isDead())
|
||||
if (mActor.getClass().isActor() && mActor.getClass().getCreatureStats(mActor).isDead()
|
||||
// Make sure that the item is actually owned by the dead actor
|
||||
// Prevents a potential exploit for resetting the owner of any item, by placing the item in a corpse
|
||||
&& Misc::StringUtils::ciEqual(item.mBase.getCellRef().mOwner, mActor.getCellRef().mRefID))
|
||||
setNewOwner = true;
|
||||
|
||||
otherModel->copyItem(item, count, setNewOwner);
|
||||
|
|
Loading…
Reference in a new issue