Esempio n. 1
0
        public DSRHook(object caller, int refreshInterval, int minLifetime, string procesName) : base(caller, refreshInterval, minLifetime, p => p.MainWindowTitle == procesName)
        {
            Offsets = new DSROffsets();
            CELib   = new CheatEngineLibrary();

            CamMan          = RegisterRelativeAOB(DSROffsets.CamManBaseAOB, 3, 7, DSROffsets.CamManOffset);
            ChrFollowCam    = RegisterRelativeAOB(DSROffsets.ChrFollowCamAOB, 3, 7, DSROffsets.ChrFollowCamOffset1, DSROffsets.ChrFollowCamOffset2, DSROffsets.ChrFollowCamOffset3);
            GroupMaskAddr   = RegisterRelativeAOB(DSROffsets.GroupMaskAOB, 2, 7);
            GraphicsData    = RegisterRelativeAOB(DSROffsets.GraphicsDataAOB, 3, 7, DSROffsets.GraphicsDataOffset1, DSROffsets.GraphicsDataOffset2);
            ChrClassWarp    = RegisterRelativeAOB(DSROffsets.ChrClassWarpAOB, 3, 7, DSROffsets.ChrClassWarpOffset1);
            WorldChrBase    = RegisterRelativeAOB(DSROffsets.WorldChrBaseAOB, 3, 7, DSROffsets.WorldChrBaseOffset1);
            ChrDbgAddr      = RegisterRelativeAOB(DSROffsets.ChrDbgAOB, 2, 7);
            MenuMan         = RegisterRelativeAOB(DSROffsets.MenuManAOB, 3, 7, DSROffsets.MenuManOffset1);
            ChrClassBasePtr = RegisterRelativeAOB(DSROffsets.ChrClassBaseAOB, 3, 7);
            EventFlags      = RegisterRelativeAOB(DSROffsets.EventFlagsAOB, 3, 7, DSROffsets.EventFlagsOffset1, DSROffsets.EventFlagsOffset2);
            ItemGetAddr     = RegisterAbsoluteAOB(DSROffsets.ItemGetAOB);
            BonfireWarpAddr = RegisterAbsoluteAOB(DSROffsets.BonfireWarpAOB);
            ChrData3        = RegisterRelativeAOB(DSROffsets.ChrData3AOB, 3, 7, DSROffsets.ChrData3Offset);
            AnimData        = RegisterRelativeAOB(DSROffsets.AnimDataAOB, 3, 7, DSROffsets.AnimDataOffset0, DSROffsets.AnimDataOffset1, DSROffsets.AnimDataOffset2, DSROffsets.AnimDataOffset3);
            GameMan         = RegisterRelativeAOB(DSROffsets.GameManAOB, 3, 7, DSROffsets.GameManOffset);

            StopMyChr      = RegisterAbsoluteAOB(DSROffsets.StopMyChrAOB);
            EntityAngle    = RegisterAbsoluteAOB(DSROffsets.EntityAngleAOB);
            EntityCam      = RegisterAbsoluteAOB(DSROffsets.EntityCamAOB);
            DownArrowInput = RegisterAbsoluteAOB(DSROffsets.DownArrowInputAOB);
            ArrowUpInput   = RegisterAbsoluteAOB(DSROffsets.ArrowUpInputAOB);
            GamepadYInput  = RegisterAbsoluteAOB(DSROffsets.GamepadYInputAOB);
            EnemyAttacks   = RegisterAbsoluteAOB(DSROffsets.EnemyAttacksAOB);

            ChrData1    = CreateChildPointer(WorldChrBase, (int)DSROffsets.WorldChrBase.ChrData1);
            ChrMapData  = CreateBasePointer(IntPtr.Zero);
            ChrAnimData = CreateBasePointer(IntPtr.Zero);
            ChrPosData  = CreateBasePointer(IntPtr.Zero);
            ChrData2    = CreateChildPointer(ChrClassBasePtr, DSROffsets.ChrData2Offset1, DSROffsets.ChrData2Offset2);
        }
Esempio n. 2
0
        public void DSRHook_OnHooked()
        {
            Offsets = DSROffsets.GetOffsets(Process.MainModule.ModuleMemorySize);

            ChrMapData  = CreateChildPointer(ChrData1, (int)DSROffsets.ChrData1.ChrMapData + Offsets.ChrData1Boost1);
            ChrAnimData = CreateChildPointer(ChrMapData, (int)DSROffsets.ChrMapData.ChrAnimData);
            ChrPosData  = CreateChildPointer(ChrMapData, (int)DSROffsets.ChrMapData.ChrPosData);
        }
Esempio n. 3
0
        public static DSROffsets GetOffsets(int moduleSize)
        {
            DSROffsets result  = new DSROffsets();
            int        version = versions.ContainsKey(moduleSize) ? versions[moduleSize] : 100;

            if (version > 1)
            {
                result.ChrClassWarpBoost = 0x10;
            }

            if (version > 2)
            {
                result.ChrData1Boost1 = 0x20;
                result.ChrData1Boost2 = 0x10;
            }

            return(result);
        }