コード例 #1
0
        public ActionResult PassFail(int?id, string part, int result)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Volkswagen volkswagen = db.Volkswagens.Find(id);

            if (volkswagen == null)
            {
                return(HttpNotFound());
            }
            if (ModelState.IsValid)
            {
                switch (part)
                {
                case "maks": { volkswagen.tasutud = result; break; }

                case "parandus": { volkswagen.parandatud = result; break; }


                default:
                { return(HttpNotFound()); }
                break;
                }
                db.Entry(volkswagen).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(RedirectToAction("Index"));
        }
コード例 #2
0
            private int HitOnTar(Obj_AI_Base tar)
            {
                if (tar == null)
                {
                    return(int.MaxValue);
                }
                int addTime = 0;

                if (Volkswagen.inAutoAttackRange(Source, tar))
                //+ check if want to move to killabel minion and range it wants to
                {
                    var realDist = Volkswagen.realDistanceTill(Source, _target);
                    var aaRange  = Volkswagen.getRealAutoAttackRange(Source, tar);

                    addTime += (int)(((realDist - aaRange) * 1000) / Source.MoveSpeed);
                }

                if (Source.IsMelee || Volkswagen.Azir)
                {
                    return((int)(CreatedTick + Source.AttackCastDelay * 1000) + addTime);
                }
                else
                {
                    return(CreatedTick +
                           (int)((Source.Position.Distance(tar.Position) * 1000) / (Source.BasicAttack.MissileSpeed)) +
                           ((Source is Obj_AI_Turret) ? TowerDamageDelay : 0) + addTime);
                    //lil delay cus dunno l8er could try to values what says delay of dmg dealing
                }
            }
コード例 #3
0
        public ActionResult DeleteConfirmed(int id)
        {
            Volkswagen volkswagen = db.Volkswagens.Find(id);

            db.Volkswagens.Remove(volkswagen);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "id,tellija,auto,viga,parandatud,tasutud")] Volkswagen volkswagen)
 {
     if (ModelState.IsValid)
     {
         db.Entry(volkswagen).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(volkswagen));
 }
コード例 #5
0
        public ActionResult Create([Bind(Include = "id,tellija,auto,viga,parandatud,tasutud")] Volkswagen volkswagen)
        {
            if (ModelState.IsValid)
            {
                db.Volkswagens.Add(volkswagen);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(volkswagen));
        }
コード例 #6
0
        // GET: Volkswagens/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Volkswagen volkswagen = db.Volkswagens.Find(id);

            if (volkswagen == null)
            {
                return(HttpNotFound());
            }
            return(View(volkswagen));
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: rokn/HackBulgaria
        private static void TestCars()
        {
            Car car = new Audi();

            Console.WriteLine("Is Audi eco friendly : {0}", car.IsEcoFriendly(false));

            car = new Volkswagen();

            Console.WriteLine();

            Console.WriteLine("Is Volkswagen eco friendly : {0}", car.IsEcoFriendly(false));

            Console.WriteLine("Volkswagen mileage: {0}", ((Volkswagen)car).GetMileage());
        }
コード例 #8
0
    public double Cost(object[] cars)
    {
        double cost = 0;

        foreach (var car in cars)
        {
            if (car is Mercedes)
            {
                Mercedes mercedes = (Mercedes)car;
                cost += mercedes.cost;
            }
            else if (car is Volkswagen)
            {
                Volkswagen volks = (Volkswagen)car;
                cost += volks.cost;
            }
        }
        return(cost);
    }
コード例 #9
0
 private static void StartHeartBeat()
 {
     Bootstrap.Init(null);
     Hacks.RenderWatermark = false;
     Chat.Print(
         "Starting <font color = \"#740000\">Volatile AIO</font> <font color = \"#B87F7F\">Heart.cs</font>:");
     if (!Directory.Exists(ChampionProfiles.VolatileDir))
     {
         Directory.CreateDirectory(ChampionProfiles.VolatileDir);
     }
     if (!File.Exists(Path.Combine(
                          ChampionProfiles.VolatileDir, "Volatile.json")))
     {
         SaveSettings(false);
     }
     else if (LoadSettings())
     {
         UsingVorb = true;
         Volkswagen.AddToMenu();
     }
     else
     {
         UsingVorb = false;
     }
     VolatileMenu = MainMenu.AddMenu("V." + Player.ChampionName, "volatilemenu",
                                     "Volatile " + Player.ChampionName);
     ExtensionLoader = new ExtensionLoader();
     //InfoBoard
     VolatileMenu.AddGroupLabel("Heart.cs");
     VolatileMenu.AddLabel("\"I.. I'm alive.. I can feel my heart beating.\"");
     VolatileMenu.AddSeparator();
     VolatileMenu.AddLabel("Welcome to Volatile AIO." + Environment.NewLine +
                           "Volatile is an intelligent and aware AIO." + Environment.NewLine +
                           "It strives to include the most thorough logic" + Environment.NewLine +
                           "and the most pleasant game experience" + Environment.NewLine);
     VolatileMenu.AddSeparator();
     VolatileMenu.AddLabel("I hope you'll like it.");
     VolatileMenu.AddSeparator();
     VolatileMenu.AddGroupLabel("Supported Champions:");
     foreach (var champion in ExtensionLoader.Champions)
     {
         var label = champion.Name + " by " + champion.Developer;
         for (var i = champion.Name.Length; i < 20; i++)
         {
             label += " ";
         }
         label += "Status: " + champion.State;
         VolatileMenu.AddLabel(label);
     }
     VolatileMenu.AddSeparator();
     VolatileMenu.AddLabel("AIO Options:");
     VolatileMenu.Add("debug", new CheckBox("Debug", false));
     VolatileMenu.Add("golf", new CheckBox("Use Volatile Orbwalker", false)).OnValueChange +=
         Secret_OnValueChange;
     VolatileMenu.AddLabel(
         "*Orbwalker requires reload. Press f5 to reload, and please turn off EB Orbwalker Drawings");
     OrbHandler();
     if (!ExtensionLoader.IncludesChampion(Player.ChampionName) && Player.ChampionName.ToLower() != "leesin")
     {
         return;
     }
     CastManager.MenuInit();
     ManaManager = new ManaManager();
     AutoLeveler = new AutoLeveler();
     DrawManager = new DrawManager();
     // ReSharper disable once UseNullPropagation
     if (OnDraw != null)
     {
         OnDraw.Invoke();
     }
     Drawinit = true;
     HackMenu = VolatileMenu.AddSubMenu("Hacks", "hacks", "Volatile Hacks");
     SkinManager.Initialize();
     //RecallTracker = new RecallTracker();
     ChampionProfiles = new ChampionProfiles();
     Profileinit      = true;
     Activator        = new Activator();
     if (!AutoLeveler.PrioritiesAreSet() &&
         AutoLeveler.AutoLevelMenu["autolevel"].Cast <CheckBox>().CurrentValue)
     {
         Chat.Print("Auto-Leveler: Priorities not Set!");
     }
     if (!ManaManager.PrioritiesAreSet() && ManaManager.MmMenu["manamanager"].Cast <CheckBox>().CurrentValue)
     {
         Chat.Print("Mana Manager: Priorities not Set!");
     }
 }