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