1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

MetaIdentifier now uses std::variant internally

This commit is contained in:
Ivan Savenko
2023-10-14 18:13:59 +03:00
parent b394158dc9
commit 80e6485965
61 changed files with 487 additions and 421 deletions

View File

@@ -17,7 +17,6 @@
#include "CGeneralTextHandler.h"
#include "StartInfo.h" // for StartInfo
#include "battle/BattleInfo.h" // for BattleInfo
#include "bonuses/BonusSubtypes.h"
#include "NetPacks.h" // for InfoWindow
#include "GameSettings.h"
#include "TerrainHandler.h"
@@ -269,7 +268,7 @@ bool CGameInfoCallback::getTownInfo(const CGObjectInstance * town, InfoAboutTown
{
const auto * selectedHero = dynamic_cast<const CGHeroInstance *>(selectedObject);
if(nullptr != selectedHero)
detailed = selectedHero->hasVisions(town, BonusSubtypes::visionsTowns);
detailed = selectedHero->hasVisions(town, BonusSubtypeID::visionsTowns);
}
dest.initFromTown(dynamic_cast<const CGTownInstance *>(town), detailed);
@@ -323,7 +322,7 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
{
const auto * selectedHero = dynamic_cast<const CGHeroInstance *>(selectedObject);
if(nullptr != selectedHero)
if(selectedHero->hasVisions(hero, BonusSubtypes::visionsHeroes))
if(selectedHero->hasVisions(hero, BonusSubtypeID::visionsHeroes))
infoLevel = InfoAboutHero::EInfoLevel::DETAILED;
}