Bazaar developer reference

CvGame::DoMinorBullyGold(PlayerTypes, PlayerTypes)

Defined in
CvGame.cpp, line 10549
Class
CvGame
Hook name
CivHooks::CvGame_DoMinorBullyGold

Hooks

static bool BeforeCvGame_DoMinorBullyGold(CvGame* self, PlayerTypes eBully, PlayerTypes eMinor);static void AfterCvGame_DoMinorBullyGold(CvGame* self, PlayerTypes eBully, PlayerTypes eMinor);static void ReplaceCvGame_DoMinorBullyGold(void (*original)(CvGame*, PlayerTypes, PlayerTypes), CvGame* self, PlayerTypes eBully, PlayerTypes eMinor);CivRegisterBefore<CivHooks::CvGame_DoMinorBullyGold>(host, &BeforeCvGame_DoMinorBullyGold);CivRegisterAfter<CivHooks::CvGame_DoMinorBullyGold>(host, &AfterCvGame_DoMinorBullyGold);CivRegisterReplace<CivHooks::CvGame_DoMinorBullyGold>(host, &ReplaceCvGame_DoMinorBullyGold);

Code

10547/// Do the action of a major bullying gold from a minor10548/// Demanded gold and a calculated bully metric are not provided (ex. from Lua, Player UI), so calculate them here10549void CvGame::DoMinorBullyGold(PlayerTypes eBully, PlayerTypes eMinor)10550{10551	CvAssertMsg(eBully >= 0, "eBully is expected to be non-negative (invalid Index)");10552	CvAssertMsg(eBully < MAX_MAJOR_CIVS, "eBully is expected to be within maximum bounds (invalid Index)");10553	CvAssertMsg(eMinor >= MAX_MAJOR_CIVS, "eMinor is not in expected range (invalid Index)");10554	CvAssertMsg(eMinor < MAX_CIV_PLAYERS, "eMinor is not in expected range (invalid Index)");1055510556	int iGold = GET_PLAYER(eMinor).GetMinorCivAI()->GetBullyGoldAmount(eBully);1055710558	gDLL->sendMinorBullyGold(eBully, eMinor, iGold);10559}

Calls

Called by