Bazaar developer reference

CvAdvisorCounsel::SetCounselEntry(uint, AdvisorTypes, const char *, int)

Defined in
CvAdvisorCounsel.cpp, line 2011
Class
CvAdvisorCounsel
Hook name
CivHooks::CvAdvisorCounsel_SetCounselEntry

Hooks

static bool BeforeCvAdvisorCounsel_SetCounselEntry(CvAdvisorCounsel* self, uint uiIndex, AdvisorTypes eAdvisor, const char* strAdvisorCounsel, int iValue, bool& result);static void AfterCvAdvisorCounsel_SetCounselEntry(CvAdvisorCounsel* self, uint uiIndex, AdvisorTypes eAdvisor, const char* strAdvisorCounsel, int iValue, bool& result);static bool ReplaceCvAdvisorCounsel_SetCounselEntry(bool (*original)(CvAdvisorCounsel*, uint, AdvisorTypes, const char*, int), CvAdvisorCounsel* self, uint uiIndex, AdvisorTypes eAdvisor, const char* strAdvisorCounsel, int iValue);CivRegisterBefore<CivHooks::CvAdvisorCounsel_SetCounselEntry>(host, &BeforeCvAdvisorCounsel_SetCounselEntry);CivRegisterAfter<CivHooks::CvAdvisorCounsel_SetCounselEntry>(host, &AfterCvAdvisorCounsel_SetCounselEntry);CivRegisterReplace<CivHooks::CvAdvisorCounsel_SetCounselEntry>(host, &ReplaceCvAdvisorCounsel_SetCounselEntry);

Code

2011bool CvAdvisorCounsel::SetCounselEntry(uint uiIndex, AdvisorTypes eAdvisor, const char* strAdvisorCounsel, int iValue)2012{2013	if(uiIndex >= m_aCounsel.size())2014	{2015		return false;2016	}20172018	m_aCounsel[uiIndex].m_eAdvisor = eAdvisor;2019	strcpy_s(m_aCounsel[uiIndex].m_strTxtKey, strAdvisorCounsel);2020	m_aCounsel[uiIndex].m_iValue = iValue;20212022	return true;2023}

Calls

Called by