Esempio n. 1
0
 public com.kodgames.corgi.protocol.Goods ToProtoBuf()
 {
     com.kodgames.corgi.protocol.Goods goods = new com.kodgames.corgi.protocol.Goods {
         discount         = this.discount,
         endTime          = this.endTime,
         goodsID          = this.goodsID,
         status           = this.status,
         remainBuyCount   = this.remainBuyCount,
         nextOpenTime     = this.nextOpenTime,
         vipLevel         = this.vipLevel,
         playerLevel      = this.playerLevel,
         openTime         = this.openTime,
         statusIndex      = this.statusIndex,
         maxBuyCount      = this.maxBuyCount,
         showPlayerLevel  = this.showPlayerLevel,
         showVipLevel     = this.showVipLevel,
         earlyShowTime    = this.earlyShowTime,
         timeDurationType = this.timeDurationType
     };
     foreach (WeihuaGames.ClientClass.GoodsSpecialLimit limit in this.melaleucaLimits)
     {
         goods.melaleucaLimits.Add(limit.ToProtoBuf());
     }
     foreach (WeihuaGames.ClientClass.GoodsSpecialLimit limit2 in this.wolfSmokeLimits)
     {
         goods.wolfSmokeLimits.Add(limit2.ToProtoBuf());
     }
     return(goods);
 }
Esempio n. 2
0
 public WeihuaGames.ClientClass.Goods FromProtobuf(com.kodgames.corgi.protocol.Goods goods)
 {
     if (goods != null)
     {
         this.discount         = goods.discount;
         this.endTime          = goods.endTime;
         this.goodsID          = goods.goodsID;
         this.status           = goods.status;
         this.remainBuyCount   = goods.remainBuyCount;
         this.nextOpenTime     = goods.nextOpenTime;
         this.vipLevel         = goods.vipLevel;
         this.playerLevel      = goods.playerLevel;
         this.openTime         = goods.openTime;
         this.statusIndex      = goods.statusIndex;
         this.maxBuyCount      = goods.maxBuyCount;
         this.showVipLevel     = goods.showVipLevel;
         this.showPlayerLevel  = goods.showPlayerLevel;
         this.earlyShowTime    = goods.earlyShowTime;
         this.timeDurationType = goods.timeDurationType;
         foreach (com.kodgames.corgi.protocol.GoodsSpecialLimit limit in goods.melaleucaLimits)
         {
             this.melaleucaLimits.Add(new WeihuaGames.ClientClass.GoodsSpecialLimit().FromProtobuf(limit));
         }
         foreach (com.kodgames.corgi.protocol.GoodsSpecialLimit limit2 in goods.wolfSmokeLimits)
         {
             this.wolfSmokeLimits.Add(new WeihuaGames.ClientClass.GoodsSpecialLimit().FromProtobuf(limit2));
         }
     }
     return(this);
 }