Bazaar developer reference

CvGame::DoMinorGiftTileImprovement(PlayerTypes, PlayerTypes, int, int)

Defined in
CvGame.cpp, line 10536
Class
CvGame
Hook name
CivHooks::CvGame_DoMinorGiftTileImprovement

Hooks

static bool BeforeCvGame_DoMinorGiftTileImprovement(CvGame* self, PlayerTypes eMajor, PlayerTypes eMinor, int iPlotX, int iPlotY);static void AfterCvGame_DoMinorGiftTileImprovement(CvGame* self, PlayerTypes eMajor, PlayerTypes eMinor, int iPlotX, int iPlotY);static void ReplaceCvGame_DoMinorGiftTileImprovement(void (*original)(CvGame*, PlayerTypes, PlayerTypes, int, int), CvGame* self, PlayerTypes eMajor, PlayerTypes eMinor, int iPlotX, int iPlotY);CivRegisterBefore<CivHooks::CvGame_DoMinorGiftTileImprovement>(host, &BeforeCvGame_DoMinorGiftTileImprovement);CivRegisterAfter<CivHooks::CvGame_DoMinorGiftTileImprovement>(host, &AfterCvGame_DoMinorGiftTileImprovement);CivRegisterReplace<CivHooks::CvGame_DoMinorGiftTileImprovement>(host, &ReplaceCvGame_DoMinorGiftTileImprovement);

Code

10535/// Do the action of a major gifting a tile improvement to a minor's plot, to improve its resource10536void CvGame::DoMinorGiftTileImprovement(PlayerTypes eMajor, PlayerTypes eMinor, int iPlotX, int iPlotY)10537{10538	CvAssertMsg(eMajor >= 0, "eMajor is expected to be non-negative (invalid Index)");10539	CvAssertMsg(eMajor < MAX_MAJOR_CIVS, "eMajor is expected to be within maximum bounds (invalid Index)");10540	CvAssertMsg(eMinor >= MAX_MAJOR_CIVS, "eMinor is not in expected range (invalid Index)");10541	CvAssertMsg(eMinor < MAX_CIV_PLAYERS, "eMinor is not in expected range (invalid Index)");1054210543	gDLL->sendMinorGiftTileImprovement(eMajor, eMinor, iPlotX, iPlotY);10544}

Calls

Called by