public void MergeFrom(BattleAction other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.ActionStartMs != 0L)
     {
         ActionStartMs = other.ActionStartMs;
     }
     if (other.DurationMs != 0)
     {
         DurationMs = other.DurationMs;
     }
     if (other.EnergyDelta != 0)
     {
         EnergyDelta = other.EnergyDelta;
     }
     if (other.AttackerIndex != 0)
     {
         AttackerIndex = other.AttackerIndex;
     }
     if (other.TargetIndex != 0)
     {
         TargetIndex = other.TargetIndex;
     }
     if (other.ActivePokemonId != 0UL)
     {
         ActivePokemonId = other.ActivePokemonId;
     }
     if (other.playerJoined_ != null)
     {
         if (playerJoined_ == null)
         {
             playerJoined_ = new global::POGOProtos.Data.Battle.BattleParticipant();
         }
         PlayerJoined.MergeFrom(other.PlayerJoined);
     }
     if (other.battleResults_ != null)
     {
         if (battleResults_ == null)
         {
             battleResults_ = new global::POGOProtos.Data.Battle.BattleResults();
         }
         BattleResults.MergeFrom(other.BattleResults);
     }
     if (other.DamageWindowsStartTimestampMs != 0L)
     {
         DamageWindowsStartTimestampMs = other.DamageWindowsStartTimestampMs;
     }
     if (other.DamageWindowsEndTimestampMs != 0L)
     {
         DamageWindowsEndTimestampMs = other.DamageWindowsEndTimestampMs;
     }
     if (other.playerLeft_ != null)
     {
         if (playerLeft_ == null)
         {
             playerLeft_ = new global::POGOProtos.Data.Battle.BattleParticipant();
         }
         PlayerLeft.MergeFrom(other.PlayerLeft);
     }
     if (other.TargetPokemonId != 0UL)
     {
         TargetPokemonId = other.TargetPokemonId;
     }
     if (other.leveledUpFriends_ != null)
     {
         if (leveledUpFriends_ == null)
         {
             leveledUpFriends_ = new global::POGOProtos.Data.Friends.LeveledUpFriends();
         }
         LeveledUpFriends.MergeFrom(other.LeveledUpFriends);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #2
0
 public void MergeFrom(BattleAction other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.ActionStartMs != 0L)
     {
         ActionStartMs = other.ActionStartMs;
     }
     if (other.DurationMs != 0)
     {
         DurationMs = other.DurationMs;
     }
     if (other.EnergyDelta != 0)
     {
         EnergyDelta = other.EnergyDelta;
     }
     if (other.AttackerIndex != 0)
     {
         AttackerIndex = other.AttackerIndex;
     }
     if (other.TargetIndex != 0)
     {
         TargetIndex = other.TargetIndex;
     }
     if (other.ActivePokemonId != 0UL)
     {
         ActivePokemonId = other.ActivePokemonId;
     }
     if (other.playerJoined_ != null)
     {
         if (playerJoined_ == null)
         {
             playerJoined_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant();
         }
         PlayerJoined.MergeFrom(other.PlayerJoined);
     }
     if (other.battleResults_ != null)
     {
         if (battleResults_ == null)
         {
             battleResults_ = new global::PokemonGoDesktop.API.Proto.BattleResults();
         }
         BattleResults.MergeFrom(other.BattleResults);
     }
     if (other.DamageWindowsStartTimestampMss != 0L)
     {
         DamageWindowsStartTimestampMss = other.DamageWindowsStartTimestampMss;
     }
     if (other.DamageWindowsEndTimestampMss != 0L)
     {
         DamageWindowsEndTimestampMss = other.DamageWindowsEndTimestampMss;
     }
     if (other.playerLeft_ != null)
     {
         if (playerLeft_ == null)
         {
             playerLeft_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant();
         }
         PlayerLeft.MergeFrom(other.PlayerLeft);
     }
     if (other.TargetPokemonId != 0UL)
     {
         TargetPokemonId = other.TargetPokemonId;
     }
 }