예제 #1
0
 public CSystemAnomaly(SystemAnomaly systemAnomaly)
 {
     SystemAnomaly      = systemAnomaly;
     Id                 = systemAnomaly.ID;
     Stopwatch          = new Stopwatch();
     State              = SystemAnomalyState.StartWarp;
     _maxLockTargets    = (int)Math.Min(Global.Ext.Me.MaxLockedTargets, Global.Ship.MaxLockedTargets);
     _noTargetStopwatch = new Stopwatch();
 }
예제 #2
0
        private void InWarp()
        {
            Log.WriteLine("InWarp");
            var mode = Global.Ext.Me.ToEntity.Mode;

            if (mode != (int)EntityMode.Warping)
            {
                State = SystemAnomalyState.KillEnemies;
            }
        }
예제 #3
0
        private void KillEnemies()
        {
            Log.WriteLine("KillEnemies");
            var enemies = GetEnemies();

            if (enemies.Count == 0)
            {
                if (_noTargetStopwatch.Elapsed.Seconds > 30)
                {
                    State = SystemAnomalyState.LootWrecks;
                }
                return;
            }
            _noTargetStopwatch.Restart();
            LockTargets(enemies);
            ActivateWeapons();
        }
예제 #4
0
        private void StartWarp()
        {
            Log.WriteLine("StartWarp");
            var mode = Global.Ext.Me.ToEntity.Mode;

            if (mode == (int)EntityMode.Warping)
            {
                State = SystemAnomalyState.InWarp;
            }
            else if (GetEnemies().Count > 0)
            {
                State = SystemAnomalyState.KillEnemies;
            }
            else
            {
                SystemAnomaly.WarpTo(0, false);
            }
        }
예제 #5
0
 private void SalvageWrecks()
 {
     State = SystemAnomalyState.Complete;
 }
예제 #6
0
 private void LootWrecks()
 {
     State = SystemAnomalyState.SalvageWrecks;
 }