Bazaar developer reference

CvDllPlayer::FirstUnit(int *, bool)

Defined in
CvDllPlayer.cpp, line 297
Class
CvDllPlayer
Hook name
CivHooks::CvDllPlayer_FirstUnit

Hooks

static bool BeforeCvDllPlayer_FirstUnit(CvDllPlayer* self, int* pIterIdx, bool bRev, ICvUnit1*& result);static void AfterCvDllPlayer_FirstUnit(CvDllPlayer* self, int* pIterIdx, bool bRev, ICvUnit1*& result);static ICvUnit1* ReplaceCvDllPlayer_FirstUnit(ICvUnit1* (*original)(CvDllPlayer*, int*, bool), CvDllPlayer* self, int* pIterIdx, bool bRev);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_FirstUnit::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllPlayer_FirstUnit);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_FirstUnit::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllPlayer_FirstUnit);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_FirstUnit::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllPlayer_FirstUnit);

Code

297ICvUnit1* CvDllPlayer::FirstUnit(int* pIterIdx, bool bRev)298{299	CvUnit* pkUnit = m_pPlayer->firstUnit(pIterIdx, bRev);300	return (NULL != pkUnit)? new CvDllUnit(pkUnit) : NULL;301}

Calls