1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Fix spell creation magicka cost (Fixes #1763)

This commit is contained in:
MiroslavR 2014-08-06 13:19:40 +02:00
parent 8951974208
commit 8707f7b116

View File

@ -398,7 +398,7 @@ namespace MWGui
for (std::vector<ESM::ENAMstruct>::const_iterator it = mEffects.begin(); it != mEffects.end(); ++it)
{
float x = 0.5 * it->mMagnMin + it->mMagnMax;
float x = 0.5 * (it->mMagnMin + it->mMagnMax);
const ESM::MagicEffect* effect =
store.get<ESM::MagicEffect>().find(it->mEffectID);
@ -413,7 +413,7 @@ namespace MWGui
y += x * fEffectCostMult;
y = std::max(1.f,y);
if (effect->mData.mFlags & ESM::MagicEffect::CastTarget)
if (it->mRange == ESM::RT_Target)
y *= 1.5;
}