Bazaar developer reference

CvGame::setTeamRank(TeamTypes, int)

Defined in
CvGame.cpp, line 7235
Class
CvGame
Hook name
CivHooks::CvGame_setTeamRank

Hooks

static bool BeforeCvGame_setTeamRank(CvGame* self, TeamTypes eTeam, int iRank);static void AfterCvGame_setTeamRank(CvGame* self, TeamTypes eTeam, int iRank);static void ReplaceCvGame_setTeamRank(void (*original)(CvGame*, TeamTypes, int), CvGame* self, TeamTypes eTeam, int iRank);CivRegisterBefore<CivHooks::CvGame_setTeamRank>(host, &BeforeCvGame_setTeamRank);CivRegisterAfter<CivHooks::CvGame_setTeamRank>(host, &AfterCvGame_setTeamRank);CivRegisterReplace<CivHooks::CvGame_setTeamRank>(host, &ReplaceCvGame_setTeamRank);

Code

7235void CvGame::setTeamRank(TeamTypes eTeam, int iRank)7236{7237	CvAssertMsg(eTeam >= 0, "eTeam is expected to be non-negative (invalid Index)");7238	CvAssertMsg(eTeam < MAX_TEAMS, "eTeam is expected to be within maximum bounds (invalid Index)");7239	m_aiTeamRank[eTeam] = iRank;7240	CvAssert(getTeamRank(eTeam) >= 0);7241}

Called by