示例#1
0
        private Client(Process process, ClientVersion version, string dataDirectory)
        {
            this.Version = version;

            this.Process = process;
            this.Process.EnableRaisingEvents = true;
            this.Process.Exited += Process_Exited;

            //this.Process.WaitForInputIdle();

            ProcessHandle = WinApi.OpenProcess(WinApi.PROCESS_ALL_ACCESS, 0, (uint)process.Id);
            BaseAddress = WinApi.GetBaseAddress(ProcessHandle).ToInt64();

            Initialize(Path.Combine(dataDirectory, "Tibia.dat"));
        }
示例#2
0
 public Client(string datFilename, ClientVersion version)
 {
     this.Version = version;
     Initialize(datFilename);
 }
示例#3
0
 public Client(Process process, ClientVersion version)
     : this(process, version, Path.GetDirectoryName(process.MainModule.FileName))
 {
 }