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

String building id

This commit is contained in:
nordsoft
2023-04-09 04:53:06 +04:00
parent 6ed8f748b3
commit 08809f1cdc
3 changed files with 14 additions and 4 deletions

View File

@@ -24,6 +24,7 @@
#include "../mapObjects/CGHeroInstance.h"//for hero crossover
#include "../CHeroHandler.h"
#include "../Languages.h"
#include "../StringConstants.h"
#include "CMapService.h"
#include "CMap.h"
#include "CMapInfo.h"
@@ -319,7 +320,7 @@ CScenarioTravel CCampaignHandler::readScenarioTravelFromJson(JsonNode & reader,
bonus.info2 = bjson["amount"].Integer();
}
else if(bonus.type == CScenarioTravel::STravelBonus::EBonusType::BUILDING)
bonus.info1 = bjson["type"].Integer(); //VLC->modh->identifiers.getIdentifier(CModHandler::scopeMap(), "buildings", bjson["hero"].String()).get();
bonus.info1 = vstd::find_pos(EBuildingType::names, bjson["type"].String());
else
{
if(int heroId = heroSpecialMap[bjson["hero"].String()])