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

        try
        {
            ToLua.CheckArgsCount(L, 5);
            CenterServerManager centerServerManager = (CenterServerManager)ToLua.CheckObject(L, 1, typeof(CenterServerManager));
            string name    = ToLua.CheckString(L, 2);
            int    level   = (int)LuaDLL.luaL_checknumber(L, 3);
            int    vip     = (int)LuaDLL.luaL_checknumber(L, 4);
            string newName = ToLua.CheckString(L, 5);
            centerServerManager.UpdateRoleInfo(name, level, vip, newName);
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }