Bazaar developer reference

CvGame::GetPreviousVoteCast(TeamTypes) const

Defined in
CvGame.cpp, line 5381
Class
CvGame
Hook name
CivHooks::CvGame_GetPreviousVoteCast

Hooks

static bool BeforeCvGame_GetPreviousVoteCast(const CvGame* self, TeamTypes eVotingTeam, TeamTypes& result);static void AfterCvGame_GetPreviousVoteCast(const CvGame* self, TeamTypes eVotingTeam, TeamTypes& result);static TeamTypes ReplaceCvGame_GetPreviousVoteCast(TeamTypes (*original)(const CvGame*, TeamTypes), const CvGame* self, TeamTypes eVotingTeam);CivRegisterBefore<CivHooks::CvGame_GetPreviousVoteCast>(host, &BeforeCvGame_GetPreviousVoteCast);CivRegisterAfter<CivHooks::CvGame_GetPreviousVoteCast>(host, &AfterCvGame_GetPreviousVoteCast);CivRegisterReplace<CivHooks::CvGame_GetPreviousVoteCast>(host, &ReplaceCvGame_GetPreviousVoteCast);

Code

5380/// Get the last vote this team made, for record keeping5381TeamTypes CvGame::GetPreviousVoteCast(TeamTypes eVotingTeam) const5382{5383	CvAssertMsg(eVotingTeam >= 0, "eVotingTeam is expected to be non-negative (invalid Index)");5384	CvAssertMsg(eVotingTeam < MAX_CIV_TEAMS, "eVotingTeam is expected to be within maximum bounds (invalid Index)");5385	if (eVotingTeam < 0 || eVotingTeam >= MAX_CIV_TEAMS) return NO_TEAM;53865387	return (TeamTypes) m_aiPreviousVotesCast[eVotingTeam];5388}

Called by