Ejemplo n.º 1
0
        private EverydayAward ParseEverydayTemplate(GM.DataCache.DailyReward dict)
        {
            EverydayAward award = new EverydayAward();

            award.Id    = dict.Id;
            award.Type  = dict.Type;
            award.Title = dict.Title;
            award.Desc  = dict.Desc;
            string type  = dict.ItemType;
            string id    = dict.ItemId;
            int    count = dict.ItemNum;

            award.AwardItem = new LTShowItemData(id, count, type);

            return(award);
        }
Ejemplo n.º 2
0
        private FirstChargeAward ParseFirstChargeTemplate(GM.DataCache.DailyReward dict)
        {
            FirstChargeAward award = new FirstChargeAward();

            award.Type          = dict.Type;
            award.Title         = dict.Title;
            award.Desc          = dict.Desc;
            award.AwardItemList = new List <LTShowItemData>();
            string type  = dict.ItemType;
            string id    = dict.ItemId;
            int    count = dict.ItemNum;

            if (!string.IsNullOrEmpty(id))
            {
                award.AwardItemList.Add(new LTShowItemData(id, count, type));
            }
            type  = dict.ItemType2;
            id    = dict.ItemId2;
            count = dict.ItemNum2;
            if (!string.IsNullOrEmpty(id))
            {
                award.AwardItemList.Add(new LTShowItemData(id, count, type));
            }
            type  = dict.ItemType3;
            id    = dict.ItemId3;
            count = dict.ItemNum3;
            if (!string.IsNullOrEmpty(id))
            {
                award.AwardItemList.Add(new LTShowItemData(id, count, type));
            }
            type  = dict.ItemType4;
            id    = dict.ItemId4;
            count = dict.ItemNum4;
            if (!string.IsNullOrEmpty(id))
            {
                award.AwardItemList.Add(new LTShowItemData(id, count, type));
            }
            return(award);
        }