public WeihuaGames.ClientClass.WolfSmokeGoodsInfo FromProtobuf(com.kodgames.corgi.protocol.WolfSmokeGoodsInfo wolfSmokeGoodsInfo) { if (wolfSmokeGoodsInfo != null) { this.goodsId = wolfSmokeGoodsInfo.goodsId; this.alreadyBuy = wolfSmokeGoodsInfo.alreadyBuy; if (wolfSmokeGoodsInfo.reward != null) { WeihuaGames.ClientClass.Consumable consumable = new WeihuaGames.ClientClass.Consumable(); consumable.FromProtobuf(wolfSmokeGoodsInfo.reward); this.reward = consumable; } if (wolfSmokeGoodsInfo.cost != null) { WeihuaGames.ClientClass.Cost cost = new WeihuaGames.ClientClass.Cost(); cost.FromProtobuf(wolfSmokeGoodsInfo.cost); this.cost = cost; } if (wolfSmokeGoodsInfo.discountCost != null) { WeihuaGames.ClientClass.Cost cost2 = new WeihuaGames.ClientClass.Cost(); cost2.FromProtobuf(wolfSmokeGoodsInfo.discountCost); this.discountCost = cost2; } this.goodsIndex = wolfSmokeGoodsInfo.goodsIndex; } return(this); }
public WeihuaGames.ClientClass.GuildTaskInfo FromProtobuf(com.kodgames.corgi.protocol.GuildTaskInfo guildTaskInfo) { if (guildTaskInfo != null) { this.taskId = guildTaskInfo.taskId; this.taskName = guildTaskInfo.taskName; this.taskIconId = guildTaskInfo.taskIconId; this.taskDesc = guildTaskInfo.taskDesc; this.taskQuality = guildTaskInfo.taskQuality; this.taskType = guildTaskInfo.taskType; this.total = guildTaskInfo.total; this.taskParamList = guildTaskInfo.taskParamList; if (guildTaskInfo.rewardViews != null) { List <WeihuaGames.ClientClass.RewardView> list = new List <WeihuaGames.ClientClass.RewardView>(); foreach (com.kodgames.corgi.protocol.RewardView view in guildTaskInfo.rewardViews) { list.Add(new WeihuaGames.ClientClass.RewardView().FromProtobuf(view)); } this.rewardViews = list; } this.taskExtRewardDesc = guildTaskInfo.taskExtRewardDesc; if (guildTaskInfo.extRewardView != null) { WeihuaGames.ClientClass.RewardView view2 = new WeihuaGames.ClientClass.RewardView(); view2.FromProtobuf(guildTaskInfo.extRewardView); this.extRewardView = view2; } this.maxCompletedTaskPerDay = guildTaskInfo.maxCompletedTaskPerDay; this.maxFreeDiceCountPerDay = guildTaskInfo.maxFreeDiceCountPerDay; this.freeRefreshCountPerDay = guildTaskInfo.freeRefreshCountPerDay; this.freeDiceCount = guildTaskInfo.freeDiceCount; this.refreshCount = guildTaskInfo.refreshCount; this.completedTaskCount = guildTaskInfo.completedTaskCount; this.doingTaskProgress = guildTaskInfo.doingTaskProgress; if (guildTaskInfo.refreshCost != null) { WeihuaGames.ClientClass.Cost cost = new WeihuaGames.ClientClass.Cost(); cost.FromProtobuf(guildTaskInfo.refreshCost); this.refreshCost = cost; } if (guildTaskInfo.diceCost != null) { WeihuaGames.ClientClass.Cost cost2 = new WeihuaGames.ClientClass.Cost(); cost2.FromProtobuf(guildTaskInfo.diceCost); this.diceCost = cost2; } this.lastDiceResults = guildTaskInfo.lastDiceResults; this.nextRefreshTime = guildTaskInfo.nextRefreshTime; } return(this); }
public WeihuaGames.ClientClass.MysteryGoodInfo FromProtoBuf(com.kodgames.corgi.protocol.MysteryGoodInfo protoInfo) { if (protoInfo == null) { return(null); } this.goodId = protoInfo.goodsId; this.goodIndex = protoInfo.goodsIndex; this.buyOrNot = protoInfo.buyOrNot; this.consume = new WeihuaGames.ClientClass.Consumable().FromProtobuf(protoInfo.reward); this.cost = new WeihuaGames.ClientClass.Cost().FromProtobuf(protoInfo.cost); if (protoInfo.discountCost != null) { this.discountCost = new WeihuaGames.ClientClass.Cost().FromProtobuf(protoInfo.discountCost); } return(this); }
public WeihuaGames.ClientClass.ZentiaGood FromProtobuf(com.kodgames.corgi.protocol.ZentiaGood zentiaGood) { if (zentiaGood != null) { this.exchangeGoodId = zentiaGood.exchangeGoodId; if (zentiaGood.reward != null) { WeihuaGames.ClientClass.Reward reward = new WeihuaGames.ClientClass.Reward(); reward.FromProtobuf(zentiaGood.reward); this.reward = reward; } if (zentiaGood.cost != null) { WeihuaGames.ClientClass.Cost cost = new WeihuaGames.ClientClass.Cost(); cost.FromProtobuf(zentiaGood.cost); this.cost = cost; } } return(this); }
public WeihuaGames.ClientClass.CostAndRewardAndSync FromProtoBuf(com.kodgames.corgi.protocol.CostAndRewardAndSync proto) { if (proto != null) { if (proto.costs != null) { this.costs = new List <WeihuaGames.ClientClass.Cost>(); foreach (com.kodgames.corgi.protocol.Cost cost in proto.costs) { if (cost != null) { WeihuaGames.ClientClass.Cost item = new WeihuaGames.ClientClass.Cost(); item.FromProtobuf(cost); this.costs.Add(item); } } } if (proto.reward != null) { this.reward = new WeihuaGames.ClientClass.Reward(); this.reward.FromProtobuf(proto.reward); } if (proto.notEnoughCost != null) { this.notEnoughCost = new WeihuaGames.ClientClass.Cost(); this.notEnoughCost.FromProtobuf(proto.notEnoughCost); } if (proto.viewFixReward != null) { this.viewFixReward = new WeihuaGames.ClientClass.Reward(); this.viewFixReward.FromProtobuf(proto.viewFixReward); } if (proto.viewRandomreward != null) { this.viewRandomReward = new WeihuaGames.ClientClass.Reward(); this.viewRandomReward.FromProtobuf(proto.viewRandomreward); } } return(this); }