CvDiplomacyAI::SetResurrectedBy(PlayerTypes, bool)
- Defined in
- CvDiplomacyAI.cpp, line 23115
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetResurrectedBy
Hooks
static bool BeforeCvDiplomacyAI_SetResurrectedBy(CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);static void AfterCvDiplomacyAI_SetResurrectedBy(CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);static void ReplaceCvDiplomacyAI_SetResurrectedBy(void (*original)(CvDiplomacyAI*, PlayerTypes, bool), CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetResurrectedBy>(host, &BeforeCvDiplomacyAI_SetResurrectedBy);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetResurrectedBy>(host, &AfterCvDiplomacyAI_SetResurrectedBy);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetResurrectedBy>(host, &ReplaceCvDiplomacyAI_SetResurrectedBy);
Code
23115void CvDiplomacyAI::SetResurrectedBy(PlayerTypes ePlayer, bool bValue)23116{23117 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");23118 CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");23119 if(bValue)23120 {23121 m_paiResurrectedOnTurn[ePlayer] = GC.getGame().getGameTurn();23122 }23123 else23124 {23125 m_paiResurrectedOnTurn[ePlayer] = -1;23126 }23127}