Bazaar developer reference

CvActionInfo::getAutomateType() const

Defined in
CvInfos.cpp, line 1048
Class
CvActionInfo
Hook name
CivHooks::CvActionInfo_getAutomateType

Hooks

static bool BeforeCvActionInfo_getAutomateType(const CvActionInfo* self, int& result);static void AfterCvActionInfo_getAutomateType(const CvActionInfo* self, int& result);static int ReplaceCvActionInfo_getAutomateType(int (*original)(const CvActionInfo*), const CvActionInfo* self);CivRegisterBefore<CivHooks::CvActionInfo_getAutomateType>(host, &BeforeCvActionInfo_getAutomateType);CivRegisterAfter<CivHooks::CvActionInfo_getAutomateType>(host, &AfterCvActionInfo_getAutomateType);CivRegisterReplace<CivHooks::CvActionInfo_getAutomateType>(host, &ReplaceCvActionInfo_getAutomateType);

Code

1048int CvActionInfo::getAutomateType() const1049{10501051	if(ACTIONSUBTYPE_COMMAND == m_eSubType)1052	{1053		CvCommandInfo* pkCommandInfo = GC.getCommandInfo((CommandTypes)m_iOriginalIndex);1054		if(pkCommandInfo)1055		{1056			return pkCommandInfo->getAutomate();1057		}1058	}1059	else if(ACTIONSUBTYPE_AUTOMATE == m_eSubType)1060	{1061		CvAutomateInfo* pkAutomateInfo = GC.getAutomateInfo(m_iOriginalIndex);1062		if(pkAutomateInfo)1063		{1064			return pkAutomateInfo->getAutomate();1065		}1066	}10671068	return NO_AUTOMATE;1069}

Calls

Called by