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); }