Ejemplo n.º 1
0
        public bool LOBBY2CLIENT_DRAW_CARD_GOODS_RESP(Observers.Interfaces.INotification note)
        {
            DrawCardGoodsResp         drawCardGoodsResp      = note.Body as DrawCardGoodsResp;
            List <DrawCardGoodsProto> drawCardGoodsProtoList = drawCardGoodsResp.goods;
            int drawCardGoodsProtoCount = drawCardGoodsProtoList.Count;

            for (int i = 0; i < drawCardGoodsProtoCount; i++)
            {
                DrawCardGoodsProto          drawCardGoodsProto          = drawCardGoodsProtoList[i];
                ShopHeroRandomCardInfo      shopHeroRandomCardInfo      = null;
                ShopEquipmentRandomCardInfo shopEquipmentRandomCardInfo = null;
                ShopProxy.instance.ShopHeroRandomCardInfoDic.TryGetValue(drawCardGoodsProto.goodsNo, out shopHeroRandomCardInfo);
                ShopProxy.instance.ShopEquipmentRandomCardInfoDic.TryGetValue(drawCardGoodsProto.goodsNo, out shopEquipmentRandomCardInfo);
                if (shopHeroRandomCardInfo != null)
                {
                    shopHeroRandomCardInfo.setFreeInfo(drawCardGoodsProto.remainFreeTimes, drawCardGoodsProto.freeDrawCoolingOverTime);
                }
                else if (shopEquipmentRandomCardInfo != null)
                {
                    shopEquipmentRandomCardInfo.setFreeInfo(drawCardGoodsProto.remainFreeTimes, drawCardGoodsProto.freeDrawCoolingOverTime);
                }
            }
            ShopProxy.instance.OnShopHeroRandomCardInfoListUpdate();
            ShopProxy.instance.OnShopEquipmentRandomCardInfoListUpdate();
            return(true);
        }
Ejemplo n.º 2
0
        public bool LOBBY2CLIENT_DRAW_CARD_GOODS_UPDATE_RESP(Observers.Interfaces.INotification note)
        {
            DrawCardGoodsUpdateResp drawCardGoodsUpdateResp = note.Body as DrawCardGoodsUpdateResp;
            DrawCardGoodsProto      drawCardGoodsProto      = drawCardGoodsUpdateResp.updateGoods;

            if (drawCardGoodsProto != null)
            {
                ShopHeroRandomCardInfo      shopHeroRandomCardInfo      = null;
                ShopEquipmentRandomCardInfo shopEquipmentRandomCardInfo = null;
                ShopProxy.instance.ShopHeroRandomCardInfoDic.TryGetValue(drawCardGoodsProto.goodsNo, out shopHeroRandomCardInfo);
                ShopProxy.instance.ShopEquipmentRandomCardInfoDic.TryGetValue(drawCardGoodsProto.goodsNo, out shopEquipmentRandomCardInfo);
                if (shopHeroRandomCardInfo != null)
                {
                    shopHeroRandomCardInfo.setFreeInfo(drawCardGoodsProto.remainFreeTimes, drawCardGoodsProto.freeDrawCoolingOverTime);
                }
                else if (shopEquipmentRandomCardInfo != null)
                {
                    shopEquipmentRandomCardInfo.setFreeInfo(drawCardGoodsProto.remainFreeTimes, drawCardGoodsProto.freeDrawCoolingOverTime);
                }
                ShopProxy.instance.OnShopHeroRandomCardInfoListUpdate();
                ShopProxy.instance.OnShopEquipmentRandomCardInfoListUpdate();
            }
            return(true);
        }