Bazaar developer reference

CvAICityStrategyEntry::GetPersonalityFlavorThresholdMod(int) const

Defined in
CvCityStrategyAI.cpp, line 121
Class
CvAICityStrategyEntry
Hook name
CivHooks::CvAICityStrategyEntry_GetPersonalityFlavorThresholdMod

Hooks

static bool BeforeCvAICityStrategyEntry_GetPersonalityFlavorThresholdMod(const CvAICityStrategyEntry* self, int i, int& result);static void AfterCvAICityStrategyEntry_GetPersonalityFlavorThresholdMod(const CvAICityStrategyEntry* self, int i, int& result);static int ReplaceCvAICityStrategyEntry_GetPersonalityFlavorThresholdMod(int (*original)(const CvAICityStrategyEntry*, int), const CvAICityStrategyEntry* self, int i);CivRegisterBefore<CivHooks::CvAICityStrategyEntry_GetPersonalityFlavorThresholdMod>(host, &BeforeCvAICityStrategyEntry_GetPersonalityFlavorThresholdMod);CivRegisterAfter<CivHooks::CvAICityStrategyEntry_GetPersonalityFlavorThresholdMod>(host, &AfterCvAICityStrategyEntry_GetPersonalityFlavorThresholdMod);CivRegisterReplace<CivHooks::CvAICityStrategyEntry_GetPersonalityFlavorThresholdMod>(host, &ReplaceCvAICityStrategyEntry_GetPersonalityFlavorThresholdMod);

Code

120/// How do a player's Personality Flavors affect the Threshold for adopting a Strategy? (if applicable)121int CvAICityStrategyEntry::GetPersonalityFlavorThresholdMod(int i) const122{123	CvAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");124	CvAssertMsg(i > -1, "Index out of bounds");125	return m_piPersonalityFlavorThresholdMod ? m_piPersonalityFlavorThresholdMod[i] : -1;126}

Called by