CvCity::processProcess(ProcessTypes, int)
- Defined in
- CvCity.cpp, line 6866
- Class
- CvCity
- Hook name
CivHooks::CvCity_processProcess
Hooks
static bool BeforeCvCity_processProcess(CvCity* self, ProcessTypes eProcess, int iChange);static void AfterCvCity_processProcess(CvCity* self, ProcessTypes eProcess, int iChange);static void ReplaceCvCity_processProcess(void (*original)(CvCity*, ProcessTypes, int), CvCity* self, ProcessTypes eProcess, int iChange);CivRegisterBefore<CivHooks::CvCity_processProcess>(host, &BeforeCvCity_processProcess);CivRegisterAfter<CivHooks::CvCity_processProcess>(host, &AfterCvCity_processProcess);CivRegisterReplace<CivHooks::CvCity_processProcess>(host, &ReplaceCvCity_processProcess);
Code
6866void CvCity::processProcess(ProcessTypes eProcess, int iChange)6867{6868 VALIDATE_OBJECT6869 int iI;68706871 const CvProcessInfo* pkProcessInfo = GC.getProcessInfo(eProcess);6872 CvAssertFmt(pkProcessInfo != NULL, "Process type %d is invalid", eProcess);6873 if (pkProcessInfo != NULL)6874 {6875 // Convert to another yield6876 for(iI = 0; iI < NUM_YIELD_TYPES; iI++)6877 {6878 changeProductionToYieldModifier(((YieldTypes)iI), (pkProcessInfo->getProductionToYieldModifier(iI) * iChange));6879 }6880 }6881}