Bazaar developer reference

CvDiplomacyAI::GetWarValueLost(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 9145
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetWarValueLost

Hooks

static bool BeforeCvDiplomacyAI_GetWarValueLost(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetWarValueLost(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetWarValueLost(int (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWarValueLost>(host, &BeforeCvDiplomacyAI_GetWarValueLost);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWarValueLost>(host, &AfterCvDiplomacyAI_GetWarValueLost);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWarValueLost>(host, &ReplaceCvDiplomacyAI_GetWarValueLost);

Code

9144// What is the value of stuff (Units & Cities) lost in a war against a particular Player?9145int CvDiplomacyAI::GetWarValueLost(PlayerTypes ePlayer) const9146{9147	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9148	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.");9149	return m_paiWarValueLost[ePlayer];9150}

Called by