stolenrays
Deity
- Joined
- Aug 2, 2009
- Messages
- 2,061
I need a little help here. I need some SDK code for my Exchange POW trade item. I'm not good with the syntax, so everything I tried had an error.
I need some code here where you can only exchange hostages if both leaders MEMORY_DECLARED_WAR > 0. It'd prob be something similar to this
if (GET_PLAYER((PlayerTypes)iI).AI_getMemoryCount((PlayerTypes)iJ, MEMORY_WARMONGER > 1));
Spoiler :
Code:
bool CvTeam::canExchangeHostages(TeamTypes eTeam) const
{
for (int iTeam = 0; iTeam < MAX_CIV_TEAMS; ++iTeam)
{
if (iTeam != getID() && iTeam != eTeam)
{
CvTeam& kLoopTeam = GET_TEAM((TeamTypes)iTeam);
if (kLoopTeam.isPermanentWarPeace(eTeam) != kLoopTeam.isPermanentWarPeace(getID()))
{
return false;
}
if (isPermanentWarPeace((TeamTypes)iTeam) != GET_TEAM(eTeam).isPermanentWarPeace((TeamTypes)iTeam))
{
return false;
}
}
}
return true;
}
// edead: end
I need some code here where you can only exchange hostages if both leaders MEMORY_DECLARED_WAR > 0. It'd prob be something similar to this
if (GET_PLAYER((PlayerTypes)iI).AI_getMemoryCount((PlayerTypes)iJ, MEMORY_WARMONGER > 1));