Bazaar developer reference

CvDiplomacyAI::GetAngryAboutProtectedMinorKilledScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23817
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore

Hooks

static bool BeforeCvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore>(host, &BeforeCvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore>(host, &AfterCvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore>(host, &ReplaceCvDiplomacyAI_GetAngryAboutProtectedMinorKilledScore);

Code

23817int CvDiplomacyAI::GetAngryAboutProtectedMinorKilledScore(PlayerTypes ePlayer)23818{23819	int iOpinionWeight = 0;23820	if (IsAngryAboutProtectedMinorKilled(ePlayer))23821	{23822		iOpinionWeight += /*40*/ GC.getOPINION_WEIGHT_KILLED_PROTECTED_MINOR();23823		if (GetOtherPlayerNumProtectedMinorsKilled(ePlayer) > 1)23824			iOpinionWeight += /*10*/ GC.getOPINION_WEIGHT_KILLED_MANY_PROTECTED_MINORS();23825	}23826	return iOpinionWeight;23827}

Calls

Called by