Bazaar developer reference

CvWonderProductionAI::FlavorUpdate()

Defined in
CvWonderProductionAI.cpp, line 164
Class
CvWonderProductionAI
Hook name
CivHooks::CvWonderProductionAI_FlavorUpdate
Overrides
CvFlavorRecipient::FlavorUpdate()

Hooks

static bool BeforeCvWonderProductionAI_FlavorUpdate(CvWonderProductionAI* self);static void AfterCvWonderProductionAI_FlavorUpdate(CvWonderProductionAI* self);static void ReplaceCvWonderProductionAI_FlavorUpdate(void (*original)(CvWonderProductionAI*), CvWonderProductionAI* self);CivRegisterBefore<CivHooks::CvWonderProductionAI_FlavorUpdate>(host, &BeforeCvWonderProductionAI_FlavorUpdate);CivRegisterAfter<CivHooks::CvWonderProductionAI_FlavorUpdate>(host, &AfterCvWonderProductionAI_FlavorUpdate);CivRegisterReplace<CivHooks::CvWonderProductionAI_FlavorUpdate>(host, &ReplaceCvWonderProductionAI_FlavorUpdate);

Code

163/// Respond to a new set of flavor values164void CvWonderProductionAI::FlavorUpdate()165{166	// Broadcast to our sub AI objects167	for(int iFlavor = 0; iFlavor < GC.getNumFlavorTypes(); iFlavor++)168	{169		int iFlavorValue = GetLatestFlavorValue((FlavorTypes)iFlavor);170		AddFlavorWeights((FlavorTypes)iFlavor, iFlavorValue);171	}172}

Calls