Bazaar developer reference

CvAIOperation::LogOperationSpecialMessage(const CvString &)

Defined in
CvAIOperation.cpp, line 1397
Class
CvAIOperation
Hook name
CivHooks::CvAIOperation_LogOperationSpecialMessage

Hooks

static bool BeforeCvAIOperation_LogOperationSpecialMessage(CvAIOperation* self, const CvString& strMsg);static void AfterCvAIOperation_LogOperationSpecialMessage(CvAIOperation* self, const CvString& strMsg);static void ReplaceCvAIOperation_LogOperationSpecialMessage(void (*original)(CvAIOperation*, const CvString&), CvAIOperation* self, const CvString& strMsg);CivRegisterBefore<CivHooks::CvAIOperation_LogOperationSpecialMessage>(host, &BeforeCvAIOperation_LogOperationSpecialMessage);CivRegisterAfter<CivHooks::CvAIOperation_LogOperationSpecialMessage>(host, &AfterCvAIOperation_LogOperationSpecialMessage);CivRegisterReplace<CivHooks::CvAIOperation_LogOperationSpecialMessage>(host, &ReplaceCvAIOperation_LogOperationSpecialMessage);

Code

1397void CvAIOperation::LogOperationSpecialMessage(const CvString& strMsg)1398{1399	if(GC.getLogging() && GC.getAILogging())1400	{1401		CvString strOutBuf;1402		CvString strBaseString;14031404		CvString strPlayerName = GET_PLAYER(m_eOwner).getCivilizationShortDescription();1405		FILogFile* pLog = LOGFILEMGR.GetLog(GetLogFileName(strPlayerName), FILogFile::kDontTimeStamp);14061407		// Get the leading info for this line1408		strBaseString.Format("%03d, ", GC.getGame().getElapsedGameTurns());1409		strBaseString += strPlayerName + ", " + GetOperationName() + ", ";1410		strOutBuf = strBaseString + strMsg;1411		pLog->Msg(strOutBuf);1412	}1413}

Calls

Called by