Laserlicht 1 år sedan
förälder
incheckning
52ae6a56f1
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      client/battle/BattleInterfaceClasses.cpp

+ 1 - 1
client/battle/BattleInterfaceClasses.cpp

@@ -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;