Example #1
0
 // Token: 0x06003D45 RID: 15685 RVA: 0x001149A0 File Offset: 0x00112BA0
 public static TrainingTech FromDataSection(ProTrainingTech Tech)
 {
     return(new TrainingTech
     {
         ConfigId = Tech.ConfigId,
         Level = Tech.Level
     });
 }
    public static int ToPro(IntPtr l)
    {
        int result;

        try
        {
            int total = LuaDLL.lua_gettop(l);
            if (LuaObject.matchType(l, total, 2, new Type[0]))
            {
                TrainingTech    trainingTech = (TrainingTech)LuaObject.checkSelf(l);
                ProTrainingTech o            = trainingTech.ToPro();
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else if (LuaObject.matchType(l, total, 2, new Type[0]))
            {
                TrainingTech    trainingTech2 = (TrainingTech)LuaObject.checkSelf(l);
                ProTrainingTech o2            = trainingTech2.ToPro();
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o2);
                result = 2;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function ToPro to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }