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: