for (iI = 0; iI < MAX_PLAYERS; iI++)
{
CvPlayer& kPlayer = GET_PLAYER((PlayerTypes)iI);
if ((kPlayer.getTeam() == getID()) || (kPlayer.getTeam() == eTeam))
{
//TKs Here we check to see if there are trade net works established with other Players, if so update the Trade Net works
for (int iPlotGroup = 0; iPlotGroup < kPlayer.getNumPlotgroups(); iPlotGroup++)
{
for (int iCity = 0; iCity < kPlayer.getNumCitiesInPlotgroup(iPlotGroup); iCity++)
{
CvCity* pCity = kPlayer.getCity(iPlotGroup, iCity);
CvPlotGroup* pPlotGroup = pCity->plot()->getPlotGroup((PlayerTypes)iI);
if (pPlotGroup != NULL)
{
//pPlotGroup->recalculatePlots();
CLLNode<XYCoords>* pPlotNode;
pPlotNode = pPlotGroup->headPlotsNode();
CvPlot* pPlot;
while (pPlotNode != NULL)
{
pPlot = GC.getMapINLINE().plotSorenINLINE(pPlotNode->m_data.iX, pPlotNode->m_data.iY);
FAssertMsg(pPlot != NULL, "Plot is not assigned a valid value");
pPlot->updatePlotGroup((PlayerTypes)iI, true);
pPlotNode = pPlotGroup->nextPlotsNode(pPlotNode);
}
}
}
}
kPlayer.validateMissions();
}
}