1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

Fix missing modded spells in magic guilds for h3m maps

This commit is contained in:
Ivan Savenko 2024-01-05 16:47:23 +02:00
parent 4b5b99aba3
commit 480a0f19c0

View File

@ -2223,17 +2223,10 @@ CGObjectInstance * CMapLoaderH3M::readTown(const int3 & position, std::shared_pt
}
{
std::set<SpellID> spellsMask;
std::set<SpellID> spellsMask = VLC->spellh->getDefaultAllowed(); // by default - include spells from mods
reader->readBitmaskSpells(spellsMask, true);
std::copy(spellsMask.begin(), spellsMask.end(), std::back_inserter(object->possibleSpells));
auto defaultAllowed = VLC->spellh->getDefaultAllowed();
//add all spells from mods
for(int i = features.spellsCount; i < defaultAllowed.size(); ++i)
if(defaultAllowed.count(i))
object->possibleSpells.emplace_back(i);
}
if(features.levelHOTA1)