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

Rumors: implement support for grail terrain rumor

This commit is contained in:
ArseniyShestakov
2015-12-01 04:57:52 +03:00
parent c5485ceede
commit ffcc5ccdd2
3 changed files with 23 additions and 17 deletions

View File

@@ -567,7 +567,7 @@ EPlayerStatus::EStatus CGameInfoCallback::getPlayerStatus(PlayerColor player, bo
std::string CGameInfoCallback::getTavernRumor(const CGObjectInstance * townOrTavern) const
{
std::string text = "";
std::string text = "", extraText = "";
if(gs->rumor.type == RumorState::RUMOR_NONE) // (version < 755 backward compatability
return text;
@@ -575,9 +575,14 @@ std::string CGameInfoCallback::getTavernRumor(const CGObjectInstance * townOrTav
switch(gs->rumor.type)
{
case RumorState::RUMOR_STATS:
text = boost::str(boost::format(VLC->generaltexth->allTexts[rumor.first]) % VLC->generaltexth->capColors[rumor.second]);
break;
if(rumor.first == 212)
extraText = VLC->generaltexth->arraytxt[158 + rumor.second];
else
extraText = VLC->generaltexth->capColors[rumor.second];
text = boost::str(boost::format(VLC->generaltexth->allTexts[rumor.first]) % extraText);
break;
case RumorState::RUMOR_MAP:
text = gs->map->rumors[rumor.first].text;
break;