public WeihuaGames.ClientClass.ZentiaExchange FromProtobuf(com.kodgames.corgi.protocol.ZentiaExchange zentiaExchange) { if (zentiaExchange != null) { this.exchangeId = zentiaExchange.exchangeId; this.index = zentiaExchange.index; this.iconId = zentiaExchange.iconId; this.isAlreadyExchanged = zentiaExchange.isAlreadyExchanged; if (zentiaExchange.costs != null) { List <WeihuaGames.ClientClass.ItemEx> list = new List <WeihuaGames.ClientClass.ItemEx>(); foreach (com.kodgames.corgi.protocol.ItemEx ex in zentiaExchange.costs) { if (ex != null) { WeihuaGames.ClientClass.ItemEx item = new WeihuaGames.ClientClass.ItemEx(); item.FromProtobuf(ex); list.Add(item); } } this.costs = list; } if (zentiaExchange.costAssets != null) { List <WeihuaGames.ClientClass.CostAsset> list2 = new List <WeihuaGames.ClientClass.CostAsset>(); foreach (com.kodgames.corgi.protocol.CostAsset asset in zentiaExchange.costAssets) { if (asset != null) { WeihuaGames.ClientClass.CostAsset asset2 = new WeihuaGames.ClientClass.CostAsset(); asset2.FromProtobuf(asset); list2.Add(asset2); } } this.costAssets = list2; } if (zentiaExchange.reward != null) { WeihuaGames.ClientClass.Reward reward = new WeihuaGames.ClientClass.Reward(); reward.FromProtobuf(zentiaExchange.reward); this.reward = reward; } if (zentiaExchange.zentiaReward != null) { WeihuaGames.ClientClass.Reward reward2 = new WeihuaGames.ClientClass.Reward(); reward2.FromProtobuf(zentiaExchange.zentiaReward); this.zentiaReward = reward2; } } return(this); }
public WeihuaGames.ClientClass.InviteReward FromProtobuf(com.kodgames.corgi.protocol.InviteReward inviteReward) { if (inviteReward == null) { return(null); } this.id = inviteReward.id; this.requireCount = inviteReward.requireCount; this.requireLevel = inviteReward.requireLevel; this.reward = new WeihuaGames.ClientClass.Reward().FromProtobuf(inviteReward.reward); this.pickState = inviteReward.pickState; this.sortIndex = inviteReward.sortIndex; return(this); }
public WeihuaGames.ClientClass.SevenElevenGift FromProtobuf(com.kodgames.corgi.protocol.SevenElevenGift sevenElevenGift) { if (sevenElevenGift != null) { WeihuaGames.ClientClass.Reward reward = new WeihuaGames.ClientClass.Reward(); reward.FromProtobuf(sevenElevenGift.reward); this.reward = reward; this.exchangeCode = sevenElevenGift.exchangeCode; this.convertType = sevenElevenGift.convertType; WeihuaGames.ClientClass.CostAndRewardAndSync sync = new WeihuaGames.ClientClass.CostAndRewardAndSync(); sync.FromProtoBuf(sevenElevenGift.costAndRewardAndSync); this.costAndRewardAndSync = sync; } return(this); }
public WeihuaGames.ClientClass.CombatResultAndReward FromProtobuf(com.kodgames.corgi.protocol.CombatResultAndReward combatResultAndReward) { if (combatResultAndReward != null) { this.combatNumMax = combatResultAndReward.combatNumMax; this.combatNumReal = combatResultAndReward.combatNumReal; this.isPlotBattle = combatResultAndReward.isPlotBattle; if (combatResultAndReward.rewards != null) { foreach (com.kodgames.corgi.protocol.Reward reward in combatResultAndReward.rewards) { WeihuaGames.ClientClass.Reward item = new WeihuaGames.ClientClass.Reward(); item.FromProtobuf(reward); this.rewards.Add(item); } } if (combatResultAndReward.battleRecords != null) { foreach (com.kodgames.corgi.protocol.BattleRecord record in combatResultAndReward.battleRecords) { WeihuaGames.ClientClass.BattleRecord record2 = new WeihuaGames.ClientClass.BattleRecord(); record2.FromProtobuf(record); this.battleRecords.Add(record2); } } if (combatResultAndReward.dungeonReward != null) { this.dungeonReward.FromProtobuf(combatResultAndReward.dungeonReward); } if (combatResultAndReward.starCompleteIndexs != null) { foreach (int num in combatResultAndReward.starCompleteIndexs) { this.starCompleteIndexs.Add(num); } } if (combatResultAndReward.dungeonReward_ExpSilver != null) { this.dungeonReward_ExpSilver.FromProtobuf(combatResultAndReward.dungeonReward_ExpSilver); } if (combatResultAndReward.firstpassReward != null) { this.firstpassReward.FromProtobuf(combatResultAndReward.firstpassReward); } } return(this); }
public WeihuaGames.ClientClass.ZentiaServerReward FromProtobuf(com.kodgames.corgi.protocol.ZentiaServerReward zentiaServerReward) { if (zentiaServerReward != null) { this.rewardLevelId = zentiaServerReward.rewardLevelId; this.serverZentiaPoint = zentiaServerReward.serverZentiaPoint; this.totalZentiaPoint = zentiaServerReward.totalZentiaPoint; this.isActived = zentiaServerReward.isActived; this.isRewardGet = zentiaServerReward.isRewardGet; if (zentiaServerReward.reward != null) { WeihuaGames.ClientClass.Reward reward = new WeihuaGames.ClientClass.Reward(); reward.FromProtobuf(zentiaServerReward.reward); this.reward = reward; } } return(this); }
public WeihuaGames.ClientClass.ZentiaRank FromProtobuf(com.kodgames.corgi.protocol.ZentiaRank zentiaRank) { if (zentiaRank != null) { this.rank = zentiaRank.rank; this.playerId = zentiaRank.playerId; this.playerName = zentiaRank.playerName; this.playerZentiaPoint = zentiaRank.playerZentiaPoint; this.iconId = zentiaRank.iconId; if (zentiaRank.reward != null) { WeihuaGames.ClientClass.Reward reward = new WeihuaGames.ClientClass.Reward(); reward.FromProtobuf(zentiaRank.reward); this.reward = reward; } } return(this); }
public WeihuaGames.ClientClass.EmailPlayer FromProtoBuf(com.kodgames.corgi.protocol.EmailPlayer emailProtoBuf) { this.emailId = emailProtoBuf.emailId; this.emailType = emailProtoBuf.emailType; this.emailTitle = emailProtoBuf.emailTitle; this.emailBody = emailProtoBuf.emailBody; this.sendTime = emailProtoBuf.sendTime; this.senderPlayerId = emailProtoBuf.senderId; this.playerId = emailProtoBuf.receiverId; this.senderName = emailProtoBuf.senderName; this.emailParentGroupId = emailProtoBuf.emailGroupId; this.statusDidPick = emailProtoBuf.statusDidPick; if (emailProtoBuf.attachmentRewards != null) { this.attachmentRewards = new WeihuaGames.ClientClass.Reward(); this.attachmentRewards.FromProtobuf(emailProtoBuf.attachmentRewards); } 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); }