1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

- implemented Hill Fort (minor issue - you can do ANY upgrades, including archers to sharpshooters without Gelu and so on)

- fixed some g++ errors in macroses
- minor tweaks
This commit is contained in:
Ivan Savenko
2010-07-22 00:32:45 +00:00
parent 2f996f14ba
commit 215dc95acb
15 changed files with 360 additions and 89 deletions

View File

@@ -486,19 +486,12 @@ void CPlayerInterface::garrisonChanged(const CGObjectInstance * obj)
boost::unique_lock<boost::recursive_mutex> un(*pim);
updateInfo(obj);
bool wasGarrison = false;
for(std::list<IShowActivable*>::iterator i = GH.listInt.begin(); i != GH.listInt.end(); i++)
{
if((*i)->type & IShowActivable::WITH_GARRISON)
{
CWindowWithGarrison *wwg = static_cast<CWindowWithGarrison*>(*i);
wwg->garr->recreateSlots();
wasGarrison = true;
}
else if(CKingdomInterface *cki = dynamic_cast<CKingdomInterface*>(*i))
{//a cheat for Kingdom Overview window (it has CWindowWithGarrison-childrens which are not present in ListInt)
//need to create "Garrison Holder" class thingy
cki->updateAllGarrisons();
CGarrisonHolder *cgh = static_cast<CGarrisonHolder*>(*i);
cgh->updateGarrisons();
}
else if(CTradeWindow *cmw = dynamic_cast<CTradeWindow*>(*i))
{
@@ -2037,6 +2030,12 @@ void CPlayerInterface::showUniversityWindow(const IMarket *market, const CGHeroI
GH.pushInt(cuw);
}
void CPlayerInterface::showHillFortWindow(const CGObjectInstance *object, const CGHeroInstance *visitor)
{
CHillFortWindow *chfw = new CHillFortWindow(visitor, object);
GH.pushInt(chfw);
}
void CPlayerInterface::availableArtifactsChanged(const CGBlackMarket *bm /*= NULL*/)
{
if(CMarketplaceWindow *cmw = dynamic_cast<CMarketplaceWindow*>(GH.topInt()))