Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerLastRoundWarValueLost(PlayerTypes, PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 9354
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost(void (*original)(CvDiplomacyAI*, PlayerTypes, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost>(host, &BeforeCvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost>(host, &AfterCvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerLastRoundWarValueLost);

Code

9353// Set old estimate of value ePlayer has lost in war with eLostToPlayer (before this turn)9354void CvDiplomacyAI::SetOtherPlayerLastRoundWarValueLost(PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int iValue)9355{9356	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");9357	CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");9358	CvAssertMsg(eLostToPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");9359	CvAssertMsg(eLostToPlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");9360	CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting OtherPlayerLastRoundWarValueLost to a negative value.  Please send Anton your save file and version.");9361	m_ppaaiOtherPlayerLastRoundWarValueLost[ePlayer][eLostToPlayer] = iValue;9362}

Called by