1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Fix Dagoth Ur's Fire Shield not being visible

This commit is contained in:
Evil Eye 2021-12-27 22:30:25 +01:00
parent c166341ec0
commit dc946d0a47
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}");
}