Bazaar developer reference

CvDiplomacyAI::GetWeDenouncedFriendCount()

Defined in
CvDiplomacyAI.cpp, line 21873
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetWeDenouncedFriendCount

Hooks

static bool BeforeCvDiplomacyAI_GetWeDenouncedFriendCount(CvDiplomacyAI* self, int& result);static void AfterCvDiplomacyAI_GetWeDenouncedFriendCount(CvDiplomacyAI* self, int& result);static int ReplaceCvDiplomacyAI_GetWeDenouncedFriendCount(int (*original)(CvDiplomacyAI*), CvDiplomacyAI* self);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWeDenouncedFriendCount>(host, &BeforeCvDiplomacyAI_GetWeDenouncedFriendCount);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWeDenouncedFriendCount>(host, &AfterCvDiplomacyAI_GetWeDenouncedFriendCount);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWeDenouncedFriendCount>(host, &ReplaceCvDiplomacyAI_GetWeDenouncedFriendCount);

Code

21872/// How many friends have WE Denounced ?21873int CvDiplomacyAI::GetWeDenouncedFriendCount()21874{21875	int iNum = 0;2187621877	PlayerTypes eMyPlayer = GetPlayer()->GetID();2187821879	PlayerTypes eLoopPlayer;21880	for(int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)21881	{21882		eLoopPlayer = (PlayerTypes) iPlayerLoop;2188321884		if(GET_PLAYER(eLoopPlayer).GetDiplomacyAI()->IsFriendDenouncedUs(eMyPlayer))21885			iNum++;21886	}2188721888	return iNum;21889}

Calls

Called by