Bazaar developer reference

CvDllPlayer::AddDiplomacyRequest(PlayerTypes, DiploUIStateTypes, const char *, LeaderheadAnimationTypes, int)

Defined in
CvDllPlayer.cpp, line 406
Class
CvDllPlayer
Hook name
CivHooks::CvDllPlayer_AddDiplomacyRequest

Hooks

static bool BeforeCvDllPlayer_AddDiplomacyRequest(CvDllPlayer* self, PlayerTypes ePlayerID, DiploUIStateTypes eDiploType, const char* pszMessage, LeaderheadAnimationTypes eAnimationType, int iExtraGameData, bool& result);static void AfterCvDllPlayer_AddDiplomacyRequest(CvDllPlayer* self, PlayerTypes ePlayerID, DiploUIStateTypes eDiploType, const char* pszMessage, LeaderheadAnimationTypes eAnimationType, int iExtraGameData, bool& result);static bool ReplaceCvDllPlayer_AddDiplomacyRequest(bool (*original)(CvDllPlayer*, PlayerTypes, DiploUIStateTypes, const char*, LeaderheadAnimationTypes, int), CvDllPlayer* self, PlayerTypes ePlayerID, DiploUIStateTypes eDiploType, const char* pszMessage, LeaderheadAnimationTypes eAnimationType, int iExtraGameData);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_AddDiplomacyRequest::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllPlayer_AddDiplomacyRequest);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_AddDiplomacyRequest::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllPlayer_AddDiplomacyRequest);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_AddDiplomacyRequest::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllPlayer_AddDiplomacyRequest);

Code

406bool CvDllPlayer::AddDiplomacyRequest(PlayerTypes ePlayerID, DiploUIStateTypes eDiploType, const char* pszMessage, LeaderheadAnimationTypes eAnimationType, int iExtraGameData)407{408#if defined(MOD_API_PLAYER_LOGS)409	return m_pPlayer->GetDiplomacyRequests()->Add(ePlayerID, eDiploType, NO_DIPLO_MESSAGE_TYPE, pszMessage, eAnimationType, iExtraGameData);410#else411	return m_pPlayer->GetDiplomacyRequests()->Add(ePlayerID, eDiploType, pszMessage, eAnimationType, iExtraGameData);412#endif413}

Calls