Bazaar developer reference

CvDiplomacyAI::GetPlayerTargetValue(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 6731
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetPlayerTargetValue

Hooks

static bool BeforeCvDiplomacyAI_GetPlayerTargetValue(const CvDiplomacyAI* self, PlayerTypes ePlayer, TargetValueTypes& result);static void AfterCvDiplomacyAI_GetPlayerTargetValue(const CvDiplomacyAI* self, PlayerTypes ePlayer, TargetValueTypes& result);static TargetValueTypes ReplaceCvDiplomacyAI_GetPlayerTargetValue(TargetValueTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetPlayerTargetValue>(host, &BeforeCvDiplomacyAI_GetPlayerTargetValue);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetPlayerTargetValue>(host, &AfterCvDiplomacyAI_GetPlayerTargetValue);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetPlayerTargetValue>(host, &ReplaceCvDiplomacyAI_GetPlayerTargetValue);

Code

6730/// What is our assessment of this player's value as a military target?6731TargetValueTypes CvDiplomacyAI::GetPlayerTargetValue(PlayerTypes ePlayer) const6732{6733	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6734	CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6735	return (TargetValueTypes) m_paePlayerTargetValue[ePlayer];6736}

Called by