Exemple #1
0
 public DeepPointer(OffsetT base_, params OffsetT[] offsets)
 {
     _base    = base_;
     _offsets = new List <OffsetT>();
     _offsets.Add(0); // deref base first
     _offsets.AddRange(offsets);
 }
Exemple #2
0
        public DeepPointer(DeepPointer deepPointer, params OffsetT[] offsets)
        {
            _base = deepPointer.GetBase();
            List <OffsetT> offsetLst = new List <OffsetT>(deepPointer.GetOffsets());

            offsetLst.AddRange(offsets);
            _offsets = offsetLst;
        }
Exemple #3
0
        public bool DerefString(Process process, ReadStringType type, StringBuilder sb)
        {
            OffsetT offset = _offsets[_offsets.Count - 1];
            IntPtr  ptr;

            if (!this.DerefOffsets(process, out ptr) ||
                !process.ReadString(ptr + offset, type, sb))
            {
                return(false);
            }
            return(true);
        }
Exemple #4
0
        internal DeepPointer ModifyOffset(int offsetIndex, OffsetT NewValue)
        {
            if (offsetIndex >= 0 && offsetIndex < _offsets.Count)
            {
                if (_offsets[0] == 0)
                {
                    offsetIndex++;
                }

                _offsets[offsetIndex] = NewValue;
            }
            return(this);
        }
Exemple #5
0
        internal DeepPointer MultiplyOffset(int offsetIndex, OffsetT multiplayBy)
        {
            if (offsetIndex >= 0 && offsetIndex < _offsets.Count)
            {
                if (_offsets[0] == 0)
                {
                    offsetIndex++;
                }

                _offsets[offsetIndex] *= multiplayBy;
            }
            return(this);
        }
Exemple #6
0
        public bool DerefBytes(Process process, int count, out byte[] value)
        {
            OffsetT offset = _offsets[_offsets.Count - 1];
            IntPtr  ptr;

            if (!this.DerefOffsets(process, out ptr) ||
                !process.ReadBytes(ptr + offset, count, out value))
            {
                value = null;
                return(false);
            }

            return(true);
        }
Exemple #7
0
        public bool Deref <T>(Process process, out T value) where T : struct
        {
            OffsetT offset = _offsets[_offsets.Count - 1];
            IntPtr  ptr;

            if (!this.DerefOffsets(process, out ptr) ||
                !process.ReadValue(ptr + offset, out value))
            {
                value = default(T);
                return(false);
            }

            return(true);
        }
 public DeepPointer(OffsetT base_, params OffsetT[] offsets)
 {
     _base = base_;
     InitializeOffsets(offsets);
 }
 public DeepPointer(string module, OffsetT base_, params OffsetT[] offsets)
     : this(base_, offsets)
 {
     _module = module.ToLower();
 }
Exemple #10
0
 public DeepPointer(OffsetT base_, DerefType derefType, params OffsetT[] offsets)
 {
     _base      = base_;
     _derefType = derefType;
     InitializeOffsets(offsets);
 }
Exemple #11
0
 public DeepPointer(OffsetT base_, params OffsetT[] offsets)
     : this(base_, DerefType.Auto, offsets)
 {
 }
Exemple #12
0
 public DeepPointer(string module, OffsetT base_, params OffsetT[] offsets)
     : this(module, base_, DerefType.Auto, offsets)
 {
 }
Exemple #13
0
 public DeepPointer(OffsetT base_, bool baseIsAbsolute_, params OffsetT[] offsets)
     : this(base_, offsets)
 {
     _baseIsAbsolute = baseIsAbsolute_;
 }
Exemple #14
0
 public DeepPointer(OffsetT base_, List <int> offsets)
 {
     _base    = base_;
     _offsets = offsets;
 }
Exemple #15
0
 public GameVar(string id, OffsetT base_, params OffsetT[] offsets) : base(new DeepPointer(base_, offsets))
 {
     this.Name           = id;
     this.UpdateInterval = TimeSpan.FromMilliseconds(5);
 }