FlammieJerynZ
Flammy
Hi everyone! How're you?
I hope you all be okay.
I was having the idea to create a custom function for CvCity in the DLL, to check if a City has a Secondary Pantheon Belief (gained by the Religious Tolerance Social Policy in Piety Social Policy Tree).
But I was wondering if is well writed here, you know, to avoid any Crashes, bad data or confusions.
There is it:
// ----------------------------------------------------------------------------
bool CvCity::HasSecondaryReligionPantheonBelief(BeliefTypes iBeliefType) const
{
BeliefTypes eSecondaryPantheon = GetCityReligions()->GetSecondaryReligionPantheonBelief();
return (eSecondaryPantheon != NO_BELIEF && eSecondaryPantheon == iBeliefType);
}
Thank you in advance and I will appreciate any answer!
I hope you all be okay.
I was having the idea to create a custom function for CvCity in the DLL, to check if a City has a Secondary Pantheon Belief (gained by the Religious Tolerance Social Policy in Piety Social Policy Tree).
But I was wondering if is well writed here, you know, to avoid any Crashes, bad data or confusions.
There is it:
Spoiler The script for the function :
// ----------------------------------------------------------------------------
bool CvCity::HasSecondaryReligionPantheonBelief(BeliefTypes iBeliefType) const
{
BeliefTypes eSecondaryPantheon = GetCityReligions()->GetSecondaryReligionPantheonBelief();
return (eSecondaryPantheon != NO_BELIEF && eSecondaryPantheon == iBeliefType);
}
Thank you in advance and I will appreciate any answer!
Last edited: