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:
parent
4b5b99aba3
commit
480a0f19c0
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user