Example #1
0
        public bool AddQueue()
        {
            DSWaitingSystem dswaitingSystem = this.service.DSWaitingSystem;

            if (dswaitingSystem != null)
            {
                string argString = base.Operation.GetArgString(0, "");
                if (argString == "reset")
                {
                    string @string = FeatureMatrix.GetString("DSQuestSetting");
                    using (IEnumerator <string> enumerator = (from q in @string.Split(new char[]
                    {
                        ','
                    })
                                                              where q != ""
                                                              select q).GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            string text = enumerator.Current;
                            dswaitingSystem.AddWaitingQueue(text.Trim(), -1, true);
                        }
                        return(true);
                    }
                }
                int argInt = base.Operation.GetArgInt(1, -1);
                dswaitingSystem.AddWaitingQueue(argString, argInt, true);
            }
            else
            {
                DSService.RequestDSBossOperation(base.Operation);
            }
            return(true);
        }
Example #2
0
        public bool AddDummy()
        {
            DSWaitingSystem dswaitingSystem = this.service.DSWaitingSystem;

            if (dswaitingSystem != null)
            {
                string argString         = base.Operation.GetArgString(0, "");
                List <DSPlayerInfo> list = new List <DSPlayerInfo>();
                int num = 1;
                for (;;)
                {
                    int argInt = base.Operation.GetArgInt(num, -1);
                    if (argInt <= 0)
                    {
                        break;
                    }
                    list.Add(new DSPlayerInfo((long)_CheatCommandProcessor.DummyClientID, -1L, argInt));
                    _CheatCommandProcessor.DummyClientID--;
                    num++;
                }
                dswaitingSystem.Register(argString, list, -1L, -1L, true, false);
                this.DSState();
            }
            else
            {
                DSService.RequestDSBossOperation(base.Operation);
            }
            return(true);
        }
Example #3
0
        public bool RemoveQueue()
        {
            DSWaitingSystem dswaitingSystem = this.service.DSWaitingSystem;

            if (dswaitingSystem != null)
            {
                string argString = base.Operation.GetArgString(0, "");
                if (argString == "all")
                {
                    using (List <KeyValuePair <string, DSWaitingQueue> > .Enumerator enumerator = dswaitingSystem.QueueDict.ToList <KeyValuePair <string, DSWaitingQueue> >().GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            KeyValuePair <string, DSWaitingQueue> keyValuePair = enumerator.Current;
                            dswaitingSystem.RemoveWaitingQueue(keyValuePair.Key);
                        }
                        return(true);
                    }
                }
                dswaitingSystem.RemoveWaitingQueue(argString);
            }
            else
            {
                DSService.RequestDSBossOperation(base.Operation);
            }
            return(true);
        }
Example #4
0
 public bool SinkShip()
 {
     if (this.service.DSWaitingSystem == null)
     {
         DSService.RequestDSBossOperation(base.Operation);
     }
     return(true);
 }
Example #5
0
        public bool DSState()
        {
            DSWaitingSystem dswaitingSystem = this.service.DSWaitingSystem;

            if (dswaitingSystem != null)
            {
                IEntityProxy frontendConn = this.service.Connect(this.service.DSServiceEntity, new Location(base.Operation.FrontendID, "FrontendServiceCore.FrontendService"));
                frontendConn.SendConsole(dswaitingSystem.ToString(), new object[0]);
            }
            else
            {
                DSService.RequestDSBossOperation(base.Operation);
            }
            return(true);
        }
Example #6
0
        public bool RemoveDummy()
        {
            DSWaitingSystem dswaitingSystem = this.service.DSWaitingSystem;

            if (dswaitingSystem != null)
            {
                string         argString      = base.Operation.GetArgString(0, "");
                DSWaitingQueue dswaitingQueue = dswaitingSystem.QueueDict.TryGetValue(argString);
                if (dswaitingQueue != null)
                {
                    int num  = base.Operation.GetArgInt(1, 0);
                    int num2 = 0;
                    if (num >= 0)
                    {
                        using (LinkedList <DSWaitingParty> .Enumerator enumerator = dswaitingQueue.WaitingParties.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                DSWaitingParty dswaitingParty = enumerator.Current;
                                foreach (KeyValuePair <long, DSPlayer> keyValuePair in dswaitingParty.Members)
                                {
                                    if (keyValuePair.Key < 0L)
                                    {
                                        if (num2 == num)
                                        {
                                            dswaitingSystem.Unregister(keyValuePair.Key, false);
                                            this.DSState();
                                            return(true);
                                        }
                                        num2++;
                                    }
                                }
                            }
                            return(true);
                        }
                    }
                    num = -1 - num;
                    foreach (DSShip dsship in dswaitingQueue.Ships)
                    {
                        foreach (KeyValuePair <long, DSPlayer> keyValuePair2 in dsship.Players)
                        {
                            if (keyValuePair2.Key < 0L)
                            {
                                if (num2 == num)
                                {
                                    dswaitingSystem.Unregister(keyValuePair2.Key, false);
                                    this.DSState();
                                    return(true);
                                }
                                num2++;
                            }
                        }
                    }
                    return(true);
                }
            }
            else
            {
                DSService.RequestDSBossOperation(base.Operation);
            }
            return(true);
        }