CvHomelandAI::ExecuteCultureBlast(CvUnit *)
- Defined in
- CvHomelandAI.cpp, line 6147
- Class
- CvHomelandAI
- Hook name
CivHooks::CvHomelandAI_ExecuteCultureBlast
Hooks
static bool BeforeCvHomelandAI_ExecuteCultureBlast(CvHomelandAI* self, CvUnit* pUnit, bool& result);static void AfterCvHomelandAI_ExecuteCultureBlast(CvHomelandAI* self, CvUnit* pUnit, bool& result);static bool ReplaceCvHomelandAI_ExecuteCultureBlast(bool (*original)(CvHomelandAI*, CvUnit*), CvHomelandAI* self, CvUnit* pUnit);CivRegisterBefore<CivHooks::CvHomelandAI_ExecuteCultureBlast>(host, &BeforeCvHomelandAI_ExecuteCultureBlast);CivRegisterAfter<CivHooks::CvHomelandAI_ExecuteCultureBlast>(host, &AfterCvHomelandAI_ExecuteCultureBlast);CivRegisterReplace<CivHooks::CvHomelandAI_ExecuteCultureBlast>(host, &ReplaceCvHomelandAI_ExecuteCultureBlast);
Code
6147bool CvHomelandAI::ExecuteCultureBlast(CvUnit* pUnit)6148{6149 if (pUnit->canGivePolicies(pUnit->plot()))6150 {6151 pUnit->PushMission(CvTypes::getMISSION_GIVE_POLICIES());6152 UnitProcessed(pUnit->GetID());61536154 if(GC.getLogging() && GC.getAILogging())6155 {6156 CvString strLogString;6157 CvString strTemp;6158 strTemp = pUnit->getUnitInfo().GetDescription();6159 strLogString.Format("%s blasted culture with unit at, X: %d, Y: %d", strTemp.GetCString(), pUnit->getX(), pUnit->getY());6160 LogHomelandMessage(strLogString);6161 }6162 }6163 else6164 {6165 MoveCivilianToSafety(pUnit);6166 }61676168 return true;6169}
Calls
- CvBaseInfo::GetDescription() const
- CvGlobals::getAILogging()
- CvGlobals::getLogging()
- CvHomelandAI::LogHomelandMessage(CvString &)
- CvHomelandAI::MoveCivilianToSafety(CvUnit *, bool, bool)
- CvHomelandAI::UnitProcessed(int)
CvString::CvStringCvString::FormatCvString::GetCStringCvString::operator=- CvTypes::getMISSION_GIVE_POLICIES()
- CvUnit::canGivePolicies(const CvPlot *, bool) const
- CvUnit::GetID() const
- CvUnit::getUnitInfo() const
- CvUnit::getX() const
- CvUnit::getY() const
- CvUnit::plot() const
- CvUnit::PushMission(MissionTypes, int, int, int, bool, bool, MissionAITypes, CvPlot *, CvUnit *)