예제 #1
0
 static int ChatMonitor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         CenterServerManager obj = (CenterServerManager)ToLua.CheckObject(L, 1, typeof(CenterServerManager));
         string arg0             = ToLua.CheckString(L, 2);
         string arg1             = ToLua.CheckString(L, 3);
         string arg2             = ToLua.CheckString(L, 4);
         obj.ChatMonitor(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    private static int ChatMonitor(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 4);
            CenterServerManager centerServerManager = (CenterServerManager)ToLua.CheckObject(L, 1, typeof(CenterServerManager));
            string nickName = ToLua.CheckString(L, 2);
            string roleId   = ToLua.CheckString(L, 3);
            string msg      = ToLua.CheckString(L, 4);
            centerServerManager.ChatMonitor(nickName, roleId, msg);
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }