Exemple #1
0
    public static int GetLuaObj(IntPtr l)
    {
        int result;

        try
        {
            BJLuaObjHelper bjluaObjHelper = (BJLuaObjHelper)LuaObject.checkSelf(l);
            LuaTable       luaObj         = bjluaObjHelper.GetLuaObj();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, luaObj);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
        // Token: 0x0600049D RID: 1181 RVA: 0x00014E08 File Offset: 0x00013008
        private LuaTable GetHotfixLuaObj(object extObj)
        {
            if (extObj == null)
            {
                Debug.LogError("GetHotfixLuaObj extObj is null");
                return(null);
            }
            FieldInfo field = extObj.GetType().GetField("m_luaObjHelper", BindingFlags.Instance | BindingFlags.NonPublic);

            if (field == null)
            {
                Debug.LogError("GetHotfixLuaObj can't get field: m_luaObjHelper");
                return(null);
            }
            BJLuaObjHelper bjluaObjHelper = field.GetValue(extObj) as BJLuaObjHelper;

            if (bjluaObjHelper == null)
            {
                Debug.LogError("GetHotfixLuaObj can't get value from field");
                return(null);
            }
            return(bjluaObjHelper.GetLuaObj());
        }