Bazaar developer reference

CvMinorCivAI::GetContestValueForLeader(MinorCivQuestTypes)

Defined in
CvMinorCivAI.cpp, line 5453
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_GetContestValueForLeader

Hooks

static bool BeforeCvMinorCivAI_GetContestValueForLeader(CvMinorCivAI* self, MinorCivQuestTypes eType, int& result);static void AfterCvMinorCivAI_GetContestValueForLeader(CvMinorCivAI* self, MinorCivQuestTypes eType, int& result);static int ReplaceCvMinorCivAI_GetContestValueForLeader(int (*original)(CvMinorCivAI*, MinorCivQuestTypes), CvMinorCivAI* self, MinorCivQuestTypes eType);CivRegisterBefore<CivHooks::CvMinorCivAI_GetContestValueForLeader>(host, &BeforeCvMinorCivAI_GetContestValueForLeader);CivRegisterAfter<CivHooks::CvMinorCivAI_GetContestValueForLeader>(host, &AfterCvMinorCivAI_GetContestValueForLeader);CivRegisterReplace<CivHooks::CvMinorCivAI_GetContestValueForLeader>(host, &ReplaceCvMinorCivAI_GetContestValueForLeader);

Code

5453int CvMinorCivAI::GetContestValueForLeader(MinorCivQuestTypes eType)5454{5455	PlayerTypes eParticipant;5456	for (int iMajor = 0; iMajor < MAX_MAJOR_CIVS; iMajor++)5457	{5458		eParticipant = (PlayerTypes) iMajor;5459		for (uint iQuestLoop = 0; iQuestLoop < m_QuestsGiven[eParticipant].size(); iQuestLoop++)5460		{5461			if (m_QuestsGiven[eParticipant][iQuestLoop].GetType() == eType)5462			{5463				return m_QuestsGiven[eParticipant][iQuestLoop].GetContestValueForLeader();5464			}5465		}5466	}54675468	return -1;5469}

Calls

Called by