Merge pull request #5951 from Opuszek/fix_crashing_hero_spell_widget

Fixes crash on uncheck customize spell
This commit is contained in:
Ivan Savenko
2025-07-28 18:53:42 +03:00
committed by GitHub
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -1273,6 +1273,11 @@ void CGHeroInstance::removeSpellbook()
}
}
void CGHeroInstance::removeAllSpells()
{
spells.clear();
}
const std::set<SpellID> & CGHeroInstance::getSpellsInSpellbook() const
{
return spells;
+1
View File
@@ -157,6 +157,7 @@ public:
bool spellbookContainsSpell(const SpellID & spell) const;
std::vector<BonusSourceID> getSourcesForSpell(const SpellID & spell) const;
void removeSpellbook();
void removeAllSpells();
const std::set<SpellID> & getSpellsInSpellbook() const;
EAlignment getAlignment() const;
bool needsLastStack()const override;