Bazaar developer reference

CvEconomicAIStrategyXMLEntry::GetPlayerFlavorValue(int) const

Defined in
CvEconomicAI.cpp, line 115
Class
CvEconomicAIStrategyXMLEntry
Hook name
CivHooks::CvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue

Hooks

static bool BeforeCvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue(const CvEconomicAIStrategyXMLEntry* self, int i, int& result);static void AfterCvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue(const CvEconomicAIStrategyXMLEntry* self, int i, int& result);static int ReplaceCvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue(int (*original)(const CvEconomicAIStrategyXMLEntry*, int), const CvEconomicAIStrategyXMLEntry* self, int i);CivRegisterBefore<CivHooks::CvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue>(host, &BeforeCvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue);CivRegisterAfter<CivHooks::CvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue>(host, &AfterCvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue);CivRegisterReplace<CivHooks::CvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue>(host, &ReplaceCvEconomicAIStrategyXMLEntry_GetPlayerFlavorValue);

Code

114/// What player flavors will be added by adopting this Strategy?115int CvEconomicAIStrategyXMLEntry::GetPlayerFlavorValue(int i) const116{117	FAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");118	FAssertMsg(i > -1, "Index out of bounds");119	return m_piPlayerFlavorValue ? m_piPlayerFlavorValue[i] : -1;120}

Called by