forked from mirror/openmw-tes3mp
Make Open spells casted by anything trigger player crime event (fixes #4461)
This commit is contained in:
parent
101f0b1579
commit
0c4fa55f16
1 changed files with 3 additions and 2 deletions
|
@ -665,8 +665,9 @@ namespace MWMechanics
|
|||
if (target.getCellRef().getLockLevel() > 0)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound3D(target, "Open Lock", 1.f, 1.f);
|
||||
if (!caster.isEmpty() && caster.getClass().isActor())
|
||||
MWBase::Environment::get().getMechanicsManager()->objectOpened(caster, target);
|
||||
if (!caster.isEmpty())
|
||||
MWBase::Environment::get().getMechanicsManager()->objectOpened(getPlayer(), target);
|
||||
// Use the player instead of the caster for vanilla crime compatibility
|
||||
|
||||
if (caster == getPlayer())
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
|
||||
|
|
Loading…
Reference in a new issue