Bazaar developer reference

CvDllGameContext::GetTeam(TeamTypes)

Defined in
CvDllContext.cpp, line 242
Class
CvDllGameContext
Hook name
CivHooks::CvDllGameContext_GetTeam

Hooks

static bool BeforeCvDllGameContext_GetTeam(CvDllGameContext* self, TeamTypes eTeam, ICvTeam1*& result);static void AfterCvDllGameContext_GetTeam(CvDllGameContext* self, TeamTypes eTeam, ICvTeam1*& result);static ICvTeam1* ReplaceCvDllGameContext_GetTeam(ICvTeam1* (*original)(CvDllGameContext*, TeamTypes), CvDllGameContext* self, TeamTypes eTeam);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllGameContext_GetTeam::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllGameContext_GetTeam);host->RegisterHook(host->pluginIndex, CivHooks::CvDllGameContext_GetTeam::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllGameContext_GetTeam);host->RegisterHook(host->pluginIndex, CivHooks::CvDllGameContext_GetTeam::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllGameContext_GetTeam);

Code

242ICvTeam1* CvDllGameContext::GetTeam(TeamTypes eTeam)243{244	if(eTeam < MAX_TEAMS)245	{246		CvTeam& kTeam = CvTeam::getTeam(eTeam);247		return new CvDllTeam(&kTeam);248	}249250	return NULL;251}

Calls