//------------------------------------------------------------------------------ void CvDllNetMessageHandler::ResponseUpdateCityCitizens(PlayerTypes ePlayer, int iCityID) { CvCity* pCity = GET_PLAYER(ePlayer).getCity(iCityID); if(NULL != pCity && pCity->GetCityCitizens()) { CvCityCitizens* pkCitizens = pCity->GetCityCitizens(); if(pkCitizens != NULL) { pkCitizens->DoVerifyWorkingPlots(); pkCitizens->DoReallocateCitizens(); } } }
//------------------------------------------------------------------------------ void CvDllNetMessageHandler::ResponseUpdateCityCitizens(PlayerTypes ePlayer, int iCityID) { //there was a crash when this was called while the map is uninitialized if (GC.getMap().numPlots()==0) return; CvCity* pCity = GET_PLAYER(ePlayer).getCity(iCityID); if(NULL != pCity && pCity->GetCityCitizens()) { CvCityCitizens* pkCitizens = pCity->GetCityCitizens(); if(pkCitizens != NULL) { pkCitizens->DoVerifyWorkingPlots(); pkCitizens->DoReallocateCitizens(); } } }