public void MergeFrom(ClientPlayerDetails other) { if (other == null) { return; } if (other.CreationTime != 0L) { CreationTime = other.CreationTime; } if (other.Username.Length != 0) { Username = other.Username; } if (other.Team != 0) { Team = other.Team; } if (other.Tutorial.Length != 0) { Tutorial = other.Tutorial; } if (other.avatar_ != null) { if (avatar_ == null) { avatar_ = new global::PokemonGoApi.Proto.PlayerAvatar(); } Avatar.MergeFrom(other.Avatar); } if (other.PokeStorage != 0) { PokeStorage = other.PokeStorage; } if (other.ItemStorage != 0) { ItemStorage = other.ItemStorage; } if (other.dailyBonus_ != null) { if (dailyBonus_ == null) { dailyBonus_ = new global::PokemonGoApi.Proto.DailyBonus(); } DailyBonus.MergeFrom(other.DailyBonus); } if (other.Badge.Length != 0) { Badge = other.Badge; } if (other.settings_ != null) { if (settings_ == null) { settings_ = new global::PokemonGoApi.Proto.ContactSettingsProto(); } Settings.MergeFrom(other.Settings); } currency_.Add(other.currency_); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 8: { CreationTime = input.ReadInt64(); break; } case 18: { Username = input.ReadString(); break; } case 40: { Team = input.ReadInt32(); break; } case 58: { Tutorial = input.ReadBytes(); break; } case 66: { if (avatar_ == null) { avatar_ = new global::PokemonGoApi.Proto.PlayerAvatar(); } input.ReadMessage(avatar_); break; } case 72: { PokeStorage = input.ReadInt32(); break; } case 80: { ItemStorage = input.ReadInt32(); break; } case 90: { if (dailyBonus_ == null) { dailyBonus_ = new global::PokemonGoApi.Proto.DailyBonus(); } input.ReadMessage(dailyBonus_); break; } case 98: { Badge = input.ReadString(); break; } case 106: { if (settings_ == null) { settings_ = new global::PokemonGoApi.Proto.ContactSettingsProto(); } input.ReadMessage(settings_); break; } case 114: { currency_.AddEntriesFrom(input, _repeated_currency_codec); break; } } } }