Bazaar developer reference

CvDllPlayer::GetDiplomacyAI()

Defined in
CvDllPlayer.cpp, line 388
Class
CvDllPlayer
Hook name
CivHooks::CvDllPlayer_GetDiplomacyAI

Hooks

static bool BeforeCvDllPlayer_GetDiplomacyAI(CvDllPlayer* self, ICvDiplomacyAI1*& result);static void AfterCvDllPlayer_GetDiplomacyAI(CvDllPlayer* self, ICvDiplomacyAI1*& result);static ICvDiplomacyAI1* ReplaceCvDllPlayer_GetDiplomacyAI(ICvDiplomacyAI1* (*original)(CvDllPlayer*), CvDllPlayer* self);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_GetDiplomacyAI::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllPlayer_GetDiplomacyAI);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_GetDiplomacyAI::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllPlayer_GetDiplomacyAI);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_GetDiplomacyAI::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllPlayer_GetDiplomacyAI);

Code

388ICvDiplomacyAI1* CvDllPlayer::GetDiplomacyAI()389{390	CvDiplomacyAI* pAI = m_pPlayer->GetDiplomacyAI();391	return (NULL != pAI)? new CvDllDiplomacyAI(pAI) : NULL;392}

Calls