CvCityReligions::GetSecondaryReligionPantheonBelief()
- Defined in
- CvReligionClasses.cpp, line 3688
- Class
- CvCityReligions
- Hook name
CivHooks::CvCityReligions_GetSecondaryReligionPantheonBelief
Hooks
static bool BeforeCvCityReligions_GetSecondaryReligionPantheonBelief(CvCityReligions* self, BeliefTypes& result);static void AfterCvCityReligions_GetSecondaryReligionPantheonBelief(CvCityReligions* self, BeliefTypes& result);static BeliefTypes ReplaceCvCityReligions_GetSecondaryReligionPantheonBelief(BeliefTypes (*original)(CvCityReligions*), CvCityReligions* self);CivRegisterBefore<CivHooks::CvCityReligions_GetSecondaryReligionPantheonBelief>(host, &BeforeCvCityReligions_GetSecondaryReligionPantheonBelief);CivRegisterAfter<CivHooks::CvCityReligions_GetSecondaryReligionPantheonBelief>(host, &AfterCvCityReligions_GetSecondaryReligionPantheonBelief);CivRegisterReplace<CivHooks::CvCityReligions_GetSecondaryReligionPantheonBelief>(host, &ReplaceCvCityReligions_GetSecondaryReligionPantheonBelief);
Code
3687/// Is there a pantheon belief in the secondary religion here?3688BeliefTypes CvCityReligions::GetSecondaryReligionPantheonBelief()3689{3690 BeliefTypes eRtnValue = NO_BELIEF;36913692 // Check for the policy that allows a secondary religion to be active3693 if (GET_PLAYER(m_pCity->getOwner()).IsSecondReligionPantheon())3694 {3695 ReligionTypes eSecondary = GetSecondaryReligion();3696 if (eSecondary != NO_RELIGION)3697 {3698 const CvReligion* pReligion = GC.getGame().GetGameReligions()->GetReligion(eSecondary, m_pCity->getOwner());3699 if(pReligion)3700 {3701 for(int iI = 0; iI < pReligion->m_Beliefs.GetNumBeliefs(); iI++)3702 {3703 const BeliefTypes eBelief = pReligion->m_Beliefs.GetBelief(iI);3704 CvBeliefEntry* pEntry = GC.GetGameBeliefs()->GetEntry((int)eBelief);3705 if(pEntry && pEntry->IsPantheonBelief())3706 {3707 eRtnValue = eBelief;3708 break;3709 }3710 }3711 }3712 }3713 }37143715 return eRtnValue;3716}
Calls
- CvBeliefEntry::IsPantheonBelief() const
- CvBeliefXMLEntries::GetEntry(int)
- CvCity::getOwner() const
- CvCityReligions::GetSecondaryReligion()
- CvGame::GetGameReligions()
- CvGameReligions::GetReligion(ReligionTypes, PlayerTypes) const
- CvGlobals::getGame()
- CvGlobals::GetGameBeliefs() const
- CvPlayer::IsSecondReligionPantheon() const
- CvPlayerAI::getPlayer(PlayerTypes)
- CvReligionBeliefs::GetBelief(int) const
- CvReligionBeliefs::GetNumBeliefs() const
Called by
- CvCityBuildings::GetYieldFromGreatWorks(YieldTypes) const
- CvCity::GetJONSCultureThreshold() const
- CvCity::GetLocalHappiness() const
- CvCity::GetYieldPerTurnFromUnimprovedFeatures(YieldTypes) const
- CvCity::UpdateReligion(ReligionTypes)
- CvCity::foodDifferenceTimes100(bool, CvString *) const
- CvCity::getExtraSpecialistYield(YieldTypes, SpecialistTypes) const
- CvCity::getProductionModifier(BuildingTypes, CvString *) const
- CvCity::getStrengthValue(bool) const
- CvCityCitizens::DoSpecialists()
- CvCityCitizens::IsAIWantSpecialistRightNow()
- CvGameCulture::GetGreatWorkTooltip(int, PlayerTypes) const
- CvPlot::calculateImprovementYieldChange(ImprovementTypes, YieldTypes, PlayerTypes, bool, RouteTypes) const
- CvPlot::calculateNatureYield(YieldTypes, TeamTypes, bool) const
- CvGameReligions::GetBeliefYieldForKill(YieldTypes, int, int, PlayerTypes)
- CvPlayerTrade::GetTradeConnectionPolicyValueTimes100(const TradeConnection &, YieldTypes)
- CvUnit::healRate(const CvPlot *) const
- CvLuaCity::lGetReligionBuildingClassYieldChange(lua_State *)
- CvLuaCity::lGetReligionCityRangeStrikeModifier(lua_State *)
- CvLuaCity::lGetSecondaryReligionPantheonBelief(lua_State *)