Bazaar developer reference

CvGameLeagues::SetDiplomaticVictor(PlayerTypes)

Defined in
CvVotingClasses.cpp, line 7163
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_SetDiplomaticVictor

Hooks

static bool BeforeCvGameLeagues_SetDiplomaticVictor(CvGameLeagues* self, PlayerTypes ePlayer);static void AfterCvGameLeagues_SetDiplomaticVictor(CvGameLeagues* self, PlayerTypes ePlayer);static void ReplaceCvGameLeagues_SetDiplomaticVictor(void (*original)(CvGameLeagues*, PlayerTypes), CvGameLeagues* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvGameLeagues_SetDiplomaticVictor>(host, &BeforeCvGameLeagues_SetDiplomaticVictor);CivRegisterAfter<CivHooks::CvGameLeagues_SetDiplomaticVictor>(host, &AfterCvGameLeagues_SetDiplomaticVictor);CivRegisterReplace<CivHooks::CvGameLeagues_SetDiplomaticVictor>(host, &ReplaceCvGameLeagues_SetDiplomaticVictor);

Code

7163void CvGameLeagues::SetDiplomaticVictor(PlayerTypes ePlayer)7164{7165	// There can be only one7166	CvAssertMsg(m_eDiplomaticVictor == NO_PLAYER, "Player voted Diplomatic Victor when there already was one. Please send Anton your save file and version.");7167	if (m_eDiplomaticVictor == NO_PLAYER)7168	{7169		m_eDiplomaticVictor = ePlayer;7170		GC.getGame().testVictory();7171	}7172}

Calls

Called by