Esempio n. 1
0
 static int UpgradeInfo(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         CenterServerManager obj = (CenterServerManager)ToLua.CheckObject(L, 1, typeof(CenterServerManager));
         string arg0             = ToLua.CheckString(L, 2);
         int    arg1             = (int)LuaDLL.luaL_checknumber(L, 3);
         obj.UpgradeInfo(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    private static int UpgradeInfo(IntPtr L)
    {
        int result;

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