CvTacticalAI::LogTacticalMessage(CvString &, bool)
- Defined in
- CvTacticalAI.cpp, line 11671
- Class
- CvTacticalAI
- Hook name
CivHooks::CvTacticalAI_LogTacticalMessage
Hooks
static bool BeforeCvTacticalAI_LogTacticalMessage(CvTacticalAI* self, CvString& strMsg, bool bSkipLogDominanceZone);static void AfterCvTacticalAI_LogTacticalMessage(CvTacticalAI* self, CvString& strMsg, bool bSkipLogDominanceZone);static void ReplaceCvTacticalAI_LogTacticalMessage(void (*original)(CvTacticalAI*, CvString&, bool), CvTacticalAI* self, CvString& strMsg, bool bSkipLogDominanceZone);CivRegisterBefore<CivHooks::CvTacticalAI_LogTacticalMessage>(host, &BeforeCvTacticalAI_LogTacticalMessage);CivRegisterAfter<CivHooks::CvTacticalAI_LogTacticalMessage>(host, &AfterCvTacticalAI_LogTacticalMessage);CivRegisterReplace<CivHooks::CvTacticalAI_LogTacticalMessage>(host, &ReplaceCvTacticalAI_LogTacticalMessage);
Code
11670/// Log current status of the operation11671void CvTacticalAI::LogTacticalMessage(CvString& strMsg, bool bSkipLogDominanceZone)11672{11673 if(GC.getLogging() && GC.getAILogging())11674 {11675 CvString strOutBuf;11676 CvString strBaseString;11677 CvString strPlayerName;11678 CvString strTemp;11679 FILogFile* pLog;1168011681 strPlayerName = m_pPlayer->getCivilizationShortDescription();11682 pLog = LOGFILEMGR.GetLog(GetLogFileName(strPlayerName), FILogFile::kDontTimeStamp);1168311684 // Get the leading info for this line11685 strBaseString.Format("%03d, ", GC.getGame().getElapsedGameTurns());11686 strBaseString += strPlayerName + ", ";11687 strTemp = "no zone, ";11688 if(!bSkipLogDominanceZone)11689 {11690 CvTacticalDominanceZone* pZone = GC.getGame().GetTacticalAnalysisMap()->GetZone(m_iCurrentZoneIndex);11691 if(pZone != NULL)11692 {11693 strTemp.Format("Zone ID: %d, ", pZone->GetDominanceZoneID());11694 }11695 }11696 strBaseString += strTemp;11697 strOutBuf = strBaseString + strMsg;1169811699 pLog->Msg(strOutBuf);11700 }11701}
Calls
- CvGame::getElapsedGameTurns() const
- CvGame::GetTacticalAnalysisMap()
- CvGlobals::getAILogging()
- CvGlobals::getGame()
- CvGlobals::getLogging()
- CvPlayer::getCivilizationShortDescription() const
CvString::CvStringCvString::FormatCvString::operator const char *CvString::operator=CvString::operator=- CvTacticalAI::GetLogFileName(CvString &) const
- CvTacticalAnalysisMap::GetZone(int)
- CvTacticalDominanceZone::GetDominanceZoneID() const
FILogFile::MsgFILogFileMgr::GetInstanceFILogFileMgr::GetLogstd::basic_string::operator+=std::operator+std::operator+
Called by
48 functions in 4 files
- CvMilitaryAI::BuyEmergencyBuilding(CvCity *)
- CvMilitaryAI::BuyEmergencyUnit(UnitAITypes, CvCity *)
- CvTacticalAI::ExecuteAttack(CvTacticalTarget *, CvPlot *, bool, bool)
- CvTacticalAI::ExecuteBarbarianCivilianEscortMove()
- CvTacticalAI::ExecuteBarbarianMoves(bool)
- CvTacticalAI::ExecuteEscortEmbarkedMoves()
- CvTacticalAI::ExecuteFlankAttack(CvTacticalTarget &)
- CvTacticalAI::ExecuteFormationMoves(CvArmyAI *, CvPlot *)
- CvTacticalAI::ExecuteGatherMoves(CvArmyAI *)
- CvTacticalAI::ExecuteMoveOfBlockingUnit(UnitHandle)
- CvTacticalAI::ExecuteMovesToSafestPlot()
- CvTacticalAI::ExecuteNavalFormationMoves(CvArmyAI *, CvPlot *)
- CvTacticalAI::ExecuteOneProtectedBombard(CvTacticalTarget &)
- CvTacticalAI::ExecuteRepositionMoves()
- CvTacticalAI::ExecuteSafeBombards(CvTacticalTarget &)
- CvTacticalAI::ExecuteWithdrawMoves()
- CvTacticalAI::GetBestRepositionPlot(UnitHandle, CvPlot *)
- CvTacticalAI::LaunchAttack(void *, CvTacticalTarget *, bool, bool, bool)
- CvTacticalAI::MoveGreatGeneral(CvArmyAI *)
- CvTacticalAI::PerformChosenMoves(int)
- CvTacticalAI::PlotAirInterceptMoves()
- CvTacticalAI::PlotAirSweepMoves()
- CvTacticalAI::PlotAncientRuinMoves(int)
- CvTacticalAI::PlotBarbarianCampMoves()
- CvTacticalAI::PlotBarbarianPlunderTradeUnitMove(DomainTypes)
- CvTacticalAI::PlotBastionMoves(int)
- CvTacticalAI::PlotBlockadeImprovementMoves()
- CvTacticalAI::PlotCampDefenseMoves()
- CvTacticalAI::PlotCaptureCityMoves()
- CvTacticalAI::PlotCivilianAttackMoves(AITacticalTargetType)
- CvTacticalAI::PlotDamageCityMoves()
- CvTacticalAI::PlotDefensiveAirlifts()
- CvTacticalAI::PlotDestroyUnitMoves(AITacticalTargetType, bool, bool)
- CvTacticalAI::PlotGarrisonMoves(int, bool)
- CvTacticalAI::PlotGuardImprovementMoves(int)
- CvTacticalAI::PlotHealMoves()
- CvTacticalAI::PlotNavalEscortOperationMoves(CvAINavalEscortedOperation *)
- CvTacticalAI::PlotPillageMoves(AITacticalTargetType, bool)
- CvTacticalAI::PlotPlunderTradeUnitMoves(DomainTypes)
- CvTacticalAI::PlotSingleHexOperationMoves(CvAIEscortedOperation *)
- CvTacticalAI::QueueAttack(void *, CvTacticalTarget *, bool, bool)
- CvTacticalAI::ReviewUnassignedUnits()
- CvTacticalAI::UpdatePostures()
- CvTacticalAnalysisMap::LogZones()
- CvUnit::AI_promote()
- CvUnit::AI_promotionValue(PromotionTypes)
- CvUnit::createCaptureUnit(const CvUnitCaptureDefinition &)
- CvUnit::setDamage(int, PlayerTypes, int, float, const CvString *)