Bazaar developer reference

CvDiplomacyAI::SetPlayerStopSpyingRequestAccepted(PlayerTypes, bool)

Defined in
CvDiplomacyAI.cpp, line 21065
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetPlayerStopSpyingRequestAccepted

Hooks

static bool BeforeCvDiplomacyAI_SetPlayerStopSpyingRequestAccepted(CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);static void AfterCvDiplomacyAI_SetPlayerStopSpyingRequestAccepted(CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);static void ReplaceCvDiplomacyAI_SetPlayerStopSpyingRequestAccepted(void (*original)(CvDiplomacyAI*, PlayerTypes, bool), CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetPlayerStopSpyingRequestAccepted>(host, &BeforeCvDiplomacyAI_SetPlayerStopSpyingRequestAccepted);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetPlayerStopSpyingRequestAccepted>(host, &AfterCvDiplomacyAI_SetPlayerStopSpyingRequestAccepted);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetPlayerStopSpyingRequestAccepted>(host, &ReplaceCvDiplomacyAI_SetPlayerStopSpyingRequestAccepted);

Code

21065void CvDiplomacyAI::SetPlayerStopSpyingRequestAccepted(PlayerTypes ePlayer, bool bValue)21066{21067	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send slewis this with your last 5 autosaves and what changelist # you're playing.");21068	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send slewis this with your last 5 autosaves and what changelist # you're playing.");2106921070	if(bValue != IsPlayerStopSpyingRequestAccepted(ePlayer))21071	{21072		m_pabPlayerStopSpyingRequestAccepted[ePlayer] = bValue;21073	}21074}

Calls

Called by