public void MergeFrom(EncounterResponse other) { if (other == null) { return; } if (other.wildPokemon_ != null) { if (wildPokemon_ == null) { wildPokemon_ = new global::PokemonGoDesktop.API.Proto.WildPokemon(); } WildPokemon.MergeFrom(other.WildPokemon); } if (other.Background != 0) { Background = other.Background; } if (other.Status != 0) { Status = other.Status; } if (other.captureProbability_ != null) { if (captureProbability_ == null) { captureProbability_ = new global::PokemonGoDesktop.API.Proto.CaptureProbability(); } CaptureProbability.MergeFrom(other.CaptureProbability); } }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 10: { if (wildPokemon_ == null) { wildPokemon_ = new global::PokemonGoDesktop.API.Proto.WildPokemon(); } input.ReadMessage(wildPokemon_); break; } case 16: { background_ = (global::PokemonGoDesktop.API.Proto.EncounterResponse.Types.Background)input.ReadEnum(); break; } case 24: { status_ = (global::PokemonGoDesktop.API.Proto.EncounterResponse.Types.Status)input.ReadEnum(); break; } case 34: { if (captureProbability_ == null) { captureProbability_ = new global::PokemonGoDesktop.API.Proto.CaptureProbability(); } input.ReadMessage(captureProbability_); break; } } } }