From 56edc1b2139bbcf152c0a8285b92352f923d3c93 Mon Sep 17 00:00:00 2001 From: Miroslav Puda Date: Mon, 27 May 2013 12:26:06 +0200 Subject: [PATCH] Correction of getting spell range "Target". --- apps/openmw/mwmechanics/enchanting.cpp | 2 +- apps/openmw/mwmechanics/enchanting.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/enchanting.cpp b/apps/openmw/mwmechanics/enchanting.cpp index ded75f03a..e53a14120 100644 --- a/apps/openmw/mwmechanics/enchanting.cpp +++ b/apps/openmw/mwmechanics/enchanting.cpp @@ -160,7 +160,7 @@ namespace MWMechanics cost1 *= constDurationMultipler; cost2 *= 2; } - if(effect->mData.mFlags & ESM::MagicEffect::CastTarget) + if(it->mRange == ESM::RT_Target) cost1 *= 1.5; float fullcost = cost1+cost2; diff --git a/apps/openmw/mwmechanics/enchanting.hpp b/apps/openmw/mwmechanics/enchanting.hpp index 2831f9ddb..d7acf60e7 100644 --- a/apps/openmw/mwmechanics/enchanting.hpp +++ b/apps/openmw/mwmechanics/enchanting.hpp @@ -3,6 +3,7 @@ #include #include "../mwworld/ptr.hpp" #include +#include #include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" namespace MWMechanics