예제 #1
0
 public void MergeFrom(BattleParticipant other)
 {
     if (other == null)
     {
         return;
     }
     if (other.activePokemon_ != null)
     {
         if (activePokemon_ == null)
         {
             activePokemon_ = new global::POGOProtos.Data.Battle.BattlePokemonInfo();
         }
         ActivePokemon.MergeFrom(other.ActivePokemon);
     }
     if (other.trainerPublicProfile_ != null)
     {
         if (trainerPublicProfile_ == null)
         {
             trainerPublicProfile_ = new global::POGOProtos.Data.Player.PlayerPublicProfile();
         }
         TrainerPublicProfile.MergeFrom(other.TrainerPublicProfile);
     }
     reversePokemon_.Add(other.reversePokemon_);
     defeatedPokemon_.Add(other.defeatedPokemon_);
 }
 public void MergeFrom(BattleParticipant other)
 {
     if (other == null)
     {
         return;
     }
     if (other.activePokemon_ != null)
     {
         if (activePokemon_ == null)
         {
             activePokemon_ = new global::POGOProtos.Data.Battle.BattlePokemonInfo();
         }
         ActivePokemon.MergeFrom(other.ActivePokemon);
     }
     if (other.trainerPublicProfile_ != null)
     {
         if (trainerPublicProfile_ == null)
         {
             trainerPublicProfile_ = new global::POGOProtos.Data.Player.PlayerPublicProfile();
         }
         TrainerPublicProfile.MergeFrom(other.TrainerPublicProfile);
     }
     reversePokemon_.Add(other.reversePokemon_);
     defeatedPokemon_.Add(other.defeatedPokemon_);
     lobbyPokemon_.Add(other.lobbyPokemon_);
     if (other.DamageDealt != 0)
     {
         DamageDealt = other.DamageDealt;
     }
     if (other.SuperEffectiveChargeMove != false)
     {
         SuperEffectiveChargeMove = other.SuperEffectiveChargeMove;
     }
     if (other.WeatherBoosted != false)
     {
         WeatherBoosted = other.WeatherBoosted;
     }
     if (other.HighestFriendshipMilestone != 0)
     {
         HighestFriendshipMilestone = other.HighestFriendshipMilestone;
     }
     friendCodename_.Add(other.friendCodename_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }