Esempio n. 1
0
        public ActionResult MatchMakerAttack(int planetID)
        {
            var db     = new ZkDataContext();
            var planet = db.Planets.Single(x => x.PlanetID == planetID);

            if (Global.IsAccountAuthorized && Global.Account.CanPlayerPlanetWars() && planet.CanMatchMakerPlay(db.CurrentAccount().Faction))
            {
                Global.Server.PlanetWarsMatchMaker.AddAttackOption(planet);
                Global.Server.RequestJoinPlanet(Global.Account.Name, planet.PlanetID);
            }
            return(RedirectToAction("Planet", new { id = planetID }));
        }