CvDiplomacyAI::LogWarPeaceWillingToOffer(CvString &, PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 27465
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_LogWarPeaceWillingToOffer
Hooks
static bool BeforeCvDiplomacyAI_LogWarPeaceWillingToOffer(CvDiplomacyAI* self, CvString& strString, PlayerTypes ePlayer);static void AfterCvDiplomacyAI_LogWarPeaceWillingToOffer(CvDiplomacyAI* self, CvString& strString, PlayerTypes ePlayer);static void ReplaceCvDiplomacyAI_LogWarPeaceWillingToOffer(void (*original)(CvDiplomacyAI*, CvString&, PlayerTypes), CvDiplomacyAI* self, CvString& strString, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_LogWarPeaceWillingToOffer>(host, &BeforeCvDiplomacyAI_LogWarPeaceWillingToOffer);CivRegisterAfter<CivHooks::CvDiplomacyAI_LogWarPeaceWillingToOffer>(host, &AfterCvDiplomacyAI_LogWarPeaceWillingToOffer);CivRegisterReplace<CivHooks::CvDiplomacyAI_LogWarPeaceWillingToOffer>(host, &ReplaceCvDiplomacyAI_LogWarPeaceWillingToOffer);
Code
27464/// Log Peace Treaty Willing to Offer27465void CvDiplomacyAI::LogWarPeaceWillingToOffer(CvString& strString, PlayerTypes ePlayer)27466{27467 CvString strTemp;2746827469 // No Minor Civs27470 if(GET_PLAYER(ePlayer).isMinorCiv())27471 {27472 strTemp.Format("");27473 }27474 else27475 {27476 // War Goal27477 switch(GetTreatyWillingToOffer(ePlayer))27478 {27479 case NO_PEACE_TREATY_TYPE:27480 strTemp.Format("");27481 break;27482 case PEACE_TREATY_WHITE_PEACE:27483 strTemp.Format("PeaceOff White Peace (0)");27484 break;27485 case PEACE_TREATY_ARMISTICE:27486 strTemp.Format("PeaceOff Armistice (1)");27487 break;27488 case PEACE_TREATY_SETTLEMENT:27489 strTemp.Format("PeaceOff Settlement (2)");27490 break;27491 case PEACE_TREATY_BACKDOWN:27492 strTemp.Format("PeaceOff Backdown (3)");27493 break;27494 case PEACE_TREATY_SUBMISSION:27495 strTemp.Format("PeaceOff Submission (4)");27496 break;27497 case PEACE_TREATY_SURRENDER:27498 strTemp.Format("PeaceOff Surrender (5)");27499 break;27500 case PEACE_TREATY_CESSION:27501 strTemp.Format("PeaceOff Cession (6)");27502 break;27503 case PEACE_TREATY_CAPITULATION:27504 strTemp.Format("PeaceOff CAPITULATION (7)");27505 break;27506 case PEACE_TREATY_UNCONDITIONAL_SURRENDER:27507 strTemp.Format("PeaceOff **UN SURRENDER (8)**");27508 break;27509 default:27510 strTemp.Format("XXX");27511 break;27512 }27513 }2751427515 strString += ", " + strTemp;27516}
Calls
- CvDiplomacyAI::GetTreatyWillingToOffer(PlayerTypes) const
- CvPlayer::isMinorCiv() const
- CvPlayerAI::getPlayer(PlayerTypes)
CvString::CvStringCvString::Formatstd::basic_string::operator+=std::operator+