Bazaar developer reference

CvGameLeagues::DoPlayerAliveStatusChanged(PlayerTypes)

Defined in
CvVotingClasses.cpp, line 7060
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_DoPlayerAliveStatusChanged

Hooks

static bool BeforeCvGameLeagues_DoPlayerAliveStatusChanged(CvGameLeagues* self, PlayerTypes ePlayer);static void AfterCvGameLeagues_DoPlayerAliveStatusChanged(CvGameLeagues* self, PlayerTypes ePlayer);static void ReplaceCvGameLeagues_DoPlayerAliveStatusChanged(void (*original)(CvGameLeagues*, PlayerTypes), CvGameLeagues* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvGameLeagues_DoPlayerAliveStatusChanged>(host, &BeforeCvGameLeagues_DoPlayerAliveStatusChanged);CivRegisterAfter<CivHooks::CvGameLeagues_DoPlayerAliveStatusChanged>(host, &AfterCvGameLeagues_DoPlayerAliveStatusChanged);CivRegisterReplace<CivHooks::CvGameLeagues_DoPlayerAliveStatusChanged>(host, &ReplaceCvGameLeagues_DoPlayerAliveStatusChanged);

Code

7060void CvGameLeagues::DoPlayerAliveStatusChanged(PlayerTypes ePlayer)7061{7062	bool bAlive = GET_PLAYER(ePlayer).isAlive();7063	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7064	{7065		if (!bAlive && it->IsMember(ePlayer))7066		{7067			it->RemoveMember(ePlayer);7068		}7069		else if (bAlive)7070		{7071			it->AddMember(ePlayer);7072		}7073	}70747075	GC.getGame().DoUpdateDiploVictory();7076}

Calls

Called by