Bazaar developer reference

CvCity::IsOccupied() const

Defined in
CvCity.cpp, line 9590
Class
CvCity
Hook name
CivHooks::CvCity_IsOccupied

Hooks

static bool BeforeCvCity_IsOccupied(const CvCity* self, bool& result);static void AfterCvCity_IsOccupied(const CvCity* self, bool& result);static bool ReplaceCvCity_IsOccupied(bool (*original)(const CvCity*), const CvCity* self);CivRegisterBefore<CivHooks::CvCity_IsOccupied>(host, &BeforeCvCity_IsOccupied);CivRegisterAfter<CivHooks::CvCity_IsOccupied>(host, &AfterCvCity_IsOccupied);CivRegisterReplace<CivHooks::CvCity_IsOccupied>(host, &ReplaceCvCity_IsOccupied);

Code

9590bool CvCity::IsOccupied() const9591{9592	VALIDATE_OBJECT95939594	// If we're a puppet then we don't count as an occupied city9595	if(IsPuppet())9596		return false;95979598	return m_bOccupied;9599}

Calls

Called by