CvPlayer::SetResearchAgreementCounter(PlayerTypes, int)
- Defined in
- CvPlayer.cpp, line 19361
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_SetResearchAgreementCounter
Hooks
static bool BeforeCvPlayer_SetResearchAgreementCounter(CvPlayer* self, PlayerTypes ePlayer, int iValue);static void AfterCvPlayer_SetResearchAgreementCounter(CvPlayer* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvPlayer_SetResearchAgreementCounter(void (*original)(CvPlayer*, PlayerTypes, int), CvPlayer* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvPlayer_SetResearchAgreementCounter>(host, &BeforeCvPlayer_SetResearchAgreementCounter);CivRegisterAfter<CivHooks::CvPlayer_SetResearchAgreementCounter>(host, &AfterCvPlayer_SetResearchAgreementCounter);CivRegisterReplace<CivHooks::CvPlayer_SetResearchAgreementCounter>(host, &ReplaceCvPlayer_SetResearchAgreementCounter);
Code
19360/// Set the beakers accumulated during the RA with a player19361void CvPlayer::SetResearchAgreementCounter(PlayerTypes ePlayer, int iValue)19362{19363 CvAssertMsg(ePlayer >= 0, "eIndex is expected to be non-negative (invalid Index)");19364 CvAssertMsg(ePlayer < MAX_PLAYERS, "eIndex is expected to be within maximum bounds (invalid Index)");1936519366 CvAssertMsg(GetID() != ePlayer, "Trying to make a RA Agreement with oneself. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");1936719368 m_aiResearchAgreementCounter.setAt(ePlayer, iValue);19369}
Calls
FAutoVariable::setAt