mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
get rid of CBattleInfoCallback::battleCanCastThisSpell
This commit is contained in:
@@ -194,8 +194,7 @@ void CBattleAI::attemptCastingSpell()
|
||||
std::vector<const CSpell*> possibleSpells;
|
||||
vstd::copy_if(VLC->spellh->objects, std::back_inserter(possibleSpells), [this, hero] (const CSpell *s) -> bool
|
||||
{
|
||||
auto problem = getCbc()->battleCanCastThisSpell(hero, s, ECastingMode::HERO_CASTING);
|
||||
return problem == ESpellCastProblem::OK;
|
||||
return s->canBeCast(getCbc().get(), ECastingMode::HERO_CASTING, hero) == ESpellCastProblem::OK;
|
||||
});
|
||||
LOGFL("I can cast %d spells.", possibleSpells.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user