Bazaar developer reference

CvMilitaryAIStrategyXMLEntry::GetPlayerFlavorValue(int) const

Defined in
CvMilitaryAI.cpp, line 110
Class
CvMilitaryAIStrategyXMLEntry
Hook name
CivHooks::CvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue

Hooks

static bool BeforeCvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue(const CvMilitaryAIStrategyXMLEntry* self, int i, int& result);static void AfterCvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue(const CvMilitaryAIStrategyXMLEntry* self, int i, int& result);static int ReplaceCvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue(int (*original)(const CvMilitaryAIStrategyXMLEntry*, int), const CvMilitaryAIStrategyXMLEntry* self, int i);CivRegisterBefore<CivHooks::CvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue>(host, &BeforeCvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue);CivRegisterAfter<CivHooks::CvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue>(host, &AfterCvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue);CivRegisterReplace<CivHooks::CvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue>(host, &ReplaceCvMilitaryAIStrategyXMLEntry_GetPlayerFlavorValue);

Code

109/// What player flavors will be added by adopting this Strategy?110int CvMilitaryAIStrategyXMLEntry::GetPlayerFlavorValue(int i) const111{112	FAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");113	FAssertMsg(i > -1, "Index out of bounds");114	return m_piPlayerFlavorValue ? m_piPlayerFlavorValue[i] : -1;115}

Called by