From 3ea7d58ca8b48ed252345fbad73dddbeea1815b4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 9 Nov 2013 10:34:46 +0100 Subject: [PATCH] Advance skill on successfull spell cast --- apps/openmw/CMakeLists.txt | 2 +- apps/openmw/mwworld/worldimp.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index f07bbab86b..e2dbf40de4 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -68,7 +68,7 @@ add_openmw_dir (mwclass add_openmw_dir (mwmechanics mechanicsmanagerimp stat character creaturestats magiceffects movement actors objects drawstate spells activespells npcstats aipackage aisequence alchemy aiwander aitravel aifollow - aiescort aiactivate repair enchanting pathfinding security + aiescort aiactivate repair enchanting pathfinding security spellsuccess ) add_openmw_dir (mwbase diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index a91f1e00c3..6c18ec4fd6 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2040,6 +2040,7 @@ namespace MWWorld return; } + actor.getClass().skillUsageSucceeded(actor, MWMechanics::spellSchoolToSkill(MWMechanics::getSpellSchool(selectedSpell, actor)), 0); actor.getClass().getCreatureStats(actor).getActiveSpells().addSpell(selectedSpell, actor, ESM::RT_Self); // TODO: RT_Range, RT_Touch