Lua command `actor:setEquipment` doesn't trigger mwscripts when equipping or unequipping a scripted item
Lua command actor:setEquipment
doesn't trigger mwscripts when equipping or unequipping a scripted item.
It happens because setEquipment
simply calls (link) MWWorld::InventoryStore::equip
. And InventoryStore::equip doesn't trigger scripts.
Questions:
- Are there any cases when equipment should be changed without triggering attached mwscripts? If yes, then probably current behavior of
actor:setEquipment
is correct and we just need an additional command to trigger an mwscript when needed. - Should
MWWorld::InventoryStore::equip
be changed to trigger scripts on attached objects? Or it is a low level function that shouldn't interfere with scripting in any way?