You'd be better off using a player number for testing this.
It's not a good variant for us
. But what you can say about this code:
const CvWString & CvCity::getLeaderName(PlayerTypes eID, uint uiForm) const
{
FASSERT_BOUNDS(0, MAX_PLAYERS, eID, "CvInitCore::getLeaderName");
if ( checkBounds(eID, 0, MAX_PLAYERS) )
{
m_szTemp = gDLL->getObjectText(CvString(m_aszLeaderName[eID]).GetCString(), uiForm, true);
}
else
{
m_szTemp = "";
}
return m_szTemp;
}
bool CvCity::checkBounds( int iValue, int iLower, int iUpper ) const
{
if (iValue >= iLower)
{
if (iValue < iUpper)
{
return true;
}
}
return false;
}
void CvCity::setLeaderName(PlayerTypes eID, const CvWString & szLeaderName)
{
FASSERT_BOUNDS(0, MAX_PLAYERS, eID, "CvInitCore::setLeaderName");
if ( checkBounds(eID, 0, MAX_PLAYERS) )
{
CvWString szName = szLeaderName;
gDLL->stripSpecialCharacters(szName);
m_aszLeaderName[eID] = szName;
}
}
Can i use anything from it? and how to compare szLeaderName( or m_aszLeaderName) with our names? Is it really possible?