Пример #1
0
    public override MapProfile UpdateProfile(BotProfile botProfile_1)
    {
        MapProfile collectProfile;

        if (botProfile_1 == null)
        {
            collectProfile = null;
        }
        else
        {
            List <MapProfile> maps = botProfile_1.Maps;
            if (maps == null)
            {
                collectProfile = null;
            }
            else
            {
                collectProfile = maps.FirstOrDefault(new Func <MapProfile, bool>(GClass843.< > c.< > c_0.method_0));
            }
        }
        this.CollectProfile = collectProfile;
        if (this.CollectProfile != null)
        {
            this.SellProfile           = DataUtils.DeepClone <MapProfile>(this.CollectProfile);
            this.SellProfile.TargetMap = TargetMap.P52;
            MapProfile sellProfile = this.SellProfile;
            this.SellProfile.Collector           = false;
            sellProfile.Hunter                   = false;
            this.CollectProfile.CollectPalladium = true;
        }
        return(this.CollectProfile);
    }
Пример #2
0
 public override bool vmethod_26()
 {
     if (base.vmethod_26())
     {
         MapProfile mapProfile = base.C.MapProfile;
         return(mapProfile != null && mapProfile.MinHp > 0);
     }
     return(false);
 }
    private void UpdateTallGrassIndex(MapProfile mapProfile)
    {
        TallGrassMap mapping = tallGrassMap.Find(tgm => tgm.mapProfile == mapProfile);

        if (mapping.mapProfile)
        {
            tallGrassLauncher.shotIndex = mapping.objectSpawnIndex;
        }
    }
Пример #4
0
    public virtual SelectedNpcModel vmethod_2(Ship ship_0)
    {
        MapProfile mapProfile = base.MapProfile;

        if (mapProfile == null)
        {
            return(null);
        }
        return(mapProfile.GetModel(Ship.Default, base.C.Map, null, 0));
    }
Пример #5
0
    public override uint vmethod_48()
    {
        MapProfile mapProfile = base.C.MapProfile;

        if (mapProfile != null && mapProfile.ReviveAtPortal && !base.C.IsStopping && this.method_28().smethod_0(60000))
        {
            return(3U);
        }
        return(1U);
    }
Пример #6
0
    public virtual void UpdateForSchedule()
    {
        MapProfile mapProfile = this.MapProfile;

        if (mapProfile != null && mapProfile.MapCooldown > 0 && ((mapProfile.MaxDeaths > 0 && this.Deaths >= mapProfile.MaxDeaths) | (this.Started != default(DateTimeOffset) && mapProfile.MapDuration > 0 && (DateTimeOffset.Now - this.Started).TotalMinutes > (double)mapProfile.MapDuration)))
        {
            this.SetCooldown(TimeSpan.FromMinutes((double)mapProfile.MapCooldown), false);
        }
        this.UpdateState();
        this.Priority = this.UpdatePriority();
    }
 public void populateObstacles(MapProfile mapProfile)
 {
     this.mapProfile = mapProfile;
     min             = mapProfile.GeneratableBounds.min;
     max             = mapProfile.GeneratableBounds.max;
     //ObjectSpawner
     objectSpawner.SpawnMaster = true;
     //Populate
     foreach (ObstacleInfo obstacle in mapProfile.obstacleList)
     {
         populate(obstacle);
     }
 }
Пример #8
0
    public override SelectedNpcModel vmethod_2(Ship ship_0)
    {
        if (ship_0 == null)
        {
            return(null);
        }
        MapProfile mapProfile = base.MapProfile;

        if (mapProfile == null)
        {
            return(null);
        }
        return(mapProfile.GetModel(ship_0, base.C.Map, null, 0));
    }
Пример #9
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);
    }
Пример #10
0
    public virtual void OnDeath(GClass218 gclass218_0)
    {
        int deaths = this.Deaths;

        this.Deaths = deaths + 1;
        MapProfile mapProfile  = this.Context.MapProfile;
        int        num         = (mapProfile != null) ? mapProfile.MaxDeaths : 0;
        MapProfile mapProfile2 = this.Context.MapProfile;
        int        num2        = (mapProfile2 != null) ? mapProfile2.MapCooldown : 1;

        if (num > 0 && this.Deaths >= num)
        {
            TimeSpan timeSpan_ = TimeSpan.FromMinutes((double)num2);
            this.SetCooldown(timeSpan_, true);
        }
    }
Пример #11
0
    public override int UpdatePriority()
    {
        MapProfile mapProfile = base.MapProfile;

        if (mapProfile != null)
        {
            int qz_GroupSize = mapProfile.QZ_GroupSize;
        }
        int num = this.ferMgYrrwCU();

        if ((base.C.Hero.IsInitialized || base.C.Hero.LastStatUpdate.smethod_0(3600000)) && (num == 0 || base.C.Hero.Group.Members.Count < 2))
        {
            return(int.MinValue);
        }
        return(base.UpdatePriority());
    }
Пример #12
0
    public override int vmethod_9(NpcShip npcShip_1)
    {
        int num = base.vmethod_9(npcShip_1);

        if (num >= 0)
        {
            if (npcShip_1.LastAttackedHero.smethod_0(5000))
            {
                num++;
            }
            MapProfile mapProfile = base.C.MapProfile;
            if (mapProfile != null && mapProfile.Escort_PreferFreeNPCs && (npcShip_1.LeashedBy <= 0 || base.Hero.Group.jYrndIqmin(npcShip_1.LeashedBy)))
            {
                num += 3;
            }
        }
        return(num);
    }
Пример #13
0
    public void generateMapPath(MapProfile mapProfile)
    {
        //Initialize MapPath
        int safetyEject = 100;

        do
        {
            mapPath = mapProfile.caravanPathAlgorithm.generate(mapProfile.caravanPathReqs);
            safetyEject--;
            if (safetyEject == 0)
            {
                Debug.Log($"Safety eject! mapPath: {mapPath.Length}");
                break;
            }
        }while (!mapProfile.caravanPathReqs.validMapPath(mapPath));
        Debug.Log($"Generated map path. Length: {mapPath.Length}");
        //Delegate
        onMapPathGenerated?.Invoke(mapPath);
    }
Пример #14
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);
    }
Пример #15
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     MapProfile.RegisterMaps();
 }