1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Refactoring of campaign handler: rename types and use strong typing

This commit is contained in:
Ivan Savenko
2023-06-25 21:16:03 +03:00
parent 453d441562
commit d1e5a347ff
29 changed files with 419 additions and 397 deletions

View File

@@ -922,8 +922,8 @@ void CCastleBuildings::enterMagesGuild()
{
const StartInfo *si = LOCPLINT->cb->getStartInfo();
// it would be nice to find a way to move this hack to config/mapOverrides.json
if(si && si->campState && si->campState->camp && // We're in campaign,
(si->campState->camp->header.filename == "DATA/YOG.H3C") && // which is "Birth of a Barbarian",
if(si && si->campState && si->campState && // We're in campaign,
(si->campState->header.filename == "DATA/YOG.H3C") && // which is "Birth of a Barbarian",
(hero->subID == 45)) // and the hero is Yog (based on Solmyr)
{
// "Yog has given up magic in all its forms..."