1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

get rid of CPlayerBattleCallback::battleCanCastThisSpell

This commit is contained in:
AlexVinS
2017-06-05 22:53:42 +03:00
parent 4d430f6ad8
commit 2cfb2e6ae0
4 changed files with 4 additions and 17 deletions

View File

@@ -547,9 +547,9 @@ void CSpellWindow::SpellArea::clickLeft(tribool down, bool previousState)
}
//we will cast a spell
if(mySpell->combatSpell && owner->myInt->battleInt) //if battle window is open
if(mySpell->isCombatSpell() && owner->myInt->battleInt) //if battle window is open
{
ESpellCastProblem::ESpellCastProblem problem = owner->myInt->cb->battleCanCastThisSpell(mySpell);
ESpellCastProblem::ESpellCastProblem problem = owner->myInt->cb->battleCanCastThisSpell(owner->myHero, mySpell, ECastingMode::HERO_CASTING);
switch (problem)
{
case ESpellCastProblem::OK: