mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Fix restacking unequipped items
This commit is contained in:
parent
da85f3e575
commit
49125fa26e
@ -443,6 +443,9 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c
|
|||||||
{
|
{
|
||||||
ContainerStoreIterator retval = it;
|
ContainerStoreIterator retval = it;
|
||||||
|
|
||||||
|
// empty this slot
|
||||||
|
mSlots[slot] = end();
|
||||||
|
|
||||||
if (restack) {
|
if (restack) {
|
||||||
// restack item previously in this slot
|
// restack item previously in this slot
|
||||||
for (MWWorld::ContainerStoreIterator iter (begin()); iter != end(); ++iter)
|
for (MWWorld::ContainerStoreIterator iter (begin()); iter != end(); ++iter)
|
||||||
@ -457,9 +460,6 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// empty this slot
|
|
||||||
mSlots[slot] = end();
|
|
||||||
|
|
||||||
if (actor.getRefData().getHandle() == "player")
|
if (actor.getRefData().getHandle() == "player")
|
||||||
{
|
{
|
||||||
// Unset OnPCEquip Variable on item's script, if it has a script with that variable declared
|
// Unset OnPCEquip Variable on item's script, if it has a script with that variable declared
|
||||||
|
Loading…
x
Reference in New Issue
Block a user