CvDiplomacyAI::SetPlotBuyingAggressivePosture(PlayerTypes, AggressivePostureTypes)
- Defined in
- CvDiplomacyAI.cpp, line 8576
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetPlotBuyingAggressivePosture
Hooks
static bool BeforeCvDiplomacyAI_SetPlotBuyingAggressivePosture(CvDiplomacyAI* self, PlayerTypes ePlayer, AggressivePostureTypes ePosture);static void AfterCvDiplomacyAI_SetPlotBuyingAggressivePosture(CvDiplomacyAI* self, PlayerTypes ePlayer, AggressivePostureTypes ePosture);static void ReplaceCvDiplomacyAI_SetPlotBuyingAggressivePosture(void (*original)(CvDiplomacyAI*, PlayerTypes, AggressivePostureTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, AggressivePostureTypes ePosture);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetPlotBuyingAggressivePosture>(host, &BeforeCvDiplomacyAI_SetPlotBuyingAggressivePosture);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetPlotBuyingAggressivePosture>(host, &AfterCvDiplomacyAI_SetPlotBuyingAggressivePosture);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetPlotBuyingAggressivePosture>(host, &ReplaceCvDiplomacyAI_SetPlotBuyingAggressivePosture);
Code
8575/// Set how aggressively this player has bought land near us8576void CvDiplomacyAI::SetPlotBuyingAggressivePosture(PlayerTypes ePlayer, AggressivePostureTypes ePosture)8577{8578 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");8579 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.");8580 CvAssertMsg(ePosture >= 0, "DIPLOMACY_AI: Invalid AggressivePostureType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");8581 CvAssertMsg(ePosture < NUM_AGGRESSIVE_POSTURE_TYPES, "DIPLOMACY_AI: Invalid AggressivePostureType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");85828583 m_paePlotBuyingAggressivePosture[ePlayer] = ePosture;8584}