"upgrade finished" message only for own faction.

This commit is contained in:
titiger 2015-11-18 21:23:27 +01:00
parent 72b3d3008d
commit 405f327836
1 changed files with 4 additions and 2 deletions

View File

@ -887,8 +887,10 @@ void Faction::cancelUpgrade(const UpgradeType *ut){
void Faction::finishUpgrade(const UpgradeType *ut){
upgradeManager.finishUpgrade(ut);
Console *console=world->getGame()->getConsole();
console->addStdMessage("UpgradeFinished",": " + formatString(ut->getName(true)));
if(world->getThisFaction()!=NULL && this->getIndex()==world->getThisFaction()->getIndex()){
Console *console=world->getGame()->getConsole();
console->addStdMessage("UpgradeFinished",": " + formatString(ut->getName(true)));
}
for(int i=0; i<getUnitCount(); ++i){
getUnit(i)->applyUpgrade(ut);
}