Bazaar developer reference

getCity(IDInfo)

Defined in
CvGameCoreUtils.cpp, line 175
Hook name
CivHooks::getCity

Hooks

static bool BeforegetCity(IDInfo city, CvCity*& result);static void AftergetCity(IDInfo city, CvCity*& result);static CvCity* ReplacegetCity(CvCity* (*original)(IDInfo), IDInfo city);CivRegisterBefore<CivHooks::getCity>(host, &BeforegetCity);CivRegisterAfter<CivHooks::getCity>(host, &AftergetCity);CivRegisterReplace<CivHooks::getCity>(host, &ReplacegetCity);

Code

175CvCity* getCity(IDInfo city)176{177	if((city.eOwner >= 0) && city.eOwner < MAX_PLAYERS)178	{179		return (GET_PLAYER((PlayerTypes)city.eOwner).getCity(city.iID));180	}181182	return NULL;183}

Calls

Called by