Ejemplo n.º 1
0
 public ProgramPointer(OriMemory memory, MemPointer pointer)
 {
     this.Memory    = memory;
     this.Name      = pointer;
     this.AutoDeref = true;
     lastID         = memory.Program == null ? -1 : memory.Program.Id;
     lastTry        = DateTime.MinValue;
 }
Ejemplo n.º 2
0
        public ProgramPointer(HollowKnightMemory memory, MemPointer pointer)
        {
            this.Memory    = memory;
            this.Name      = pointer;
            this.AutoDeref = true;

            //This shows up if the Modding API is installed.  In this case the pointer for GameManager is slightly off.
            if (File.Exists(Path.Combine(Path.GetDirectoryName(Memory.Program.MainModule.FileName), @"hollow_knight_Data\Managed\Assembly-CSharp.xml")))
            {
                Log("Modding API Detected, using API Signature for GameManager");
                foreach (KeyValuePair <MemVersion, Dictionary <MemPointer, string> > pattern in funcPatterns)
                {
                    pattern.Value[MemPointer.GameManager] = "558BEC5783EC048B7D088B05????????83EC086A0050E8????????83C41085C07423B8????????893883EC0C57E8????????83C41083EC0C57393FE8????????83C410EB3F8B05";
                }
            }

            lastID  = memory.Program == null ? -1 : memory.Program.Id;
            lastTry = DateTime.MinValue;
        }