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

Merge pull request #4457 from mikeiit/bug_double_dialog_7_days

Removed Redundant Info Window
This commit is contained in:
Ivan Savenko 2024-08-17 12:59:47 +03:00 committed by GitHub
commit 11ac768599
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1418,18 +1418,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);