Bazaar developer reference

CvActionInfo::getCommandData() const

Defined in
CvInfos.cpp, line 1029
Class
CvActionInfo
Hook name
CivHooks::CvActionInfo_getCommandData

Hooks

static bool BeforeCvActionInfo_getCommandData(const CvActionInfo* self, int& result);static void AfterCvActionInfo_getCommandData(const CvActionInfo* self, int& result);static int ReplaceCvActionInfo_getCommandData(int (*original)(const CvActionInfo*), const CvActionInfo* self);CivRegisterBefore<CivHooks::CvActionInfo_getCommandData>(host, &BeforeCvActionInfo_getCommandData);CivRegisterAfter<CivHooks::CvActionInfo_getCommandData>(host, &AfterCvActionInfo_getCommandData);CivRegisterReplace<CivHooks::CvActionInfo_getCommandData>(host, &ReplaceCvActionInfo_getCommandData);

Code

1029int CvActionInfo::getCommandData() const1030{10311032	if(ACTIONSUBTYPE_PROMOTION == m_eSubType)1033	{1034		return m_iOriginalIndex;1035	}1036	else if(ACTIONSUBTYPE_COMMAND == m_eSubType)1037	{1038		return GC.getCommandInfo((CommandTypes)m_iOriginalIndex)->getAutomate();1039	}1040	else if(ACTIONSUBTYPE_AUTOMATE == m_eSubType)1041	{1042		return GC.getAutomateInfo(m_iOriginalIndex)->getAutomate();1043	}10441045	return -1;1046}

Calls

Called by