Bazaar developer reference

CvCombatInfo::getCombatMember(BattleUnitTypes) const

Defined in
CvStructs.cpp, line 504
Class
CvCombatInfo
Hook name
CivHooks::CvCombatInfo_getCombatMember

Hooks

static bool BeforeCvCombatInfo_getCombatMember(const CvCombatInfo* self, BattleUnitTypes unitType, const CvCombatMemberEntry*& result);static void AfterCvCombatInfo_getCombatMember(const CvCombatInfo* self, BattleUnitTypes unitType, const CvCombatMemberEntry*& result);static const CvCombatMemberEntry* ReplaceCvCombatInfo_getCombatMember(const CvCombatMemberEntry* (*original)(const CvCombatInfo*, BattleUnitTypes), const CvCombatInfo* self, BattleUnitTypes unitType);CivRegisterBefore<CivHooks::CvCombatInfo_getCombatMember>(host, &BeforeCvCombatInfo_getCombatMember);CivRegisterAfter<CivHooks::CvCombatInfo_getCombatMember>(host, &AfterCvCombatInfo_getCombatMember);CivRegisterReplace<CivHooks::CvCombatInfo_getCombatMember>(host, &ReplaceCvCombatInfo_getCombatMember);

Code

504const CvCombatMemberEntry* CvCombatInfo::getCombatMember(BattleUnitTypes unitType) const505{506	if((int)unitType < (int)BATTLE_UNIT_COUNT)507		return &m_kCombatMembers[unitType];508	return NULL;509}