From dbf7f0b4aa1896f7f54236cccff0131165aba377 Mon Sep 17 00:00:00 2001 From: Vladimir Olteanu Date: Sun, 26 Jun 2022 16:58:01 +0300 Subject: [PATCH] Remove spurious "I can't cast that here" --- Source/player.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/player.cpp b/Source/player.cpp index eb80f131b..985243057 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -3567,11 +3567,6 @@ void CheckPlrSpell(bool isShiftHeld, spell_id spellID, spell_type spellType) return; } - if (leveltype == DTYPE_TOWN && !spelldata[spellID].sTownSpell) { - myPlayer.Say(HeroSpeech::ICantCastThatHere); - return; - } - if (ControlMode == ControlTypes::KeyboardAndMouse) { if (pcurs != CURSOR_HAND) return; @@ -3591,6 +3586,12 @@ void CheckPlrSpell(bool isShiftHeld, spell_id spellID, spell_type spellType) return; } } + + if (leveltype == DTYPE_TOWN && !spelldata[spellID].sTownSpell) { + myPlayer.Say(HeroSpeech::ICantCastThatHere); + return; + } + SpellCheckResult spellcheck = SpellCheckResult::Success; switch (spellType) { case RSPLTYPE_SKILL: