mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix missing modded spells in magic guilds for h3m maps
This commit is contained in:
@@ -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);
|
reader->readBitmaskSpells(spellsMask, true);
|
||||||
std::copy(spellsMask.begin(), spellsMask.end(), std::back_inserter(object->possibleSpells));
|
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)
|
if(features.levelHOTA1)
|
||||||
|
Reference in New Issue
Block a user