public static int Destroy(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            battlePrepareTreasure.Destroy();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure o = new BattlePrepareTreasure();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int get_m_isOpened(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, battlePrepareTreasure.m_luaExportHelper.m_isOpened);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int GetBattleTreasureInfo(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure        battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            ConfigDataBattleTreasureInfo battleTreasureInfo    = battlePrepareTreasure.GetBattleTreasureInfo();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, battleTreasureInfo);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int IsOpened(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            bool b = battlePrepareTreasure.IsOpened();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_position(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            GridPosition          position;
            LuaObject.checkValueType <GridPosition>(l, 2, out position);
            battlePrepareTreasure.m_luaExportHelper.m_position = position;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_graphic(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            GenericGraphic        graphic;
            LuaObject.checkType <GenericGraphic>(l, 2, out graphic);
            battlePrepareTreasure.m_luaExportHelper.m_graphic = graphic;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_battleTreasureInfo(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure        battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            ConfigDataBattleTreasureInfo battleTreasureInfo;
            LuaObject.checkType <ConfigDataBattleTreasureInfo>(l, 2, out battleTreasureInfo);
            battlePrepareTreasure.m_luaExportHelper.m_battleTreasureInfo = battleTreasureInfo;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_clientBattle(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            ClientBattle          clientBattle;
            LuaObject.checkType <ClientBattle>(l, 2, out clientBattle);
            battlePrepareTreasure.m_luaExportHelper.m_clientBattle = clientBattle;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int SetOpened(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            bool opened;
            LuaObject.checkType(l, 2, out opened);
            battlePrepareTreasure.SetOpened(opened);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int Initialize(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            ClientBattle          clientBattle;
            LuaObject.checkType <ClientBattle>(l, 2, out clientBattle);
            ConfigDataBattleTreasureInfo treasureInfo;
            LuaObject.checkType <ConfigDataBattleTreasureInfo>(l, 3, out treasureInfo);
            battlePrepareTreasure.Initialize(clientBattle, treasureInfo);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int ComputeGraphicPosition(IntPtr l)
    {
        int result;

        try
        {
            BattlePrepareTreasure battlePrepareTreasure = (BattlePrepareTreasure)LuaObject.checkSelf(l);
            Vector2 p;
            LuaObject.checkType(l, 2, out p);
            float zoffset;
            LuaObject.checkType(l, 3, out zoffset);
            Vector3 o = battlePrepareTreasure.m_luaExportHelper.ComputeGraphicPosition(p, zoffset);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }