public com.kodgames.corgi.protocol.CombatResultAndReward ToProtobufWithOnlyBattleData()
 {
     com.kodgames.corgi.protocol.CombatResultAndReward reward = new com.kodgames.corgi.protocol.CombatResultAndReward {
         combatNumMax  = this.CombatNumMax,
         combatNumReal = this.combatNumReal,
         isPlotBattle  = this.isPlotBattle
     };
     if (this.BattleRecords != null)
     {
         foreach (WeihuaGames.ClientClass.BattleRecord record in this.BattleRecords)
         {
             reward.battleRecords.Add(record.ToProtobuf());
         }
     }
     return(reward);
 }
 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);
 }