public override int AskQuestion(AiQuestion_ShareEnemyTarget question, out List <AiAnswer_ShareEnemyTarget> answers) { List <Scientist> scientists; Scientist.CommTargetCache.Clear(); if (this.GetAlliesInRange(out scientists) > 0) { foreach (Scientist scientist in scientists) { AiAnswer_ShareEnemyTarget aiAnswerShareEnemyTarget = scientist.OnAiQuestion(this, question); if (aiAnswerShareEnemyTarget.PlayerTarget == null) { continue; } Scientist.CommTargetCache.Add(aiAnswerShareEnemyTarget); } } answers = Scientist.CommTargetCache; return(Scientist.CommTargetCache.Count); }
public override int AskQuestion( AiQuestion_ShareEnemyTarget question, out List <AiAnswer_ShareEnemyTarget> answers) { Scientist.CommTargetCache.Clear(); List <Scientist> allies; if (this.GetAlliesInRange(out allies) > 0) { foreach (NPCPlayerApex npcPlayerApex in allies) { AiAnswer_ShareEnemyTarget shareEnemyTarget = npcPlayerApex.OnAiQuestion((NPCPlayerApex)this, question); if (Object.op_Inequality((Object)shareEnemyTarget.PlayerTarget, (Object)null)) { Scientist.CommTargetCache.Add(shareEnemyTarget); } } } answers = Scientist.CommTargetCache; return(Scientist.CommTargetCache.Count); }