Bazaar developer reference

CvDiplomacyAI::GetBrokenMilitaryPromiseWithAnybodyScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23547
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore

Hooks

static bool BeforeCvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore>(host, &BeforeCvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore>(host, &AfterCvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore>(host, &ReplaceCvDiplomacyAI_GetBrokenMilitaryPromiseWithAnybodyScore);

Code

23547int CvDiplomacyAI::GetBrokenMilitaryPromiseWithAnybodyScore(PlayerTypes ePlayer)23548{23549	int iOpinionWeight = 0;23550	// Broken military promise with us?23551	if(IsPlayerBrokenMilitaryPromise(ePlayer))23552	{23553	}23554	else if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).IsBrokenMilitaryPromise())23555	{23556		iOpinionWeight += /*15*/ GC.getOPINION_WEIGHT_BROKEN_MILITARY_PROMISE_WORLD();23557	}2355823559	return iOpinionWeight;23560}

Calls

Called by