public void MergeFrom(ItemSettings other) { if (other == null) { return; } if (other.ItemId != 0) { ItemId = other.ItemId; } if (other.ItemType != 0) { ItemType = other.ItemType; } if (other.Category != 0) { Category = other.Category; } if (other.DropFreq != 0F) { DropFreq = other.DropFreq; } if (other.DropTrainerLevel != 0) { DropTrainerLevel = other.DropTrainerLevel; } if (other.pokeball_ != null) { if (pokeball_ == null) { pokeball_ = new global::PokemonGoDesktop.API.Proto.PokeballAttributes(); } Pokeball.MergeFrom(other.Pokeball); } if (other.potion_ != null) { if (potion_ == null) { potion_ = new global::PokemonGoDesktop.API.Proto.PotionAttributes(); } Potion.MergeFrom(other.Potion); } if (other.revive_ != null) { if (revive_ == null) { revive_ = new global::PokemonGoDesktop.API.Proto.ReviveAttributes(); } Revive.MergeFrom(other.Revive); } if (other.battle_ != null) { if (battle_ == null) { battle_ = new global::PokemonGoDesktop.API.Proto.BattleAttributes(); } Battle.MergeFrom(other.Battle); } if (other.food_ != null) { if (food_ == null) { food_ = new global::PokemonGoDesktop.API.Proto.FoodAttributes(); } Food.MergeFrom(other.Food); } if (other.inventoryUpgrade_ != null) { if (inventoryUpgrade_ == null) { inventoryUpgrade_ = new global::PokemonGoDesktop.API.Proto.InventoryUpgradeAttributes(); } InventoryUpgrade.MergeFrom(other.InventoryUpgrade); } if (other.xpBoost_ != null) { if (xpBoost_ == null) { xpBoost_ = new global::PokemonGoDesktop.API.Proto.ExperienceBoostAttributes(); } XpBoost.MergeFrom(other.XpBoost); } if (other.incense_ != null) { if (incense_ == null) { incense_ = new global::PokemonGoDesktop.API.Proto.IncenseAttributes(); } Incense.MergeFrom(other.Incense); } if (other.eggIncubator_ != null) { if (eggIncubator_ == null) { eggIncubator_ = new global::PokemonGoDesktop.API.Proto.EggIncubatorAttributes(); } EggIncubator.MergeFrom(other.EggIncubator); } if (other.fortModifier_ != null) { if (fortModifier_ == null) { fortModifier_ = new global::PokemonGoDesktop.API.Proto.FortModifierAttributes(); } FortModifier.MergeFrom(other.FortModifier); } }
public void MergeFrom(ItemSettings other) { if (other == null) { return; } if (other.ItemId != 0) { ItemId = other.ItemId; } if (other.ItemType != 0) { ItemType = other.ItemType; } if (other.Category != 0) { Category = other.Category; } if (other.DropFreq != 0F) { DropFreq = other.DropFreq; } if (other.DropTrainerLevel != 0) { DropTrainerLevel = other.DropTrainerLevel; } if (other.pokeball_ != null) { if (pokeball_ == null) { pokeball_ = new global::POGOProtos.Settings.Master.Item.PokeballAttributes(); } Pokeball.MergeFrom(other.Pokeball); } if (other.potion_ != null) { if (potion_ == null) { potion_ = new global::POGOProtos.Settings.Master.Item.PotionAttributes(); } Potion.MergeFrom(other.Potion); } if (other.revive_ != null) { if (revive_ == null) { revive_ = new global::POGOProtos.Settings.Master.Item.ReviveAttributes(); } Revive.MergeFrom(other.Revive); } if (other.battle_ != null) { if (battle_ == null) { battle_ = new global::POGOProtos.Settings.Master.Item.BattleAttributes(); } Battle.MergeFrom(other.Battle); } if (other.food_ != null) { if (food_ == null) { food_ = new global::POGOProtos.Settings.Master.Item.FoodAttributes(); } Food.MergeFrom(other.Food); } if (other.inventoryUpgrade_ != null) { if (inventoryUpgrade_ == null) { inventoryUpgrade_ = new global::POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes(); } InventoryUpgrade.MergeFrom(other.InventoryUpgrade); } if (other.xpBoost_ != null) { if (xpBoost_ == null) { xpBoost_ = new global::POGOProtos.Settings.Master.Item.ExperienceBoostAttributes(); } XpBoost.MergeFrom(other.XpBoost); } if (other.incense_ != null) { if (incense_ == null) { incense_ = new global::POGOProtos.Settings.Master.Item.IncenseAttributes(); } Incense.MergeFrom(other.Incense); } if (other.eggIncubator_ != null) { if (eggIncubator_ == null) { eggIncubator_ = new global::POGOProtos.Settings.Master.Item.EggIncubatorAttributes(); } EggIncubator.MergeFrom(other.EggIncubator); } if (other.fortModifier_ != null) { if (fortModifier_ == null) { fortModifier_ = new global::POGOProtos.Settings.Master.Item.FortModifierAttributes(); } FortModifier.MergeFrom(other.FortModifier); } if (other.stardustBoost_ != null) { if (stardustBoost_ == null) { stardustBoost_ = new global::POGOProtos.Settings.Master.Item.StardustBoostAttributes(); } StardustBoost.MergeFrom(other.StardustBoost); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(TradingPokemon other) { if (other == null) { return; } if (other.PokemonId != 0UL) { PokemonId = other.PokemonId; } if (other.PokedexEntryNumber != 0) { PokedexEntryNumber = other.PokedexEntryNumber; } if (other.OriginalCp != 0) { OriginalCp = other.OriginalCp; } if (other.AdjustedCpMin != 0) { AdjustedCpMin = other.AdjustedCpMin; } if (other.AdjustedCpMax != 0) { AdjustedCpMax = other.AdjustedCpMax; } if (other.OriginalStamina != 0) { OriginalStamina = other.OriginalStamina; } if (other.AdjustedStaminaMin != 0) { AdjustedStaminaMin = other.AdjustedStaminaMin; } if (other.AdjustedStaminaMax != 0) { AdjustedStaminaMax = other.AdjustedStaminaMax; } if (other.FriendLevelCap != false) { FriendLevelCap = other.FriendLevelCap; } if (other.Move1 != 0) { Move1 = other.Move1; } if (other.Move2 != 0) { Move2 = other.Move2; } if (other.pokemonDisplay_ != null) { if (pokemonDisplay_ == null) { pokemonDisplay_ = new global::POGOProtos.Data.PokemonDisplay(); } PokemonDisplay.MergeFrom(other.PokemonDisplay); } if (other.CapturedS2CellId != 0L) { CapturedS2CellId = other.CapturedS2CellId; } if (other.tradedPokemon_ != null) { if (tradedPokemon_ == null) { tradedPokemon_ = new global::POGOProtos.Data.PokemonData(); } TradedPokemon.MergeFrom(other.TradedPokemon); } if (other.pokeball_ != null) { if (pokeball_ == null) { pokeball_ = new global::POGOProtos.Inventory.Item.ItemData(); } Pokeball.MergeFrom(other.Pokeball); } if (other.IndividualAttack != 0) { IndividualAttack = other.IndividualAttack; } if (other.IndividualDefense != 0) { IndividualDefense = other.IndividualDefense; } if (other.IndividualStamina != 0) { IndividualStamina = other.IndividualStamina; } if (other.Nickname.Length != 0) { Nickname = other.Nickname; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }