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:
parent
8951974208
commit
8707f7b116
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user