1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00
This commit is contained in:
Laserlicht
2024-08-01 23:35:07 +02:00
parent 6f604444c6
commit 52ae6a56f1

View File

@@ -463,7 +463,7 @@ std::vector<std::tuple<SpellID, bool>> QuickSpellPanel::getSpells()
for(const auto & availableSpellID : CGI->spellh->getDefaultAllowed())
{
const auto * availableSpell = availableSpellID.toSpell();
if(!availableSpell->isAdventure() && !availableSpell->isCreatureAbility() && hero->canCastThisSpell(availableSpell.get()) && !vstd::contains(spellIds, availableSpell->getId()))
if(!availableSpell->isAdventure() && !availableSpell->isCreatureAbility() && hero->canCastThisSpell(availableSpell) && !vstd::contains(spellIds, availableSpell->getId()))
{
spellIds[i] = availableSpell->getId();
break;