Bazaar developer reference

CvHomelandAI::LogHomelandMessage(CvString &)

Defined in
CvHomelandAI.cpp, line 5904
Class
CvHomelandAI
Hook name
CivHooks::CvHomelandAI_LogHomelandMessage

Hooks

static bool BeforeCvHomelandAI_LogHomelandMessage(CvHomelandAI* self, CvString& strMsg);static void AfterCvHomelandAI_LogHomelandMessage(CvHomelandAI* self, CvString& strMsg);static void ReplaceCvHomelandAI_LogHomelandMessage(void (*original)(CvHomelandAI*, CvString&), CvHomelandAI* self, CvString& strMsg);CivRegisterBefore<CivHooks::CvHomelandAI_LogHomelandMessage>(host, &BeforeCvHomelandAI_LogHomelandMessage);CivRegisterAfter<CivHooks::CvHomelandAI_LogHomelandMessage>(host, &AfterCvHomelandAI_LogHomelandMessage);CivRegisterReplace<CivHooks::CvHomelandAI_LogHomelandMessage>(host, &ReplaceCvHomelandAI_LogHomelandMessage);

Code

5902/// Find the plot where we want to pillage5903/// Log current status of the operation5904void CvHomelandAI::LogHomelandMessage(CvString& strMsg)5905{5906	if(GC.getLogging() && GC.getAILogging())5907	{5908		CvString strOutBuf;5909		CvString strBaseString;5910		CvString strTemp, szTemp2;5911		CvString strPlayerName;5912		FILogFile* pLog;59135914		strPlayerName = m_pPlayer->getCivilizationShortDescription();5915		pLog = LOGFILEMGR.GetLog(GetLogFileName(strPlayerName), FILogFile::kDontTimeStamp);59165917		// Get the leading info for this line5918		strBaseString.Format("%03d, ", GC.getGame().getElapsedGameTurns());5919		strBaseString += strPlayerName + ", ";5920		strOutBuf = strBaseString + strMsg;5921		pLog->Msg(strOutBuf);5922	}5923}

Calls

Called by

45 functions in 6 files