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

thievesGuild support

This commit is contained in:
Laserlicht
2024-05-30 21:58:35 +02:00
parent 3f9e53acc8
commit 9c1ce214fc
4 changed files with 12 additions and 3 deletions

View File

@@ -224,15 +224,17 @@ void CGameInfoCallback::getThievesGuildInfo(SThievesGuildInfo & thi, const CGObj
ERROR_RET_IF(obj->ID == Obj::TOWN && !canGetFullInfo(obj), "Cannot get info about town guild object!");
//TODO: advmap object -> check if they're visited by our hero
if(obj->ID == Obj::TOWN || obj->ID == Obj::TAVERN)
if(obj->ID == Obj::TOWN || obj->ID == Obj::TAVERN)
{
int taverns = 0;
for(auto town : gs->players[*getPlayerID()].towns)
{
if(town->hasBuilt(BuildingID::TAVERN))
taverns++;
if(town->hasBuilt(BuildingSubID::THIEVES_GUILD))
taverns += 2;
}
gs->obtainPlayersStats(thi, taverns);
}
else if(obj->ID == Obj::DEN_OF_THIEVES)