Bazaar developer reference

CvDiplomacyAI::GetBrokenAttackCityStatePromiseWithAnybodyScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23671
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore

Hooks

static bool BeforeCvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore>(host, &BeforeCvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore>(host, &AfterCvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore>(host, &ReplaceCvDiplomacyAI_GetBrokenAttackCityStatePromiseWithAnybodyScore);

Code

23671int CvDiplomacyAI::GetBrokenAttackCityStatePromiseWithAnybodyScore(PlayerTypes ePlayer)23672{23673	int iOpinionWeight = 0;23674	// Broken CityState attack promise with us?23675	if(IsPlayerBrokenAttackCityStatePromise(ePlayer))23676	{23677	}23678	// Broken CityState attack promise with someone else?23679	else if(GET_TEAM(GET_PLAYER(ePlayer).getTeam()).IsBrokenCityStatePromise())23680	{23681		iOpinionWeight += /*0*/ GC.getOPINION_WEIGHT_BROKEN_CITY_STATE_PROMISE_WORLD();23682	}2368323684	return iOpinionWeight;23685}

Calls

Called by