1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Thieves Guild: fix tavern map object, lvl 0 when no taverns owned

We also now check not number of towns, but only towns that has tavern built. Also according to original mechanics all taverns always display information based on your number of taverns and not number of taverns of object owner.
This commit is contained in:
ArseniyShestakov
2015-12-04 18:38:57 +03:00
parent 3b3c49420f
commit 2a63ba148a
3 changed files with 13 additions and 4 deletions

View File

@ -2603,13 +2603,15 @@ void CGameState::obtainPlayersStats(SThievesGuildInfo & tgi, int level)
tgi.playerColors.push_back(elem.second.color);
}
if(level >= 1) //num of towns & num of heroes
if(level >= 0) //num of towns & num of heroes
{
//num of towns
FILL_FIELD(numOfTowns, g->second.towns.size())
//num of heroes
FILL_FIELD(numOfHeroes, g->second.heroes.size())
//best hero's portrait
}
if(level >= 1) //best hero's portrait
{
for(auto g = players.cbegin(); g != players.cend(); ++g)
{
if(playerInactive(g->second.color))