Bazaar developer reference

CvDllNetMessageHandler::ResponseSetCityAvoidGrowth(PlayerTypes, int, bool)

Defined in
CvDllNetMessageHandler.cpp, line 954
Class
CvDllNetMessageHandler
Hook name
CivHooks::CvDllNetMessageHandler_ResponseSetCityAvoidGrowth

Hooks

static bool BeforeCvDllNetMessageHandler_ResponseSetCityAvoidGrowth(CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iCityID, bool bAvoidGrowth);static void AfterCvDllNetMessageHandler_ResponseSetCityAvoidGrowth(CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iCityID, bool bAvoidGrowth);static void ReplaceCvDllNetMessageHandler_ResponseSetCityAvoidGrowth(void (*original)(CvDllNetMessageHandler*, PlayerTypes, int, bool), CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iCityID, bool bAvoidGrowth);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseSetCityAvoidGrowth::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllNetMessageHandler_ResponseSetCityAvoidGrowth);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseSetCityAvoidGrowth::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllNetMessageHandler_ResponseSetCityAvoidGrowth);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseSetCityAvoidGrowth::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllNetMessageHandler_ResponseSetCityAvoidGrowth);

Code

954void CvDllNetMessageHandler::ResponseSetCityAvoidGrowth(PlayerTypes ePlayer, int iCityID, bool bAvoidGrowth)955{956	CvCity* pCity = GET_PLAYER(ePlayer).getCity(iCityID);957	if(pCity != NULL)958	{959		CvCityCitizens* pkCitizens = pCity->GetCityCitizens();960		if(pkCitizens != NULL)961		{962			pkCitizens->SetForcedAvoidGrowth(bAvoidGrowth);963		}964	}965}

Calls