mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
CPlayerInterface::buildChanged: fix update of advInt townlist
Fix issue when town icon on adventure interface is not updated from village after vcmiarmenelos cheat used. This didn't occur during normal gameplay since usually castleInt is active when you build something.
This commit is contained in:
parent
5a387cdaf1
commit
f020fa06fd
@ -612,22 +612,25 @@ void CPlayerInterface::buildChanged(const CGTownInstance *town, BuildingID build
|
||||
break;
|
||||
}
|
||||
|
||||
if(!castleInt)
|
||||
return;
|
||||
if(castleInt->town!=town)
|
||||
return;
|
||||
switch(what)
|
||||
if(castleInt)
|
||||
{
|
||||
case 1:
|
||||
CCS->soundh->playSound(soundBase::newBuilding);
|
||||
castleInt->addBuilding(buildingID);
|
||||
break;
|
||||
case 2:
|
||||
castleInt->removeBuilding(buildingID);
|
||||
break;
|
||||
castleInt->townlist->update(town);
|
||||
|
||||
if(castleInt->town == town)
|
||||
{
|
||||
switch(what)
|
||||
{
|
||||
case 1:
|
||||
CCS->soundh->playSound(soundBase::newBuilding);
|
||||
castleInt->addBuilding(buildingID);
|
||||
break;
|
||||
case 2:
|
||||
castleInt->removeBuilding(buildingID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
adventureInt->townList.update(town);
|
||||
castleInt->townlist->update(town);
|
||||
}
|
||||
|
||||
void CPlayerInterface::battleStartBefore(const CCreatureSet *army1, const CCreatureSet *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user