1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 12:15:41 +00:00

Merge branch 'lit_ur' into 'master'

Fix Dagoth Ur's Fire Shield not being visible

See merge request OpenMW/openmw!1514
This commit is contained in:
psi29a 2022-01-04 10:22:45 +00:00
commit e16245278e
2 changed files with 3 additions and 4 deletions

View file

@ -218,8 +218,7 @@ namespace MWMechanics
return params.mSlot == slotIndex && params.mType == ESM::ActiveSpells::Type_Enchantment && params.mId == slot->getCellRef().getRefId();
}) != mSpells.end())
continue;
ActiveSpellParams params(*slot, enchantment, slotIndex, ptr);
mSpells.emplace_back(params);
const ActiveSpellParams& params = mSpells.emplace_back(ActiveSpellParams{*slot, enchantment, slotIndex, ptr});
for(const auto& effect : params.mEffects)
MWMechanics::playEffects(ptr, *world->getStore().get<ESM::MagicEffect>().find(effect.mEffectId), playNonLooping);
}

View file

@ -914,8 +914,8 @@ MagicApplicationResult applyMagicEffect(const MWWorld::Ptr& target, const MWWorl
oldMagnitude = effect.mMagnitude;
else
{
if(spellParams.getType() == ESM::ActiveSpells::Type_Consumable || spellParams.getType() == ESM::ActiveSpells::Type_Temporary)
playEffects(target, *magicEffect);
if(spellParams.getType() != ESM::ActiveSpells::Type_Enchantment)
playEffects(target, *magicEffect, spellParams.getType() == ESM::ActiveSpells::Type_Consumable || spellParams.getType() == ESM::ActiveSpells::Type_Temporary);
if(effect.mEffectId == ESM::MagicEffect::Soultrap && !target.getClass().isNpc() && target.getType() == ESM::Creature::sRecordId && target.get<ESM::Creature>()->mBase->mData.mSoul == 0 && caster == getPlayer())
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicInvalidTarget}");
}