1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* town visiting

* improvements in garrisons
This commit is contained in:
Michał W. Urbańczyk
2008-01-28 14:01:09 +00:00
parent a30a6bc507
commit e6de19e17d
11 changed files with 155 additions and 33 deletions

View File

@@ -168,6 +168,8 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, bool Activate)
statusbar = new CStatusBar(8,555,"TSTATBAR.bmp",732);
std::set< std::pair<int,int> > s; //group - id
//buildings
for (std::set<int>::const_iterator i=town->builtBuildings.begin();i!=town->builtBuildings.end();i++)
{
if(CGI->townh->structures.find(town->subID) != CGI->townh->structures.end()) //we have info about structures in this town
@@ -218,8 +220,10 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, bool Activate)
break;
}
//garrison
std::sort(buildings.begin(),buildings.end(),srthlp);
garr = new CGarrisonInt(305,387,4,32,townInt,243,13,&town->garrison,(town->garrisonHero)?(&town->garrisonHero->army):(NULL));
garr = new CGarrisonInt(305,387,4,32,townInt,243,13,town,town->visitingHero);
if(Activate)
{