1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix build

This commit is contained in:
MichalZr6
2025-05-04 17:31:42 +02:00
parent eb3addd32e
commit ef95f34bdb
2 changed files with 4 additions and 20 deletions

View File

@@ -683,23 +683,7 @@ void MapController::modAssessmentObject(const CGObjectInstance * obj, ModCompati
for(const auto & spellID : town->obligatorySpells)
{
auto hero = dynamic_cast<CGHeroInstance *>(obj.get());
for(const auto & spellID : hero->getSpellsInSpellbook())
{
if(spellID == SpellID::PRESET || spellID == SpellID::SPELLBOOK_PRESET)
continue;
extractEntityMod(spellID.toEntity(LIBRARY));
}
for(const auto & [_, slotInfo] : hero->artifactsWorn)
{
extractEntityMod(slotInfo.getArt()->getTypeId().toEntity(LIBRARY));
}
for(const auto & art : hero->artifactsInBackpack)
{
extractEntityMod(art.getArt()->getTypeId().toEntity(LIBRARY));
}
extractEntityMod(spellID.toEntity(LIBRARY));
}
}
@@ -715,12 +699,12 @@ void MapController::modAssessmentObject(const CGObjectInstance * obj, ModCompati
for(const auto & [_, slotInfo] : hero->artifactsWorn)
{
extractEntityMod(slotInfo.artifact->getTypeId().toEntity(LIBRARY));
extractEntityMod(slotInfo.getArt()->getTypeId().toEntity(LIBRARY));
}
for(const auto & art : hero->artifactsInBackpack)
{
extractEntityMod(art.artifact->getTypeId().toEntity(LIBRARY));
extractEntityMod(art.getArt()->getTypeId().toEntity(LIBRARY));
}
}