コード例 #1
0
        public static void SafeKeep(Player plr)
        {
            IBattlefront battlefront = plr.Region.Bttlfront;

            if (GameData.Constants.DoomsdaySwitch == 2)
            {
                ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront;

                if (pBttlfront != null)
                {
                    foreach (Keep keep in pBttlfront._Keeps)
                    {
                        keep.SafeKeep();
                    }

                    plr.SendClientMessage("Keeps set to status safe");
                }
                else
                {
                    ProximityBattlefront bttlfront = battlefront as ProximityBattlefront;

                    foreach (Keep keep in bttlfront._Keeps)
                    {
                        keep.SafeKeep();
                    }

                    plr.SendClientMessage("Keeps set to status safe");
                }
            }
            else
            {
                ProgressingBattlefront pBttlfront = battlefront as ProgressingBattlefront;

                if (pBttlfront != null)
                {
                    foreach (Keep keep in pBttlfront._Keeps)
                    {
                        keep.SafeKeep();
                    }

                    plr.SendClientMessage("Keeps set to status safe");
                }
                else
                {
                    Battlefront bttlfront = battlefront as Battlefront;

                    foreach (Keep keep in bttlfront._Keeps)
                    {
                        keep.SafeKeep();
                    }

                    plr.SendClientMessage("Keeps set to status safe");
                }
            }
        }
コード例 #2
0
        public static void SupplyToggle(Player plr)
        {
            if (plr.Zone == null || plr.Region.Bttlfront == null)
            {
                SendCsr(plr, "CAMPAIGN SUPPLY: Must be in a RvR zone to use this command.");
                return;
            }
            else if (!(plr.Region.Bttlfront is Battlefront))
            {
                SendCsr(plr, "CAMPAIGN SUPPLY: This command is supported in legacy RvR.");
                return;
            }

            Battlefront battlefront = (Battlefront)plr.Region.Bttlfront;

            battlefront.ToggleSupplies();

            plr.SendClientMessage("Supplies " + (battlefront.NoSupplies ? "disabled." : "enabled."));
        }
コード例 #3
0
        public static void Grace(Player plr)
        {
            IBattlefront battlefront = plr.Region.Bttlfront;

            if (GameData.Constants.DoomsdaySwitch == 2)
            {
                ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront;

                if (pBttlfront != null)
                {
                    if (pBttlfront.GraceDisabled)
                    {
                        pBttlfront.StartGrace();
                    }
                    else
                    {
                        pBttlfront.EndGrace();
                    }

                    plr.SendClientMessage("Current Value of Grace: " + pBttlfront.GraceDisabled, ChatLogFilters.CHATLOGFILTERS_TELL_RECEIVE);
                }
                else
                {
                    ProximityBattlefront bttlfront = battlefront as ProximityBattlefront;

                    if (bttlfront.GraceDisabled)
                    {
                        bttlfront.StartGrace();
                    }
                    else
                    {
                        bttlfront.EndGrace();
                    }

                    plr.SendClientMessage("Current Value of Grace: " + bttlfront.GraceDisabled, ChatLogFilters.CHATLOGFILTERS_TELL_RECEIVE);
                }
            }
            else
            {
                ProgressingBattlefront pBttlfront = battlefront as ProgressingBattlefront;

                if (pBttlfront != null)
                {
                    if (pBttlfront.GraceDisabled)
                    {
                        pBttlfront.StartGrace();
                    }
                    else
                    {
                        pBttlfront.EndGrace();
                    }

                    plr.SendClientMessage("Current Value of Grace: " + pBttlfront.GraceDisabled);
                }
                else
                {
                    Battlefront bttlfront = battlefront as Battlefront;

                    if (bttlfront.GraceDisabled)
                    {
                        bttlfront.StartGrace();
                    }
                    else
                    {
                        bttlfront.EndGrace();
                    }

                    plr.SendClientMessage("Current Value of Grace: " + pBttlfront.GraceDisabled);
                }
            }
        }