summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-12-22 17:00:35 -0500
committerNeil Moore <neil@s-z.org>2012-12-22 17:00:35 -0500
commit5e01d17691d4a7594e7c3392e6af78001b524892 (patch)
treef1d7f3b4fb94af90636ebeab7349530457061eed /crawl-ref/source/skills.cc
parentf41d6fba04827345ade85f1207dd4344dc8e5af6 (diff)
downloadcrawl-ref-5e01d17691d4a7594e7c3392e6af78001b524892.tar.gz
crawl-ref-5e01d17691d4a7594e7c3392e6af78001b524892.zip
Don't disable the manual skill on load (#6458).
Reading a (non-useless) manual enabled training for its skill, even if training would otherwise be blocked (e.g. a manual of Shields without a shield, or a manual of Ice Magic with no relevant spells). However, on save and reload the skill was marked as untrainable. Fix this by always removing the player's manual_skill from stop_train.
Diffstat (limited to 'crawl-ref/source/skills.cc')
-rw-r--r--crawl-ref/source/skills.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index e5a675e90e..841b071288 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -399,6 +399,9 @@ static void _check_stop_train()
_check_spell_skills();
_check_abil_skills();
+ if (you.manual_skill != SK_NONE)
+ you.stop_train.erase(you.manual_skill);
+
if (you.stop_train.empty())
return;