1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-31 17:36:44 +00:00

forget about the setting till #2887 is implemented at least

This commit is contained in:
Evil Eye 2018-09-08 11:21:43 +02:00
parent bbcdfd4078
commit 6705e5aae4
5 changed files with 8 additions and 17 deletions

View file

@ -449,13 +449,11 @@ namespace MWGui
const MWWorld::ESMStore &store =
MWBase::Environment::get().getWorld()->getStore();
static const bool vanillaCost = Settings::Manager::getBool("expensive spells", "Game");
for (std::vector<ESM::ENAMstruct>::const_iterator it = mEffects.begin(); it != mEffects.end(); ++it)
{
const ESM::ENAMstruct& effect = *it;
y += std::max(1.f, MWMechanics::calcEffectCost(effect, vanillaCost));
y += std::max(1.f, MWMechanics::calcEffectCost(effect));
if (effect.mRange == ESM::RT_Target)
y *= 1.5;

View file

@ -3,7 +3,6 @@
#include <components/esm/loadmgef.hpp>
#include <components/esm/loadspel.hpp>
#include <components/settings/settings.hpp>
#include "windowbase.hpp"
#include "referenceinterface.hpp"

View file

@ -49,13 +49,13 @@ namespace MWMechanics
return schoolSkillMap[school];
}
float calcEffectCost(const ESM::ENAMstruct& effect, const bool customSpellCost)
float calcEffectCost(const ESM::ENAMstruct& effect)
{
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effect.mEffectID);
return calcEffectCost(effect, magicEffect, customSpellCost);
return calcEffectCost(effect, magicEffect);
}
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect, const bool customSpellCost)
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect)
{
int minMagn = 1;
int maxMagn = 1;
@ -65,12 +65,9 @@ namespace MWMechanics
maxMagn = effect.mMagnMax;
}
int duration = 0;
int duration = 1;
if (!(magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration))
duration = effect.mDuration;
//The wonders of vanilla spellmaking
if (customSpellCost && duration < 1)
duration = 1;
static const float fEffectCostMult = MWBase::Environment::get().getWorld()->getStore()
.get<ESM::GameSetting>().find("fEffectCostMult")->mValue.getFloat();

View file

@ -25,8 +25,8 @@ namespace MWMechanics
ESM::Skill::SkillEnum spellSchoolToSkill(int school);
float calcEffectCost(const ESM::ENAMstruct& effect, const bool customSpellCost = false);
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect, const bool customSpellCost = false);
float calcEffectCost(const ESM::ENAMstruct& effect);
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect);
bool isSummoningEffect(int effectId);

View file

@ -228,10 +228,7 @@ barter disposition change is permanent = false
# Uses the MCP formula (damage * (strength / 40)) to factor Strength into hand-to-hand combat.
# (0 means it does not factor it in, 1 means it factors into werewolves damage calculation and
# 2 means werewolves are ignored)
strength influences hand to hand = 0
# Makes custom spells cost the same as in vanilla
expensive spells = true
strength influences hand to hand = 0
[General]