コード例 #1
0
 public void MergeFrom(ItemTemplate other)
 {
     if (other == null)
     {
         return;
     }
     if (other.TemplateId.Length != 0)
     {
         TemplateId = other.TemplateId;
     }
     if (other.pokemonSettings_ != null)
     {
         if (pokemonSettings_ == null)
         {
             pokemonSettings_ = new global::PokemonGoDesktop.API.Proto.PokemonSettings();
         }
         PokemonSettings.MergeFrom(other.PokemonSettings);
     }
     if (other.itemSettings_ != null)
     {
         if (itemSettings_ == null)
         {
             itemSettings_ = new global::PokemonGoDesktop.API.Proto.ItemSettings();
         }
         ItemSettings.MergeFrom(other.ItemSettings);
     }
     if (other.moveSettings_ != null)
     {
         if (moveSettings_ == null)
         {
             moveSettings_ = new global::PokemonGoDesktop.API.Proto.MoveSettings();
         }
         MoveSettings.MergeFrom(other.MoveSettings);
     }
     if (other.moveSequenceSettings_ != null)
     {
         if (moveSequenceSettings_ == null)
         {
             moveSequenceSettings_ = new global::PokemonGoDesktop.API.Proto.MoveSequenceSettings();
         }
         MoveSequenceSettings.MergeFrom(other.MoveSequenceSettings);
     }
     if (other.typeEffective_ != null)
     {
         if (typeEffective_ == null)
         {
             typeEffective_ = new global::PokemonGoDesktop.API.Proto.TypeEffectiveSettings();
         }
         TypeEffective.MergeFrom(other.TypeEffective);
     }
     if (other.badgeSettings_ != null)
     {
         if (badgeSettings_ == null)
         {
             badgeSettings_ = new global::PokemonGoDesktop.API.Proto.BadgeSettings();
         }
         BadgeSettings.MergeFrom(other.BadgeSettings);
     }
     if (other.camera_ != null)
     {
         if (camera_ == null)
         {
             camera_ = new global::PokemonGoDesktop.API.Proto.CameraSettings();
         }
         Camera.MergeFrom(other.Camera);
     }
     if (other.playerLevel_ != null)
     {
         if (playerLevel_ == null)
         {
             playerLevel_ = new global::PokemonGoDesktop.API.Proto.PlayerLevelSettings();
         }
         PlayerLevel.MergeFrom(other.PlayerLevel);
     }
     if (other.gymLevel_ != null)
     {
         if (gymLevel_ == null)
         {
             gymLevel_ = new global::PokemonGoDesktop.API.Proto.GymLevelSettings();
         }
         GymLevel.MergeFrom(other.GymLevel);
     }
     if (other.battleSettings_ != null)
     {
         if (battleSettings_ == null)
         {
             battleSettings_ = new global::PokemonGoDesktop.API.Proto.GymBattleSettings();
         }
         BattleSettings.MergeFrom(other.BattleSettings);
     }
     if (other.encounterSettings_ != null)
     {
         if (encounterSettings_ == null)
         {
             encounterSettings_ = new global::PokemonGoDesktop.API.Proto.EncounterSettings();
         }
         EncounterSettings.MergeFrom(other.EncounterSettings);
     }
     if (other.iapItemDisplay_ != null)
     {
         if (iapItemDisplay_ == null)
         {
             iapItemDisplay_ = new global::PokemonGoDesktop.API.Proto.IapItemDisplay();
         }
         IapItemDisplay.MergeFrom(other.IapItemDisplay);
     }
     if (other.iapSettings_ != null)
     {
         if (iapSettings_ == null)
         {
             iapSettings_ = new global::PokemonGoDesktop.API.Proto.IapSettings();
         }
         IapSettings.MergeFrom(other.IapSettings);
     }
     if (other.pokemonUpgrades_ != null)
     {
         if (pokemonUpgrades_ == null)
         {
             pokemonUpgrades_ = new global::PokemonGoDesktop.API.Proto.PokemonUpgradeSettings();
         }
         PokemonUpgrades.MergeFrom(other.PokemonUpgrades);
     }
     if (other.equippedBadges_ != null)
     {
         if (equippedBadges_ == null)
         {
             equippedBadges_ = new global::PokemonGoDesktop.API.Proto.EquippedBadgeSettings();
         }
         EquippedBadges.MergeFrom(other.EquippedBadges);
     }
 }