1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

get rid of CBattleInfoCallback::battleCanCastThisSpell

This commit is contained in:
AlexVinS
2017-06-05 23:46:55 +03:00
parent 6c308956f9
commit 195e979a18
7 changed files with 30 additions and 44 deletions

View File

@ -4458,7 +4458,7 @@ bool CGameHandler::makeCustomAction(BattleAction &ba)
if (ba.selectedStack >= 0)
parameters.aimToStack(gs->curB->battleGetStackByID(ba.selectedStack, false));
ESpellCastProblem::ESpellCastProblem escp = gs->curB->battleCanCastThisSpell(h, s, ECastingMode::HERO_CASTING);//todo: should we check aimed cast?
ESpellCastProblem::ESpellCastProblem escp = s->canBeCast(gs->curB, ECastingMode::HERO_CASTING, h);//todo: should we check aimed cast?
if (escp != ESpellCastProblem::OK)
{
logGlobal->warn("Spell cannot be cast! Problem: %d", escp);