Bazaar developer reference

CvDllNetMessageHandler::ResponseSetCityAIFocus(PlayerTypes, int, CityAIFocusTypes)

Defined in
CvDllNetMessageHandler.cpp, line 941
Class
CvDllNetMessageHandler
Hook name
CivHooks::CvDllNetMessageHandler_ResponseSetCityAIFocus

Hooks

static bool BeforeCvDllNetMessageHandler_ResponseSetCityAIFocus(CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iCityID, CityAIFocusTypes eFocus);static void AfterCvDllNetMessageHandler_ResponseSetCityAIFocus(CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iCityID, CityAIFocusTypes eFocus);static void ReplaceCvDllNetMessageHandler_ResponseSetCityAIFocus(void (*original)(CvDllNetMessageHandler*, PlayerTypes, int, CityAIFocusTypes), CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iCityID, CityAIFocusTypes eFocus);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseSetCityAIFocus::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllNetMessageHandler_ResponseSetCityAIFocus);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseSetCityAIFocus::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllNetMessageHandler_ResponseSetCityAIFocus);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseSetCityAIFocus::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllNetMessageHandler_ResponseSetCityAIFocus);

Code

941void CvDllNetMessageHandler::ResponseSetCityAIFocus(PlayerTypes ePlayer, int iCityID, CityAIFocusTypes eFocus)942{943	CvCity* pCity = GET_PLAYER(ePlayer).getCity(iCityID);944	if(pCity != NULL)945	{946		CvCityCitizens* pkCitizens = pCity->GetCityCitizens();947		if(pkCitizens != NULL)948		{949			pkCitizens->SetFocusType(eFocus);950		}951	}952}

Calls