CvPlayer::ChangeFaith(int)
- Defined in
- CvPlayer.cpp, line 11421
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_ChangeFaith
Hooks
static bool BeforeCvPlayer_ChangeFaith(CvPlayer* self, int iChange);static void AfterCvPlayer_ChangeFaith(CvPlayer* self, int iChange);static void ReplaceCvPlayer_ChangeFaith(void (*original)(CvPlayer*, int), CvPlayer* self, int iChange);CivRegisterBefore<CivHooks::CvPlayer_ChangeFaith>(host, &BeforeCvPlayer_ChangeFaith);CivRegisterAfter<CivHooks::CvPlayer_ChangeFaith>(host, &AfterCvPlayer_ChangeFaith);CivRegisterReplace<CivHooks::CvPlayer_ChangeFaith>(host, &ReplaceCvPlayer_ChangeFaith);
Code
11421void CvPlayer::ChangeFaith(int iChange)11422{11423 if(GC.getGame().isOption(GAMEOPTION_NO_RELIGION))11424 {11425 return;11426 }1142711428 SetFaith(GetFaith() + iChange);11429}
Calls
Called by
- CvCity::Purchase(UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- CvMilitaryAI::BuyEmergencyUnit(UnitAITypes, CvCity *)
- CvMinorCivAI::DoFirstContactWithMajor(TeamTypes, bool)
- CvPlayer::DoGreatPersonExpended(UnitTypes, CvUnit *)
- CvPlayer::DoYieldBonusFromKill(YieldTypes, CvUnit *, CvUnit *, UnitTypes, int, int, bool, int &)
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvGameReligions::CheckSpawnGreatProphet(CvPlayer &)
- CvGameReligions::DoPlayerTurn(CvPlayer &)
- CvGameReligions::FoundPantheon(PlayerTypes, BeliefTypes)
- CvUnit::DoSpreadReligion()
- CvLuaPlayer::lChangeFaith(lua_State *)