Bazaar developer reference

CvCity::getProductionSpecialist() const

Defined in
CvCity.cpp, line 4198
Class
CvCity
Hook name
CivHooks::CvCity_getProductionSpecialist

Hooks

static bool BeforeCvCity_getProductionSpecialist(const CvCity* self, SpecialistTypes& result);static void AfterCvCity_getProductionSpecialist(const CvCity* self, SpecialistTypes& result);static SpecialistTypes ReplaceCvCity_getProductionSpecialist(SpecialistTypes (*original)(const CvCity*), const CvCity* self);CivRegisterBefore<CivHooks::CvCity_getProductionSpecialist>(host, &BeforeCvCity_getProductionSpecialist);CivRegisterAfter<CivHooks::CvCity_getProductionSpecialist>(host, &AfterCvCity_getProductionSpecialist);CivRegisterReplace<CivHooks::CvCity_getProductionSpecialist>(host, &ReplaceCvCity_getProductionSpecialist);

Code

4198SpecialistTypes CvCity::getProductionSpecialist() const4199{4200	VALIDATE_OBJECT4201	const OrderData* pOrderNode = headOrderQueueNode();42024203	if(pOrderNode != NULL)4204	{4205		switch(pOrderNode->eOrderType)4206		{4207		case ORDER_TRAIN:4208		case ORDER_CONSTRUCT:4209		case ORDER_CREATE:4210			break;42114212		case ORDER_PREPARE:4213			return ((SpecialistTypes)(pOrderNode->iData1));4214			break;42154216		case ORDER_MAINTAIN:4217			break;42184219		default:4220			CvAssertMsg(false, "pOrderNode->eOrderType failed to match a valid option");4221			break;4222		}4223	}42244225	return NO_SPECIALIST;4226}

Calls

Called by