Allow running soulgem instructions on all actors (#7943)

pull/3235/head
Alexei Kotov 2 weeks ago
parent 023c0f7a46
commit 1c1df996be

@ -170,6 +170,7 @@
Bug #7899: Editor: Doors can't be unlocked
Bug #7901: Editor: Teleport-related fields shouldn't be editable if a ref does not teleport
Bug #7908: Key bindings names in the settings menu are layout-specific
Bug #7943: Using "addSoulGem" and "dropSoulGem" commands to creatures works only with "Weapon & Shield" flagged ones
Feature #2566: Handle NAM9 records for manual cell references
Feature #3537: Shader-based water ripples
Feature #5173: Support for NiFogProperty

@ -631,7 +631,7 @@ namespace MWScript
ESM::RefId gem = ESM::RefId::stringRefId(runtime.getStringLiteral(runtime[0].mInteger));
runtime.pop();
if (!ptr.getClass().hasInventoryStore(ptr))
if (!ptr.getClass().isActor())
return;
const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore();
@ -664,10 +664,10 @@ namespace MWScript
for (unsigned int i = 0; i < arg0; ++i)
runtime.pop();
if (!ptr.getClass().hasInventoryStore(ptr))
if (!ptr.getClass().isActor())
return;
MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr);
MWWorld::ContainerStore& store = ptr.getClass().getContainerStore(ptr);
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
{
if (it->getCellRef().getSoul() == soul)
@ -780,10 +780,10 @@ namespace MWScript
ESM::RefId soul = ESM::RefId::stringRefId(runtime.getStringLiteral(runtime[0].mInteger));
runtime.pop();
if (!ptr.getClass().hasInventoryStore(ptr))
if (!ptr.getClass().isActor())
return;
MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr);
MWWorld::ContainerStore& store = ptr.getClass().getContainerStore(ptr);
for (MWWorld::ContainerStoreIterator iter(store.begin()); iter != store.end(); ++iter)
{

Loading…
Cancel
Save