mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 22:20:33 +00:00
Remove the correct bound item when the effect expires
This commit is contained in:
parent
d29d68f1ba
commit
1d31c5eb6f
@ -217,10 +217,13 @@ namespace
|
|||||||
bool wasEquipped
|
bool wasEquipped
|
||||||
= currentItem != store.end() && Misc::StringUtils::ciEqual(currentItem->getCellRef().getRefId(), itemId);
|
= currentItem != store.end() && Misc::StringUtils::ciEqual(currentItem->getCellRef().getRefId(), itemId);
|
||||||
|
|
||||||
if (actor != MWMechanics::getPlayer())
|
if (wasEquipped)
|
||||||
{
|
store.remove(*currentItem, 1, actor);
|
||||||
|
else
|
||||||
store.remove(itemId, 1, actor);
|
store.remove(itemId, 1, actor);
|
||||||
|
|
||||||
|
if (actor != MWMechanics::getPlayer())
|
||||||
|
{
|
||||||
// Equip a replacement
|
// Equip a replacement
|
||||||
if (!wasEquipped)
|
if (!wasEquipped)
|
||||||
return;
|
return;
|
||||||
@ -258,8 +261,6 @@ namespace
|
|||||||
action.execute(actor);
|
action.execute(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
store.remove(itemId, 1, actor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCorprusEffect(const MWMechanics::ActiveSpells::ActiveEffect& effect, bool harmfulOnly = false)
|
bool isCorprusEffect(const MWMechanics::ActiveSpells::ActiveEffect& effect, bool harmfulOnly = false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user