Bazaar developer reference

CvPlayer::changeUnitCombatProductionModifiers(UnitCombatTypes, int)

Defined in
CvPlayer.cpp, line 20409
Class
CvPlayer
Hook name
CivHooks::CvPlayer_changeUnitCombatProductionModifiers

Hooks

static bool BeforeCvPlayer_changeUnitCombatProductionModifiers(CvPlayer* self, UnitCombatTypes eIndex, int iChange);static void AfterCvPlayer_changeUnitCombatProductionModifiers(CvPlayer* self, UnitCombatTypes eIndex, int iChange);static void ReplaceCvPlayer_changeUnitCombatProductionModifiers(void (*original)(CvPlayer*, UnitCombatTypes, int), CvPlayer* self, UnitCombatTypes eIndex, int iChange);CivRegisterBefore<CivHooks::CvPlayer_changeUnitCombatProductionModifiers>(host, &BeforeCvPlayer_changeUnitCombatProductionModifiers);CivRegisterAfter<CivHooks::CvPlayer_changeUnitCombatProductionModifiers>(host, &AfterCvPlayer_changeUnitCombatProductionModifiers);CivRegisterReplace<CivHooks::CvPlayer_changeUnitCombatProductionModifiers>(host, &ReplaceCvPlayer_changeUnitCombatProductionModifiers);

Code

20409void CvPlayer::changeUnitCombatProductionModifiers(UnitCombatTypes eIndex, int iChange)20410{20411	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");20412	CvAssertMsg(eIndex < GC.getNumUnitCombatClassInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");2041320414	if(iChange != 0)20415	{20416		m_paiUnitCombatProductionModifiers.setAt(eIndex, m_paiUnitCombatProductionModifiers[eIndex] + iChange);20417	}20418}

Calls

Called by