diff --git a/PokemonGo/RocketAPI/Client.cs b/PokemonGo/RocketAPI/Client.cs
index 4e24ed0..a34bb08 100644
--- a/PokemonGo/RocketAPI/Client.cs
+++ b/PokemonGo/RocketAPI/Client.cs
@@ -97,5 +97,10 @@ namespace PokemonGo.RocketAPI
{
return await _httpClient.PostProto<Request, SettingsResponse>($"https://{apiUrl}/rpc", settingsRequest);
}
+ public async Task<EncounterResponse> GetEncounters(string apiUrl, Request encounterRequest)
+ {
+ return await _httpClient.PostProto<Request, EncounterResponse>($"https://{apiUrl}/rpc", encounterRequest);
+ }
+
}
}
diff --git a/PokemonGo/RocketAPI/Console/Program.cs b/PokemonGo/RocketAPI/Console/Program.cs
index e2f7d59..7bf213c 100644
--- a/PokemonGo/RocketAPI/Console/Program.cs
+++ b/PokemonGo/RocketAPI/Console/Program.cs
@@ -23,11 +23,14 @@ namespace PokemonGo.RocketAPI.Console
var accessToken = await client.GetGoogleAccessToken(Settings.DeviceId, Settings.ClientSig, Settings.Email, Settings.LongDurationToken);
var profileRequest = RequestBuilder.GetRequest(RequestType.Profile, accessToken, Settings.DefaultLatitude, Settings.DefaultLongitude, 30);
var serverSettingsRequest = RequestBuilder.GetRequest(RequestType.Settings, accessToken, Settings.DefaultLatitude, Settings.DefaultLongitude, 30);
+ var encountersRequest = RequestBuilder.GetRequest(RequestType.Encounters, accessToken, Settings.DefaultLatitude, Settings.DefaultLongitude, 30);
var serverResponse = await client.GetServer(profileRequest);
var profile = await client.GetProfile(serverResponse.ApiUrl, profileRequest);
var serverSettings = await client.GetSettings(serverResponse.ApiUrl, serverSettingsRequest);
+
+ var encounters = await client.GetEncounters(serverResponse.ApiUrl, encountersRequest);
}
}
}
diff --git a/PokemonGo/RocketAPI/Enums/RequestType.cs b/PokemonGo/RocketAPI/Enums/RequestType.cs
index 2bfa70a..11bbea3 100644
--- a/PokemonGo/RocketAPI/Enums/RequestType.cs
+++ b/PokemonGo/RocketAPI/Enums/RequestType.cs
@@ -9,6 +9,7 @@ namespace PokemonGo.RocketAPI.Enums
public enum RequestType
{
Profile = 2,
- Settings = 5
+ Settings = 5,
+ Encounters = 300
}
}
diff --git a/PokemonGo/RocketAPI/GeneratedCode/EncounterResponse.cs b/PokemonGo/RocketAPI/GeneratedCode/EncounterResponse.cs
new file mode 100644
index 0000000..a3bcc6f
--- /dev/null
+++ b/PokemonGo/RocketAPI/GeneratedCode/EncounterResponse.cs
@@ -0,0 +1,2367 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: EncounterResponse.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace PokemonGo.RocketAPI.GeneratedCode {
+
+ /// <summary>Holder for reflection information generated from EncounterResponse.proto</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class EncounterResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for EncounterResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static EncounterResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChdFbmNvdW50ZXJSZXNwb25zZS5wcm90bxIhUG9rZW1vbkdvLlJvY2tldEFQ",
+ "SS5HZW5lcmF0ZWRDb2RlIqAPChFFbmNvdW50ZXJSZXNwb25zZRIQCgh1bmtu",
+ "b3duMRgBIAEoBRIQCgh1bmtub3duMhgCIAEoAxIPCgdhcGlfdXJsGAMgASgJ",
+ "Ek8KCHVua25vd242GAYgASgLMj0uUG9rZW1vbkdvLlJvY2tldEFQSS5HZW5l",
+ "cmF0ZWRDb2RlLkVuY291bnRlclJlc3BvbnNlLlVua25vd242Ek8KCHVua25v",
+ "d243GAcgASgLMj0uUG9rZW1vbkdvLlJvY2tldEFQSS5HZW5lcmF0ZWRDb2Rl",
+ "LkVuY291bnRlclJlc3BvbnNlLlVua25vd243Ek0KB3BheWxvYWQYZCADKAsy",
+ "PC5Qb2tlbW9uR28uUm9ja2V0QVBJLkdlbmVyYXRlZENvZGUuRW5jb3VudGVy",
+ "UmVzcG9uc2UuUGF5bG9hZBIUCgxlcnJvck1lc3NhZ2UYZSABKAkalAEKCFVu",
+ "a25vd242EhAKCHVua25vd24xGAEgASgFElgKCHVua25vd24yGAIgASgLMkYu",
+ "UG9rZW1vbkdvLlJvY2tldEFQSS5HZW5lcmF0ZWRDb2RlLkVuY291bnRlclJl",
+ "c3BvbnNlLlVua25vd242LlVua25vd24yGhwKCFVua25vd24yEhAKCHVua25v",
+ "d24xGAEgASgMGkMKCFVua25vd243EhEKCXVua25vd243MRgBIAEoDBIRCgl1",
+ "bmtub3duNzIYAiABKAMSEQoJdW5rbm93bjczGAMgASgMGvIKCgdQYXlsb2Fk",
+ "El8KB3Byb2ZpbGUYASADKAsyTi5Qb2tlbW9uR28uUm9ja2V0QVBJLkdlbmVy",
+ "YXRlZENvZGUuRW5jb3VudGVyUmVzcG9uc2UuUGF5bG9hZC5FbmNvdW50ZXJP",
+ "dXRQcm90bxIVCg11bmtub3dubnVtYmVyGAIgASgFGu4JChFFbmNvdW50ZXJP",
+ "dXRQcm90bxJwCgdQb2tlbW9uGAEgASgLMl8uUG9rZW1vbkdvLlJvY2tldEFQ",
+ "SS5HZW5lcmF0ZWRDb2RlLkVuY291bnRlclJlc3BvbnNlLlBheWxvYWQuRW5j",
+ "b3VudGVyT3V0UHJvdG8uV2lsZFBva2Vtb25Qcm90bxISCgpCYWNrZ3JvdW5k",
+ "GAIgASgFEg4KBlN0YXR1cxgDIAEoBRKCAQoSQ2FwdHVyZVByb2JhYmlsaXR5",
+ "GAQgASgLMmYuUG9rZW1vbkdvLlJvY2tldEFQSS5HZW5lcmF0ZWRDb2RlLkVu",
+ "Y291bnRlclJlc3BvbnNlLlBheWxvYWQuRW5jb3VudGVyT3V0UHJvdG8uQ2Fw",
+ "dHVyZVByb2JhYmlsaXR5UHJvdG8aggIKEFdpbGRQb2tlbW9uUHJvdG8SEwoL",
+ "RW5jb3VudGVySWQYASABKAQSFgoOTGFzdE1vZGlmaWVkTXMYAiABKAMSEAoI",
+ "TGF0aXR1ZGUYAyABKAESEQoJTG9uZ2l0dWRlGAQgASgBEhQKDFNwYXduUG9p",
+ "bnRJZBgFIAEoCRJsCgdQb2tlbW9uGAcgASgLMlsuUG9rZW1vbkdvLlJvY2tl",
+ "dEFQSS5HZW5lcmF0ZWRDb2RlLkVuY291bnRlclJlc3BvbnNlLlBheWxvYWQu",
+ "RW5jb3VudGVyT3V0UHJvdG8uUG9rZW1vblByb3RvEhgKEFRpbWVUaWxsSGlk",
+ "ZGVuTXMYCyABKAUa/QQKDFBva2Vtb25Qcm90bxIKCgJJZBgBIAEoBBIRCglQ",
+ "b2tlbW9uSWQYAiABKAUSCgoCQ3AYAyABKAUSDwoHU3RhbWluYRgEIAEoBRIS",
+ "CgpNYXhTdGFtaW5hGAUgASgFEg0KBU1vdmUxGAYgASgFEg0KBU1vdmUyGAcg",
+ "ASgFEhYKDkRlcGxveWVkRm9ydElkGAggASgJEhEKCU93bmVyTmFtZRgJIAEo",
+ "CRINCgVJc0VnZxgKIAEoCBIZChFFZ2dLbVdhbGtlZFRhcmdldBgLIAEoARIY",
+ "ChBFZ2dLbVdhbGtlZFN0YXJ0GAwgASgBEg4KBk9yaWdpbhgOIAEoBRIPCgdI",
+ "ZWlnaHRNGA8gASgCEhAKCFdlaWdodEtnGBAgASgCEhgKEEluZGl2aWR1YWxB",
+ "dHRhY2sYESABKAUSGQoRSW5kaXZpZHVhbERlZmVuc2UYEiABKAUSGQoRSW5k",
+ "aXZpZHVhbFN0YW1pbmEYEyABKAUSFAoMQ3BNdWx0aXBsaWVyGBQgASgCEhAK",
+ "CFBva2ViYWxsGBUgASgFEhgKEENhcHR1cmVkUzJDZWxsSWQYFiABKAMSFwoP",
+ "QmF0dGxlc0F0dGFja2VkGBcgASgFEhcKD0JhdHRsZXNEZWZlbmRlZBgYIAEo",
+ "BRIWCg5FZ2dJbmN1YmF0b3JJZBgZIAEoCRIWCg5DcmVhdGlvblRpbWVNcxga",
+ "IAEoAxITCgtOdW1VcGdyYWRlcxgbIAEoBRIeChZBZGRpdGlvbmFsQ3BNdWx0",
+ "aXBsaWVyGBwgASgCEhAKCEZhdm9yaXRlGB0gASgIEhAKCE5pY2tuYW1lGB4g",
+ "ASgJEhAKCEZyb21Gb3J0GB8gASgIGjkKF0NhcHR1cmVQcm9iYWJpbGl0eVBy",
+ "b3RvEh4KFlJldGljbGVEaWZmaWN1bHR5U2NhbGUYDCABKAFiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Parser, new[]{ "Unknown1", "Unknown2", "ApiUrl", "Unknown6", "Unknown7", "Payload", "ErrorMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Parser, new[]{ "Unknown1", "Unknown2" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Types.Unknown2), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Types.Unknown2.Parser, new[]{ "Unknown1" }, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown7), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown7.Parser, new[]{ "Unknown71", "Unknown72", "Unknown73" }, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Parser, new[]{ "Profile", "Unknownnumber" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Parser, new[]{ "Pokemon", "Background", "Status", "CaptureProbability" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.WildPokemonProto), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.WildPokemonProto.Parser, new[]{ "EncounterId", "LastModifiedMs", "Latitude", "Longitude", "SpawnPointId", "Pokemon", "TimeTillHiddenMs" }, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.PokemonProto), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.PokemonProto.Parser, new[]{ "Id", "PokemonId", "Cp", "Stamina", "MaxStamina", "Move1", "Move2", "DeployedFortId", "OwnerName", "IsEgg", "EggKmWalkedTarget", "EggKmWalkedStart", "Origin", "HeightM", "WeightKg", "IndividualAttack", "IndividualDefense", "IndividualStamina", "CpMultiplier", "Pokeball", "CapturedS2CellId", "BattlesAttacked", "BattlesDefended", "EggIncubatorId", "CreationTimeMs", "NumUpgrades", "AdditionalCpMultiplier", "Favorite", "Nickname", "FromFort" }, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.CaptureProbabilityProto), global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.CaptureProbabilityProto.Parser, new[]{ "ReticleDifficultyScale" }, null, null, null)})})})
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class EncounterResponse : pb::IMessage<EncounterResponse> {
+ private static readonly pb::MessageParser<EncounterResponse> _parser = new pb::MessageParser<EncounterResponse>(() => new EncounterResponse());
+ public static pb::MessageParser<EncounterResponse> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public EncounterResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public EncounterResponse(EncounterResponse other) : this() {
+ unknown1_ = other.unknown1_;
+ unknown2_ = other.unknown2_;
+ apiUrl_ = other.apiUrl_;
+ Unknown6 = other.unknown6_ != null ? other.Unknown6.Clone() : null;
+ Unknown7 = other.unknown7_ != null ? other.Unknown7.Clone() : null;
+ payload_ = other.payload_.Clone();
+ errorMessage_ = other.errorMessage_;
+ }
+
+ public EncounterResponse Clone() {
+ return new EncounterResponse(this);
+ }
+
+ /// <summary>Field number for the "unknown1" field.</summary>
+ public const int Unknown1FieldNumber = 1;
+ private int unknown1_;
+ public int Unknown1 {
+ get { return unknown1_; }
+ set {
+ unknown1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "unknown2" field.</summary>
+ public const int Unknown2FieldNumber = 2;
+ private long unknown2_;
+ public long Unknown2 {
+ get { return unknown2_; }
+ set {
+ unknown2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "api_url" field.</summary>
+ public const int ApiUrlFieldNumber = 3;
+ private string apiUrl_ = "";
+ public string ApiUrl {
+ get { return apiUrl_; }
+ set {
+ apiUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "unknown6" field.</summary>
+ public const int Unknown6FieldNumber = 6;
+ private global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6 unknown6_;
+ public global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6 Unknown6 {
+ get { return unknown6_; }
+ set {
+ unknown6_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "unknown7" field.</summary>
+ public const int Unknown7FieldNumber = 7;
+ private global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown7 unknown7_;
+ public global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown7 Unknown7 {
+ get { return unknown7_; }
+ set {
+ unknown7_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "payload" field.</summary>
+ public const int PayloadFieldNumber = 100;
+ private static readonly pb::FieldCodec<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload> _repeated_payload_codec
+ = pb::FieldCodec.ForMessage(802, global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Parser);
+ private readonly pbc::RepeatedField<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload> payload_ = new pbc::RepeatedField<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload>();
+ public pbc::RepeatedField<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload> Payload {
+ get { return payload_; }
+ }
+
+ /// <summary>Field number for the "errorMessage" field.</summary>
+ public const int ErrorMessageFieldNumber = 101;
+ private string errorMessage_ = "";
+ /// <summary>
+ /// Should be moved to an error-proto file if error is always 101 field
+ /// </summary>
+ public string ErrorMessage {
+ get { return errorMessage_; }
+ set {
+ errorMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as EncounterResponse);
+ }
+
+ public bool Equals(EncounterResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Unknown1 != other.Unknown1) return false;
+ if (Unknown2 != other.Unknown2) return false;
+ if (ApiUrl != other.ApiUrl) return false;
+ if (!object.Equals(Unknown6, other.Unknown6)) return false;
+ if (!object.Equals(Unknown7, other.Unknown7)) return false;
+ if(!payload_.Equals(other.payload_)) return false;
+ if (ErrorMessage != other.ErrorMessage) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Unknown1 != 0) hash ^= Unknown1.GetHashCode();
+ if (Unknown2 != 0L) hash ^= Unknown2.GetHashCode();
+ if (ApiUrl.Length != 0) hash ^= ApiUrl.GetHashCode();
+ if (unknown6_ != null) hash ^= Unknown6.GetHashCode();
+ if (unknown7_ != null) hash ^= Unknown7.GetHashCode();
+ hash ^= payload_.GetHashCode();
+ if (ErrorMessage.Length != 0) hash ^= ErrorMessage.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Unknown1 != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Unknown1);
+ }
+ if (Unknown2 != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Unknown2);
+ }
+ if (ApiUrl.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(ApiUrl);
+ }
+ if (unknown6_ != null) {
+ output.WriteRawTag(50);
+ output.WriteMessage(Unknown6);
+ }
+ if (unknown7_ != null) {
+ output.WriteRawTag(58);
+ output.WriteMessage(Unknown7);
+ }
+ payload_.WriteTo(output, _repeated_payload_codec);
+ if (ErrorMessage.Length != 0) {
+ output.WriteRawTag(170, 6);
+ output.WriteString(ErrorMessage);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Unknown1 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Unknown1);
+ }
+ if (Unknown2 != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Unknown2);
+ }
+ if (ApiUrl.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ApiUrl);
+ }
+ if (unknown6_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Unknown6);
+ }
+ if (unknown7_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Unknown7);
+ }
+ size += payload_.CalculateSize(_repeated_payload_codec);
+ if (ErrorMessage.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(ErrorMessage);
+ }
+ return size;
+ }
+
+ public void MergeFrom(EncounterResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Unknown1 != 0) {
+ Unknown1 = other.Unknown1;
+ }
+ if (other.Unknown2 != 0L) {
+ Unknown2 = other.Unknown2;
+ }
+ if (other.ApiUrl.Length != 0) {
+ ApiUrl = other.ApiUrl;
+ }
+ if (other.unknown6_ != null) {
+ if (unknown6_ == null) {
+ unknown6_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6();
+ }
+ Unknown6.MergeFrom(other.Unknown6);
+ }
+ if (other.unknown7_ != null) {
+ if (unknown7_ == null) {
+ unknown7_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown7();
+ }
+ Unknown7.MergeFrom(other.Unknown7);
+ }
+ payload_.Add(other.payload_);
+ if (other.ErrorMessage.Length != 0) {
+ ErrorMessage = other.ErrorMessage;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ Unknown1 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Unknown2 = input.ReadInt64();
+ break;
+ }
+ case 26: {
+ ApiUrl = input.ReadString();
+ break;
+ }
+ case 50: {
+ if (unknown6_ == null) {
+ unknown6_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6();
+ }
+ input.ReadMessage(unknown6_);
+ break;
+ }
+ case 58: {
+ if (unknown7_ == null) {
+ unknown7_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown7();
+ }
+ input.ReadMessage(unknown7_);
+ break;
+ }
+ case 802: {
+ payload_.AddEntriesFrom(input, _repeated_payload_codec);
+ break;
+ }
+ case 810: {
+ ErrorMessage = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the EncounterResponse message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Unknown6 : pb::IMessage<Unknown6> {
+ private static readonly pb::MessageParser<Unknown6> _parser = new pb::MessageParser<Unknown6>(() => new Unknown6());
+ public static pb::MessageParser<Unknown6> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Descriptor.NestedTypes[0]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public Unknown6() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public Unknown6(Unknown6 other) : this() {
+ unknown1_ = other.unknown1_;
+ Unknown2 = other.unknown2_ != null ? other.Unknown2.Clone() : null;
+ }
+
+ public Unknown6 Clone() {
+ return new Unknown6(this);
+ }
+
+ /// <summary>Field number for the "unknown1" field.</summary>
+ public const int Unknown1FieldNumber = 1;
+ private int unknown1_;
+ public int Unknown1 {
+ get { return unknown1_; }
+ set {
+ unknown1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "unknown2" field.</summary>
+ public const int Unknown2FieldNumber = 2;
+ private global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Types.Unknown2 unknown2_;
+ public global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Types.Unknown2 Unknown2 {
+ get { return unknown2_; }
+ set {
+ unknown2_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as Unknown6);
+ }
+
+ public bool Equals(Unknown6 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Unknown1 != other.Unknown1) return false;
+ if (!object.Equals(Unknown2, other.Unknown2)) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Unknown1 != 0) hash ^= Unknown1.GetHashCode();
+ if (unknown2_ != null) hash ^= Unknown2.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Unknown1 != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Unknown1);
+ }
+ if (unknown2_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(Unknown2);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Unknown1 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Unknown1);
+ }
+ if (unknown2_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Unknown2);
+ }
+ return size;
+ }
+
+ public void MergeFrom(Unknown6 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Unknown1 != 0) {
+ Unknown1 = other.Unknown1;
+ }
+ if (other.unknown2_ != null) {
+ if (unknown2_ == null) {
+ unknown2_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Types.Unknown2();
+ }
+ Unknown2.MergeFrom(other.Unknown2);
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ Unknown1 = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ if (unknown2_ == null) {
+ unknown2_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Types.Unknown2();
+ }
+ input.ReadMessage(unknown2_);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the Unknown6 message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Unknown2 : pb::IMessage<Unknown2> {
+ private static readonly pb::MessageParser<Unknown2> _parser = new pb::MessageParser<Unknown2>(() => new Unknown2());
+ public static pb::MessageParser<Unknown2> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Unknown6.Descriptor.NestedTypes[0]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public Unknown2() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public Unknown2(Unknown2 other) : this() {
+ unknown1_ = other.unknown1_;
+ }
+
+ public Unknown2 Clone() {
+ return new Unknown2(this);
+ }
+
+ /// <summary>Field number for the "unknown1" field.</summary>
+ public const int Unknown1FieldNumber = 1;
+ private pb::ByteString unknown1_ = pb::ByteString.Empty;
+ public pb::ByteString Unknown1 {
+ get { return unknown1_; }
+ set {
+ unknown1_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as Unknown2);
+ }
+
+ public bool Equals(Unknown2 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Unknown1 != other.Unknown1) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Unknown1.Length != 0) hash ^= Unknown1.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Unknown1.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteBytes(Unknown1);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Unknown1.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Unknown1);
+ }
+ return size;
+ }
+
+ public void MergeFrom(Unknown2 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Unknown1.Length != 0) {
+ Unknown1 = other.Unknown1;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ Unknown1 = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Unknown7 : pb::IMessage<Unknown7> {
+ private static readonly pb::MessageParser<Unknown7> _parser = new pb::MessageParser<Unknown7>(() => new Unknown7());
+ public static pb::MessageParser<Unknown7> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Descriptor.NestedTypes[1]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public Unknown7() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public Unknown7(Unknown7 other) : this() {
+ unknown71_ = other.unknown71_;
+ unknown72_ = other.unknown72_;
+ unknown73_ = other.unknown73_;
+ }
+
+ public Unknown7 Clone() {
+ return new Unknown7(this);
+ }
+
+ /// <summary>Field number for the "unknown71" field.</summary>
+ public const int Unknown71FieldNumber = 1;
+ private pb::ByteString unknown71_ = pb::ByteString.Empty;
+ public pb::ByteString Unknown71 {
+ get { return unknown71_; }
+ set {
+ unknown71_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "unknown72" field.</summary>
+ public const int Unknown72FieldNumber = 2;
+ private long unknown72_;
+ public long Unknown72 {
+ get { return unknown72_; }
+ set {
+ unknown72_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "unknown73" field.</summary>
+ public const int Unknown73FieldNumber = 3;
+ private pb::ByteString unknown73_ = pb::ByteString.Empty;
+ public pb::ByteString Unknown73 {
+ get { return unknown73_; }
+ set {
+ unknown73_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as Unknown7);
+ }
+
+ public bool Equals(Unknown7 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Unknown71 != other.Unknown71) return false;
+ if (Unknown72 != other.Unknown72) return false;
+ if (Unknown73 != other.Unknown73) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Unknown71.Length != 0) hash ^= Unknown71.GetHashCode();
+ if (Unknown72 != 0L) hash ^= Unknown72.GetHashCode();
+ if (Unknown73.Length != 0) hash ^= Unknown73.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Unknown71.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteBytes(Unknown71);
+ }
+ if (Unknown72 != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Unknown72);
+ }
+ if (Unknown73.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteBytes(Unknown73);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Unknown71.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Unknown71);
+ }
+ if (Unknown72 != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Unknown72);
+ }
+ if (Unknown73.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Unknown73);
+ }
+ return size;
+ }
+
+ public void MergeFrom(Unknown7 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Unknown71.Length != 0) {
+ Unknown71 = other.Unknown71;
+ }
+ if (other.Unknown72 != 0L) {
+ Unknown72 = other.Unknown72;
+ }
+ if (other.Unknown73.Length != 0) {
+ Unknown73 = other.Unknown73;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ Unknown71 = input.ReadBytes();
+ break;
+ }
+ case 16: {
+ Unknown72 = input.ReadInt64();
+ break;
+ }
+ case 26: {
+ Unknown73 = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Payload : pb::IMessage<Payload> {
+ private static readonly pb::MessageParser<Payload> _parser = new pb::MessageParser<Payload>(() => new Payload());
+ public static pb::MessageParser<Payload> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Descriptor.NestedTypes[2]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public Payload() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public Payload(Payload other) : this() {
+ profile_ = other.profile_.Clone();
+ unknownnumber_ = other.unknownnumber_;
+ }
+
+ public Payload Clone() {
+ return new Payload(this);
+ }
+
+ /// <summary>Field number for the "profile" field.</summary>
+ public const int ProfileFieldNumber = 1;
+ private static readonly pb::FieldCodec<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto> _repeated_profile_codec
+ = pb::FieldCodec.ForMessage(10, global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Parser);
+ private readonly pbc::RepeatedField<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto> profile_ = new pbc::RepeatedField<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto>();
+ public pbc::RepeatedField<global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto> Profile {
+ get { return profile_; }
+ }
+
+ /// <summary>Field number for the "unknownnumber" field.</summary>
+ public const int UnknownnumberFieldNumber = 2;
+ private int unknownnumber_;
+ public int Unknownnumber {
+ get { return unknownnumber_; }
+ set {
+ unknownnumber_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as Payload);
+ }
+
+ public bool Equals(Payload other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!profile_.Equals(other.profile_)) return false;
+ if (Unknownnumber != other.Unknownnumber) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= profile_.GetHashCode();
+ if (Unknownnumber != 0) hash ^= Unknownnumber.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ profile_.WriteTo(output, _repeated_profile_codec);
+ if (Unknownnumber != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Unknownnumber);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ size += profile_.CalculateSize(_repeated_profile_codec);
+ if (Unknownnumber != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Unknownnumber);
+ }
+ return size;
+ }
+
+ public void MergeFrom(Payload other) {
+ if (other == null) {
+ return;
+ }
+ profile_.Add(other.profile_);
+ if (other.Unknownnumber != 0) {
+ Unknownnumber = other.Unknownnumber;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ profile_.AddEntriesFrom(input, _repeated_profile_codec);
+ break;
+ }
+ case 16: {
+ Unknownnumber = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the Payload message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class EncounterOutProto : pb::IMessage<EncounterOutProto> {
+ private static readonly pb::MessageParser<EncounterOutProto> _parser = new pb::MessageParser<EncounterOutProto>(() => new EncounterOutProto());
+ public static pb::MessageParser<EncounterOutProto> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Descriptor.NestedTypes[0]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public EncounterOutProto() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public EncounterOutProto(EncounterOutProto other) : this() {
+ Pokemon = other.pokemon_ != null ? other.Pokemon.Clone() : null;
+ background_ = other.background_;
+ status_ = other.status_;
+ CaptureProbability = other.captureProbability_ != null ? other.CaptureProbability.Clone() : null;
+ }
+
+ public EncounterOutProto Clone() {
+ return new EncounterOutProto(this);
+ }
+
+ /// <summary>Field number for the "Pokemon" field.</summary>
+ public const int PokemonFieldNumber = 1;
+ private global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.WildPokemonProto pokemon_;
+ public global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.WildPokemonProto Pokemon {
+ get { return pokemon_; }
+ set {
+ pokemon_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Background" field.</summary>
+ public const int BackgroundFieldNumber = 2;
+ private int background_;
+ public int Background {
+ get { return background_; }
+ set {
+ background_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status" field.</summary>
+ public const int StatusFieldNumber = 3;
+ private int status_;
+ public int Status {
+ get { return status_; }
+ set {
+ status_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "CaptureProbability" field.</summary>
+ public const int CaptureProbabilityFieldNumber = 4;
+ private global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.CaptureProbabilityProto captureProbability_;
+ public global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.CaptureProbabilityProto CaptureProbability {
+ get { return captureProbability_; }
+ set {
+ captureProbability_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as EncounterOutProto);
+ }
+
+ public bool Equals(EncounterOutProto other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Pokemon, other.Pokemon)) return false;
+ if (Background != other.Background) return false;
+ if (Status != other.Status) return false;
+ if (!object.Equals(CaptureProbability, other.CaptureProbability)) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (pokemon_ != null) hash ^= Pokemon.GetHashCode();
+ if (Background != 0) hash ^= Background.GetHashCode();
+ if (Status != 0) hash ^= Status.GetHashCode();
+ if (captureProbability_ != null) hash ^= CaptureProbability.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (pokemon_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Pokemon);
+ }
+ if (Background != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Background);
+ }
+ if (Status != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Status);
+ }
+ if (captureProbability_ != null) {
+ output.WriteRawTag(34);
+ output.WriteMessage(CaptureProbability);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (pokemon_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pokemon);
+ }
+ if (Background != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Background);
+ }
+ if (Status != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status);
+ }
+ if (captureProbability_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(CaptureProbability);
+ }
+ return size;
+ }
+
+ public void MergeFrom(EncounterOutProto other) {
+ if (other == null) {
+ return;
+ }
+ if (other.pokemon_ != null) {
+ if (pokemon_ == null) {
+ pokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.WildPokemonProto();
+ }
+ Pokemon.MergeFrom(other.Pokemon);
+ }
+ if (other.Background != 0) {
+ Background = other.Background;
+ }
+ if (other.Status != 0) {
+ Status = other.Status;
+ }
+ if (other.captureProbability_ != null) {
+ if (captureProbability_ == null) {
+ captureProbability_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.CaptureProbabilityProto();
+ }
+ 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 (pokemon_ == null) {
+ pokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.WildPokemonProto();
+ }
+ input.ReadMessage(pokemon_);
+ break;
+ }
+ case 16: {
+ Background = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ Status = input.ReadInt32();
+ break;
+ }
+ case 34: {
+ if (captureProbability_ == null) {
+ captureProbability_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.CaptureProbabilityProto();
+ }
+ input.ReadMessage(captureProbability_);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the EncounterOutProto message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class WildPokemonProto : pb::IMessage<WildPokemonProto> {
+ private static readonly pb::MessageParser<WildPokemonProto> _parser = new pb::MessageParser<WildPokemonProto>(() => new WildPokemonProto());
+ public static pb::MessageParser<WildPokemonProto> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Descriptor.NestedTypes[0]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public WildPokemonProto() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public WildPokemonProto(WildPokemonProto other) : this() {
+ encounterId_ = other.encounterId_;
+ lastModifiedMs_ = other.lastModifiedMs_;
+ latitude_ = other.latitude_;
+ longitude_ = other.longitude_;
+ spawnPointId_ = other.spawnPointId_;
+ Pokemon = other.pokemon_ != null ? other.Pokemon.Clone() : null;
+ timeTillHiddenMs_ = other.timeTillHiddenMs_;
+ }
+
+ public WildPokemonProto Clone() {
+ return new WildPokemonProto(this);
+ }
+
+ /// <summary>Field number for the "EncounterId" field.</summary>
+ public const int EncounterIdFieldNumber = 1;
+ private ulong encounterId_;
+ public ulong EncounterId {
+ get { return encounterId_; }
+ set {
+ encounterId_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "LastModifiedMs" field.</summary>
+ public const int LastModifiedMsFieldNumber = 2;
+ private long lastModifiedMs_;
+ public long LastModifiedMs {
+ get { return lastModifiedMs_; }
+ set {
+ lastModifiedMs_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Latitude" field.</summary>
+ public const int LatitudeFieldNumber = 3;
+ private double latitude_;
+ public double Latitude {
+ get { return latitude_; }
+ set {
+ latitude_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Longitude" field.</summary>
+ public const int LongitudeFieldNumber = 4;
+ private double longitude_;
+ public double Longitude {
+ get { return longitude_; }
+ set {
+ longitude_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SpawnPointId" field.</summary>
+ public const int SpawnPointIdFieldNumber = 5;
+ private string spawnPointId_ = "";
+ public string SpawnPointId {
+ get { return spawnPointId_; }
+ set {
+ spawnPointId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "Pokemon" field.</summary>
+ public const int PokemonFieldNumber = 7;
+ private global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.PokemonProto pokemon_;
+ public global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.PokemonProto Pokemon {
+ get { return pokemon_; }
+ set {
+ pokemon_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TimeTillHiddenMs" field.</summary>
+ public const int TimeTillHiddenMsFieldNumber = 11;
+ private int timeTillHiddenMs_;
+ public int TimeTillHiddenMs {
+ get { return timeTillHiddenMs_; }
+ set {
+ timeTillHiddenMs_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as WildPokemonProto);
+ }
+
+ public bool Equals(WildPokemonProto other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (EncounterId != other.EncounterId) return false;
+ if (LastModifiedMs != other.LastModifiedMs) return false;
+ if (Latitude != other.Latitude) return false;
+ if (Longitude != other.Longitude) return false;
+ if (SpawnPointId != other.SpawnPointId) return false;
+ if (!object.Equals(Pokemon, other.Pokemon)) return false;
+ if (TimeTillHiddenMs != other.TimeTillHiddenMs) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (EncounterId != 0UL) hash ^= EncounterId.GetHashCode();
+ if (LastModifiedMs != 0L) hash ^= LastModifiedMs.GetHashCode();
+ if (Latitude != 0D) hash ^= Latitude.GetHashCode();
+ if (Longitude != 0D) hash ^= Longitude.GetHashCode();
+ if (SpawnPointId.Length != 0) hash ^= SpawnPointId.GetHashCode();
+ if (pokemon_ != null) hash ^= Pokemon.GetHashCode();
+ if (TimeTillHiddenMs != 0) hash ^= TimeTillHiddenMs.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (EncounterId != 0UL) {
+ output.WriteRawTag(8);
+ output.WriteUInt64(EncounterId);
+ }
+ if (LastModifiedMs != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(LastModifiedMs);
+ }
+ if (Latitude != 0D) {
+ output.WriteRawTag(25);
+ output.WriteDouble(Latitude);
+ }
+ if (Longitude != 0D) {
+ output.WriteRawTag(33);
+ output.WriteDouble(Longitude);
+ }
+ if (SpawnPointId.Length != 0) {
+ output.WriteRawTag(42);
+ output.WriteString(SpawnPointId);
+ }
+ if (pokemon_ != null) {
+ output.WriteRawTag(58);
+ output.WriteMessage(Pokemon);
+ }
+ if (TimeTillHiddenMs != 0) {
+ output.WriteRawTag(88);
+ output.WriteInt32(TimeTillHiddenMs);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (EncounterId != 0UL) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(EncounterId);
+ }
+ if (LastModifiedMs != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastModifiedMs);
+ }
+ if (Latitude != 0D) {
+ size += 1 + 8;
+ }
+ if (Longitude != 0D) {
+ size += 1 + 8;
+ }
+ if (SpawnPointId.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(SpawnPointId);
+ }
+ if (pokemon_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pokemon);
+ }
+ if (TimeTillHiddenMs != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TimeTillHiddenMs);
+ }
+ return size;
+ }
+
+ public void MergeFrom(WildPokemonProto other) {
+ if (other == null) {
+ return;
+ }
+ if (other.EncounterId != 0UL) {
+ EncounterId = other.EncounterId;
+ }
+ if (other.LastModifiedMs != 0L) {
+ LastModifiedMs = other.LastModifiedMs;
+ }
+ if (other.Latitude != 0D) {
+ Latitude = other.Latitude;
+ }
+ if (other.Longitude != 0D) {
+ Longitude = other.Longitude;
+ }
+ if (other.SpawnPointId.Length != 0) {
+ SpawnPointId = other.SpawnPointId;
+ }
+ if (other.pokemon_ != null) {
+ if (pokemon_ == null) {
+ pokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.PokemonProto();
+ }
+ Pokemon.MergeFrom(other.Pokemon);
+ }
+ if (other.TimeTillHiddenMs != 0) {
+ TimeTillHiddenMs = other.TimeTillHiddenMs;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ EncounterId = input.ReadUInt64();
+ break;
+ }
+ case 16: {
+ LastModifiedMs = input.ReadInt64();
+ break;
+ }
+ case 25: {
+ Latitude = input.ReadDouble();
+ break;
+ }
+ case 33: {
+ Longitude = input.ReadDouble();
+ break;
+ }
+ case 42: {
+ SpawnPointId = input.ReadString();
+ break;
+ }
+ case 58: {
+ if (pokemon_ == null) {
+ pokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Types.PokemonProto();
+ }
+ input.ReadMessage(pokemon_);
+ break;
+ }
+ case 88: {
+ TimeTillHiddenMs = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class PokemonProto : pb::IMessage<PokemonProto> {
+ private static readonly pb::MessageParser<PokemonProto> _parser = new pb::MessageParser<PokemonProto>(() => new PokemonProto());
+ public static pb::MessageParser<PokemonProto> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Descriptor.NestedTypes[1]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public PokemonProto() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public PokemonProto(PokemonProto other) : this() {
+ id_ = other.id_;
+ pokemonId_ = other.pokemonId_;
+ cp_ = other.cp_;
+ stamina_ = other.stamina_;
+ maxStamina_ = other.maxStamina_;
+ move1_ = other.move1_;
+ move2_ = other.move2_;
+ deployedFortId_ = other.deployedFortId_;
+ ownerName_ = other.ownerName_;
+ isEgg_ = other.isEgg_;
+ eggKmWalkedTarget_ = other.eggKmWalkedTarget_;
+ eggKmWalkedStart_ = other.eggKmWalkedStart_;
+ origin_ = other.origin_;
+ heightM_ = other.heightM_;
+ weightKg_ = other.weightKg_;
+ individualAttack_ = other.individualAttack_;
+ individualDefense_ = other.individualDefense_;
+ individualStamina_ = other.individualStamina_;
+ cpMultiplier_ = other.cpMultiplier_;
+ pokeball_ = other.pokeball_;
+ capturedS2CellId_ = other.capturedS2CellId_;
+ battlesAttacked_ = other.battlesAttacked_;
+ battlesDefended_ = other.battlesDefended_;
+ eggIncubatorId_ = other.eggIncubatorId_;
+ creationTimeMs_ = other.creationTimeMs_;
+ numUpgrades_ = other.numUpgrades_;
+ additionalCpMultiplier_ = other.additionalCpMultiplier_;
+ favorite_ = other.favorite_;
+ nickname_ = other.nickname_;
+ fromFort_ = other.fromFort_;
+ }
+
+ public PokemonProto Clone() {
+ return new PokemonProto(this);
+ }
+
+ /// <summary>Field number for the "Id" field.</summary>
+ public const int IdFieldNumber = 1;
+ private ulong id_;
+ public ulong Id {
+ get { return id_; }
+ set {
+ id_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "PokemonId" field.</summary>
+ public const int PokemonIdFieldNumber = 2;
+ private int pokemonId_;
+ public int PokemonId {
+ get { return pokemonId_; }
+ set {
+ pokemonId_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Cp" field.</summary>
+ public const int CpFieldNumber = 3;
+ private int cp_;
+ public int Cp {
+ get { return cp_; }
+ set {
+ cp_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Stamina" field.</summary>
+ public const int StaminaFieldNumber = 4;
+ private int stamina_;
+ public int Stamina {
+ get { return stamina_; }
+ set {
+ stamina_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MaxStamina" field.</summary>
+ public const int MaxStaminaFieldNumber = 5;
+ private int maxStamina_;
+ public int MaxStamina {
+ get { return maxStamina_; }
+ set {
+ maxStamina_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Move1" field.</summary>
+ public const int Move1FieldNumber = 6;
+ private int move1_;
+ public int Move1 {
+ get { return move1_; }
+ set {
+ move1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Move2" field.</summary>
+ public const int Move2FieldNumber = 7;
+ private int move2_;
+ public int Move2 {
+ get { return move2_; }
+ set {
+ move2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DeployedFortId" field.</summary>
+ public const int DeployedFortIdFieldNumber = 8;
+ private string deployedFortId_ = "";
+ public string DeployedFortId {
+ get { return deployedFortId_; }
+ set {
+ deployedFortId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "OwnerName" field.</summary>
+ public const int OwnerNameFieldNumber = 9;
+ private string ownerName_ = "";
+ public string OwnerName {
+ get { return ownerName_; }
+ set {
+ ownerName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "IsEgg" field.</summary>
+ public const int IsEggFieldNumber = 10;
+ private bool isEgg_;
+ public bool IsEgg {
+ get { return isEgg_; }
+ set {
+ isEgg_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "EggKmWalkedTarget" field.</summary>
+ public const int EggKmWalkedTargetFieldNumber = 11;
+ private double eggKmWalkedTarget_;
+ public double EggKmWalkedTarget {
+ get { return eggKmWalkedTarget_; }
+ set {
+ eggKmWalkedTarget_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "EggKmWalkedStart" field.</summary>
+ public const int EggKmWalkedStartFieldNumber = 12;
+ private double eggKmWalkedStart_;
+ public double EggKmWalkedStart {
+ get { return eggKmWalkedStart_; }
+ set {
+ eggKmWalkedStart_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Origin" field.</summary>
+ public const int OriginFieldNumber = 14;
+ private int origin_;
+ public int Origin {
+ get { return origin_; }
+ set {
+ origin_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "HeightM" field.</summary>
+ public const int HeightMFieldNumber = 15;
+ private float heightM_;
+ public float HeightM {
+ get { return heightM_; }
+ set {
+ heightM_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "WeightKg" field.</summary>
+ public const int WeightKgFieldNumber = 16;
+ private float weightKg_;
+ public float WeightKg {
+ get { return weightKg_; }
+ set {
+ weightKg_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IndividualAttack" field.</summary>
+ public const int IndividualAttackFieldNumber = 17;
+ private int individualAttack_;
+ public int IndividualAttack {
+ get { return individualAttack_; }
+ set {
+ individualAttack_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IndividualDefense" field.</summary>
+ public const int IndividualDefenseFieldNumber = 18;
+ private int individualDefense_;
+ public int IndividualDefense {
+ get { return individualDefense_; }
+ set {
+ individualDefense_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IndividualStamina" field.</summary>
+ public const int IndividualStaminaFieldNumber = 19;
+ private int individualStamina_;
+ public int IndividualStamina {
+ get { return individualStamina_; }
+ set {
+ individualStamina_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "CpMultiplier" field.</summary>
+ public const int CpMultiplierFieldNumber = 20;
+ private float cpMultiplier_;
+ public float CpMultiplier {
+ get { return cpMultiplier_; }
+ set {
+ cpMultiplier_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Pokeball" field.</summary>
+ public const int PokeballFieldNumber = 21;
+ private int pokeball_;
+ public int Pokeball {
+ get { return pokeball_; }
+ set {
+ pokeball_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "CapturedS2CellId" field.</summary>
+ public const int CapturedS2CellIdFieldNumber = 22;
+ private long capturedS2CellId_;
+ public long CapturedS2CellId {
+ get { return capturedS2CellId_; }
+ set {
+ capturedS2CellId_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "BattlesAttacked" field.</summary>
+ public const int BattlesAttackedFieldNumber = 23;
+ private int battlesAttacked_;
+ public int BattlesAttacked {
+ get { return battlesAttacked_; }
+ set {
+ battlesAttacked_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "BattlesDefended" field.</summary>
+ public const int BattlesDefendedFieldNumber = 24;
+ private int battlesDefended_;
+ public int BattlesDefended {
+ get { return battlesDefended_; }
+ set {
+ battlesDefended_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "EggIncubatorId" field.</summary>
+ public const int EggIncubatorIdFieldNumber = 25;
+ private string eggIncubatorId_ = "";
+ public string EggIncubatorId {
+ get { return eggIncubatorId_; }
+ set {
+ eggIncubatorId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "CreationTimeMs" field.</summary>
+ public const int CreationTimeMsFieldNumber = 26;
+ private long creationTimeMs_;
+ public long CreationTimeMs {
+ get { return creationTimeMs_; }
+ set {
+ creationTimeMs_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "NumUpgrades" field.</summary>
+ public const int NumUpgradesFieldNumber = 27;
+ private int numUpgrades_;
+ public int NumUpgrades {
+ get { return numUpgrades_; }
+ set {
+ numUpgrades_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "AdditionalCpMultiplier" field.</summary>
+ public const int AdditionalCpMultiplierFieldNumber = 28;
+ private float additionalCpMultiplier_;
+ public float AdditionalCpMultiplier {
+ get { return additionalCpMultiplier_; }
+ set {
+ additionalCpMultiplier_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Favorite" field.</summary>
+ public const int FavoriteFieldNumber = 29;
+ private bool favorite_;
+ public bool Favorite {
+ get { return favorite_; }
+ set {
+ favorite_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Nickname" field.</summary>
+ public const int NicknameFieldNumber = 30;
+ private string nickname_ = "";
+ public string Nickname {
+ get { return nickname_; }
+ set {
+ nickname_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "FromFort" field.</summary>
+ public const int FromFortFieldNumber = 31;
+ private bool fromFort_;
+ public bool FromFort {
+ get { return fromFort_; }
+ set {
+ fromFort_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as PokemonProto);
+ }
+
+ public bool Equals(PokemonProto other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Id != other.Id) return false;
+ if (PokemonId != other.PokemonId) return false;
+ if (Cp != other.Cp) return false;
+ if (Stamina != other.Stamina) return false;
+ if (MaxStamina != other.MaxStamina) return false;
+ if (Move1 != other.Move1) return false;
+ if (Move2 != other.Move2) return false;
+ if (DeployedFortId != other.DeployedFortId) return false;
+ if (OwnerName != other.OwnerName) return false;
+ if (IsEgg != other.IsEgg) return false;
+ if (EggKmWalkedTarget != other.EggKmWalkedTarget) return false;
+ if (EggKmWalkedStart != other.EggKmWalkedStart) return false;
+ if (Origin != other.Origin) return false;
+ if (HeightM != other.HeightM) return false;
+ if (WeightKg != other.WeightKg) return false;
+ if (IndividualAttack != other.IndividualAttack) return false;
+ if (IndividualDefense != other.IndividualDefense) return false;
+ if (IndividualStamina != other.IndividualStamina) return false;
+ if (CpMultiplier != other.CpMultiplier) return false;
+ if (Pokeball != other.Pokeball) return false;
+ if (CapturedS2CellId != other.CapturedS2CellId) return false;
+ if (BattlesAttacked != other.BattlesAttacked) return false;
+ if (BattlesDefended != other.BattlesDefended) return false;
+ if (EggIncubatorId != other.EggIncubatorId) return false;
+ if (CreationTimeMs != other.CreationTimeMs) return false;
+ if (NumUpgrades != other.NumUpgrades) return false;
+ if (AdditionalCpMultiplier != other.AdditionalCpMultiplier) return false;
+ if (Favorite != other.Favorite) return false;
+ if (Nickname != other.Nickname) return false;
+ if (FromFort != other.FromFort) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Id != 0UL) hash ^= Id.GetHashCode();
+ if (PokemonId != 0) hash ^= PokemonId.GetHashCode();
+ if (Cp != 0) hash ^= Cp.GetHashCode();
+ if (Stamina != 0) hash ^= Stamina.GetHashCode();
+ if (MaxStamina != 0) hash ^= MaxStamina.GetHashCode();
+ if (Move1 != 0) hash ^= Move1.GetHashCode();
+ if (Move2 != 0) hash ^= Move2.GetHashCode();
+ if (DeployedFortId.Length != 0) hash ^= DeployedFortId.GetHashCode();
+ if (OwnerName.Length != 0) hash ^= OwnerName.GetHashCode();
+ if (IsEgg != false) hash ^= IsEgg.GetHashCode();
+ if (EggKmWalkedTarget != 0D) hash ^= EggKmWalkedTarget.GetHashCode();
+ if (EggKmWalkedStart != 0D) hash ^= EggKmWalkedStart.GetHashCode();
+ if (Origin != 0) hash ^= Origin.GetHashCode();
+ if (HeightM != 0F) hash ^= HeightM.GetHashCode();
+ if (WeightKg != 0F) hash ^= WeightKg.GetHashCode();
+ if (IndividualAttack != 0) hash ^= IndividualAttack.GetHashCode();
+ if (IndividualDefense != 0) hash ^= IndividualDefense.GetHashCode();
+ if (IndividualStamina != 0) hash ^= IndividualStamina.GetHashCode();
+ if (CpMultiplier != 0F) hash ^= CpMultiplier.GetHashCode();
+ if (Pokeball != 0) hash ^= Pokeball.GetHashCode();
+ if (CapturedS2CellId != 0L) hash ^= CapturedS2CellId.GetHashCode();
+ if (BattlesAttacked != 0) hash ^= BattlesAttacked.GetHashCode();
+ if (BattlesDefended != 0) hash ^= BattlesDefended.GetHashCode();
+ if (EggIncubatorId.Length != 0) hash ^= EggIncubatorId.GetHashCode();
+ if (CreationTimeMs != 0L) hash ^= CreationTimeMs.GetHashCode();
+ if (NumUpgrades != 0) hash ^= NumUpgrades.GetHashCode();
+ if (AdditionalCpMultiplier != 0F) hash ^= AdditionalCpMultiplier.GetHashCode();
+ if (Favorite != false) hash ^= Favorite.GetHashCode();
+ if (Nickname.Length != 0) hash ^= Nickname.GetHashCode();
+ if (FromFort != false) hash ^= FromFort.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Id != 0UL) {
+ output.WriteRawTag(8);
+ output.WriteUInt64(Id);
+ }
+ if (PokemonId != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(PokemonId);
+ }
+ if (Cp != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Cp);
+ }
+ if (Stamina != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(Stamina);
+ }
+ if (MaxStamina != 0) {
+ output.WriteRawTag(40);
+ output.WriteInt32(MaxStamina);
+ }
+ if (Move1 != 0) {
+ output.WriteRawTag(48);
+ output.WriteInt32(Move1);
+ }
+ if (Move2 != 0) {
+ output.WriteRawTag(56);
+ output.WriteInt32(Move2);
+ }
+ if (DeployedFortId.Length != 0) {
+ output.WriteRawTag(66);
+ output.WriteString(DeployedFortId);
+ }
+ if (OwnerName.Length != 0) {
+ output.WriteRawTag(74);
+ output.WriteString(OwnerName);
+ }
+ if (IsEgg != false) {
+ output.WriteRawTag(80);
+ output.WriteBool(IsEgg);
+ }
+ if (EggKmWalkedTarget != 0D) {
+ output.WriteRawTag(89);
+ output.WriteDouble(EggKmWalkedTarget);
+ }
+ if (EggKmWalkedStart != 0D) {
+ output.WriteRawTag(97);
+ output.WriteDouble(EggKmWalkedStart);
+ }
+ if (Origin != 0) {
+ output.WriteRawTag(112);
+ output.WriteInt32(Origin);
+ }
+ if (HeightM != 0F) {
+ output.WriteRawTag(125);
+ output.WriteFloat(HeightM);
+ }
+ if (WeightKg != 0F) {
+ output.WriteRawTag(133, 1);
+ output.WriteFloat(WeightKg);
+ }
+ if (IndividualAttack != 0) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(IndividualAttack);
+ }
+ if (IndividualDefense != 0) {
+ output.WriteRawTag(144, 1);
+ output.WriteInt32(IndividualDefense);
+ }
+ if (IndividualStamina != 0) {
+ output.WriteRawTag(152, 1);
+ output.WriteInt32(IndividualStamina);
+ }
+ if (CpMultiplier != 0F) {
+ output.WriteRawTag(165, 1);
+ output.WriteFloat(CpMultiplier);
+ }
+ if (Pokeball != 0) {
+ output.WriteRawTag(168, 1);
+ output.WriteInt32(Pokeball);
+ }
+ if (CapturedS2CellId != 0L) {
+ output.WriteRawTag(176, 1);
+ output.WriteInt64(CapturedS2CellId);
+ }
+ if (BattlesAttacked != 0) {
+ output.WriteRawTag(184, 1);
+ output.WriteInt32(BattlesAttacked);
+ }
+ if (BattlesDefended != 0) {
+ output.WriteRawTag(192, 1);
+ output.WriteInt32(BattlesDefended);
+ }
+ if (EggIncubatorId.Length != 0) {
+ output.WriteRawTag(202, 1);
+ output.WriteString(EggIncubatorId);
+ }
+ if (CreationTimeMs != 0L) {
+ output.WriteRawTag(208, 1);
+ output.WriteInt64(CreationTimeMs);
+ }
+ if (NumUpgrades != 0) {
+ output.WriteRawTag(216, 1);
+ output.WriteInt32(NumUpgrades);
+ }
+ if (AdditionalCpMultiplier != 0F) {
+ output.WriteRawTag(229, 1);
+ output.WriteFloat(AdditionalCpMultiplier);
+ }
+ if (Favorite != false) {
+ output.WriteRawTag(232, 1);
+ output.WriteBool(Favorite);
+ }
+ if (Nickname.Length != 0) {
+ output.WriteRawTag(242, 1);
+ output.WriteString(Nickname);
+ }
+ if (FromFort != false) {
+ output.WriteRawTag(248, 1);
+ output.WriteBool(FromFort);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Id != 0UL) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Id);
+ }
+ if (PokemonId != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(PokemonId);
+ }
+ if (Cp != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cp);
+ }
+ if (Stamina != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Stamina);
+ }
+ if (MaxStamina != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxStamina);
+ }
+ if (Move1 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Move1);
+ }
+ if (Move2 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Move2);
+ }
+ if (DeployedFortId.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(DeployedFortId);
+ }
+ if (OwnerName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(OwnerName);
+ }
+ if (IsEgg != false) {
+ size += 1 + 1;
+ }
+ if (EggKmWalkedTarget != 0D) {
+ size += 1 + 8;
+ }
+ if (EggKmWalkedStart != 0D) {
+ size += 1 + 8;
+ }
+ if (Origin != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Origin);
+ }
+ if (HeightM != 0F) {
+ size += 1 + 4;
+ }
+ if (WeightKg != 0F) {
+ size += 2 + 4;
+ }
+ if (IndividualAttack != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(IndividualAttack);
+ }
+ if (IndividualDefense != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(IndividualDefense);
+ }
+ if (IndividualStamina != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(IndividualStamina);
+ }
+ if (CpMultiplier != 0F) {
+ size += 2 + 4;
+ }
+ if (Pokeball != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Pokeball);
+ }
+ if (CapturedS2CellId != 0L) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(CapturedS2CellId);
+ }
+ if (BattlesAttacked != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(BattlesAttacked);
+ }
+ if (BattlesDefended != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(BattlesDefended);
+ }
+ if (EggIncubatorId.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(EggIncubatorId);
+ }
+ if (CreationTimeMs != 0L) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(CreationTimeMs);
+ }
+ if (NumUpgrades != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(NumUpgrades);
+ }
+ if (AdditionalCpMultiplier != 0F) {
+ size += 2 + 4;
+ }
+ if (Favorite != false) {
+ size += 2 + 1;
+ }
+ if (Nickname.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(Nickname);
+ }
+ if (FromFort != false) {
+ size += 2 + 1;
+ }
+ return size;
+ }
+
+ public void MergeFrom(PokemonProto other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Id != 0UL) {
+ Id = other.Id;
+ }
+ if (other.PokemonId != 0) {
+ PokemonId = other.PokemonId;
+ }
+ if (other.Cp != 0) {
+ Cp = other.Cp;
+ }
+ if (other.Stamina != 0) {
+ Stamina = other.Stamina;
+ }
+ if (other.MaxStamina != 0) {
+ MaxStamina = other.MaxStamina;
+ }
+ if (other.Move1 != 0) {
+ Move1 = other.Move1;
+ }
+ if (other.Move2 != 0) {
+ Move2 = other.Move2;
+ }
+ if (other.DeployedFortId.Length != 0) {
+ DeployedFortId = other.DeployedFortId;
+ }
+ if (other.OwnerName.Length != 0) {
+ OwnerName = other.OwnerName;
+ }
+ if (other.IsEgg != false) {
+ IsEgg = other.IsEgg;
+ }
+ if (other.EggKmWalkedTarget != 0D) {
+ EggKmWalkedTarget = other.EggKmWalkedTarget;
+ }
+ if (other.EggKmWalkedStart != 0D) {
+ EggKmWalkedStart = other.EggKmWalkedStart;
+ }
+ if (other.Origin != 0) {
+ Origin = other.Origin;
+ }
+ if (other.HeightM != 0F) {
+ HeightM = other.HeightM;
+ }
+ if (other.WeightKg != 0F) {
+ WeightKg = other.WeightKg;
+ }
+ if (other.IndividualAttack != 0) {
+ IndividualAttack = other.IndividualAttack;
+ }
+ if (other.IndividualDefense != 0) {
+ IndividualDefense = other.IndividualDefense;
+ }
+ if (other.IndividualStamina != 0) {
+ IndividualStamina = other.IndividualStamina;
+ }
+ if (other.CpMultiplier != 0F) {
+ CpMultiplier = other.CpMultiplier;
+ }
+ if (other.Pokeball != 0) {
+ Pokeball = other.Pokeball;
+ }
+ if (other.CapturedS2CellId != 0L) {
+ CapturedS2CellId = other.CapturedS2CellId;
+ }
+ if (other.BattlesAttacked != 0) {
+ BattlesAttacked = other.BattlesAttacked;
+ }
+ if (other.BattlesDefended != 0) {
+ BattlesDefended = other.BattlesDefended;
+ }
+ if (other.EggIncubatorId.Length != 0) {
+ EggIncubatorId = other.EggIncubatorId;
+ }
+ if (other.CreationTimeMs != 0L) {
+ CreationTimeMs = other.CreationTimeMs;
+ }
+ if (other.NumUpgrades != 0) {
+ NumUpgrades = other.NumUpgrades;
+ }
+ if (other.AdditionalCpMultiplier != 0F) {
+ AdditionalCpMultiplier = other.AdditionalCpMultiplier;
+ }
+ if (other.Favorite != false) {
+ Favorite = other.Favorite;
+ }
+ if (other.Nickname.Length != 0) {
+ Nickname = other.Nickname;
+ }
+ if (other.FromFort != false) {
+ FromFort = other.FromFort;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ Id = input.ReadUInt64();
+ break;
+ }
+ case 16: {
+ PokemonId = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ Cp = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ Stamina = input.ReadInt32();
+ break;
+ }
+ case 40: {
+ MaxStamina = input.ReadInt32();
+ break;
+ }
+ case 48: {
+ Move1 = input.ReadInt32();
+ break;
+ }
+ case 56: {
+ Move2 = input.ReadInt32();
+ break;
+ }
+ case 66: {
+ DeployedFortId = input.ReadString();
+ break;
+ }
+ case 74: {
+ OwnerName = input.ReadString();
+ break;
+ }
+ case 80: {
+ IsEgg = input.ReadBool();
+ break;
+ }
+ case 89: {
+ EggKmWalkedTarget = input.ReadDouble();
+ break;
+ }
+ case 97: {
+ EggKmWalkedStart = input.ReadDouble();
+ break;
+ }
+ case 112: {
+ Origin = input.ReadInt32();
+ break;
+ }
+ case 125: {
+ HeightM = input.ReadFloat();
+ break;
+ }
+ case 133: {
+ WeightKg = input.ReadFloat();
+ break;
+ }
+ case 136: {
+ IndividualAttack = input.ReadInt32();
+ break;
+ }
+ case 144: {
+ IndividualDefense = input.ReadInt32();
+ break;
+ }
+ case 152: {
+ IndividualStamina = input.ReadInt32();
+ break;
+ }
+ case 165: {
+ CpMultiplier = input.ReadFloat();
+ break;
+ }
+ case 168: {
+ Pokeball = input.ReadInt32();
+ break;
+ }
+ case 176: {
+ CapturedS2CellId = input.ReadInt64();
+ break;
+ }
+ case 184: {
+ BattlesAttacked = input.ReadInt32();
+ break;
+ }
+ case 192: {
+ BattlesDefended = input.ReadInt32();
+ break;
+ }
+ case 202: {
+ EggIncubatorId = input.ReadString();
+ break;
+ }
+ case 208: {
+ CreationTimeMs = input.ReadInt64();
+ break;
+ }
+ case 216: {
+ NumUpgrades = input.ReadInt32();
+ break;
+ }
+ case 229: {
+ AdditionalCpMultiplier = input.ReadFloat();
+ break;
+ }
+ case 232: {
+ Favorite = input.ReadBool();
+ break;
+ }
+ case 242: {
+ Nickname = input.ReadString();
+ break;
+ }
+ case 248: {
+ FromFort = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class CaptureProbabilityProto : pb::IMessage<CaptureProbabilityProto> {
+ private static readonly pb::MessageParser<CaptureProbabilityProto> _parser = new pb::MessageParser<CaptureProbabilityProto>(() => new CaptureProbabilityProto());
+ public static pb::MessageParser<CaptureProbabilityProto> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Payload.Types.EncounterOutProto.Descriptor.NestedTypes[2]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public CaptureProbabilityProto() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public CaptureProbabilityProto(CaptureProbabilityProto other) : this() {
+ reticleDifficultyScale_ = other.reticleDifficultyScale_;
+ }
+
+ public CaptureProbabilityProto Clone() {
+ return new CaptureProbabilityProto(this);
+ }
+
+ /// <summary>Field number for the "ReticleDifficultyScale" field.</summary>
+ public const int ReticleDifficultyScaleFieldNumber = 12;
+ private double reticleDifficultyScale_;
+ /// <summary>
+ /// unknown PokeballType = 1;
+ /// unknown CaptureProbability = 2;
+ /// </summary>
+ public double ReticleDifficultyScale {
+ get { return reticleDifficultyScale_; }
+ set {
+ reticleDifficultyScale_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as CaptureProbabilityProto);
+ }
+
+ public bool Equals(CaptureProbabilityProto other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ReticleDifficultyScale != other.ReticleDifficultyScale) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (ReticleDifficultyScale != 0D) hash ^= ReticleDifficultyScale.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (ReticleDifficultyScale != 0D) {
+ output.WriteRawTag(97);
+ output.WriteDouble(ReticleDifficultyScale);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (ReticleDifficultyScale != 0D) {
+ size += 1 + 8;
+ }
+ return size;
+ }
+
+ public void MergeFrom(CaptureProbabilityProto other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ReticleDifficultyScale != 0D) {
+ ReticleDifficultyScale = other.ReticleDifficultyScale;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 97: {
+ ReticleDifficultyScale = input.ReadDouble();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj b/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
index 2cc2931..e389d13 100644
--- a/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
+++ b/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
@@ -64,6 +64,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Enums\RequestType.cs" />
+ <Compile Include="GeneratedCode\EncounterResponse.cs" />
<Compile Include="GeneratedCode\Request.cs" />
<Compile Include="GeneratedCode\SettingsResponse.cs" />
<Compile Include="Settings.cs" />
@@ -78,6 +79,7 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
+ <None Include="Proto\EncounterResponse.proto" />
<None Include="Proto\SettingsResponse.proto" />
<None Include="Proto\Request.proto" />
</ItemGroup>
diff --git a/PokemonGo/RocketAPI/Proto/EncounterResponse.proto b/PokemonGo/RocketAPI/Proto/EncounterResponse.proto
new file mode 100644
index 0000000..0a6af1f
--- /dev/null
+++ b/PokemonGo/RocketAPI/Proto/EncounterResponse.proto
@@ -0,0 +1,91 @@
+syntax = "proto3";
+
+package PokemonGo.RocketAPI.GeneratedCode;
+
+message EncounterResponse {
+ int32 unknown1 = 1;
+ int64 unknown2 = 2;
+ string api_url = 3;
+ Unknown6 unknown6 = 6;
+ Unknown7 unknown7 = 7;
+ repeated Payload payload = 100;
+ string errorMessage = 101; //Should be moved to an error-proto file if error is always 101 field
+
+ message Unknown6 {
+ int32 unknown1 = 1;
+ Unknown2 unknown2 = 2;
+
+ message Unknown2 {
+ bytes unknown1 = 1;
+ }
+
+ }
+
+ message Unknown7 {
+ bytes unknown71 = 1;
+ int64 unknown72 = 2;
+ bytes unknown73 = 3;
+ }
+
+ message Payload {
+ repeated EncounterOutProto profile = 1;
+ int32 unknownnumber = 2;
+
+
+ message EncounterOutProto {
+ WildPokemonProto Pokemon = 1;
+ int32 Background = 2;
+ int32 Status = 3;
+ CaptureProbabilityProto CaptureProbability = 4;
+
+ message WildPokemonProto {
+ uint64 EncounterId = 1;
+ int64 LastModifiedMs = 2;
+ double Latitude = 3;
+ double Longitude = 4;
+ string SpawnPointId = 5;
+ PokemonProto Pokemon = 7;
+ int32 TimeTillHiddenMs = 11;
+
+ }
+
+ message PokemonProto {
+ uint64 Id = 1;
+ int32 PokemonId = 2;
+ int32 Cp = 3;
+ int32 Stamina = 4;
+ int32 MaxStamina = 5;
+ int32 Move1 = 6;
+ int32 Move2 = 7;
+ string DeployedFortId = 8;
+ string OwnerName = 9;
+ bool IsEgg = 10;
+ double EggKmWalkedTarget = 11;
+ double EggKmWalkedStart = 12;
+ int32 Origin = 14;
+ float HeightM = 15;
+ float WeightKg = 16;
+ int32 IndividualAttack = 17;
+ int32 IndividualDefense = 18;
+ int32 IndividualStamina = 19;
+ float CpMultiplier = 20;
+ int32 Pokeball = 21;
+ int64 CapturedS2CellId = 22;
+ int32 BattlesAttacked = 23;
+ int32 BattlesDefended = 24;
+ string EggIncubatorId = 25;
+ int64 CreationTimeMs = 26;
+ int32 NumUpgrades = 27;
+ float AdditionalCpMultiplier = 28;
+ bool Favorite = 29;
+ string Nickname = 30;
+ bool FromFort = 31;
+ }
+ message CaptureProbabilityProto {
+ //unknown PokeballType = 1;
+ //unknown CaptureProbability = 2;
+ double ReticleDifficultyScale = 12;
+ }
+ }
+ }
+ }
\ No newline at end of file
You may download the files in Public Git.