CvDiplomacyAI::GetLandDisputeLevelScore(PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 23277
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetLandDisputeLevelScore
Hooks
static bool BeforeCvDiplomacyAI_GetLandDisputeLevelScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetLandDisputeLevelScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetLandDisputeLevelScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetLandDisputeLevelScore>(host, &BeforeCvDiplomacyAI_GetLandDisputeLevelScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetLandDisputeLevelScore>(host, &AfterCvDiplomacyAI_GetLandDisputeLevelScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetLandDisputeLevelScore>(host, &ReplaceCvDiplomacyAI_GetLandDisputeLevelScore);
Code
23277int CvDiplomacyAI::GetLandDisputeLevelScore(PlayerTypes ePlayer)23278{23279 // Look at Land Dispute23280 int iOpinionWeight = 0;23281 switch(GetLandDisputeLevel(ePlayer))23282 {23283 case DISPUTE_LEVEL_FIERCE:23284 iOpinionWeight += /*30*/ GC.getOPINION_WEIGHT_LAND_FIERCE();23285 break;23286 case DISPUTE_LEVEL_STRONG:23287 iOpinionWeight += /*20*/ GC.getOPINION_WEIGHT_LAND_STRONG();23288 break;23289 case DISPUTE_LEVEL_WEAK:23290 iOpinionWeight += /*10*/ GC.getOPINION_WEIGHT_LAND_WEAK();23291 break;23292 case DISPUTE_LEVEL_NONE:23293 iOpinionWeight += /*-6*/ GC.getOPINION_WEIGHT_LAND_NONE();23294 break;23295 }23296 return iOpinionWeight;23297}