Beispiel #1
0
    public List <RawInfo> GetRawInfoList(int openDay = 0, int type = 0, bool isSort = false)
    {
        List <RawInfo> list = new List <RawInfo>();

        using (Dictionary <int, ActivityItemInfo> .Enumerator enumerator = this.activityInfos.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, ActivityItemInfo> current = enumerator.get_Current();
                RawInfo rawInfo = current.get_Value().rawInfo;
                if (rawInfo != null && (type == 0 || rawInfo.tab == (Tab.TAB)type) && (openDay == 0 || rawInfo.startDay == openDay))
                {
                    list.Add(rawInfo);
                }
            }
        }
        if (isSort)
        {
            list.Sort(delegate(RawInfo node1, RawInfo node2)
            {
                ActivityItemInfo activityItemInfo  = this.activityInfos.get_Item(node1.acId);
                ActivityItemInfo activityItemInfo2 = this.activityInfos.get_Item(node2.acId);
                if (activityItemInfo.canGetFlag != activityItemInfo2.canGetFlag)
                {
                    return(activityItemInfo2.canGetFlag.CompareTo(activityItemInfo.canGetFlag));
                }
                return(node1.acId.CompareTo(node2.acId));
            });
        }
        return(list);
    }
Beispiel #2
0
    private void SetBtnGet(Transform btnGet, int cellIndex)
    {
        RawInfo          rawInfo          = this.rawInfoList.get_Item(cellIndex);
        ActivityItemInfo activityItemInfo = Activity7DayManager.Instance.activityInfos.get_Item(rawInfo.acId);

        if (activityItemInfo == null)
        {
            return;
        }
        if (activityItemInfo.hasGetPrize)
        {
            btnGet.get_gameObject().SetActive(false);
            btnGet.GetComponent <Button>().set_enabled(false);
            btnGet.get_parent().FindChild("imgFinish").get_gameObject().SetActive(true);
        }
        else
        {
            btnGet.get_gameObject().SetActive(true);
            btnGet.GetComponent <Button>().set_enabled(true);
            if (activityItemInfo.canGetFlag)
            {
                ResourceManager.SetSprite(btnGet.GetComponent <Image>(), ResourceManager.GetIconSprite("button_yellow_1"));
                btnGet.FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(513203, false));
            }
            else if (rawInfo.servletId == -1L)
            {
                btnGet.get_gameObject().SetActive(false);
            }
            else
            {
                ResourceManager.SetSprite(btnGet.GetComponent <Image>(), ResourceManager.GetIconSprite("button_orange_1"));
                btnGet.FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(513202, false));
            }
        }
    }
Beispiel #3
0
    private void ClickBtnGetToDo(Transform btnGet, int cellIndex)
    {
        RawInfo rawInfo = this.rawInfoList.get_Item(cellIndex);
        int     acId    = rawInfo.acId;

        if (!Activity7DayManager.Instance.activityInfos.ContainsKey(acId))
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(513193, false), GameDataUtils.GetChineseContent(513194, false), delegate
            {
                UIManagerControl.Instance.HideUI("OperateActivityUI");
                UIStackManager.Instance.PopUIPrevious(UIType.FullScreen);
            }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
            return;
        }
        ActivityItemInfo activityItemInfo = Activity7DayManager.Instance.activityInfos.get_Item(acId);
        bool             canGetFlag       = activityItemInfo.canGetFlag;

        if (!activityItemInfo.hasGetPrize)
        {
            if (canGetFlag)
            {
                if (BackpackManager.Instance.ShowBackpackFull())
                {
                    return;
                }
                Activity7DayManager.Instance.SendGetActivityItemPrizeReq(2, acId);
            }
            else
            {
                SourceReferenceUI.GoTo((int)rawInfo.servletId);
            }
        }
    }
Beispiel #4
0
    private void UpdateActivityItemInfo(int activityId, ActivityItemInfo newInfo)
    {
        ActivityItemInfo activityItemInfo;

        this.activityInfos.TryGetValue(activityId, ref activityItemInfo);
        if (activityItemInfo != null && newInfo.rawInfo == null)
        {
            newInfo.rawInfo = activityItemInfo.rawInfo;
        }
        this.activityInfos.set_Item(activityId, newInfo);
    }
Beispiel #5
0
    public bool GetDayRedPoint(int dayNum)
    {
        List <RawInfo> rawInfoList = this.GetRawInfoList(dayNum, 0, false);

        for (int i = 0; i < rawInfoList.get_Count(); i++)
        {
            RawInfo          rawInfo          = rawInfoList.get_Item(i);
            ActivityItemInfo activityItemInfo = this.activityInfos.get_Item(rawInfo.acId);
            if (activityItemInfo.canGetFlag)
            {
                return(true);
            }
        }
        return(false);
    }
Beispiel #6
0
 private void OnActivityItemChangeNty(short state, ActivityItemChangeNty msg = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (msg == null)
     {
         return;
     }
     for (int i = 0; i < msg.activitiesInfo.get_Count(); i++)
     {
         ActivityItemInfo activityItemInfo = msg.activitiesInfo.get_Item(i);
         if (activityItemInfo.typeId == 2)
         {
             this.UpdateActivityItemInfo(activityItemInfo.activityId, activityItemInfo);
         }
     }
     OperateActivityManager.Instance.OnUpdateActivity7DayReward();
 }
Beispiel #7
0
        public List <T2> readObjList <T1, T2>()
        {
            if (_pos == 0)
            {
                _pos = 8;
            }

            int _loc2_ = readShort();//ReadShort(_barr, _pos);
            int _loc1_ = 0;
            //int endpos = _pos + 2;
            List <T2> thelst = new List <T2>();

            while (_loc1_ < _loc2_ && this._pos < this._barr.Length)
            {
                #region xxx
                if (typeof(T1) == typeof(LongC))
                {
                    LongC _itemId = readLong();
                    T2    tt      = (T2)Convert.ChangeType(_itemId, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(Int32) || typeof(T1) == typeof(int))
                {
                    int _itemId = readInt();
                    T2  tt      = (T2)Convert.ChangeType(_itemId, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(string))
                {
                    string _itemId = readString();
                    T2     tt      = (T2)Convert.ChangeType(_itemId, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(byte) || typeof(T1) == typeof(Byte))
                {
                    int val = readByte();
                    T2  tt  = (T2)Convert.ChangeType(val, typeof(T2));
                    thelst.Add(tt);//
                }
                else if (typeof(T1) == typeof(SoulfactInfo))
                {
                    SoulfactInfo bb = new SoulfactInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(BuffPara))
                {
                    BuffPara bb = new BuffPara();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(Position))
                {
                    Position bb = new Position();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(MailSummaryInfo))
                {
                    MailSummaryInfo bb = new MailSummaryInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(AttackResultInfos))
                {
                    AttackResultInfos bb = new AttackResultInfos();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(GoodsAttribute))
                {
                    GoodsAttribute bb = new GoodsAttribute();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);
                }
                else if (typeof(T1) == typeof(Slot))
                {
                    Slot bb = new Slot();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//GemInfo
                }
                else if (typeof(T1) == typeof(GemInfo))
                {
                    GemInfo bb = new GemInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//GoodsInfoRes
                }
                else if (typeof(T1) == typeof(GoodsInfoRes))
                {
                    GoodsInfoRes bb = new GoodsInfoRes();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//BossEventInfo
                }
                else if (typeof(T1) == typeof(BossEventInfo))
                {
                    BossEventInfo bb = new BossEventInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//BossEventInfo
                }
                else if (typeof(T1) == typeof(PandoraEventInfo))
                {
                    PandoraEventInfo bb = new PandoraEventInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//ZoneTeamInfo
                }
                else if (typeof(T1) == typeof(ZoneTeamInfo))
                {
                    ZoneTeamInfo bb = new ZoneTeamInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CharacterInfo
                }
                else if (typeof(T1) == typeof(CharacterInfo))
                {
                    CharacterInfo bb = new CharacterInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//SkillLevelInfo
                }
                else if (typeof(T1) == typeof(SkillLevelInfo))
                {
                    SkillLevelInfo bb = new SkillLevelInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CSSkillInfo
                }
                else if (typeof(T1) == typeof(CSSkillInfo))
                {
                    CSSkillInfo bb = new CSSkillInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//PokemonInfo
                }
                else if (typeof(T1) == typeof(PokemonInfo))
                {
                    PokemonInfo bb = new PokemonInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//ActivityItemInfo
                }
                else if (typeof(T1) == typeof(ActivityItemInfo))
                {
                    ActivityItemInfo bb = new ActivityItemInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CSMonsterInfo
                }
                else if (typeof(T1) == typeof(CSMonsterInfo))
                {
                    CSMonsterInfo bb = new CSMonsterInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//DropGoodsInfo
                }
                else if (typeof(T1) == typeof(DropGoodsInfo))
                {
                    DropGoodsInfo bb = new DropGoodsInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//HorseSkillBean
                }
                else if (typeof(T1) == typeof(HorseSkillBean))
                {
                    HorseSkillBean bb = new HorseSkillBean();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CSPlayerInfo
                }
                else if (typeof(T1) == typeof(CSPlayerInfo))
                {
                    CSPlayerInfo bb = new CSPlayerInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//PetInfo
                }
                else if (typeof(T1) == typeof(PetInfo))
                {
                    PetInfo bb = new PetInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//NpcInfo
                }
                else if (typeof(T1) == typeof(NpcInfo))
                {
                    NpcInfo bb = new NpcInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//EffectInfo
                }
                else if (typeof(T1) == typeof(EffectInfo))
                {
                    EffectInfo bb = new EffectInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//SummonPetInfo
                }
                else if (typeof(T1) == typeof(SummonPetInfo))
                {
                    SummonPetInfo bb = new SummonPetInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CSBuffInfo
                }
                else if (typeof(T1) == typeof(CSBuffInfo))
                {
                    CSBuffInfo bb = new CSBuffInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CSHorseSkillInfo
                }
                else if (typeof(T1) == typeof(CSHorseSkillInfo))
                {
                    CSHorseSkillInfo bb = new CSHorseSkillInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//EquipInfo
                }
                else if (typeof(T1) == typeof(EquipInfo))
                {
                    EquipInfo bb = new EquipInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//EquipAttribute
                }
                else if (typeof(T1) == typeof(EquipAttribute))
                {
                    EquipAttribute bb = new EquipAttribute();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CSHorseInfo
                }
                else if (typeof(T1) == typeof(CSHorseInfo))
                {
                    CSHorseInfo bb = new CSHorseInfo();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//UseInfoBean
                }
                else if (typeof(T1) == typeof(UseInfoBean))
                {
                    UseInfoBean bb = new UseInfoBean();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//CosmicGateBean
                }
                else if (typeof(T1) == typeof(CosmicGateBean))
                {
                    CosmicGateBean bb = new CosmicGateBean();
                    bb._barr = this._barr;
                    bb._pos  = this._pos;
                    bb.reading();
                    this._pos = bb._pos;
                    T2 tt = (T2)Convert.ChangeType(bb, typeof(T2));
                    thelst.Add(tt);//
                }
                else
                {
                    ConsoleLog.Instance.writeInformationLog("readobjlist Class can't be read=" + typeof(T1).ToString());
                }
                #endregion
                _loc1_++;
            }
            //_pos = endpos;

            return(thelst);
        }
Beispiel #8
0
        public T readBean <T>() where T : new()
        {
            T tt;

            if (typeof(T) == typeof(LongC))
            {
                LongC _itemId = readLong();
                tt = (T)Convert.ChangeType(_itemId, typeof(T));
            }
            else if (typeof(T) == typeof(string))
            {
                string _itemId = readString();
                tt = (T)Convert.ChangeType(_itemId, typeof(T));
            }
            else if (typeof(T) == typeof(byte))
            {
                int val = readByte();
                tt = (T)Convert.ChangeType(val, typeof(T));
            }
            else if (typeof(T) == typeof(BuffPara))
            {
                BuffPara bb = new BuffPara();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(MailSummaryInfo))
            {
                MailSummaryInfo bb = new MailSummaryInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(AttackResultInfos))
            {
                AttackResultInfos bb = new AttackResultInfos();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(GoodsAttribute))
            {
                GoodsAttribute bb = new GoodsAttribute();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(Slot))
            {
                Slot bb = new Slot();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(GemInfo))
            {
                GemInfo bb = new GemInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(GoodsInfoRes))
            {
                GoodsInfoRes bb = new GoodsInfoRes();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(BossEventInfo))
            {
                BossEventInfo bb = new BossEventInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(PandoraEventInfo))
            {
                PandoraEventInfo bb = new PandoraEventInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(ZoneTeamInfo))
            {
                ZoneTeamInfo bb = new ZoneTeamInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CharacterInfo))
            {
                CharacterInfo bb = new CharacterInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(SkillLevelInfo))
            {
                SkillLevelInfo bb = new SkillLevelInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CSSkillInfo))
            {
                CSSkillInfo bb = new CSSkillInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(PokemonInfo))
            {
                PokemonInfo bb = new PokemonInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(ActivityItemInfo))
            {
                ActivityItemInfo bb = new ActivityItemInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CSMonsterInfo))
            {
                CSMonsterInfo bb = new CSMonsterInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(DropGoodsInfo))
            {
                DropGoodsInfo bb = new DropGoodsInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(HorseSkillBean))
            {
                HorseSkillBean bb = new HorseSkillBean();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CSPlayerInfo))
            {
                CSPlayerInfo bb = new CSPlayerInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(PetInfo))
            {
                PetInfo bb = new PetInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(NpcInfo))
            {
                NpcInfo bb = new NpcInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(EffectInfo))
            {
                EffectInfo bb = new EffectInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(SummonPetInfo))
            {
                SummonPetInfo bb = new SummonPetInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CSBuffInfo))
            {
                CSBuffInfo bb = new CSBuffInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CSHorseSkillInfo))
            {
                CSHorseSkillInfo bb = new CSHorseSkillInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(EquipInfo))
            {
                EquipInfo bb = new EquipInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(EquipAttribute))
            {
                EquipAttribute bb = new EquipAttribute();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CSHorseInfo))
            {
                CSHorseInfo bb = new CSHorseInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(UseInfoBean))
            {
                UseInfoBean bb = new UseInfoBean();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(CosmicGateBean))
            {
                CosmicGateBean bb = new CosmicGateBean();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(ItemInfo))
            {
                ItemInfo bb = new ItemInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));
            }
            else if (typeof(T) == typeof(Position))
            {
                Position bb = new Position();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));//
            }
            else if (typeof(T) == typeof(SoulfactInfo))
            {
                SoulfactInfo bb = new SoulfactInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));//DetailActivityInfo
            }
            else if (typeof(T) == typeof(DetailActivityInfo))
            {
                DetailActivityInfo bb = new DetailActivityInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));//MainTaskInfo
            }
            else if (typeof(T) == typeof(ImageDescrypt.Entity.MainTaskInfo))
            {
                ImageDescrypt.Entity.MainTaskInfo bb = new ImageDescrypt.Entity.MainTaskInfo();
                bb._barr = this._barr;
                bb._pos  = this._pos;
                bb.reading();
                this._pos = bb._pos;
                tt        = (T)Convert.ChangeType(bb, typeof(T));//
            }
            else
            {
                tt = default(T);
                ConsoleLog.Instance.writeInformationLog("Class can't be read=" + typeof(T).ToString());
            }

            /*
             * Type type = Type.GetType(className);
             * T ib = type.Assembly.CreateInstance(className) as T;
             */
            //T tt = new T();
            //Bean _loc2_ = (Bean)Convert.ChangeType(tt, typeof(Bean));
            //_loc2_._barr = this._barr;
            //_loc2_._pos = this._pos;
            //_loc2_.reading();
            //this._pos = _loc2_._pos;
            return((T)Convert.ChangeType(tt, typeof(T)));
        }