public override void SendStatement(AiStatement_EnemyEngaged statement) { foreach (Scientist allScientist in Scientist.AllScientists) { if (!Object.op_Equality((Object)allScientist, (Object)this) && this.IsInCommunicationRange((NPCPlayerApex)allScientist)) { allScientist.OnAiStatement((NPCPlayerApex)this, statement); } } }
public override void SendStatement(AiStatement_EnemyEngaged statement) { foreach (Scientist allScientist in Scientist.AllScientists) { if (allScientist == this || !base.IsInCommunicationRange(allScientist)) { continue; } allScientist.OnAiStatement(this, statement); } }
public override void OnAiStatement(NPCPlayerApex source, AiStatement_EnemyEngaged statement) { Memory.ExtendedInfo extendedInfo; if (statement.Enemy != null && statement.LastKnownPosition.HasValue && base.HostilityConsideration(statement.Enemy) && (base.AiContext.EnemyPlayer == null || base.AiContext.EnemyPlayer == statement.Enemy)) { if (source.GetFact(NPCPlayerApex.Facts.AttackedRecently) > 0) { base.SetFact(NPCPlayerApex.Facts.AllyAttackedRecently, 1, true, true); this.AllyAttackedRecentlyTimeout = Time.realtimeSinceStartup + 7f; } if (base.GetFact(NPCPlayerApex.Facts.IsBandit) > 0) { base.AiContext.LastAttacker = statement.Enemy; this.lastAttackedTime = source.lastAttackedTime; } base.UpdateTargetMemory(statement.Enemy, 0.1f, statement.LastKnownPosition.Value, out extendedInfo); } }
public override void OnAiStatement(NPCPlayerApex source, AiStatement_EnemyEngaged statement) { if (!Object.op_Inequality((Object)statement.Enemy, (Object)null) || !statement.LastKnownPosition.HasValue || !this.HostilityConsideration(statement.Enemy) || !Object.op_Equality((Object)this.AiContext.EnemyPlayer, (Object)null) && !Object.op_Equality((Object)this.AiContext.EnemyPlayer, (Object)statement.Enemy)) { return; } if (source.GetFact(NPCPlayerApex.Facts.AttackedRecently) > (byte)0) { this.SetFact(NPCPlayerApex.Facts.AllyAttackedRecently, (byte)1, true, true); this.AllyAttackedRecentlyTimeout = Time.get_realtimeSinceStartup() + 7f; } if (this.GetFact(NPCPlayerApex.Facts.IsBandit) > (byte)0) { this.AiContext.LastAttacker = (BaseEntity)statement.Enemy; this.lastAttackedTime = source.lastAttackedTime; } Memory.ExtendedInfo extendedInfo; this.UpdateTargetMemory((BaseEntity)statement.Enemy, 0.1f, statement.LastKnownPosition.Value, out extendedInfo); }
private void OnAggroComm() { AiStatement_EnemyEngaged statement = new AiStatement_EnemyEngaged() { Enemy = this.AiContext.EnemyPlayer, Score = this.AiContext.LastTargetScore }; if (Object.op_Inequality((Object)this.AiContext.EnemyPlayer, (Object)null)) { Memory.SeenInfo info = this.AiContext.Memory.GetInfo((BaseEntity)this.AiContext.EnemyPlayer); if (Object.op_Inequality((Object)info.Entity, (Object)null) && !info.Entity.IsDestroyed && !this.AiContext.EnemyPlayer.IsDead()) { statement.LastKnownPosition = new Vector3?(info.Position); } else { statement.Enemy = (BasePlayer)null; } } this.SendStatement(statement); }
private void OnAggroComm() { AiStatement_EnemyEngaged aiStatementEnemyEngaged = new AiStatement_EnemyEngaged() { Enemy = base.AiContext.EnemyPlayer, Score = base.AiContext.LastTargetScore }; AiStatement_EnemyEngaged nullable = aiStatementEnemyEngaged; if (base.AiContext.EnemyPlayer != null) { Memory.SeenInfo info = base.AiContext.Memory.GetInfo(base.AiContext.EnemyPlayer); if (!(info.Entity != null) || info.Entity.IsDestroyed || base.AiContext.EnemyPlayer.IsDead()) { nullable.Enemy = null; } else { nullable.LastKnownPosition = new Vector3?(info.Position); } } this.SendStatement(nullable); }