|
|
|
@ -1144,27 +1144,17 @@ namespace MWRender
|
|
|
|
|
if (enchantmentName.empty())
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
const ESM::Enchantment* enchantment = NULL;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
enchantment = MWBase::Environment::get().getWorld()->getStore().get<ESM::Enchantment>().find(enchantmentName);
|
|
|
|
|
}
|
|
|
|
|
catch (const std::runtime_error& ex)
|
|
|
|
|
{
|
|
|
|
|
const ESM::Enchantment* enchantment = MWBase::Environment::get().getWorld()->getStore().get<ESM::Enchantment>().search(enchantmentName);
|
|
|
|
|
if (!enchantment)
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assert (enchantment->mEffects.mList.size());
|
|
|
|
|
|
|
|
|
|
const ESM::MagicEffect* magicEffect = NULL;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(
|
|
|
|
|
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().search(
|
|
|
|
|
enchantment->mEffects.mList.front().mEffectID);
|
|
|
|
|
}
|
|
|
|
|
catch (const std::runtime_error& ex)
|
|
|
|
|
{
|
|
|
|
|
if (!magicEffect)
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result.x() = magicEffect->mData.mRed / 255.f;
|
|
|
|
|
result.y() = magicEffect->mData.mGreen / 255.f;
|
|
|
|
|
result.z() = magicEffect->mData.mBlue / 255.f;
|
|
|
|
|