1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Use enum instead of mix of bool's and int's for tile reveal

This commit is contained in:
Ivan Savenko
2023-10-04 15:31:42 +03:00
parent 98fd939ed6
commit dd841bdaa7
16 changed files with 55 additions and 58 deletions

View File

@ -1141,14 +1141,14 @@ void CGMagi::onHeroVisit(const CGHeroInstance * h) const
FoWChange fw;
fw.player = h->tempOwner;
fw.mode = FoWChange::Mode::REVEAL;
fw.mode = ETileVisibility::REVEALED;
fw.waitForDialogs = true;
for(const auto & it : eyelist[subID])
{
const CGObjectInstance *eye = cb->getObj(it);
cb->getTilesInRange (fw.tiles, eye->pos, 10, h->tempOwner, 1);
cb->getTilesInRange (fw.tiles, eye->pos, 10, ETileVisibility::HIDDEN, h->tempOwner);
cb->sendAndApply(&fw);
cv.pos = eye->pos;