public void MergeFrom(InventoryItemData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.pokemonData_ != null)
     {
         if (pokemonData_ == null)
         {
             pokemonData_ = new global::POGOProtos.Data.PokemonData();
         }
         PokemonData.MergeFrom(other.PokemonData);
     }
     if (other.item_ != null)
     {
         if (item_ == null)
         {
             item_ = new global::POGOProtos.Inventory.Item.ItemData();
         }
         Item.MergeFrom(other.Item);
     }
     if (other.pokedexEntry_ != null)
     {
         if (pokedexEntry_ == null)
         {
             pokedexEntry_ = new global::POGOProtos.Data.PokedexEntry();
         }
         PokedexEntry.MergeFrom(other.PokedexEntry);
     }
     if (other.playerStats_ != null)
     {
         if (playerStats_ == null)
         {
             playerStats_ = new global::POGOProtos.Data.Player.PlayerStats();
         }
         PlayerStats.MergeFrom(other.PlayerStats);
     }
     if (other.playerCurrency_ != null)
     {
         if (playerCurrency_ == null)
         {
             playerCurrency_ = new global::POGOProtos.Data.Player.PlayerCurrency();
         }
         PlayerCurrency.MergeFrom(other.PlayerCurrency);
     }
     if (other.playerCamera_ != null)
     {
         if (playerCamera_ == null)
         {
             playerCamera_ = new global::POGOProtos.Data.Player.PlayerCamera();
         }
         PlayerCamera.MergeFrom(other.PlayerCamera);
     }
     if (other.inventoryUpgrades_ != null)
     {
         if (inventoryUpgrades_ == null)
         {
             inventoryUpgrades_ = new global::POGOProtos.Inventory.InventoryUpgrades();
         }
         InventoryUpgrades.MergeFrom(other.InventoryUpgrades);
     }
     if (other.appliedItems_ != null)
     {
         if (appliedItems_ == null)
         {
             appliedItems_ = new global::POGOProtos.Inventory.AppliedItems();
         }
         AppliedItems.MergeFrom(other.AppliedItems);
     }
     if (other.eggIncubators_ != null)
     {
         if (eggIncubators_ == null)
         {
             eggIncubators_ = new global::POGOProtos.Inventory.EggIncubators();
         }
         EggIncubators.MergeFrom(other.EggIncubators);
     }
     if (other.candy_ != null)
     {
         if (candy_ == null)
         {
             candy_ = new global::POGOProtos.Inventory.Candy();
         }
         Candy.MergeFrom(other.Candy);
     }
     if (other.quest_ != null)
     {
         if (quest_ == null)
         {
             quest_ = new global::POGOProtos.Data.Quests.Quest();
         }
         Quest.MergeFrom(other.Quest);
     }
     if (other.avatarItem_ != null)
     {
         if (avatarItem_ == null)
         {
             avatarItem_ = new global::POGOProtos.Data.Avatar.AvatarItem();
         }
         AvatarItem.MergeFrom(other.AvatarItem);
     }
     if (other.raidTickets_ != null)
     {
         if (raidTickets_ == null)
         {
             raidTickets_ = new global::POGOProtos.Inventory.RaidTickets();
         }
         RaidTickets.MergeFrom(other.RaidTickets);
     }
 }
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (pokemonData_ == null)
                    {
                        pokemonData_ = new global::POGOProtos.Data.PokemonData();
                    }
                    input.ReadMessage(pokemonData_);
                    break;
                }

                case 18: {
                    if (item_ == null)
                    {
                        item_ = new global::POGOProtos.Inventory.Item.ItemData();
                    }
                    input.ReadMessage(item_);
                    break;
                }

                case 26: {
                    if (pokedexEntry_ == null)
                    {
                        pokedexEntry_ = new global::POGOProtos.Data.PokedexEntry();
                    }
                    input.ReadMessage(pokedexEntry_);
                    break;
                }

                case 34: {
                    if (playerStats_ == null)
                    {
                        playerStats_ = new global::POGOProtos.Data.Player.PlayerStats();
                    }
                    input.ReadMessage(playerStats_);
                    break;
                }

                case 42: {
                    if (playerCurrency_ == null)
                    {
                        playerCurrency_ = new global::POGOProtos.Data.Player.PlayerCurrency();
                    }
                    input.ReadMessage(playerCurrency_);
                    break;
                }

                case 50: {
                    if (playerCamera_ == null)
                    {
                        playerCamera_ = new global::POGOProtos.Data.Player.PlayerCamera();
                    }
                    input.ReadMessage(playerCamera_);
                    break;
                }

                case 58: {
                    if (inventoryUpgrades_ == null)
                    {
                        inventoryUpgrades_ = new global::POGOProtos.Inventory.InventoryUpgrades();
                    }
                    input.ReadMessage(inventoryUpgrades_);
                    break;
                }

                case 66: {
                    if (appliedItems_ == null)
                    {
                        appliedItems_ = new global::POGOProtos.Inventory.AppliedItems();
                    }
                    input.ReadMessage(appliedItems_);
                    break;
                }

                case 74: {
                    if (eggIncubators_ == null)
                    {
                        eggIncubators_ = new global::POGOProtos.Inventory.EggIncubators();
                    }
                    input.ReadMessage(eggIncubators_);
                    break;
                }

                case 82: {
                    if (candy_ == null)
                    {
                        candy_ = new global::POGOProtos.Inventory.Candy();
                    }
                    input.ReadMessage(candy_);
                    break;
                }

                case 90: {
                    if (quest_ == null)
                    {
                        quest_ = new global::POGOProtos.Data.Quests.Quest();
                    }
                    input.ReadMessage(quest_);
                    break;
                }

                case 98: {
                    if (avatarItem_ == null)
                    {
                        avatarItem_ = new global::POGOProtos.Data.Avatar.AvatarItem();
                    }
                    input.ReadMessage(avatarItem_);
                    break;
                }

                case 106: {
                    if (raidTickets_ == null)
                    {
                        raidTickets_ = new global::POGOProtos.Inventory.RaidTickets();
                    }
                    input.ReadMessage(raidTickets_);
                    break;
                }
                }
            }
        }
Ejemplo n.º 3
0
 public void MergeFrom(InventoryItemData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.pokemonData_ != null)
     {
         if (pokemonData_ == null)
         {
             pokemonData_ = new global::POGOProtos.Data.PokemonData();
         }
         PokemonData.MergeFrom(other.PokemonData);
     }
     if (other.ItemId != null)
     {
         if (ItemId == null)
         {
             ItemId = new global::POGOProtos.Inventory.Item.ItemData();
         }
         Item.MergeFrom(other.Item);
     }
     if (other.pokedexEntry_ != null)
     {
         if (pokedexEntry_ == null)
         {
             pokedexEntry_ = new global::POGOProtos.Data.PokedexEntry();
         }
         PokedexEntry.MergeFrom(other.PokedexEntry);
     }
     if (other.playerStats_ != null)
     {
         if (playerStats_ == null)
         {
             playerStats_ = new global::POGOProtos.Data.Player.PlayerStats();
         }
         PlayerStats.MergeFrom(other.PlayerStats);
     }
     if (other.playerCurrency_ != null)
     {
         if (playerCurrency_ == null)
         {
             playerCurrency_ = new global::POGOProtos.Data.Player.PlayerCurrency();
         }
         PlayerCurrency.MergeFrom(other.PlayerCurrency);
     }
     if (other.playerCamera_ != null)
     {
         if (playerCamera_ == null)
         {
             playerCamera_ = new global::POGOProtos.Data.Player.PlayerCamera();
         }
         PlayerCamera.MergeFrom(other.PlayerCamera);
     }
     if (other.inventoryUpgrades_ != null)
     {
         if (inventoryUpgrades_ == null)
         {
             inventoryUpgrades_ = new global::POGOProtos.Inventory.InventoryUpgrades();
         }
         InventoryUpgrades.MergeFrom(other.InventoryUpgrades);
     }
     if (other.appliedItems_ != null)
     {
         if (appliedItems_ == null)
         {
             appliedItems_ = new global::POGOProtos.Inventory.AppliedItems();
         }
         AppliedItems.MergeFrom(other.AppliedItems);
     }
     if (other.eggIncubators_ != null)
     {
         if (eggIncubators_ == null)
         {
             eggIncubators_ = new global::POGOProtos.Inventory.EggIncubators();
         }
         EggIncubators.MergeFrom(other.EggIncubators);
     }
     if (other.candy_ != null)
     {
         if (candy_ == null)
         {
             candy_ = new global::POGOProtos.Inventory.Candy();
         }
         Candy.MergeFrom(other.Candy);
     }
 }