Bazaar developer reference

checkBattleUnitType(BattleUnitTypes)

Defined in
CvStructs.cpp, line 171
Hook name
CivHooks::checkBattleUnitType

Hooks

static bool BeforecheckBattleUnitType(BattleUnitTypes unitType);static void AftercheckBattleUnitType(BattleUnitTypes unitType);static void ReplacecheckBattleUnitType(void (*original)(BattleUnitTypes), BattleUnitTypes unitType);CivRegisterBefore<CivHooks::checkBattleUnitType>(host, &BeforecheckBattleUnitType);CivRegisterAfter<CivHooks::checkBattleUnitType>(host, &AftercheckBattleUnitType);CivRegisterReplace<CivHooks::checkBattleUnitType>(host, &ReplacecheckBattleUnitType);

Code

171void checkBattleUnitType(BattleUnitTypes unitType)172{173	DEBUG_VARIABLE(unitType);174	CvAssertMsg((unitType >= 0) && (unitType < BATTLE_UNIT_COUNT), "Invalid battle unit type.");175}

Called by