Bazaar developer reference

CvReplayInfo::getPlayerColor(int) const

Defined in
CvReplayInfo.cpp, line 279
Class
CvReplayInfo
Hook name
CivHooks::CvReplayInfo_getPlayerColor

Hooks

static bool BeforeCvReplayInfo_getPlayerColor(const CvReplayInfo* self, int iPlayer, PlayerColorTypes& result);static void AfterCvReplayInfo_getPlayerColor(const CvReplayInfo* self, int iPlayer, PlayerColorTypes& result);static PlayerColorTypes ReplaceCvReplayInfo_getPlayerColor(PlayerColorTypes (*original)(const CvReplayInfo*, int), const CvReplayInfo* self, int iPlayer);CivRegisterBefore<CivHooks::CvReplayInfo_getPlayerColor>(host, &BeforeCvReplayInfo_getPlayerColor);CivRegisterAfter<CivHooks::CvReplayInfo_getPlayerColor>(host, &AfterCvReplayInfo_getPlayerColor);CivRegisterReplace<CivHooks::CvReplayInfo_getPlayerColor>(host, &ReplaceCvReplayInfo_getPlayerColor);

Code

279PlayerColorTypes CvReplayInfo::getPlayerColor(int iPlayer) const280{281	if(iPlayer >= 0 && iPlayer < (int)m_listPlayerInfo.size())282	{283		return m_listPlayerInfo[iPlayer].m_ePlayerColor;284	}285286	return NO_PLAYERCOLOR;287}

Calls

Called by