public static void stopRead() { if (arRead != null) { arRead.closeRead(); } arRead = null; }
static public int get_combatFinish(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); pushValue(l, self.combatFinish); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int calcActionOffset(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); self.calcActionOffset(); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int get_FileName(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); pushValue(l, self.FileName); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_UserDataPath(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); pushValue(l, self.UserDataPath); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int closeWrite(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); self.closeWrite(); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int openAppend(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); var ret = self.openAppend(); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int readFinishFlag(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); var ret = self.readFinishFlag(); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
public static void stopRecord(bool isFinish) { if (arWrite == null) { return; } arWrite.combatFinish = isFinish; arWrite.exitEvent.Set(); arWrite.writeThread.Join(); arWrite = null; }
static public int set_combatFinish(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Boolean v; checkType(l, 2, out v); self.combatFinish = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_UserDataPath(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); string v; checkType(l, 2, out v); self.UserDataPath = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_actions(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Collections.Generic.List <System.Byte[]> v; checkType(l, 2, out v); self.actions = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_locker(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Object v; checkType(l, 2, out v); self.locker = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_exitEvent(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Threading.AutoResetEvent v; checkType(l, 2, out v); self.exitEvent = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_waitTime(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Int32 v; checkType(l, 2, out v); self.waitTime = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_writeThread(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Threading.Thread v; checkType(l, 2, out v); self.writeThread = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { Game.ActionRecord o; System.String a1; checkType(l, 2, out a1); o = new Game.ActionRecord(a1); pushValue(l, o); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int openWrite(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Boolean a1; var ret = self.openWrite(out a1); pushValue(l, ret); pushValue(l, a1); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int writeAction(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Byte[] a1; checkType(l, 2, out a1); var ret = self.writeAction(a1); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int writeHead(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.Int64 a2; checkType(l, 3, out a2); System.String a3; checkType(l, 4, out a3); var ret = self.writeHead(a1, a2, a3); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int readAction(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.Byte[] a1; System.Int32 a2; checkType(l, 3, out a2); System.Int32 a3; var ret = self.readAction(out a1, a2, out a3); pushValue(l, ret); pushValue(l, a1); pushValue(l, a3); return(3); } catch (Exception e) { return(error(l, e)); } }
static public int readHead(IntPtr l) { try { Game.ActionRecord self = (Game.ActionRecord)checkSelf(l); System.String a1; System.Int64 a2; System.String a3; System.Boolean a4; var ret = self.readHead(out a1, out a2, out a3, out a4); pushValue(l, ret); pushValue(l, a1); pushValue(l, a2); pushValue(l, a3); pushValue(l, a4); return(5); } catch (Exception e) { return(error(l, e)); } }
public static void startRecord(string clientVer, string fileName, long timestamp, string roomInfo) { if (arWrite != null) { return; } bool fileExist = false; arWrite = new ActionRecord(fileName); arWrite.openWrite(out fileExist); if (!fileExist) { arWrite.writeHead(clientVer, timestamp, roomInfo); } arWrite.closeWrite(); arWrite.writeThread = new Thread(arWrite.WriteProc); arWrite.exitEvent = new AutoResetEvent(false); arWrite.actions.Clear(); arWrite.writeThread.Start(); }
public static void removeRecord(string fileName) { ActionRecord tmp = new ActionRecord(fileName); tmp.delete(); }
public static bool startRead(string fileName) { stopRead(); arRead = new ActionRecord(fileName); return(arRead.openRead()); }