Bazaar developer reference

CvMilitaryAI::LogMilitarySummaryMessage(const CvString &)

Defined in
CvMilitaryAI.cpp, line 4449
Class
CvMilitaryAI
Hook name
CivHooks::CvMilitaryAI_LogMilitarySummaryMessage

Hooks

static bool BeforeCvMilitaryAI_LogMilitarySummaryMessage(CvMilitaryAI* self, const CvString& strMsg);static void AfterCvMilitaryAI_LogMilitarySummaryMessage(CvMilitaryAI* self, const CvString& strMsg);static void ReplaceCvMilitaryAI_LogMilitarySummaryMessage(void (*original)(CvMilitaryAI*, const CvString&), CvMilitaryAI* self, const CvString& strMsg);CivRegisterBefore<CivHooks::CvMilitaryAI_LogMilitarySummaryMessage>(host, &BeforeCvMilitaryAI_LogMilitarySummaryMessage);CivRegisterAfter<CivHooks::CvMilitaryAI_LogMilitarySummaryMessage>(host, &AfterCvMilitaryAI_LogMilitarySummaryMessage);CivRegisterReplace<CivHooks::CvMilitaryAI_LogMilitarySummaryMessage>(host, &ReplaceCvMilitaryAI_LogMilitarySummaryMessage);

Code

4448/// Log a message to the high-level summary log4449void CvMilitaryAI::LogMilitarySummaryMessage(const CvString& strMsg)4450{4451	if(GC.getLogging() && GC.getAILogging())4452	{4453		CvString strOutBuf;4454		CvString strBaseString;4455		CvString strPlayerName = m_pPlayer->getCivilizationShortDescription();4456		FILogFile* pLog = LOGFILEMGR.GetLog(GetLogFileName(strPlayerName, true/*bSummary*/), FILogFile::kDontTimeStamp);44574458		// Get the leading info for this line4459		strBaseString.Format("%03d, ", GC.getGame().getElapsedGameTurns());4460		strBaseString += strPlayerName + ", ";4461		strOutBuf = strBaseString + strMsg;4462		pLog->Msg(strOutBuf);4463	}4464}

Calls

Called by