/// <summary>
        /// コンストラクタ
        /// </summary>
        public SkillCountService()
        {
            SkillStorage.Create();
            PowStorage.Create();
            MapStorage.Create();

            _skillArrayRecognizer.Updated     += (_, e) => SkillsUpdated?.Invoke(this, new SkillsUpdatedEventArgs(e));
            _powRecognizer.Updated            += (_, e) => PowUpdated?.Invoke(this, new PowUpdatedEventArgs(e));
            _hpRecognizer.Updated             += (_, e) => HpUpdated?.Invoke(this, new HpUpdatedEventArgs(e));
            _powDebuffArrayRecognizer.Updated += (_, e) => PowDebuffsUpdated?.Invoke(this, new PowDebuffsUpdatedEventArgs(e));
            _keepDamageRecognizer.Updated     += (_, e) => KeepDamageUpdated?.Invoke(this, new KeepDamageUpdatedEventArgs(e));
            _bookUseRecognizer.Updated        += (_, e) => BookUsesUpdated?.Invoke(this, new BookUsesUpdatedEventArgs(e));
            _warStateRecognizer.WarStarted    += (_, e) =>
            {
                Logger.WriteLine("War started.");
                WarStarted?.Invoke(this, new WarStartedEventArgs(e));
            };
            _warStateRecognizer.WarCanceled += (_, e) =>
            {
                Logger.WriteLine("War canceled.");
                WarCanceled?.Invoke(this, new WarCanceledEventArgs(e));
            };
            _warStateRecognizer.WarFinished += (_, e) =>
            {
                Logger.WriteLine("War finished.");
                WarFinished?.Invoke(this, new WarFinishedEventArgs(e));
            };
        }
Esempio n. 2
0
        public void FsTrim()
        {
            int virtualBlockCount  = Header.MainDataBlockCount;
            int physicalBlockCount = virtualBlockCount + Header.JournalBlockCount;

            int blockMapLength       = virtualBlockCount * MapEntryLength;
            int physicalBitmapLength = Util.AlignUp(physicalBlockCount, 32) / 8;
            int virtualBitmapLength  = Util.AlignUp(virtualBlockCount, 32) / 8;

            MapStorage.Slice(blockMapLength).Fill(SaveDataFileSystem.TrimFillValue);
            FreeBlocks.Slice(physicalBitmapLength).Fill(SaveDataFileSystem.TrimFillValue);
            ModifiedPhysicalBlocks.Slice(physicalBitmapLength).Fill(SaveDataFileSystem.TrimFillValue);
            ModifiedVirtualBlocks.Slice(virtualBitmapLength).Fill(SaveDataFileSystem.TrimFillValue);
        }
Esempio n. 3
0
 public IStorage GetMapStorage() => MapStorage.AsReadOnly();
 public void Initialize()
 {
     MapStorage.Create();
     recognizer = new MapRecognizer();
 }
Esempio n. 5
0
 public IStorage GetMapStorage() => MapStorage.WithAccess(FileAccess.Read);