Bazaar developer reference

CvMinorCivAI::GetNumActiveQuestsForPlayer(PlayerTypes) const

Defined in
CvMinorCivAI.cpp, line 5048
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_GetNumActiveQuestsForPlayer

Hooks

static bool BeforeCvMinorCivAI_GetNumActiveQuestsForPlayer(const CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static void AfterCvMinorCivAI_GetNumActiveQuestsForPlayer(const CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvMinorCivAI_GetNumActiveQuestsForPlayer(int (*original)(const CvMinorCivAI*, PlayerTypes), const CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_GetNumActiveQuestsForPlayer>(host, &BeforeCvMinorCivAI_GetNumActiveQuestsForPlayer);CivRegisterAfter<CivHooks::CvMinorCivAI_GetNumActiveQuestsForPlayer>(host, &AfterCvMinorCivAI_GetNumActiveQuestsForPlayer);CivRegisterReplace<CivHooks::CvMinorCivAI_GetNumActiveQuestsForPlayer>(host, &ReplaceCvMinorCivAI_GetNumActiveQuestsForPlayer);

Code

5048int CvMinorCivAI::GetNumActiveQuestsForPlayer(PlayerTypes ePlayer) const5049{5050	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");5051	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");5052	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return 0;50535054	return m_QuestsGiven[ePlayer].size();5055}

Calls

Called by