Bazaar developer reference

CvMinorCivAI::GetGiftTileImprovementCost(PlayerTypes)

Defined in
CvMinorCivAI.cpp, line 10147
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_GetGiftTileImprovementCost

Hooks

static bool BeforeCvMinorCivAI_GetGiftTileImprovementCost(CvMinorCivAI* self, PlayerTypes eMajor, int& result);static void AfterCvMinorCivAI_GetGiftTileImprovementCost(CvMinorCivAI* self, PlayerTypes eMajor, int& result);static int ReplaceCvMinorCivAI_GetGiftTileImprovementCost(int (*original)(CvMinorCivAI*, PlayerTypes), CvMinorCivAI* self, PlayerTypes eMajor);CivRegisterBefore<CivHooks::CvMinorCivAI_GetGiftTileImprovementCost>(host, &BeforeCvMinorCivAI_GetGiftTileImprovementCost);CivRegisterAfter<CivHooks::CvMinorCivAI_GetGiftTileImprovementCost>(host, &AfterCvMinorCivAI_GetGiftTileImprovementCost);CivRegisterReplace<CivHooks::CvMinorCivAI_GetGiftTileImprovementCost>(host, &ReplaceCvMinorCivAI_GetGiftTileImprovementCost);

Code

10147int CvMinorCivAI::GetGiftTileImprovementCost(PlayerTypes eMajor)10148{10149	CvAssertMsg(eMajor >= 0, "eMajor is expected to be non-negative (invalid Index)");10150	CvAssertMsg(eMajor < MAX_MAJOR_CIVS, "eMajor is expected to be within maximum bounds (invalid Index)");10151	if(eMajor < 0 || eMajor >= MAX_MAJOR_CIVS) return -1;1015210153	return GC.getMINOR_CIV_TILE_IMPROVEMENT_GIFT_COST();10154}

Calls

Called by