mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:45:34 +00:00
Enchanting: use fEnchantmentConstantDurationMult and fEffectCostMult
This commit is contained in:
parent
871d59de6c
commit
cda2eea906
1 changed files with 7 additions and 5 deletions
|
@ -176,23 +176,25 @@ namespace MWMechanics
|
|||
int magMax = (it->mMagnMax == 0) ? 1 : it->mMagnMax;
|
||||
int area = (it->mArea == 0) ? 1 : it->mArea;
|
||||
|
||||
float magnitudeCost = 0;
|
||||
float magnitudeCost = (magMin + magMax) * baseCost * 0.05;
|
||||
if (mCastStyle == ESM::Enchantment::ConstantEffect)
|
||||
{
|
||||
magnitudeCost = (magMin + magMax) * baseCost * 2.5;
|
||||
magnitudeCost *= store.get<ESM::GameSetting>().find("fEnchantmentConstantDurationMult")->getFloat();
|
||||
}
|
||||
else
|
||||
{
|
||||
magnitudeCost = (magMin + magMax) * it->mDuration * baseCost * 0.025;
|
||||
magnitudeCost *= it->mDuration;
|
||||
if(it->mRange == ESM::RT_Target)
|
||||
magnitudeCost *= 1.5;
|
||||
}
|
||||
|
||||
float areaCost = area * 0.025 * baseCost;
|
||||
float areaCost = area * 0.05 * baseCost;
|
||||
if (it->mRange == ESM::RT_Target)
|
||||
areaCost *= 1.5;
|
||||
|
||||
enchantmentCost += (magnitudeCost + areaCost) * effectsLeftCnt;
|
||||
const float fEffectCostMult = store.get<ESM::GameSetting>().find("fEffectCostMult")->getFloat();
|
||||
|
||||
enchantmentCost += (magnitudeCost + areaCost) * fEffectCostMult * effectsLeftCnt;
|
||||
--effectsLeftCnt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue