public void MergeFrom(TradingPlayer other) { if (other == null) { return; } if (other.PlayerId.Length != 0) { PlayerId = other.PlayerId; } if (other.publicProfile_ != null) { if (publicProfile_ == null) { publicProfile_ = new global::POGOProtos.Data.Player.PlayerPublicProfile(); } PublicProfile.MergeFrom(other.PublicProfile); } excludedPokemon_.Add(other.excludedPokemon_); if (other.tradingPokemon_ != null) { if (tradingPokemon_ == null) { tradingPokemon_ = new global::POGOProtos.Data.Trading.TradingPokemon(); } TradingPokemon.MergeFrom(other.TradingPokemon); } if (other.bonus_ != null) { if (bonus_ == null) { bonus_ = new global::POGOProtos.Inventory.Loot(); } Bonus.MergeFrom(other.Bonus); } if (other.price_ != null) { if (price_ == null) { price_ = new global::POGOProtos.Inventory.Loot(); } Price.MergeFrom(other.Price); } if (other.CanAffordTrading != false) { CanAffordTrading = other.CanAffordTrading; } if (other.HasConfirmed != false) { HasConfirmed = other.HasConfirmed; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { PlayerId = input.ReadString(); break; } case 18: { if (publicProfile_ == null) { publicProfile_ = new global::POGOProtos.Data.Player.PlayerPublicProfile(); } input.ReadMessage(publicProfile_); break; } case 26: { excludedPokemon_.AddEntriesFrom(input, _repeated_excludedPokemon_codec); break; } case 34: { if (tradingPokemon_ == null) { tradingPokemon_ = new global::POGOProtos.Data.Trading.TradingPokemon(); } input.ReadMessage(tradingPokemon_); break; } case 42: { if (bonus_ == null) { bonus_ = new global::POGOProtos.Inventory.Loot(); } input.ReadMessage(bonus_); break; } case 50: { if (price_ == null) { price_ = new global::POGOProtos.Inventory.Loot(); } input.ReadMessage(price_); break; } case 56: { CanAffordTrading = input.ReadBool(); break; } case 64: { HasConfirmed = input.ReadBool(); break; } } } }