CvPlayer::GetScoreFromReligion() const
- Defined in
- CvPlayer.cpp, line 5603
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_GetScoreFromReligion
Hooks
static bool BeforeCvPlayer_GetScoreFromReligion(const CvPlayer* self, int& result);static void AfterCvPlayer_GetScoreFromReligion(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetScoreFromReligion(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetScoreFromReligion>(host, &BeforeCvPlayer_GetScoreFromReligion);CivRegisterAfter<CivHooks::CvPlayer_GetScoreFromReligion>(host, &AfterCvPlayer_GetScoreFromReligion);CivRegisterReplace<CivHooks::CvPlayer_GetScoreFromReligion>(host, &ReplaceCvPlayer_GetScoreFromReligion);
Code
5602// Score from world wonders: 40 per5603int CvPlayer::GetScoreFromReligion() const5604{5605 if(GC.getGame().isOption(GAMEOPTION_NO_RELIGION))5606 {5607 return 0;5608 }5609 int iScore = 0;5610 CvGameReligions *pGameReligions = GC.getGame().GetGameReligions();5611 ReligionTypes eReligion = GetReligions()->GetReligionCreatedByPlayer();5612 if (eReligion > RELIGION_PANTHEON)5613 {5614 const CvReligion *pReligion = pGameReligions->GetReligion(eReligion, GetID());5615 iScore += pReligion->m_Beliefs.GetNumBeliefs() * /*20*/ GC.getSCORE_BELIEF_MULTIPLIER();5616 iScore += pGameReligions->GetNumCitiesFollowing(eReligion) * /*1*/ GC.getSCORE_RELIGION_CITIES_MULTIPLIER();5617 }5618 return iScore;5619}
Calls
- CvGame::GetGameReligions()
- CvGame::isOption(GameOptionTypes) const
- CvGameReligions::GetNumCitiesFollowing(ReligionTypes) const
- CvGameReligions::GetReligion(ReligionTypes, PlayerTypes) const
- CvGlobals::getGame()
- CvGlobals::getSCORE_BELIEF_MULTIPLIER()
- CvGlobals::getSCORE_RELIGION_CITIES_MULTIPLIER()
- CvPlayer::GetID() const
- CvPlayer::GetReligions() const
- CvPlayerReligions::GetReligionCreatedByPlayer(bool) const
- CvReligionBeliefs::GetNumBeliefs() const