예제 #1
0
        public th06(Process Game)
        {
            this.Game        = Game;
            ClientID         = "446970252773949440";
            SubTitle         = "Embodiment of Scarlet Devil";
            ProgramName      = "th06";
            StageOffset      = 0x29D6D4;
            CharacterOffset  = 0x29D4BD;
            SpellOffset      = 0x29D4BE;
            DifficultyOffset = 0x29BCB0;
            IsPauseOffset    = 0x29D4BF;
            StatusOffset     = 0x29D4C1;
            IsInGameOffset   = 0x29D4C1;
            Init();

            WorkerTimer.Elapsed += (sender, e) =>
            {
                if (Game.HasExited)
                {
                    WorkerTimer.Stop();
                    ProcessFinder.ProcessClose();
                    return;
                }
                bool isPause = IsPause;
                if (IsInGame || isPause)
                {
                    if (!IsPlaying)
                    {
                        IsPlaying                 = true;
                        Presence.Details          = StatusString + " " + CharSpellString;
                        Presence.Timestamps.Start = PlayTime = DateTime.UtcNow;
                        return;
                    }
                    Presence.State = DiffChap;

                    if (!WasPause && isPause)
                    {
                        WasPause                  = true;
                        Presence.Details          = "Pausing " + CharSpellString;
                        Presence.Timestamps.Start = DateTime.UtcNow;
                    }
                    else if (WasPause && !isPause)
                    {
                        WasPause                  = false;
                        Presence.Details          = StatusString + " " + CharSpellString;
                        Presence.Timestamps.Start = (PlayTime += DateTime.UtcNow - Presence.Timestamps.Start);
                    }
                }
                else
                {
                    IsPlaying                 = false;
                    Presence.Details          = "In Main Menu";
                    Presence.Timestamps.Start = PlayTime = null;
                    Presence.State            = null;
                }
                UpdatePresence();
            };
            WorkerTimer.Start();
        }
예제 #2
0
        public th08(Process Game)
        {
            this.Game        = Game;
            ClientID         = "447393228401147914";
            SubTitle         = "Imperishable Night";
            ProgramName      = "th08";
            StageOffset      = 0x124D2D8;
            CharacterOffset  = 0x124CF48;
            DifficultyOffset = 0x124CF49;
            IsPauseOffset    = 0x124D0A0;
            StatusOffset     = 0x124D0B4;
            IsInGameOffset   = 0x120F41F;
            Init();

            WorkerTimer.Elapsed += ElapsedFunc;
            WorkerTimer.Start();
        }
예제 #3
0
        public th07(Process Game)
        {
            this.Game        = Game;
            ClientID         = "445995245767884800";
            SubTitle         = "Perfect Cherry Blossom";
            ProgramName      = "th07";
            StageOffset      = 0x22F85C;
            CharacterOffset  = 0x22F645;
            SpellOffset      = 0x22F646;
            DifficultyOffset = 0x226280;
            IsPauseOffset    = 0x22F640;
            StatusOffset     = 0x22F648;
            IsInGameOffset   = 0x22FBDC;
            Init();

            WorkerTimer.Elapsed += ElapsedFunc;
            WorkerTimer.Start();
        }