Bazaar developer reference

CvPlayer::SetHasLostCapital(bool, PlayerTypes)

Defined in
CvPlayer.cpp, line 16271
Class
CvPlayer
Hook name
CivHooks::CvPlayer_SetHasLostCapital

Hooks

static bool BeforeCvPlayer_SetHasLostCapital(CvPlayer* self, bool bValue, PlayerTypes eConqueror);static void AfterCvPlayer_SetHasLostCapital(CvPlayer* self, bool bValue, PlayerTypes eConqueror);static void ReplaceCvPlayer_SetHasLostCapital(void (*original)(CvPlayer*, bool, PlayerTypes), CvPlayer* self, bool bValue, PlayerTypes eConqueror);CivRegisterBefore<CivHooks::CvPlayer_SetHasLostCapital>(host, &BeforeCvPlayer_SetHasLostCapital);CivRegisterAfter<CivHooks::CvPlayer_SetHasLostCapital>(host, &AfterCvPlayer_SetHasLostCapital);CivRegisterReplace<CivHooks::CvPlayer_SetHasLostCapital>(host, &ReplaceCvPlayer_SetHasLostCapital);

Code

16270/// Sets us to having lost our capital in war16271void CvPlayer::SetHasLostCapital(bool bValue, PlayerTypes eConqueror)16272{16273	if(bValue != m_bLostCapital)16274	{16275		m_bLostCapital = bValue;16276		m_eConqueror = eConqueror;1627716278		// Don't really care if a City State lost its capital16279		if(!isMinorCiv())16280		{16281			int iMostOriginalCapitals = 0;16282			TeamTypes eWinningTeam = NO_TEAM;16283			PlayerTypes eWinningPlayer = NO_PLAYER;1628416285			{16286				// Calculate who owns the most original capitals by iterating through all civs 16287				// and finding out who owns their original capital.16288				typedef std::tr1::array<int, MAX_CIV_TEAMS> CivTeamArray;16289				CivTeamArray aTeamCityCount;16290				aTeamCityCount.assign(0);1629116292				CvMap& kMap = GC.getMap();16293				for (int iLoopPlayer = 0; iLoopPlayer < MAX_MAJOR_CIVS; ++iLoopPlayer)16294				{16295					const PlayerTypes ePlayer = static_cast<PlayerTypes>(iLoopPlayer);16296					CvPlayer& kLoopPlayer = GET_PLAYER(ePlayer);16297					if(kLoopPlayer.isEverAlive())16298					{16299						const int iOriginalCapitalX = kLoopPlayer.GetOriginalCapitalX();16300						const int iOriginalCapitalY = kLoopPlayer.GetOriginalCapitalY();16301						if(iOriginalCapitalX != -1 && iOriginalCapitalY != -1)16302						{16303							CvPlot* pkPlot = kMap.plot(iOriginalCapitalX, iOriginalCapitalY);16304							if(pkPlot != NULL)16305							{16306								CvCity* pkCapitalCity = pkPlot->getPlotCity();16307								if(pkCapitalCity != NULL)16308								{16309									const PlayerTypes eCapitalOwner = pkCapitalCity->getOwner();16310									if(eCapitalOwner != NO_PLAYER)16311									{16312										CvPlayer& kCapitalOwnerPlayer = GET_PLAYER(eCapitalOwner);16313										aTeamCityCount[kCapitalOwnerPlayer.getTeam()]++;16314									}16315								}16316							}	16317						}16318					}16319				}1632016321				// What's the max count and are they the only team to have the max?16322				CivTeamArray::iterator itMax = max_element(aTeamCityCount.begin(), aTeamCityCount.end());16323				if(count(aTeamCityCount.begin(), aTeamCityCount.end(), *itMax) == 1)16324				{16325					eWinningTeam = static_cast<TeamTypes>(itMax - aTeamCityCount.begin());16326					iMostOriginalCapitals = *itMax;1632716328					CvTeam& kTeam = GET_TEAM(eWinningTeam);16329					eWinningPlayer = kTeam.getLeaderID();16330				}			16331			}1633216333			// Someone just lost their capital, test to see if someone wins16334			if(bValue)16335			{16336				// slewis - Moved Conquest victory elsewhere so that victory is more accurately awarded16337				//GC.getGame().DoTestConquestVictory();1633816339				Localization::String localizedBuffer;16340				Localization::String localizedSummary;16341				NotificationTypes eNotificationType = NOTIFICATION_CAPITAL_LOST;1634216343				for(uint ui = 0; ui < MAX_MAJOR_CIVS; ui++)16344				{16345					PlayerTypes ePlayer = (PlayerTypes)ui;16346					CvNotifications* pNotifications = GET_PLAYER(ePlayer).GetNotifications();16347					if(!pNotifications)16348					{16349						continue;16350					}1635116352					// Notify Player lost their capital16353					if(ePlayer == GetID())16354					{16355						eNotificationType = NOTIFICATION_CAPITAL_LOST_ACTIVE_PLAYER;16356						localizedSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_SUMMARY_YOU_LOST_CAPITAL");16357						if (eWinningPlayer == ePlayer)16358						{16359							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_LOST_CAPITAL_YOU_WINNING");16360							localizedBuffer << iMostOriginalCapitals;16361						}16362						else if (eWinningTeam != NO_TEAM)16363						{16364							if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).isHasMet(eWinningTeam))16365							{16366								if (eWinningPlayer != NO_PLAYER) // there is a winning player16367								{16368									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_LOST_CAPITAL_OTHER_PLAYER_WINNING");16369									if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16370									{16371										localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16372									}16373									else16374									{16375										localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16376									}16377									localizedBuffer << iMostOriginalCapitals;16378								}16379								else16380								{16381									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_LOST_CAPITAL_TEAM_WINNING");16382									localizedBuffer << (int)eWinningTeam;16383									localizedBuffer << iMostOriginalCapitals;16384								}16385							}16386							else // if someone is winning16387							{16388								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_LOST_CAPITAL_UNMET_WINNING");16389								localizedBuffer << iMostOriginalCapitals;16390							}16391						}16392						else // if no one is winning16393						{16394							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_LOST_CAPITAL");16395						}16396					}16397					// Known player16398					else if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).isHasMet(getTeam()))16399					{16400						eNotificationType = NOTIFICATION_CAPITAL_LOST;16401						localizedSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_SUMMARY_PLAYER_LOST_CAPITAL");16402						localizedSummary << getCivilizationShortDescriptionKey();1640316404						if (eWinningTeam != NO_TEAM)16405						{16406							if (GET_TEAM(eWinningTeam).isHasMet(getTeam()))16407							{16408								if (eWinningPlayer == GetID())16409								{16410									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL_YOU_WINNING");1641116412									if (GC.getGame().isGameMultiPlayer() && isHuman())16413									{16414										localizedBuffer << getNickName();16415									}16416									else16417									{16418										localizedBuffer << getNameKey();16419									}16420									localizedBuffer << iMostOriginalCapitals;16421								}16422								else if (eWinningPlayer != NO_PLAYER)16423								{16424									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL_OTHER_WINNING");16425									if (GC.getGame().isGameMultiPlayer() && isHuman())16426									{16427										localizedBuffer << getNickName();16428									}16429									else16430									{16431										localizedBuffer << getNameKey();16432									}1643316434									if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16435									{16436										localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16437									}16438									else16439									{16440										localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16441									}16442									localizedBuffer << iMostOriginalCapitals;16443								}16444								else // if (eWinningTeam != NO_TEAM)16445								{16446									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL_TEAM_WINNING");16447									if (GC.getGame().isGameMultiPlayer() && isHuman())16448									{16449										localizedBuffer << getNickName();16450									}16451									else16452									{16453										localizedBuffer << getNameKey();16454									}1645516456									localizedBuffer << (int)eWinningTeam;16457									localizedBuffer << iMostOriginalCapitals;16458								}16459							}16460							else16461							{16462								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL_UNMET_WINNING");16463								if (GC.getGame().isGameMultiPlayer() && isHuman())16464								{16465									localizedBuffer << getNickName();16466								}16467								else16468								{16469									localizedBuffer << getNameKey();16470								}16471								localizedBuffer << iMostOriginalCapitals;16472							}16473						}16474						else16475						{16476							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL");16477							if (GC.getGame().isGameMultiPlayer() && isHuman())16478							{16479								localizedBuffer << getNickName();16480							}16481							else16482							{16483								localizedBuffer << getNameKey();16484							}16485						}16486					}16487					else // unmet player16488					{16489						eNotificationType = NOTIFICATION_CAPITAL_LOST;16490						localizedSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_SUMMARY_SOMEONE_LOST_CAPITAL");1649116492						if (eWinningTeam != NO_TEAM)16493						{16494							if (GET_TEAM(eWinningTeam).isHasMet(getTeam()))16495							{16496								if (eWinningPlayer == GetID())16497								{16498									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_LOST_CAPITAL_YOU_WINNING");16499									localizedBuffer << iMostOriginalCapitals;16500								}16501								else if (eWinningPlayer != NO_PLAYER)16502								{16503									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_LOST_CAPITAL_OTHER_WINNING");16504									if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16505									{16506										localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16507									}16508									else16509									{16510										localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16511									}16512									localizedBuffer << iMostOriginalCapitals;16513								}16514								else // if (eWinningTeam != NO_TEAM)16515								{16516									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_LOST_CAPITAL_TEAM_WINNING");16517									localizedBuffer << (int)eWinningTeam;16518									localizedBuffer << iMostOriginalCapitals;16519								}16520							}16521							else16522							{16523								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_LOST_CAPITAL_UNMET_WINNING");16524								localizedBuffer << iMostOriginalCapitals;16525							}16526						}16527						else16528						{16529							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_LOST_CAPITAL");16530						}16531					}1653216533					pNotifications->Add(eNotificationType, localizedBuffer.toUTF8(), localizedSummary.toUTF8(), -1, -1, -1);16534				}1653516536				//replay message16537				{16538					Localization::String message;16539					if (eWinningPlayer != NO_PLAYER)16540					{16541						message = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL_OTHER_WINNING");16542						if (GC.getGame().isGameMultiPlayer() && isHuman())16543						{16544#if defined(MOD_BUGFIX_MINOR)16545							message << getNickName();16546#else16547							localizedBuffer << getNickName();16548#endif16549						}16550						else16551						{16552#if defined(MOD_BUGFIX_MINOR)16553							message << getNameKey();16554#else16555							localizedBuffer << getNameKey();16556#endif16557						}1655816559						if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16560						{16561#if defined(MOD_BUGFIX_MINOR)16562							message << GET_PLAYER(eWinningPlayer).getNickName();16563#else16564							localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16565#endif16566						}16567						else16568						{16569#if defined(MOD_BUGFIX_MINOR)16570							message << GET_PLAYER(eWinningPlayer).getNameKey();16571#else16572							localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16573#endif16574						}1657516576#if defined(MOD_BUGFIX_MINOR)16577						message << iMostOriginalCapitals;16578#else16579						localizedBuffer << iMostOriginalCapitals;16580#endif16581					}16582					else if (eWinningTeam != NO_TEAM)16583					{16584						message = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL_TEAM_WINNING");16585						if (GC.getGame().isGameMultiPlayer() && isHuman())16586						{16587#if defined(MOD_BUGFIX_MINOR)16588							message << getNickName();16589#else16590							localizedBuffer << getNickName();16591#endif16592						}16593						else16594						{16595#if defined(MOD_BUGFIX_MINOR)16596							message << getNameKey();16597#else16598							localizedBuffer << getNameKey();16599#endif16600						}1660116602#if defined(MOD_BUGFIX_MINOR)16603						message << (int)eWinningTeam;16604						message << iMostOriginalCapitals;16605#else16606						localizedBuffer << (int)eWinningTeam;16607						localizedBuffer << iMostOriginalCapitals;16608#endif16609					}16610					else16611					{16612						message = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_LOST_CAPITAL");16613						if (GC.getGame().isGameMultiPlayer() && isHuman())16614						{16615#if defined(MOD_BUGFIX_MINOR)16616							message << getNickName();16617#else16618							localizedBuffer << getNickName();16619#endif16620						}16621						else16622						{16623#if defined(MOD_BUGFIX_MINOR)16624							message << getNameKey();16625#else16626							localizedBuffer << getNameKey();16627#endif16628						}16629					}1663016631					CvString translatedMessage = message.toUTF8();16632					GC.getGame().addReplayMessage(REPLAY_MESSAGE_MAJOR_EVENT, GetID(), translatedMessage, GetOriginalCapitalX(), GetOriginalCapitalY());16633				}					16634			}16635			// Player recovered capital!16636			else16637			{16638				Localization::String localizedBuffer;16639				Localization::String localizedSummary;1664016641				for(uint ui = 0; ui < MAX_MAJOR_CIVS; ui++)16642				{16643					PlayerTypes ePlayer = (PlayerTypes)ui;16644					CvNotifications* pNotifications = GET_PLAYER(ePlayer).GetNotifications();16645					if(!pNotifications)16646					{16647						continue;16648					}1664916650					// Notify Player lost their capital16651					if(ePlayer == GetID())16652					{16653						localizedSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_RECOVERED_CAPITAL");16654						if (eWinningPlayer == ePlayer)16655						{16656							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_REGAINED_CAPITAL_YOU_WINNING");16657							localizedBuffer << iMostOriginalCapitals;16658						}16659						else if (GET_TEAM(getTeam()).isHasMet(eWinningTeam))16660						{16661							if (eWinningPlayer != NO_PLAYER) // there is a winning player16662							{16663								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_REGAINED_CAPITAL_OTHER_PLAYER_WINNING");16664								if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16665								{16666									localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16667								}16668								else16669								{16670									localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16671								}16672								localizedBuffer << iMostOriginalCapitals;16673							}16674							else16675							{16676								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_REGAINED_CAPITAL_TEAM_WINNING");16677								localizedBuffer << (int)eWinningTeam;16678								localizedBuffer << iMostOriginalCapitals;16679							}16680						}16681						else if (eWinningTeam != NO_TEAM) // if someone is winning16682						{16683							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_REGAINED_CAPITAL_UNMET_WINNING");16684							localizedBuffer << iMostOriginalCapitals;16685						}16686						else // if no one is winning16687						{16688							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_YOU_RECOVERED_CAPITAL");16689						}16690					}16691					// Known player16692					else if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).isHasMet(getTeam()))16693					{16694						localizedSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_SUMMARY_PLAYER_RECOVERED_CAPITAL");16695						localizedSummary << getCivilizationShortDescriptionKey();1669616697						if (eWinningTeam != NO_TEAM)16698						{16699							if (GET_TEAM(eWinningTeam).isHasMet(getTeam()))16700							{16701								if (eWinningPlayer == ePlayer)16702								{16703									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL_YOU_WINNING");16704									localizedBuffer << iMostOriginalCapitals;16705								}16706								else if (eWinningPlayer != NO_PLAYER)16707								{16708									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL_OTHER_WINNING");16709									if (GC.getGame().isGameMultiPlayer() && isHuman())16710									{16711										localizedBuffer << getNickName();16712									}16713									else16714									{16715										localizedBuffer << getNameKey();16716									}1671716718									if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16719									{16720										localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16721									}16722									else16723									{16724										localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16725									}16726									localizedBuffer << iMostOriginalCapitals;16727								}16728								else // if (eWinningTeam != NO_TEAM)16729								{16730									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL_TEAM_WINNING");16731									if (GC.getGame().isGameMultiPlayer() && isHuman())16732									{16733										localizedBuffer << getNickName();16734									}16735									else16736									{16737										localizedBuffer << getNameKey();16738									}1673916740									localizedBuffer << (int)eWinningTeam;16741									localizedBuffer << iMostOriginalCapitals;16742								}16743							}16744							else16745							{16746								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL_UNMET_WINNING");16747								if (GC.getGame().isGameMultiPlayer() && isHuman())16748								{16749									localizedBuffer << getNickName();16750								}16751								else16752								{16753									localizedBuffer << getNameKey();16754								}16755								localizedBuffer << iMostOriginalCapitals;16756							}16757						}16758						else16759						{16760							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL");16761							if (GC.getGame().isGameMultiPlayer() && isHuman())16762							{16763								localizedBuffer << getNickName();16764							}16765							else16766							{16767								localizedBuffer << getNameKey();16768							}16769						}16770					}16771					else // unmet player16772					{16773						localizedSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_SUMMARY_SOMEONE_RECOVERED_CAPITAL");1677416775						if (eWinningTeam != NO_TEAM)16776						{16777							if (GET_TEAM(eWinningTeam).isHasMet(getTeam()))16778							{16779								if (eWinningPlayer == ePlayer)16780								{16781									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_REGAINED_CAPITAL_YOU_WINNING");16782									localizedBuffer << iMostOriginalCapitals;16783								}16784								else if (eWinningPlayer != NO_PLAYER)16785								{16786									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_REGAINED_CAPITAL_OTHER_WINNING");16787									if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16788									{16789										localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16790									}16791									else16792									{16793										localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16794									}16795									localizedBuffer << iMostOriginalCapitals;16796								}16797								else // if (eWinningTeam != NO_TEAM)16798								{16799									localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_REGAINED_CAPITAL_TEAM_WINNING");16800									localizedBuffer << (int)eWinningTeam;16801									localizedBuffer << iMostOriginalCapitals;16802								}16803							}16804							else16805							{16806								localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_REGAINED_CAPITAL_UNMET_WINNING");16807								localizedBuffer << iMostOriginalCapitals;16808							}16809						}16810						else16811						{16812							localizedBuffer = Localization::Lookup("TXT_KEY_NOTIFICATION_UNMET_REGAINED_CAPITAL");16813						}16814					}1681516816					pNotifications->Add(NOTIFICATION_CAPITAL_RECOVERED, localizedBuffer.toUTF8(), localizedSummary.toUTF8(), -1, -1, -1);16817				}1681816819				//replay message16820				{16821					Localization::String message;16822					if (eWinningPlayer != NO_PLAYER)16823					{16824						message = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL_OTHER_WINNING");16825						if (GC.getGame().isGameMultiPlayer() && isHuman())16826						{16827#if defined(MOD_BUGFIX_MINOR)16828							message << getNickName();16829#else16830							localizedBuffer << getNickName();16831#endif16832						}16833						else16834						{16835#if defined(MOD_BUGFIX_MINOR)16836							message << getNameKey();16837#else16838							localizedBuffer << getNameKey();16839#endif16840						}1684116842						if(GC.getGame().isGameMultiPlayer() && GET_PLAYER(eWinningPlayer).isHuman())16843						{16844#if defined(MOD_BUGFIX_MINOR)16845							message << GET_PLAYER(eWinningPlayer).getNickName();16846#else16847							localizedBuffer << GET_PLAYER(eWinningPlayer).getNickName();16848#endif16849						}16850						else16851						{16852#if defined(MOD_BUGFIX_MINOR)16853							message << GET_PLAYER(eWinningPlayer).getNameKey();16854#else16855							localizedBuffer << GET_PLAYER(eWinningPlayer).getNameKey();16856#endif16857						}1685816859#if defined(MOD_BUGFIX_MINOR)16860						message << iMostOriginalCapitals;16861#else16862						localizedBuffer << iMostOriginalCapitals;16863#endif16864					}16865					else if (eWinningTeam != NO_TEAM)16866					{16867						message = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL_TEAM_WINNING");16868						if (GC.getGame().isGameMultiPlayer() && isHuman())16869						{16870#if defined(MOD_BUGFIX_MINOR)16871							message << getNickName();16872#else16873							localizedBuffer << getNickName();16874#endif16875						}16876						else16877						{16878#if defined(MOD_BUGFIX_MINOR)16879							message << getNameKey();16880#else16881							localizedBuffer << getNameKey();16882#endif16883						}1688416885#if defined(MOD_BUGFIX_MINOR)16886						message << (int)eWinningTeam;16887						message << iMostOriginalCapitals;16888#else16889						localizedBuffer << (int)eWinningTeam;16890						localizedBuffer << iMostOriginalCapitals;16891#endif16892					}16893					else16894					{16895						message = Localization::Lookup("TXT_KEY_NOTIFICATION_OTHER_REGAINED_CAPITAL");16896						if (GC.getGame().isGameMultiPlayer() && isHuman())16897						{16898#if defined(MOD_BUGFIX_MINOR)16899							message << getNickName();16900#else16901							localizedBuffer << getNickName();16902#endif16903						}16904						else16905						{16906#if defined(MOD_BUGFIX_MINOR)16907							message << getNameKey();16908#else16909							localizedBuffer << getNameKey();16910#endif16911						}16912					}1691316914					CvString translatedMessage = message.toUTF8();16915					GC.getGame().addReplayMessage(REPLAY_MESSAGE_MAJOR_EVENT, GetID(), translatedMessage, GetOriginalCapitalX(), GetOriginalCapitalY());16916				}					16917			}16918		}16919	}16920}

Calls

Called by