1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Merge pull request #3354 from dydzio0614/antimagic-garrison

Add missing antimagic functionality to antimagic garrisons
This commit is contained in:
Ivan Savenko
2023-12-22 16:33:39 +02:00
committed by GitHub
5 changed files with 32 additions and 3 deletions

View File

@@ -557,6 +557,15 @@ void BattleWindow::bSpellf()
LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[683])
% heroName % CGI->artifacts()->getByIndex(artID)->getNameTranslated()));
}
else if(blockingBonus->source == BonusSource::OBJECT_TYPE)
{
if(blockingBonus->sid.as<MapObjectID>() == Obj::GARRISON || blockingBonus->sid.as<MapObjectID>() == Obj::GARRISON2)
LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[684]);
}
}
else
{
logGlobal->warn("Unexpected problem with readiness to cast spell");
}
}