-
Notifications
You must be signed in to change notification settings - Fork 7
/
Shared.cs
416 lines (379 loc) · 14.9 KB
/
Shared.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: shared.proto
// </auto-generated>
#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 Items.Protobuf.Shared {
/// <summary>Holder for reflection information generated from shared.proto</summary>
public static partial class SharedReflection {
#region Descriptor
/// <summary>File descriptor for shared.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static SharedReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CgxzaGFyZWQucHJvdG8SHGNsaWVudGVkaXRvci5wcm90b2J1Zi5zaGFyZWQi",
"LQoKQ29vcmRpbmF0ZRIJCgF4GAEgASgNEgkKAXkYAiABKA0SCQoBehgDIAEo",
"DSqUAQoNUExBWUVSX0FDVElPThIWChJQTEFZRVJfQUNUSU9OX05PTkUQABIW",
"ChJQTEFZRVJfQUNUSU9OX0xPT0sQARIVChFQTEFZRVJfQUNUSU9OX1VTRRAC",
"EhYKElBMQVlFUl9BQ1RJT05fT1BFThADEiQKIFBMQVlFUl9BQ1RJT05fQVVU",
"T1dBTEtfSElHSExJR0hUEAQqtQUKDUlURU1fQ0FURUdPUlkSGAoUSVRFTV9D",
"QVRFR09SWV9BUk1PUlMQARIZChVJVEVNX0NBVEVHT1JZX0FNVUxFVFMQAhIX",
"ChNJVEVNX0NBVEVHT1JZX0JPT1RTEAMSHAoYSVRFTV9DQVRFR09SWV9DT05U",
"QUlORVJTEAQSHAoYSVRFTV9DQVRFR09SWV9ERUNPUkFUSU9OEAUSFgoSSVRF",
"TV9DQVRFR09SWV9GT09EEAYSHgoaSVRFTV9DQVRFR09SWV9IRUxNRVRTX0hB",
"VFMQBxIWChJJVEVNX0NBVEVHT1JZX0xFR1MQCBIYChRJVEVNX0NBVEVHT1JZ",
"X09USEVSUxAJEhkKFUlURU1fQ0FURUdPUllfUE9USU9OUxAKEhcKE0lURU1f",
"Q0FURUdPUllfUklOR1MQCxIXChNJVEVNX0NBVEVHT1JZX1JVTkVTEAwSGQoV",
"SVRFTV9DQVRFR09SWV9TSElFTERTEA0SFwoTSVRFTV9DQVRFR09SWV9UT09M",
"UxAOEhsKF0lURU1fQ0FURUdPUllfVkFMVUFCTEVTEA8SHAoYSVRFTV9DQVRF",
"R09SWV9BTU1VTklUSU9OEBASFgoSSVRFTV9DQVRFR09SWV9BWEVTEBESFwoT",
"SVRFTV9DQVRFR09SWV9DTFVCUxASEiIKHklURU1fQ0FURUdPUllfRElTVEFO",
"Q0VfV0VBUE9OUxATEhgKFElURU1fQ0FURUdPUllfU1dPUkRTEBQSHAoYSVRF",
"TV9DQVRFR09SWV9XQU5EU19ST0RTEBUSIQodSVRFTV9DQVRFR09SWV9QUkVN",
"SVVNX1NDUk9MTFMQFhIfChtJVEVNX0NBVEVHT1JZX1NQRUNJQUxfQ09JTlMQ",
"FxIjCh9JVEVNX0NBVEVHT1JZX0NSRUFUVVJFX1BST0RVQ1RTEBgq7QEKEVBM",
"QVlFUl9QUk9GRVNTSU9OEiIKFVBMQVlFUl9QUk9GRVNTSU9OX0FOWRD/////",
"//////8BEhoKFlBMQVlFUl9QUk9GRVNTSU9OX05PTkUQABIcChhQTEFZRVJf",
"UFJPRkVTU0lPTl9LTklHSFQQARIdChlQTEFZRVJfUFJPRkVTU0lPTl9QQUxB",
"RElOEAISHgoaUExBWUVSX1BST0ZFU1NJT05fU09SQ0VSRVIQAxIbChdQTEFZ",
"RVJfUFJPRkVTU0lPTl9EUlVJRBAEEh4KGlBMQVlFUl9QUk9GRVNTSU9OX1BS",
"T01PVEVEEAoqgwEKE0FOSU1BVElPTl9MT09QX1RZUEUSKQocQU5JTUFUSU9O",
"X0xPT1BfVFlQRV9QSU5HUE9ORxD///////////8BEiAKHEFOSU1BVElPTl9M",
"T09QX1RZUEVfSU5GSU5JVEUQABIfChtBTklNQVRJT05fTE9PUF9UWVBFX0NP",
"VU5URUQQASo0CglIT09LX1RZUEUSEwoPSE9PS19UWVBFX1NPVVRIEAESEgoO",
"SE9PS19UWVBFX0VBU1QQAg=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Items.Protobuf.Shared.PLAYER_ACTION), typeof(global::Items.Protobuf.Shared.ITEM_CATEGORY), typeof(global::Items.Protobuf.Shared.PLAYER_PROFESSION), typeof(global::Items.Protobuf.Shared.ANIMATION_LOOP_TYPE), typeof(global::Items.Protobuf.Shared.HOOK_TYPE), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Items.Protobuf.Shared.Coordinate), global::Items.Protobuf.Shared.Coordinate.Parser, new[]{ "X", "Y", "Z" }, null, null, null, null)
}));
}
#endregion
}
#region Enums
public enum PLAYER_ACTION {
[pbr::OriginalName("PLAYER_ACTION_NONE")] None = 0,
[pbr::OriginalName("PLAYER_ACTION_LOOK")] Look = 1,
[pbr::OriginalName("PLAYER_ACTION_USE")] Use = 2,
[pbr::OriginalName("PLAYER_ACTION_OPEN")] Open = 3,
[pbr::OriginalName("PLAYER_ACTION_AUTOWALK_HIGHLIGHT")] AutowalkHighlight = 4,
}
public enum ITEM_CATEGORY {
[pbr::OriginalName("ITEM_CATEGORY_ARMORS")] Armors = 1,
[pbr::OriginalName("ITEM_CATEGORY_AMULETS")] Amulets = 2,
[pbr::OriginalName("ITEM_CATEGORY_BOOTS")] Boots = 3,
[pbr::OriginalName("ITEM_CATEGORY_CONTAINERS")] Containers = 4,
[pbr::OriginalName("ITEM_CATEGORY_DECORATION")] Decoration = 5,
[pbr::OriginalName("ITEM_CATEGORY_FOOD")] Food = 6,
[pbr::OriginalName("ITEM_CATEGORY_HELMETS_HATS")] HelmetsHats = 7,
[pbr::OriginalName("ITEM_CATEGORY_LEGS")] Legs = 8,
[pbr::OriginalName("ITEM_CATEGORY_OTHERS")] Others = 9,
[pbr::OriginalName("ITEM_CATEGORY_POTIONS")] Potions = 10,
[pbr::OriginalName("ITEM_CATEGORY_RINGS")] Rings = 11,
[pbr::OriginalName("ITEM_CATEGORY_RUNES")] Runes = 12,
[pbr::OriginalName("ITEM_CATEGORY_SHIELDS")] Shields = 13,
[pbr::OriginalName("ITEM_CATEGORY_TOOLS")] Tools = 14,
[pbr::OriginalName("ITEM_CATEGORY_VALUABLES")] Valuables = 15,
[pbr::OriginalName("ITEM_CATEGORY_AMMUNITION")] Ammunition = 16,
[pbr::OriginalName("ITEM_CATEGORY_AXES")] Axes = 17,
[pbr::OriginalName("ITEM_CATEGORY_CLUBS")] Clubs = 18,
[pbr::OriginalName("ITEM_CATEGORY_DISTANCE_WEAPONS")] DistanceWeapons = 19,
[pbr::OriginalName("ITEM_CATEGORY_SWORDS")] Swords = 20,
[pbr::OriginalName("ITEM_CATEGORY_WANDS_RODS")] WandsRods = 21,
[pbr::OriginalName("ITEM_CATEGORY_PREMIUM_SCROLLS")] PremiumScrolls = 22,
[pbr::OriginalName("ITEM_CATEGORY_SPECIAL_COINS")] SpecialCoins = 23,
[pbr::OriginalName("ITEM_CATEGORY_CREATURE_PRODUCTS")] CreatureProducts = 24,
}
public enum PLAYER_PROFESSION {
[pbr::OriginalName("PLAYER_PROFESSION_ANY")] Any = -1,
[pbr::OriginalName("PLAYER_PROFESSION_NONE")] None = 0,
[pbr::OriginalName("PLAYER_PROFESSION_KNIGHT")] Knight = 1,
[pbr::OriginalName("PLAYER_PROFESSION_PALADIN")] Paladin = 2,
[pbr::OriginalName("PLAYER_PROFESSION_SORCERER")] Sorcerer = 3,
[pbr::OriginalName("PLAYER_PROFESSION_DRUID")] Druid = 4,
[pbr::OriginalName("PLAYER_PROFESSION_PROMOTED")] Promoted = 10,
}
public enum ANIMATION_LOOP_TYPE {
[pbr::OriginalName("ANIMATION_LOOP_TYPE_PINGPONG")] Pingpong = -1,
[pbr::OriginalName("ANIMATION_LOOP_TYPE_INFINITE")] Infinite = 0,
[pbr::OriginalName("ANIMATION_LOOP_TYPE_COUNTED")] Counted = 1,
}
public enum HOOK_TYPE {
[pbr::OriginalName("HOOK_TYPE_SOUTH")] South = 1,
[pbr::OriginalName("HOOK_TYPE_EAST")] East = 2,
}
#endregion
#region Messages
public sealed partial class Coordinate : pb::IMessage<Coordinate>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Coordinate> _parser = new pb::MessageParser<Coordinate>(() => new Coordinate());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Coordinate> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Items.Protobuf.Shared.SharedReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Coordinate() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Coordinate(Coordinate other) : this() {
_hasBits0 = other._hasBits0;
x_ = other.x_;
y_ = other.y_;
z_ = other.z_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Coordinate Clone() {
return new Coordinate(this);
}
/// <summary>Field number for the "x" field.</summary>
public const int XFieldNumber = 1;
private readonly static uint XDefaultValue = 0;
private uint x_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint X {
get { if ((_hasBits0 & 1) != 0) { return x_; } else { return XDefaultValue; } }
set {
_hasBits0 |= 1;
x_ = value;
}
}
/// <summary>Gets whether the "x" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool HasX {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "x" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearX() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "y" field.</summary>
public const int YFieldNumber = 2;
private readonly static uint YDefaultValue = 0;
private uint y_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint Y {
get { if ((_hasBits0 & 2) != 0) { return y_; } else { return YDefaultValue; } }
set {
_hasBits0 |= 2;
y_ = value;
}
}
/// <summary>Gets whether the "y" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool HasY {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "y" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearY() {
_hasBits0 &= ~2;
}
/// <summary>Field number for the "z" field.</summary>
public const int ZFieldNumber = 3;
private readonly static uint ZDefaultValue = 0;
private uint z_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint Z {
get { if ((_hasBits0 & 4) != 0) { return z_; } else { return ZDefaultValue; } }
set {
_hasBits0 |= 4;
z_ = value;
}
}
/// <summary>Gets whether the "z" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool HasZ {
get { return (_hasBits0 & 4) != 0; }
}
/// <summary>Clears the value of the "z" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearZ() {
_hasBits0 &= ~4;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Coordinate);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Coordinate other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (X != other.X) return false;
if (Y != other.Y) return false;
if (Z != other.Z) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (HasX) hash ^= X.GetHashCode();
if (HasY) hash ^= Y.GetHashCode();
if (HasZ) hash ^= Z.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasX) {
output.WriteRawTag(8);
output.WriteUInt32(X);
}
if (HasY) {
output.WriteRawTag(16);
output.WriteUInt32(Y);
}
if (HasZ) {
output.WriteRawTag(24);
output.WriteUInt32(Z);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasX) {
output.WriteRawTag(8);
output.WriteUInt32(X);
}
if (HasY) {
output.WriteRawTag(16);
output.WriteUInt32(Y);
}
if (HasZ) {
output.WriteRawTag(24);
output.WriteUInt32(Z);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (HasX) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(X);
}
if (HasY) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Y);
}
if (HasZ) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Z);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Coordinate other) {
if (other == null) {
return;
}
if (other.HasX) {
X = other.X;
}
if (other.HasY) {
Y = other.Y;
}
if (other.HasZ) {
Z = other.Z;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
X = input.ReadUInt32();
break;
}
case 16: {
Y = input.ReadUInt32();
break;
}
case 24: {
Z = input.ReadUInt32();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
X = input.ReadUInt32();
break;
}
case 16: {
Y = input.ReadUInt32();
break;
}
case 24: {
Z = input.ReadUInt32();
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code