From 9de3abcb5f8cd5a5f7486cdf73b5729fc870761d Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 14 Jan 2014 03:34:11 +0100 Subject: [PATCH] Closes #1105: Do not reduce magicka if unable to cast --- apps/openmw/mwworld/worldimp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 620058c65f..f9899c3a20 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2075,8 +2075,11 @@ namespace MWWorld } // Reduce mana - magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost); - stats.setMagicka(magicka); + if (!fail) + { + magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost); + stats.setMagicka(magicka); + } } if (isPlayer && fail)