public static Search ( ProcessStream pc, byte buffer ) : int | ||
pc | ProcessStream | |
buffer | byte | |
Результат | int |
public static void Calibrate(CalibrationInfo[] info) { Client.m_LocationPointer = (LocationPointer)null; ProcessStream processStream = Client.ProcessStream; if (processStream == null) { return; } int coordPointer1 = 0; int coordSize1 = 0; int coordPointer2 = 0; int coordSize2 = 0; int coordPointer3 = 0; int coordSize3 = 0; int coordPointer4 = 0; int coordSize4 = 0; for (int index = 0; index < info.Length; ++index) { CalibrationInfo calibrationInfo = info[index]; int ptr = Client.Search(processStream, calibrationInfo.Mask, calibrationInfo.Vals); if (ptr != 0) { if (coordPointer1 == 0 && calibrationInfo.DetX.Length > 0) { Client.GetCoordDetails(processStream, ptr, calibrationInfo.DetX, out coordPointer1, out coordSize1); } if (coordPointer2 == 0 && calibrationInfo.DetY.Length > 0) { Client.GetCoordDetails(processStream, ptr, calibrationInfo.DetY, out coordPointer2, out coordSize2); } if (coordPointer3 == 0 && calibrationInfo.DetZ.Length > 0) { Client.GetCoordDetails(processStream, ptr, calibrationInfo.DetZ, out coordPointer3, out coordSize3); } if (coordPointer4 == 0 && calibrationInfo.DetF.Length > 0) { Client.GetCoordDetails(processStream, ptr, calibrationInfo.DetF, out coordPointer4, out coordSize4); } if (coordPointer1 != 0 && coordPointer2 != 0 && (coordPointer3 != 0 && coordPointer4 != 0)) { break; } } } if (coordPointer1 == 0 && coordPointer2 == 0 && (coordPointer3 == 0 && coordPointer4 == 0)) { return; } Client.m_LocationPointer = new LocationPointer(coordPointer1, coordPointer2, coordPointer3, coordPointer4, coordSize1, coordSize2, coordSize3, coordSize4); }
public static void Calibrate(CalibrationInfo[] info) { Client.m_LocationPointer = null; System.ProcessStream processStream = Client.ProcessStream; if (processStream == null) { return; } int num = 0; int num1 = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; for (int i = 0; i < (int)info.Length; i++) { CalibrationInfo calibrationInfo = info[i]; int num8 = Client.Search(processStream, calibrationInfo.Mask, calibrationInfo.Vals); if (num8 != 0) { if (num == 0 && (int)calibrationInfo.DetX.Length > 0) { Client.GetCoordDetails(processStream, num8, calibrationInfo.DetX, out num, out num1); } if (num2 == 0 && (int)calibrationInfo.DetY.Length > 0) { Client.GetCoordDetails(processStream, num8, calibrationInfo.DetY, out num2, out num3); } if (num4 == 0 && (int)calibrationInfo.DetZ.Length > 0) { Client.GetCoordDetails(processStream, num8, calibrationInfo.DetZ, out num4, out num5); } if (num6 == 0 && (int)calibrationInfo.DetF.Length > 0) { Client.GetCoordDetails(processStream, num8, calibrationInfo.DetF, out num6, out num7); } if (num != 0 && num2 != 0 && num4 != 0 && num6 != 0) { break; } } } if (num != 0 || num2 != 0 || num4 != 0 || num6 != 0) { Client.m_LocationPointer = new Ultima.LocationPointer(num, num2, num4, num6, num1, num3, num5, num7); } }
public static void Calibrate(int x, int y, int z) { Client.m_LocationPointer = null; System.ProcessStream processStream = Client.ProcessStream; if (processStream == null) { return; } byte[] numArray = new byte[] { (byte)z, (byte)(z >> 8), (byte)(z >> 16), (byte)(z >> 24), (byte)y, (byte)(y >> 8), (byte)(y >> 16), (byte)(y >> 24), (byte)x, (byte)(x >> 8), (byte)(x >> 16), (byte)(x >> 24) }; int num = Client.Search(processStream, numArray); if (num == 0) { return; } Client.m_LocationPointer = new Ultima.LocationPointer(num + 8, num + 4, num, 0, 4, 4, 4, 0); }