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")); }
public Client(string datFilename, ClientVersion version) { this.Version = version; Initialize(datFilename); }
public Client(Process process, ClientVersion version) : this(process, version, Path.GetDirectoryName(process.MainModule.FileName)) { }