예제 #1
0
        public IEnumerable <string> method_1()
        {
            GEnum5 genum = MapUtils.smethod_10(this.MapId);

            if (genum != GEnum5.None)
            {
                int all  = 0;
                int done = 0;
                foreach (KeyValuePair <int, Ship> keyValuePair in this.Ships)
                {
                    Ship value = keyValuePair.Value;
                    if (value.IsNpc)
                    {
                        int num = all;
                        all = num + 1;
                        bool flag;
                        if (value.HpPercentage < 25f || this.method_8(value, out flag))
                        {
                            num  = done;
                            done = num + 1;
                        }
                    }
                }
                DarkOrbitWebAPI.GalaxyGatesInfo ggInfo       = this.Game.Web.GgInfo;
                DarkOrbitWebAPI.jumpgateGate    jumpgateGate = (ggInfo != null) ? ggInfo.GetGate(genum) : null;
                string text = string.Format("Wave {0}/{1}", (jumpgateGate != null) ? new int?(jumpgateGate.currentWave) : null, (jumpgateGate != null) ? new int?(jumpgateGate.totalWave) : null);
                if (jumpgateGate != null)
                {
                    yield return(text);
                }
                yield return(string.Format("{0}/{1}", done, all));
            }
            yield break;
        }
예제 #2
0
    public override void Update()
    {
        DarkOrbitWebAPI.GalaxyGatesInfo ggInfo = this.Web.GgInfo;
        if (ggInfo == null)
        {
            return;
        }
        Dictionary <Type, object> subscribed = this.Subscribed;

        lock (subscribed)
        {
            this.Subscribed[typeof(DarkOrbitWebAPI.GalaxyGatesInfo)] = ggInfo;
        }
        DarkOrbitWebAPI.jumpgateGate[] gates = ggInfo.gates;
        for (int i = 0; i < gates.Length; i++)
        {
            GClass885.< > c__DisplayClass4_0 CS$ < > 8__locals1 = new GClass885.< > c__DisplayClass4_0();
            CS$ < > 8__locals1.jumpgateGate_0 = gates[i];
            string key;
            if (GClass919.dictionary_0.TryGetValue(CS$ < > 8__locals1.jumpgateGate_0.id, out key))
            {
                base.Add(StatisticsCategory.WithName(key, new IValueWrapper <string>[]
                {
                    this.method_0(new Func <DarkOrbitWebAPI.GalaxyGatesInfo, string>(CS$ < > 8__locals1.method_0)),
                    this.method_0(new Func <DarkOrbitWebAPI.GalaxyGatesInfo, string>(CS$ < > 8__locals1.method_1)),
                    this.method_0(new Func <DarkOrbitWebAPI.GalaxyGatesInfo, string>(CS$ < > 8__locals1.method_2))
                }));
예제 #3
0
        public SelectedNpcModel GetModel(Ship ship, Map map = null, int?targetMap = null, int offsetWave = 0)
        {
            if (ship == null)
            {
                return(null);
            }
            if (map != null)
            {
                int int_ = targetMap ?? map.MapId;
                if (MapUtils.smethod_10(int_) != GEnum5.None)
                {
                    if (this.NpcWhitelist.Any((SelectedNpcModel t) => NpcUtils.NpcById[t.NpcId] is NpcUtils.GGWaveType))
                    {
                        GEnum5 type = MapUtils.smethod_10(int_);
                        DarkOrbitWebAPI.GalaxyGatesInfo ggInfo       = map.Game.Web.GgInfo;
                        DarkOrbitWebAPI.jumpgateGate    jumpgateGate = (ggInfo != null) ? ggInfo.GetGate(type) : null;
                        if (jumpgateGate == null)
                        {
                            return(null);
                        }
                        SelectedNpcModel result = null;
                        int num = 0;
                        foreach (KeyValuePair <SelectedNpcModel, NpcUtils.GGWaveType> keyValuePair in (from t in this.NpcWhitelist
                                                                                                       where NpcUtils.NpcById[t.NpcId] is NpcUtils.GGWaveType
                                                                                                       select t).ToDictionary((SelectedNpcModel t) => t, (SelectedNpcModel t) => (NpcUtils.GGWaveType)NpcUtils.NpcById[t.NpcId]))
                        {
                            if (jumpgateGate.currentWave >= keyValuePair.Value.WaveNumber)
                            {
                                if (offsetWave == 0)
                                {
                                    result = keyValuePair.Key;
                                }
                            }
                            else
                            {
                                num++;
                                if (num == offsetWave)
                                {
                                    result = keyValuePair.Key;
                                }
                            }
                        }
                        return(result);
                    }
                }
            }
            if (ship == Ship.Default)
            {
                return(null);
            }
            string name = ship.Name;

            NpcUtils.NpcType npc = NpcUtils.NpcType.smethod_5(name);
            return(this.NpcWhitelist.FirstOrDefault((SelectedNpcModel t) => t.NpcId == npc.Id));
        }
예제 #4
0
    public virtual bool vmethod_1()
    {
        int    mapId          = base.Context.Map.MapId;
        GEnum5 galaxyGateType = this.GalaxyGateType;

        DarkOrbitWebAPI.GalaxyGatesInfo ggInfo = base.Context.Game.Web.GgInfo;
        if (((ggInfo != null) ? ggInfo.GetGate(galaxyGateType) : null) == null)
        {
            return(false);
        }
        MapProfile       mapProfile       = base.MapProfile;
        SelectedNpcModel selectedNpcModel = (mapProfile != null) ? mapProfile.GetModel(Ship.Default, base.Context.Map, new int?(mapId), 0) : null;

        return(selectedNpcModel != null && mapProfile.NpcWhitelist.LastOrDefault <SelectedNpcModel>() == selectedNpcModel);
    }
예제 #5
0
    protected virtual bool vmethod_0()
    {
        DarkOrbitWebAPI.GalaxyGatesInfo ggInfo       = base.Context.Game.Web.GgInfo;
        DarkOrbitWebAPI.jumpgateGate    jumpgateGate = (ggInfo != null) ? ggInfo.GetGate(this.GalaxyGateType) : null;
        if (jumpgateGate == null)
        {
            return(false);
        }
        MapProfile       mapProfile       = base.MapProfile;
        SelectedNpcModel selectedNpcModel = (mapProfile != null) ? mapProfile.GetModel(Ship.Default, base.Context.Map, new int?((int)base.Map), 0) : null;

        if (selectedNpcModel != null && selectedNpcModel.Enabled)
        {
            if (jumpgateGate.prepared)
            {
                if (base.Context.Account.JumpGGLastLife || jumpgateGate.livesLeft != 1)
                {
                    return(true);
                }
            }
            return(false);
        }
        return(false);
    }
예제 #6
0
 public void method_3(DarkOrbitWebAPI.GalaxyGatesInfo galaxyGatesInfo_1)
 {
     this.galaxyGatesInfo_0 = galaxyGatesInfo_1;
 }