CvWonderProductionAI::IsWonder(const CvBuildingEntry &) const
- Defined in
- CvWonderProductionAI.cpp, line 552
- Class
- CvWonderProductionAI
- Hook name
CivHooks::CvWonderProductionAI_IsWonder
Hooks
static bool BeforeCvWonderProductionAI_IsWonder(const CvWonderProductionAI* self, const CvBuildingEntry& kBuilding, bool& result);static void AfterCvWonderProductionAI_IsWonder(const CvWonderProductionAI* self, const CvBuildingEntry& kBuilding, bool& result);static bool ReplaceCvWonderProductionAI_IsWonder(bool (*original)(const CvWonderProductionAI*, const CvBuildingEntry&), const CvWonderProductionAI* self, const CvBuildingEntry& kBuilding);CivRegisterBefore<CivHooks::CvWonderProductionAI_IsWonder>(host, &BeforeCvWonderProductionAI_IsWonder);CivRegisterAfter<CivHooks::CvWonderProductionAI_IsWonder>(host, &AfterCvWonderProductionAI_IsWonder);CivRegisterReplace<CivHooks::CvWonderProductionAI_IsWonder>(host, &ReplaceCvWonderProductionAI_IsWonder);
Code
551/// Check to make sure this is one of the buildings we consider to be a wonder552bool CvWonderProductionAI::IsWonder(const CvBuildingEntry& kBuilding) const553{554 const CvBuildingClassInfo& kBuildingClass = kBuilding.GetBuildingClassInfo();555556 if(::isWorldWonderClass(kBuildingClass) ||557 ::isTeamWonderClass(kBuildingClass) ||558 ::isNationalWonderClass(kBuildingClass))559 {560 return true;561 }562 return false;563}
Calls
Called by
- CvCity::popOrder(int, bool, bool)
- CvCityAI::AI_chooseProduction(bool)
- CvCitySpecializationAI::FindBestWonderCity() const
- CvCitySpecializationAI::SelectSpecializations()
- CvTradeAI::PrioritizeTradeRoutes(TradeConnectionList &)
- CvWonderProductionAI::AddFlavorWeights(FlavorTypes, int)
- CvWonderProductionAI::ChooseWonder(bool, bool, int &)
- CvWonderProductionAI::ChooseWonderForGreatEngineer(bool, int &, CvCity *&)