コード例 #1
0
ファイル: DSService.cs プロジェクト: ratiel/Vindictus
        public static int GetDSProcessCount()
        {
            string text = FeatureMatrix.GetString("DSProcessCount").ToUpper();

            if (text == "" || text == null)
            {
                return(0);
            }
            if (text.Contains('C'))
            {
                int    num  = text.IndexOf('C');
                string str  = text.Substring(0, num);
                string str2 = (text.Length > num) ? text.Substring(num + 1) : "";
                return(DSService.ToInt(str, 1) * DSService.GetCoreCount() + DSService.ToInt(str2, 0));
            }
            return(DSService.ToInt(text, 1));
        }
コード例 #2
0
ファイル: DSService.cs プロジェクト: ratiel/Vindictus
        public void SetupDSController()
        {
            this.DSBossID = base.LookUp.GetFirstRegisteredServiceID("DSService.DSService");
            if (base.ID == this.DSBossID)
            {
                Log <DSService> .Logger.WarnFormat("I am Boss!!!!!", new object[0]);

                this.DSWaitingSystem = new DSWaitingSystem();
                if (FeatureMatrix.IsEnable("DSDynamicLoad"))
                {
                    this.DSEntityMakerSystem = new DSEntityMakerSystem(this);
                }
                this.PrintDsState();
            }
            Log <DSService> .Logger.WarnFormat("Boss is {0}", this.DSBossID);

            if (FeatureMatrix.IsEnable("DSDynamicLoad"))
            {
                this.InitializeEntity();
                RegisterDSServiceInfo registerDSServiceInfo = new RegisterDSServiceInfo(base.ID, DSService.GetCoreCount());
                registerDSServiceInfo.OnComplete += delegate(Operation _)
                {
                    Log <DSService> .Logger.WarnFormat("Register DS Service ID : [{0}] / Core : [{1}]", base.ID, DSService.GetCoreCount());
                };
                base.RequestOperation(this.DSBossID, registerDSServiceInfo);
                return;
            }
            RegisterDSEntity op = new RegisterDSEntity(base.ID, DSService.GetCoreCount(), this.GiantRaidMachinCandidate);

            op.OnComplete += delegate(Operation _)
            {
                this.InitializeEntity(op.IDStart, op.ProcessCount);
                Log <DSService> .Logger.WarnFormat("Initialized for {0}", op.DSType);
            };
            base.RequestOperation(this.DSBossID, op);
        }