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

Use inheritance instead of composition for campaign header

This commit is contained in:
Ivan Savenko
2023-06-26 01:07:55 +03:00
parent a08fe09517
commit f6b2f58da9
15 changed files with 183 additions and 132 deletions

View File

@@ -62,8 +62,8 @@ PlayerSettings * StartInfo::getPlayersSettings(const ui8 connectedPlayerId)
std::string StartInfo::getCampaignName() const
{
if(campState->getHeader().name.empty())
return campState->getHeader().name;
if(campState->getName().empty())
return campState->getName();
else
return VLC->generaltexth->allTexts[508];
}