mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 06:09:42 +00:00
Merge pull request #1770 from Capostrophic/open
Make Open spells casted by anything trigger player crime event (bug #4461)
This commit is contained in:
commit
f3923a41c0
2 changed files with 10 additions and 6 deletions
|
@ -44,6 +44,7 @@
|
||||||
Bug #4457: Item without CanCarry flag prevents shield autoequipping in dark areas
|
Bug #4457: Item without CanCarry flag prevents shield autoequipping in dark areas
|
||||||
Bug #4458: AiWander console command handles idle chances incorrectly
|
Bug #4458: AiWander console command handles idle chances incorrectly
|
||||||
Bug #4459: NotCell dialogue condition doesn't support partial matches
|
Bug #4459: NotCell dialogue condition doesn't support partial matches
|
||||||
|
Bug #4461: "Open" spell from non-player caster isn't a crime
|
||||||
Feature #4256: Implement ToggleBorders (TB) console command
|
Feature #4256: Implement ToggleBorders (TB) console command
|
||||||
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
|
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
|
||||||
Feature #4222: 360° screenshots
|
Feature #4222: 360° screenshots
|
||||||
|
|
|
@ -644,8 +644,9 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::MagicEffect *magiceffect = store.get<ESM::MagicEffect>().find(effectId);
|
const ESM::MagicEffect *magiceffect = store.get<ESM::MagicEffect>().find(effectId);
|
||||||
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(target);
|
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(target);
|
||||||
animation->addSpellCastGlow(magiceffect);
|
if (animation)
|
||||||
|
animation->addSpellCastGlow(magiceffect);
|
||||||
if (target.getCellRef().getLockLevel() < magnitude) //If the door is not already locked to a higher value, lock it to spell magnitude
|
if (target.getCellRef().getLockLevel() < magnitude) //If the door is not already locked to a higher value, lock it to spell magnitude
|
||||||
{
|
{
|
||||||
if (caster == getPlayer())
|
if (caster == getPlayer())
|
||||||
|
@ -658,15 +659,17 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::MagicEffect *magiceffect = store.get<ESM::MagicEffect>().find(effectId);
|
const ESM::MagicEffect *magiceffect = store.get<ESM::MagicEffect>().find(effectId);
|
||||||
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(target);
|
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(target);
|
||||||
animation->addSpellCastGlow(magiceffect);
|
if (animation)
|
||||||
|
animation->addSpellCastGlow(magiceffect);
|
||||||
if (target.getCellRef().getLockLevel() <= magnitude)
|
if (target.getCellRef().getLockLevel() <= magnitude)
|
||||||
{
|
{
|
||||||
if (target.getCellRef().getLockLevel() > 0)
|
if (target.getCellRef().getLockLevel() > 0)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D(target, "Open Lock", 1.f, 1.f);
|
MWBase::Environment::get().getSoundManager()->playSound3D(target, "Open Lock", 1.f, 1.f);
|
||||||
if (!caster.isEmpty() && caster.getClass().isActor())
|
if (!caster.isEmpty())
|
||||||
MWBase::Environment::get().getMechanicsManager()->objectOpened(caster, target);
|
MWBase::Environment::get().getMechanicsManager()->objectOpened(getPlayer(), target);
|
||||||
|
// Use the player instead of the caster for vanilla crime compatibility
|
||||||
|
|
||||||
if (caster == getPlayer())
|
if (caster == getPlayer())
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
|
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
|
||||||
|
|
Loading…
Reference in a new issue