Example #1
0
        public static void Lock(Player plr, Realms realm, string noReward)
        {
            if (noReward == "0" || noReward == "1")
            {
                plr.SendClientMessage($"Attempting to lock the {plr.Region.RegionId} campaign...");

                IBattlefront battlefront = plr.Region.Bttlfront;

                bool b = false;
                if (noReward == "0")
                {
                    b = true;
                }

                if (GameData.Constants.DoomsdaySwitch == 2)
                {
                    ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront;
                    if (pBttlfront != null)
                    {
                        pBttlfront.LockZone(realm, (int)plr.ZoneId, true, false, b); // Reset changed to false
                    }
                    else
                    {
                        battlefront.LockPairing(realm, false, false, b);
                    }
                }
                else if (GameData.Constants.DoomsdaySwitch > 0)
                {
                    ProgressingBattlefront pBttlfront = battlefront as ProgressingBattlefront;
                    if (pBttlfront != null)
                    {
                        pBttlfront.LockZone(realm, (int)plr.ZoneId, true, true, b);
                    }
                    else
                    {
                        battlefront.LockPairing(realm, false, false, b);
                    }
                }
                else
                {
                    battlefront.LockPairing(realm, true);
                }
            }
            else
            {
                plr.SendClientMessage("Second parameter must be 0 or 1 - 0 no rewards, 1 grants rewards.");
            }
        }
Example #2
0
        public static void Draw(Player plr)
        {
            plr.SendClientMessage($"Attempting to lock the {plr.Region.RegionId} campaign...");
            IBattlefront battlefront = plr.Region.Bttlfront;

            Random random = new Random();
            Realms realm;

            switch (random.Next(1, 3))
            {
            case 1:
                realm = Realms.REALMS_REALM_ORDER;
                break;

            case 2:
                realm = Realms.REALMS_REALM_DESTRUCTION;
                break;

            default:
                realm = Realms.REALMS_REALM_ORDER;
                break;
            }

            if (GameData.Constants.DoomsdaySwitch == 2)
            {
                ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront;
                if (pBttlfront != null)
                {
                    pBttlfront.LockZone(realm, (int)plr.ZoneId, true, false, false, true); // Reset changed to false
                }
                else
                {
                    battlefront.LockPairing(realm, false, false, false, true);
                }
            }
            else
            {
                battlefront.LockPairing(realm, true);
            }
        }