mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Moved FoW management from CGObjectInstance to callback
This commit is contained in:
@ -1048,7 +1048,12 @@ void CGObservatory::onHeroVisit( const CGHeroInstance * h ) const
|
||||
case Obj::COVER_OF_DARKNESS:
|
||||
{
|
||||
iw.text.addTxt (MetaString::ADVOB_TXT, 31);
|
||||
hideTiles(h->tempOwner, 20);
|
||||
for (auto player : cb->gameState()->players)
|
||||
{
|
||||
if (cb->getPlayerStatus(player.first) == EPlayerStatus::INGAME &&
|
||||
cb->getPlayerRelations(player.first, h->tempOwner) == PlayerRelations::ENEMIES)
|
||||
cb->changeFogOfWar(visitablePos(), 20, player.first, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user