forked from teamnwah/openmw-tes3coop
Unstack soulgem, added via AddSoulGem console command (bug #4351)
This commit is contained in:
parent
e81faf5f2f
commit
62c04c6758
1 changed files with 6 additions and 0 deletions
|
@ -454,7 +454,13 @@ namespace MWScript
|
||||||
store.get<ESM::Creature>().find(creature); // This line throws an exception if it can't find the creature
|
store.get<ESM::Creature>().find(creature); // This line throws an exception if it can't find the creature
|
||||||
|
|
||||||
MWWorld::Ptr item = *ptr.getClass().getContainerStore(ptr).add(gem, 1, ptr);
|
MWWorld::Ptr item = *ptr.getClass().getContainerStore(ptr).add(gem, 1, ptr);
|
||||||
|
|
||||||
|
// Set the soul on just one of the gems, not the whole stack
|
||||||
|
item.getContainerStore()->unstack(item, ptr);
|
||||||
item.getCellRef().setSoul(creature);
|
item.getCellRef().setSoul(creature);
|
||||||
|
|
||||||
|
// Restack the gem with other gems with the same soul
|
||||||
|
item.getContainerStore()->restack(item);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue