CvGameReligions::SpreadReligion()
- Defined in
- CvReligionClasses.cpp, line 318
- Class
- CvGameReligions
- Hook name
CivHooks::CvGameReligions_SpreadReligion
Hooks
static bool BeforeCvGameReligions_SpreadReligion(CvGameReligions* self);static void AfterCvGameReligions_SpreadReligion(CvGameReligions* self);static void ReplaceCvGameReligions_SpreadReligion(void (*original)(CvGameReligions*), CvGameReligions* self);CivRegisterBefore<CivHooks::CvGameReligions_SpreadReligion>(host, &BeforeCvGameReligions_SpreadReligion);CivRegisterAfter<CivHooks::CvGameReligions_SpreadReligion>(host, &AfterCvGameReligions_SpreadReligion);CivRegisterReplace<CivHooks::CvGameReligions_SpreadReligion>(host, &ReplaceCvGameReligions_SpreadReligion);
Code
317/// Spread religious pressure into adjacent cities318void CvGameReligions::SpreadReligion()319{320 // Loop through all the players321 for(int iI = 0; iI < MAX_PLAYERS; iI++)322 {323 CvPlayer& kPlayer = GET_PLAYER((PlayerTypes)iI);324 if(kPlayer.isAlive())325 {326 // Loop through each of their cities327 int iLoop;328 CvCity* pLoopCity;329 for(pLoopCity = kPlayer.firstCity(&iLoop); pLoopCity != NULL; pLoopCity = kPlayer.nextCity(&iLoop))330 {331 SpreadReligionToOneCity(pLoopCity);332 }333 }334 }335}