1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Removed Redundant Info Window

Removed redundant warning when a human player loses the last town. #4418
This commit is contained in:
Mike 2024-08-15 19:41:06 -07:00
parent 84f29183c8
commit 8a9fd79aba

View File

@ -1409,18 +1409,6 @@ void CGameHandler::setOwner(const CGObjectInstance * obj, const PlayerColor owne
if (town->hasBuilt(BuildingSubID::PORTAL_OF_SUMMONING))
setPortalDwelling(town, true, false);
}
if (oldOwner.isValidPlayer()) //old owner is real player
{
if (getPlayerState(oldOwner)->towns.empty() && getPlayerState(oldOwner)->status != EPlayerStatus::LOSER) //previous player lost last town
{
InfoWindow iw;
iw.player = oldOwner;
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 6); //%s, you have lost your last town. If you do not conquer another town in the next week, you will be eliminated.
iw.text.replaceName(oldOwner);
sendAndApply(&iw);
}
}
}
const PlayerState * p = getPlayerState(owner);