mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Update client/battle/BattleInterfaceClasses.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
parent
136f33f950
commit
405bc09780
@ -460,8 +460,9 @@ std::vector<std::tuple<SpellID, bool>> QuickSpellPanel::getSpells()
|
||||
if(spellIds[i] != SpellID::NONE)
|
||||
continue;
|
||||
|
||||
for(auto & availableSpell : CGI->spellh->objects)
|
||||
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()))
|
||||
{
|
||||
spellIds[i] = availableSpell->getId();
|
||||
|
Loading…
x
Reference in New Issue
Block a user