CvTeam::hasMetHuman() const
- Defined in
- CvTeam.cpp, line 2220
- Class
- CvTeam
- Hook name
CivHooks::CvTeam_hasMetHuman
Hooks
static bool BeforeCvTeam_hasMetHuman(const CvTeam* self, bool& result);static void AfterCvTeam_hasMetHuman(const CvTeam* self, bool& result);static bool ReplaceCvTeam_hasMetHuman(bool (*original)(const CvTeam*), const CvTeam* self);CivRegisterBefore<CivHooks::CvTeam_hasMetHuman>(host, &BeforeCvTeam_hasMetHuman);CivRegisterAfter<CivHooks::CvTeam_hasMetHuman>(host, &AfterCvTeam_hasMetHuman);CivRegisterReplace<CivHooks::CvTeam_hasMetHuman>(host, &ReplaceCvTeam_hasMetHuman);
Code
2220bool CvTeam::hasMetHuman() const2221{2222 int iI;22232224 for(iI = 0; iI < MAX_CIV_TEAMS; iI++)2225 {2226 if(GET_TEAM((TeamTypes)iI).isAlive())2227 {2228 if(iI != GetID())2229 {2230 if(GET_TEAM((TeamTypes)iI).isHuman())2231 {2232 if(isHasMet((TeamTypes)iI))2233 {2234 CvAssert(iI != GetID());2235 return true;2236 }2237 }2238 }2239 }2240 }22412242 return false;2243}