Bazaar developer reference

CvDiplomacyAI::LogOpinion(CvString &, PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 27212
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_LogOpinion

Hooks

static bool BeforeCvDiplomacyAI_LogOpinion(CvDiplomacyAI* self, CvString& strString, PlayerTypes ePlayer);static void AfterCvDiplomacyAI_LogOpinion(CvDiplomacyAI* self, CvString& strString, PlayerTypes ePlayer);static void ReplaceCvDiplomacyAI_LogOpinion(void (*original)(CvDiplomacyAI*, CvString&, PlayerTypes), CvDiplomacyAI* self, CvString& strString, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_LogOpinion>(host, &BeforeCvDiplomacyAI_LogOpinion);CivRegisterAfter<CivHooks::CvDiplomacyAI_LogOpinion>(host, &AfterCvDiplomacyAI_LogOpinion);CivRegisterReplace<CivHooks::CvDiplomacyAI_LogOpinion>(host, &ReplaceCvDiplomacyAI_LogOpinion);

Code

27211/// Log Current Opinion of Major27212void CvDiplomacyAI::LogOpinion(CvString& strString, PlayerTypes ePlayer)27213{27214	CvString strTemp;2721527216	// Opinion27217	switch(GetMajorCivOpinion(ePlayer))27218	{27219	case MAJOR_CIV_OPINION_ALLY:27220		strTemp.Format("OPN **ALLY**");27221		break;27222	case MAJOR_CIV_OPINION_FRIEND:27223		strTemp.Format("OPN FRIEND");27224		break;27225	case MAJOR_CIV_OPINION_FAVORABLE:27226		strTemp.Format("OPN Favorable");27227		break;27228	case MAJOR_CIV_OPINION_NEUTRAL:27229		strTemp.Format("OPN N");27230		break;27231	case MAJOR_CIV_OPINION_COMPETITOR:27232		strTemp.Format("OPN Competitor");27233		break;27234	case MAJOR_CIV_OPINION_ENEMY:27235		strTemp.Format("OPN ENEMY");27236		break;27237	case MAJOR_CIV_OPINION_UNFORGIVABLE:27238		strTemp.Format("OPN **UNFORGIVABLE**");27239		break;27240	default:27241		strTemp.Format("XXX");27242		break;27243	}27244	strString += ", " + strTemp;27245}

Calls

Called by