1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Remove redundant lookup

This commit is contained in:
Evil Eye 2023-03-19 10:42:19 +01:00
parent 5db11d81fe
commit 0b0f02d08b

View File

@ -133,8 +133,7 @@ namespace MWClass
if (animation)
{
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
int index = ESM::MagicEffect::effectStringToId("sEffectTelekinesis");
const ESM::MagicEffect* effect = store.get<ESM::MagicEffect>().find(index);
const ESM::MagicEffect* effect = store.get<ESM::MagicEffect>().find(ESM::MagicEffect::Telekinesis);
animation->addSpellCastGlow(
effect, 1); // 1 second glow to match the time taken for a door opening or closing