Esempio n. 1
0
        private static MvProcess FindProcess(string processName)
        {
            var result = MvProcess.FindByName(processName);

            if (result == null)
            {
                ProcessEx.PrintAllProcessesNames();
                Console.WriteLine($"Can't find the process with name \"{ProcessName}\".");
            }
            return(result);
        }
Esempio n. 2
0
        public static Entity ReadAnyByEntityListAnchor(MvProcess process, long entityListAnchor, int index)
        {
            long entityAnchor = process.ReadPointer32(entityListAnchor + index * EntityStepSize); // Read the player pointer.

            if (entityAnchor != 0)
            {
                Entity entity = new Entity(process, entityAnchor);
                entity?.Read();
                return(entity);
            }
            return(null);
        }
Esempio n. 3
0
        private static void InitilazeBaseAddresses(MvProcess process)
        {
            // Find out the View Matrix base address:
            _mViewMatrixAnchor = 0x3 + (long)process.ScanModuleByPattern(ClientModule, Signatures.ViewMatrixPattern);
            _mViewMatrixAnchor = 0xB0 + process.ReadPointer32(_mViewMatrixAnchor);

            // Find out the GlowO Object base address:
            _mGlowObjectAnchor = process.ReadPointer32((long)process[ClientModule].BaseAddress + Signatures.GlowObjectOffset);
            _mGlowObjectAnchor = process.ReadPointer32(_mGlowObjectAnchor);

            // Find out the Entity List base address:
            _mEntityListAnchor = 0xB + (long)process.ScanModuleByPattern(ClientModule, Signatures.EntityListPattern);
            _mEntityListAnchor = process.ReadPointer32(_mEntityListAnchor);

            Entity localPlayer = Entity.ReadLocalPlayerByEntityListAnchor(process, _mEntityListAnchor);

            Console.WriteLine(localPlayer);
            Entity enemy = Entity.ReadAnyByEntityListAnchor(process, _mEntityListAnchor, 1);

            Console.WriteLine(enemy);
            Console.WriteLine(enemy.Anchor.ToString("X"));

            Console.WriteLine($"ViewMatrix: {_mViewMatrixAnchor:X}, GlowObject: {((long)process[ClientModule].BaseAddress + Signatures.GlowObjectOffset):X}, EntityList: {_mEntityListAnchor:X}");
        }
Esempio n. 4
0
 protected Player(MvProcess process, long anchor) : base(process, anchor)
 {
 }
Esempio n. 5
0
        public static Entity ReadLocalPlayerByEntityListAnchor(MvProcess process, long entityListAnchor)
        {
            var entity = ReadAnyByEntityListAnchor(process, entityListAnchor, LocalPlayerIndex);

            return(entity);
        }
Esempio n. 6
0
        private const long EntityStepSize = 0x10; // Step size between entities in the list.

        public Entity(MvProcess process, long anchor) : base(process, anchor)
        {
        }
Esempio n. 7
0
        }                           // Don't storage pointers (Anchor is the base address which using to initializing an object with offsets).

        protected ProcessReader(MvProcess process, long anchor)
        {
            Process = process;
            Anchor  = anchor;
        }