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.GuildExchangeGoods FromProtobuf(com.kodgames.corgi.protocol.GuildExchangeGoods guildExchangeGoods) { if (guildExchangeGoods != null) { this.goodsId = guildExchangeGoods.goodsId; this.showIndex = guildExchangeGoods.showIndex; this.existTimeMs = guildExchangeGoods.existTimeMs; this.buyCountLimitPerActive = guildExchangeGoods.buyCountLimitPerActive; if (guildExchangeGoods.costAssets != null) { List <WeihuaGames.ClientClass.CostAsset> list = new List <WeihuaGames.ClientClass.CostAsset>(); foreach (com.kodgames.corgi.protocol.CostAsset asset in guildExchangeGoods.costAssets) { list.Add(new WeihuaGames.ClientClass.CostAsset().FromProtobuf(asset)); } this.costAssets = list; } if (guildExchangeGoods.costs != null) { List <WeihuaGames.ClientClass.ItemEx> list2 = new List <WeihuaGames.ClientClass.ItemEx>(); foreach (com.kodgames.corgi.protocol.ItemEx ex in guildExchangeGoods.costs) { list2.Add(new WeihuaGames.ClientClass.ItemEx().FromProtobuf(ex)); } this.costs = list2; } if (guildExchangeGoods.rewardView != null) { WeihuaGames.ClientClass.RewardView view = new WeihuaGames.ClientClass.RewardView(); view.FromProtobuf(guildExchangeGoods.rewardView); this.rewardView = view; } this.isActive = guildExchangeGoods.isActive; this.buyCount = guildExchangeGoods.buyCount; this.endTime = guildExchangeGoods.endTime; this.conditionDesc = guildExchangeGoods.conditionDesc; } return(this); }