Blizzard / s2client-proto

StarCraft II Client - protocol definitions used to communicate with StarCraft II.
MIT License
3.78k stars 431 forks source link

csharp support (proto3) #35

Closed DenisJNewb closed 6 years ago

DenisJNewb commented 7 years ago

Is there any way to use proto3 (csharp langauge support)? Converter or something else?

KevinCalderone commented 7 years ago

We've tried to keep the syntax compatible with both proto2 and proto3. Do you get errors when using the proto3 compiler?

DenisJNewb commented 7 years ago

proto3 using zero based Enums; data.proto contains: enum Target { None = 1; // Does not require a target. Point = 2; // Requires a target position. Unit = 3; // Requires a unit to target. Given by position using feature layers. PointOrUnit = 4; // Requires either a target point or target unit. PointOrNone = 5; // Requires either a target point or no target. (eg. building add-ons) } Im getting compile error. Looks like if i manualy change None = 0 and etc. it will confuse system. Didnt it?

jhugard commented 7 years ago

Better to add Unknown = 0;

KevinCalderone commented 7 years ago

I would be fine with adding an Unknown entry to our enums for compatibility. Are there any other proto3 errors?