private static string GetGumpType(IntPtr pHandle, IntPtr gHandle) { byte[] data = new byte[128]; IntPtr stringAddress = (IntPtr)GumpHelper.GetUINT(pHandle, gHandle, 8); if (stringAddress == IntPtr.Zero) return ""; Memory.Read(pHandle, stringAddress, data, true); for (int x = 1; x < data.Length; x++) { if (data[x] == 0) { return ASCIIEncoding.ASCII.GetString(data, 0, x); } } return ""; }
private static byte[] GetVTableBytes(IntPtr pHandle, IntPtr gHandle) { return(BitConverter.GetBytes((GumpHelper.GetUINT(pHandle, gHandle)))); }