Bazaar developer reference

CvDiplomacyAI::GetTimesRobbedScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23522
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetTimesRobbedScore

Hooks

static bool BeforeCvDiplomacyAI_GetTimesRobbedScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetTimesRobbedScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetTimesRobbedScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetTimesRobbedScore>(host, &BeforeCvDiplomacyAI_GetTimesRobbedScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetTimesRobbedScore>(host, &AfterCvDiplomacyAI_GetTimesRobbedScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetTimesRobbedScore>(host, &ReplaceCvDiplomacyAI_GetTimesRobbedScore);

Code

23522int CvDiplomacyAI::GetTimesRobbedScore(PlayerTypes ePlayer)23523{23524	int iOpinionWeight = 0;23525	if(GetNumTimesRobbedBy(ePlayer) > 0)23526		iOpinionWeight += (GetNumTimesRobbedBy(ePlayer) * /*20*/ GC.getOPINION_WEIGHT_ROBBED_BY());23527	return iOpinionWeight;23528}

Calls

Called by