1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Bonus Source ID now uses metaidentifier

This commit is contained in:
Ivan Savenko
2023-10-10 18:05:18 +03:00
parent 77facf9387
commit b394158dc9
85 changed files with 295 additions and 262 deletions

View File

@@ -314,8 +314,8 @@ void CGameStateCampaign::giveCampaignBonusToHero(CGHeroInstance * hero)
if(val == 0)
continue;
int currentScenario = static_cast<int>(*gameState->scenarioOps->campState->currentScenario());
auto bb = std::make_shared<Bonus>( BonusDuration::PERMANENT, BonusType::PRIMARY_SKILL, BonusSource::CAMPAIGN_BONUS, val, currentScenario, TBonusSubtype(g) );
auto currentScenario = *gameState->scenarioOps->campState->currentScenario();
auto bb = std::make_shared<Bonus>( BonusDuration::PERMANENT, BonusType::PRIMARY_SKILL, BonusSource::CAMPAIGN_BONUS, val, TBonusSourceID(currentScenario), TBonusSubtype(g) );
hero->addNewBonus(bb);
}
break;