Пример #1
0
 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);
 }
Пример #2
0
 public static WeihuaGames.ClientClass.BattleRecord CopyTo(WeihuaGames.ClientClass.BattleRecord theOne)
 {
     WeihuaGames.ClientClass.BattleRecord record = new WeihuaGames.ClientClass.BattleRecord {
         sceneId        = theOne.sceneId,
         maxRecordCount = theOne.maxRecordCount
     };
     foreach (WeihuaGames.ClientClass.TeamRecord record2 in theOne.teamRecords)
     {
         record.teamRecords.Add(WeihuaGames.ClientClass.TeamRecord.CopyTo(record2));
     }
     if (theOne.matchinRoundRecord != null)
     {
         record.matchinRoundRecord = WeihuaGames.ClientClass.RoundRecord.CopyTo(theOne.matchinRoundRecord);
     }
     record.combatRecord = WeihuaGames.ClientClass.CombatRecord.CopyTo(theOne.combatRecord);
     return(record);
 }