1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:53:53 +00:00

Avoid redundant call

This commit is contained in:
Andrei Kortunov 2020-07-08 14:12:55 +04:00
parent b372ac9119
commit 58e3900ea0

View file

@ -1907,7 +1907,7 @@ namespace MWWorld
std::string enchantId = selectedEnchantItem.getClass().getEnchantment(selectedEnchantItem);
if (!enchantId.empty())
{
const ESM::Enchantment* ench = mStore.get<ESM::Enchantment>().search(selectedEnchantItem.getClass().getEnchantment(selectedEnchantItem));
const ESM::Enchantment* ench = mStore.get<ESM::Enchantment>().search(enchantId);
if (ench)
preloadEffects(&ench->mEffects);
}