You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Message2Server.pb.cc 93 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: Message2Server.proto
  3. #include "Message2Server.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/io/coded_stream.h>
  6. #include <google/protobuf/extension_set.h>
  7. #include <google/protobuf/wire_format_lite.h>
  8. #include <google/protobuf/descriptor.h>
  9. #include <google/protobuf/generated_message_reflection.h>
  10. #include <google/protobuf/reflection_ops.h>
  11. #include <google/protobuf/wire_format.h>
  12. // @@protoc_insertion_point(includes)
  13. #include <google/protobuf/port_def.inc>
  14. PROTOBUF_PRAGMA_INIT_SEG
  15. namespace _pb = ::PROTOBUF_NAMESPACE_ID;
  16. namespace _pbi = _pb::internal;
  17. namespace protobuf
  18. {
  19. PROTOBUF_CONSTEXPR PlayerMsg::PlayerMsg(
  20. ::_pbi::ConstantInitialized
  21. ) :
  22. _impl_{
  23. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.job_type_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}}
  24. {
  25. }
  26. struct PlayerMsgDefaultTypeInternal
  27. {
  28. PROTOBUF_CONSTEXPR PlayerMsgDefaultTypeInternal() :
  29. _instance(::_pbi::ConstantInitialized{})
  30. {
  31. }
  32. ~PlayerMsgDefaultTypeInternal()
  33. {
  34. }
  35. union
  36. {
  37. PlayerMsg _instance;
  38. };
  39. };
  40. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlayerMsgDefaultTypeInternal _PlayerMsg_default_instance_;
  41. PROTOBUF_CONSTEXPR MoveMsg::MoveMsg(
  42. ::_pbi::ConstantInitialized
  43. ) :
  44. _impl_{
  45. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_.time_in_milliseconds_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  46. {
  47. }
  48. struct MoveMsgDefaultTypeInternal
  49. {
  50. PROTOBUF_CONSTEXPR MoveMsgDefaultTypeInternal() :
  51. _instance(::_pbi::ConstantInitialized{})
  52. {
  53. }
  54. ~MoveMsgDefaultTypeInternal()
  55. {
  56. }
  57. union
  58. {
  59. MoveMsg _instance;
  60. };
  61. };
  62. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MoveMsgDefaultTypeInternal _MoveMsg_default_instance_;
  63. PROTOBUF_CONSTEXPR PropMsg::PropMsg(
  64. ::_pbi::ConstantInitialized
  65. ) :
  66. _impl_{
  67. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.prop_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  68. {
  69. }
  70. struct PropMsgDefaultTypeInternal
  71. {
  72. PROTOBUF_CONSTEXPR PropMsgDefaultTypeInternal() :
  73. _instance(::_pbi::ConstantInitialized{})
  74. {
  75. }
  76. ~PropMsgDefaultTypeInternal()
  77. {
  78. }
  79. union
  80. {
  81. PropMsg _instance;
  82. };
  83. };
  84. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PropMsgDefaultTypeInternal _PropMsg_default_instance_;
  85. PROTOBUF_CONSTEXPR SendMsg::SendMsg(
  86. ::_pbi::ConstantInitialized
  87. ) :
  88. _impl_{
  89. /*decltype(_impl_.message_)*/ {&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.to_player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.to_player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  90. {
  91. }
  92. struct SendMsgDefaultTypeInternal
  93. {
  94. PROTOBUF_CONSTEXPR SendMsgDefaultTypeInternal() :
  95. _instance(::_pbi::ConstantInitialized{})
  96. {
  97. }
  98. ~SendMsgDefaultTypeInternal()
  99. {
  100. }
  101. union
  102. {
  103. SendMsg _instance;
  104. };
  105. };
  106. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SendMsgDefaultTypeInternal _SendMsg_default_instance_;
  107. PROTOBUF_CONSTEXPR AttackMsg::AttackMsg(
  108. ::_pbi::ConstantInitialized
  109. ) :
  110. _impl_{
  111. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  112. {
  113. }
  114. struct AttackMsgDefaultTypeInternal
  115. {
  116. PROTOBUF_CONSTEXPR AttackMsgDefaultTypeInternal() :
  117. _instance(::_pbi::ConstantInitialized{})
  118. {
  119. }
  120. ~AttackMsgDefaultTypeInternal()
  121. {
  122. }
  123. union
  124. {
  125. AttackMsg _instance;
  126. };
  127. };
  128. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AttackMsgDefaultTypeInternal _AttackMsg_default_instance_;
  129. PROTOBUF_CONSTEXPR IDMsg::IDMsg(
  130. ::_pbi::ConstantInitialized
  131. ) :
  132. _impl_{
  133. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  134. {
  135. }
  136. struct IDMsgDefaultTypeInternal
  137. {
  138. PROTOBUF_CONSTEXPR IDMsgDefaultTypeInternal() :
  139. _instance(::_pbi::ConstantInitialized{})
  140. {
  141. }
  142. ~IDMsgDefaultTypeInternal()
  143. {
  144. }
  145. union
  146. {
  147. IDMsg _instance;
  148. };
  149. };
  150. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IDMsgDefaultTypeInternal _IDMsg_default_instance_;
  151. PROTOBUF_CONSTEXPR SkillMsg::SkillMsg(
  152. ::_pbi::ConstantInitialized
  153. ) :
  154. _impl_{
  155. /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.skill_id_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}}
  156. {
  157. }
  158. struct SkillMsgDefaultTypeInternal
  159. {
  160. PROTOBUF_CONSTEXPR SkillMsgDefaultTypeInternal() :
  161. _instance(::_pbi::ConstantInitialized{})
  162. {
  163. }
  164. ~SkillMsgDefaultTypeInternal()
  165. {
  166. }
  167. union
  168. {
  169. SkillMsg _instance;
  170. };
  171. };
  172. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SkillMsgDefaultTypeInternal _SkillMsg_default_instance_;
  173. } // namespace protobuf
  174. static ::_pb::Metadata file_level_metadata_Message2Server_2eproto[7];
  175. static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Message2Server_2eproto = nullptr;
  176. static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Message2Server_2eproto = nullptr;
  177. const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  178. ~0u, // no _has_bits_
  179. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _internal_metadata_),
  180. ~0u, // no _extensions_
  181. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_._oneof_case_[0]),
  182. ~0u, // no _weak_field_map_
  183. ~0u, // no _inlined_string_donated_
  184. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_id_),
  185. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_type_),
  186. ::_pbi::kInvalidFieldOffsetTag,
  187. ::_pbi::kInvalidFieldOffsetTag,
  188. PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.job_type_),
  189. ~0u, // no _has_bits_
  190. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _internal_metadata_),
  191. ~0u, // no _extensions_
  192. ~0u, // no _oneof_case_
  193. ~0u, // no _weak_field_map_
  194. ~0u, // no _inlined_string_donated_
  195. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.player_id_),
  196. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.player_type_),
  197. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.angle_),
  198. PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.time_in_milliseconds_),
  199. ~0u, // no _has_bits_
  200. PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _internal_metadata_),
  201. ~0u, // no _extensions_
  202. ~0u, // no _oneof_case_
  203. ~0u, // no _weak_field_map_
  204. ~0u, // no _inlined_string_donated_
  205. PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _impl_.player_id_),
  206. PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _impl_.player_type_),
  207. PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _impl_.prop_type_),
  208. ~0u, // no _has_bits_
  209. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _internal_metadata_),
  210. ~0u, // no _extensions_
  211. ~0u, // no _oneof_case_
  212. ~0u, // no _weak_field_map_
  213. ~0u, // no _inlined_string_donated_
  214. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.player_id_),
  215. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.player_type_),
  216. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.to_player_id_),
  217. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.to_player_type_),
  218. PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.message_),
  219. ~0u, // no _has_bits_
  220. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _internal_metadata_),
  221. ~0u, // no _extensions_
  222. ~0u, // no _oneof_case_
  223. ~0u, // no _weak_field_map_
  224. ~0u, // no _inlined_string_donated_
  225. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.player_id_),
  226. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.player_type_),
  227. PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.angle_),
  228. ~0u, // no _has_bits_
  229. PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _internal_metadata_),
  230. ~0u, // no _extensions_
  231. ~0u, // no _oneof_case_
  232. ~0u, // no _weak_field_map_
  233. ~0u, // no _inlined_string_donated_
  234. PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _impl_.player_id_),
  235. PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _impl_.player_type_),
  236. ~0u, // no _has_bits_
  237. PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _internal_metadata_),
  238. ~0u, // no _extensions_
  239. ~0u, // no _oneof_case_
  240. ~0u, // no _weak_field_map_
  241. ~0u, // no _inlined_string_donated_
  242. PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _impl_.player_id_),
  243. PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _impl_.player_type_),
  244. PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _impl_.skill_id_),
  245. };
  246. static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  247. {0, -1, -1, sizeof(::protobuf::PlayerMsg)},
  248. {11, -1, -1, sizeof(::protobuf::MoveMsg)},
  249. {21, -1, -1, sizeof(::protobuf::PropMsg)},
  250. {30, -1, -1, sizeof(::protobuf::SendMsg)},
  251. {41, -1, -1, sizeof(::protobuf::AttackMsg)},
  252. {50, -1, -1, sizeof(::protobuf::IDMsg)},
  253. {58, -1, -1, sizeof(::protobuf::SkillMsg)},
  254. };
  255. static const ::_pb::Message* const file_default_instances[] = {
  256. &::protobuf::_PlayerMsg_default_instance_._instance,
  257. &::protobuf::_MoveMsg_default_instance_._instance,
  258. &::protobuf::_PropMsg_default_instance_._instance,
  259. &::protobuf::_SendMsg_default_instance_._instance,
  260. &::protobuf::_AttackMsg_default_instance_._instance,
  261. &::protobuf::_IDMsg_default_instance_._instance,
  262. &::protobuf::_SkillMsg_default_instance_._instance,
  263. };
  264. const char descriptor_table_protodef_Message2Server_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  265. "\n\024Message2Server.proto\022\010protobuf\032\021Messag"
  266. "eType.proto\"\263\001\n\tPlayerMsg\022\021\n\tplayer_id\030\001"
  267. " \001(\003\022)\n\013player_type\030\002 \001(\0162\024.protobuf.Pla"
  268. "yerType\022-\n\014student_type\030\003 \001(\0162\025.protobuf"
  269. ".StudentTypeH\000\022-\n\014tricker_type\030\004 \001(\0162\025.p"
  270. "rotobuf.TrickerTypeH\000B\n\n\010job_type\"t\n\007Mov"
  271. "eMsg\022\021\n\tplayer_id\030\001 \001(\003\022)\n\013player_type\030\002"
  272. " \001(\0162\024.protobuf.PlayerType\022\r\n\005angle\030\003 \001("
  273. "\001\022\034\n\024time_in_milliseconds\030\004 \001(\003\"n\n\007PropM"
  274. "sg\022\021\n\tplayer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001"
  275. "(\0162\024.protobuf.PlayerType\022%\n\tprop_type\030\003 "
  276. "\001(\0162\022.protobuf.PropType\"\234\001\n\007SendMsg\022\021\n\tp"
  277. "layer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(\0162\024.pr"
  278. "otobuf.PlayerType\022\024\n\014to_player_id\030\003 \001(\003\022"
  279. ",\n\016to_player_type\030\004 \001(\0162\024.protobuf.Playe"
  280. "rType\022\017\n\007message\030\005 \001(\t\"X\n\tAttackMsg\022\021\n\tp"
  281. "layer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(\0162\024.pr"
  282. "otobuf.PlayerType\022\r\n\005angle\030\003 \001(\001\"E\n\005IDMs"
  283. "g\022\021\n\tplayer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001("
  284. "\0162\024.protobuf.PlayerType\"Z\n\010SkillMsg\022\021\n\tp"
  285. "layer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(\0162\024.pr"
  286. "otobuf.PlayerType\022\020\n\010skill_id\030\003 \001(\005b\006pro"
  287. "to3";
  288. static const ::_pbi::DescriptorTable* const descriptor_table_Message2Server_2eproto_deps[1] = {
  289. &::descriptor_table_MessageType_2eproto,
  290. };
  291. static ::_pbi::once_flag descriptor_table_Message2Server_2eproto_once;
  292. const ::_pbi::DescriptorTable descriptor_table_Message2Server_2eproto = {
  293. false,
  294. false,
  295. 883,
  296. descriptor_table_protodef_Message2Server_2eproto,
  297. "Message2Server.proto",
  298. &descriptor_table_Message2Server_2eproto_once,
  299. descriptor_table_Message2Server_2eproto_deps,
  300. 1,
  301. 7,
  302. schemas,
  303. file_default_instances,
  304. TableStruct_Message2Server_2eproto::offsets,
  305. file_level_metadata_Message2Server_2eproto,
  306. file_level_enum_descriptors_Message2Server_2eproto,
  307. file_level_service_descriptors_Message2Server_2eproto,
  308. };
  309. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_Message2Server_2eproto_getter()
  310. {
  311. return &descriptor_table_Message2Server_2eproto;
  312. }
  313. // Force running AddDescriptors() at dynamic initialization time.
  314. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_Message2Server_2eproto(&descriptor_table_Message2Server_2eproto);
  315. namespace protobuf
  316. {
  317. // ===================================================================
  318. class PlayerMsg::_Internal
  319. {
  320. public:
  321. };
  322. PlayerMsg::PlayerMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  323. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  324. {
  325. SharedCtor(arena, is_message_owned);
  326. // @@protoc_insertion_point(arena_constructor:protobuf.PlayerMsg)
  327. }
  328. PlayerMsg::PlayerMsg(const PlayerMsg& from) :
  329. ::PROTOBUF_NAMESPACE_ID::Message()
  330. {
  331. PlayerMsg* const _this = this;
  332. (void)_this;
  333. new (&_impl_) Impl_{
  334. decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.job_type_){}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}};
  335. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  336. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  337. clear_has_job_type();
  338. switch (from.job_type_case())
  339. {
  340. case kStudentType:
  341. {
  342. _this->_internal_set_student_type(from._internal_student_type());
  343. break;
  344. }
  345. case kTrickerType:
  346. {
  347. _this->_internal_set_tricker_type(from._internal_tricker_type());
  348. break;
  349. }
  350. case JOB_TYPE_NOT_SET:
  351. {
  352. break;
  353. }
  354. }
  355. // @@protoc_insertion_point(copy_constructor:protobuf.PlayerMsg)
  356. }
  357. inline void PlayerMsg::SharedCtor(
  358. ::_pb::Arena* arena, bool is_message_owned
  359. )
  360. {
  361. (void)arena;
  362. (void)is_message_owned;
  363. new (&_impl_) Impl_{
  364. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.job_type_){}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}};
  365. clear_has_job_type();
  366. }
  367. PlayerMsg::~PlayerMsg()
  368. {
  369. // @@protoc_insertion_point(destructor:protobuf.PlayerMsg)
  370. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  371. {
  372. (void)arena;
  373. return;
  374. }
  375. SharedDtor();
  376. }
  377. inline void PlayerMsg::SharedDtor()
  378. {
  379. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  380. if (has_job_type())
  381. {
  382. clear_job_type();
  383. }
  384. }
  385. void PlayerMsg::SetCachedSize(int size) const
  386. {
  387. _impl_._cached_size_.Set(size);
  388. }
  389. void PlayerMsg::clear_job_type()
  390. {
  391. // @@protoc_insertion_point(one_of_clear_start:protobuf.PlayerMsg)
  392. switch (job_type_case())
  393. {
  394. case kStudentType:
  395. {
  396. // No need to clear
  397. break;
  398. }
  399. case kTrickerType:
  400. {
  401. // No need to clear
  402. break;
  403. }
  404. case JOB_TYPE_NOT_SET:
  405. {
  406. break;
  407. }
  408. }
  409. _impl_._oneof_case_[0] = JOB_TYPE_NOT_SET;
  410. }
  411. void PlayerMsg::Clear()
  412. {
  413. // @@protoc_insertion_point(message_clear_start:protobuf.PlayerMsg)
  414. uint32_t cached_has_bits = 0;
  415. // Prevent compiler warnings about cached_has_bits being unused
  416. (void)cached_has_bits;
  417. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  418. clear_job_type();
  419. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  420. }
  421. const char* PlayerMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  422. {
  423. #define CHK_(x) \
  424. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  425. goto failure
  426. while (!ctx->Done(&ptr))
  427. {
  428. uint32_t tag;
  429. ptr = ::_pbi::ReadTag(ptr, &tag);
  430. switch (tag >> 3)
  431. {
  432. // int64 player_id = 1;
  433. case 1:
  434. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  435. {
  436. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  437. CHK_(ptr);
  438. }
  439. else
  440. goto handle_unusual;
  441. continue;
  442. // .protobuf.PlayerType player_type = 2;
  443. case 2:
  444. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  445. {
  446. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  447. CHK_(ptr);
  448. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  449. }
  450. else
  451. goto handle_unusual;
  452. continue;
  453. // .protobuf.StudentType student_type = 3;
  454. case 3:
  455. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
  456. {
  457. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  458. CHK_(ptr);
  459. _internal_set_student_type(static_cast<::protobuf::StudentType>(val));
  460. }
  461. else
  462. goto handle_unusual;
  463. continue;
  464. // .protobuf.TrickerType tricker_type = 4;
  465. case 4:
  466. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32))
  467. {
  468. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  469. CHK_(ptr);
  470. _internal_set_tricker_type(static_cast<::protobuf::TrickerType>(val));
  471. }
  472. else
  473. goto handle_unusual;
  474. continue;
  475. default:
  476. goto handle_unusual;
  477. } // switch
  478. handle_unusual:
  479. if ((tag == 0) || ((tag & 7) == 4))
  480. {
  481. CHK_(ptr);
  482. ctx->SetLastTag(tag);
  483. goto message_done;
  484. }
  485. ptr = UnknownFieldParse(
  486. tag,
  487. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  488. ptr,
  489. ctx
  490. );
  491. CHK_(ptr != nullptr);
  492. } // while
  493. message_done:
  494. return ptr;
  495. failure:
  496. ptr = nullptr;
  497. goto message_done;
  498. #undef CHK_
  499. }
  500. uint8_t* PlayerMsg::_InternalSerialize(
  501. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  502. ) const
  503. {
  504. // @@protoc_insertion_point(serialize_to_array_start:protobuf.PlayerMsg)
  505. uint32_t cached_has_bits = 0;
  506. (void)cached_has_bits;
  507. // int64 player_id = 1;
  508. if (this->_internal_player_id() != 0)
  509. {
  510. target = stream->EnsureSpace(target);
  511. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  512. }
  513. // .protobuf.PlayerType player_type = 2;
  514. if (this->_internal_player_type() != 0)
  515. {
  516. target = stream->EnsureSpace(target);
  517. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  518. 2, this->_internal_player_type(), target
  519. );
  520. }
  521. // .protobuf.StudentType student_type = 3;
  522. if (_internal_has_student_type())
  523. {
  524. target = stream->EnsureSpace(target);
  525. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  526. 3, this->_internal_student_type(), target
  527. );
  528. }
  529. // .protobuf.TrickerType tricker_type = 4;
  530. if (_internal_has_tricker_type())
  531. {
  532. target = stream->EnsureSpace(target);
  533. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  534. 4, this->_internal_tricker_type(), target
  535. );
  536. }
  537. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  538. {
  539. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  540. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  541. );
  542. }
  543. // @@protoc_insertion_point(serialize_to_array_end:protobuf.PlayerMsg)
  544. return target;
  545. }
  546. size_t PlayerMsg::ByteSizeLong() const
  547. {
  548. // @@protoc_insertion_point(message_byte_size_start:protobuf.PlayerMsg)
  549. size_t total_size = 0;
  550. uint32_t cached_has_bits = 0;
  551. // Prevent compiler warnings about cached_has_bits being unused
  552. (void)cached_has_bits;
  553. // int64 player_id = 1;
  554. if (this->_internal_player_id() != 0)
  555. {
  556. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  557. }
  558. // .protobuf.PlayerType player_type = 2;
  559. if (this->_internal_player_type() != 0)
  560. {
  561. total_size += 1 +
  562. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  563. }
  564. switch (job_type_case())
  565. {
  566. // .protobuf.StudentType student_type = 3;
  567. case kStudentType:
  568. {
  569. total_size += 1 +
  570. ::_pbi::WireFormatLite::EnumSize(this->_internal_student_type());
  571. break;
  572. }
  573. // .protobuf.TrickerType tricker_type = 4;
  574. case kTrickerType:
  575. {
  576. total_size += 1 +
  577. ::_pbi::WireFormatLite::EnumSize(this->_internal_tricker_type());
  578. break;
  579. }
  580. case JOB_TYPE_NOT_SET:
  581. {
  582. break;
  583. }
  584. }
  585. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  586. }
  587. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PlayerMsg::_class_data_ = {
  588. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  589. PlayerMsg::MergeImpl};
  590. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PlayerMsg::GetClassData() const
  591. {
  592. return &_class_data_;
  593. }
  594. void PlayerMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  595. {
  596. auto* const _this = static_cast<PlayerMsg*>(&to_msg);
  597. auto& from = static_cast<const PlayerMsg&>(from_msg);
  598. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PlayerMsg)
  599. GOOGLE_DCHECK_NE(&from, _this);
  600. uint32_t cached_has_bits = 0;
  601. (void)cached_has_bits;
  602. if (from._internal_player_id() != 0)
  603. {
  604. _this->_internal_set_player_id(from._internal_player_id());
  605. }
  606. if (from._internal_player_type() != 0)
  607. {
  608. _this->_internal_set_player_type(from._internal_player_type());
  609. }
  610. switch (from.job_type_case())
  611. {
  612. case kStudentType:
  613. {
  614. _this->_internal_set_student_type(from._internal_student_type());
  615. break;
  616. }
  617. case kTrickerType:
  618. {
  619. _this->_internal_set_tricker_type(from._internal_tricker_type());
  620. break;
  621. }
  622. case JOB_TYPE_NOT_SET:
  623. {
  624. break;
  625. }
  626. }
  627. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  628. }
  629. void PlayerMsg::CopyFrom(const PlayerMsg& from)
  630. {
  631. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PlayerMsg)
  632. if (&from == this)
  633. return;
  634. Clear();
  635. MergeFrom(from);
  636. }
  637. bool PlayerMsg::IsInitialized() const
  638. {
  639. return true;
  640. }
  641. void PlayerMsg::InternalSwap(PlayerMsg* other)
  642. {
  643. using std::swap;
  644. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  645. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  646. PROTOBUF_FIELD_OFFSET(PlayerMsg, _impl_.player_type_) + sizeof(PlayerMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(PlayerMsg, _impl_.player_id_)>(
  647. reinterpret_cast<char*>(&_impl_.player_id_),
  648. reinterpret_cast<char*>(&other->_impl_.player_id_)
  649. );
  650. swap(_impl_.job_type_, other->_impl_.job_type_);
  651. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  652. }
  653. ::PROTOBUF_NAMESPACE_ID::Metadata PlayerMsg::GetMetadata() const
  654. {
  655. return ::_pbi::AssignDescriptors(
  656. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[0]
  657. );
  658. }
  659. // ===================================================================
  660. class MoveMsg::_Internal
  661. {
  662. public:
  663. };
  664. MoveMsg::MoveMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  665. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  666. {
  667. SharedCtor(arena, is_message_owned);
  668. // @@protoc_insertion_point(arena_constructor:protobuf.MoveMsg)
  669. }
  670. MoveMsg::MoveMsg(const MoveMsg& from) :
  671. ::PROTOBUF_NAMESPACE_ID::Message()
  672. {
  673. MoveMsg* const _this = this;
  674. (void)_this;
  675. new (&_impl_) Impl_{
  676. decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, decltype(_impl_.time_in_milliseconds_){}, decltype(_impl_.player_type_){}, /*decltype(_impl_._cached_size_)*/ {}};
  677. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  678. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  679. // @@protoc_insertion_point(copy_constructor:protobuf.MoveMsg)
  680. }
  681. inline void MoveMsg::SharedCtor(
  682. ::_pb::Arena* arena, bool is_message_owned
  683. )
  684. {
  685. (void)arena;
  686. (void)is_message_owned;
  687. new (&_impl_) Impl_{
  688. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, decltype(_impl_.time_in_milliseconds_){int64_t{0}}, decltype(_impl_.player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  689. }
  690. MoveMsg::~MoveMsg()
  691. {
  692. // @@protoc_insertion_point(destructor:protobuf.MoveMsg)
  693. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  694. {
  695. (void)arena;
  696. return;
  697. }
  698. SharedDtor();
  699. }
  700. inline void MoveMsg::SharedDtor()
  701. {
  702. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  703. }
  704. void MoveMsg::SetCachedSize(int size) const
  705. {
  706. _impl_._cached_size_.Set(size);
  707. }
  708. void MoveMsg::Clear()
  709. {
  710. // @@protoc_insertion_point(message_clear_start:protobuf.MoveMsg)
  711. uint32_t cached_has_bits = 0;
  712. // Prevent compiler warnings about cached_has_bits being unused
  713. (void)cached_has_bits;
  714. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  715. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  716. }
  717. const char* MoveMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  718. {
  719. #define CHK_(x) \
  720. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  721. goto failure
  722. while (!ctx->Done(&ptr))
  723. {
  724. uint32_t tag;
  725. ptr = ::_pbi::ReadTag(ptr, &tag);
  726. switch (tag >> 3)
  727. {
  728. // int64 player_id = 1;
  729. case 1:
  730. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  731. {
  732. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  733. CHK_(ptr);
  734. }
  735. else
  736. goto handle_unusual;
  737. continue;
  738. // .protobuf.PlayerType player_type = 2;
  739. case 2:
  740. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  741. {
  742. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  743. CHK_(ptr);
  744. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  745. }
  746. else
  747. goto handle_unusual;
  748. continue;
  749. // double angle = 3;
  750. case 3:
  751. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25))
  752. {
  753. _impl_.angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
  754. ptr += sizeof(double);
  755. }
  756. else
  757. goto handle_unusual;
  758. continue;
  759. // int64 time_in_milliseconds = 4;
  760. case 4:
  761. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32))
  762. {
  763. _impl_.time_in_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  764. CHK_(ptr);
  765. }
  766. else
  767. goto handle_unusual;
  768. continue;
  769. default:
  770. goto handle_unusual;
  771. } // switch
  772. handle_unusual:
  773. if ((tag == 0) || ((tag & 7) == 4))
  774. {
  775. CHK_(ptr);
  776. ctx->SetLastTag(tag);
  777. goto message_done;
  778. }
  779. ptr = UnknownFieldParse(
  780. tag,
  781. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  782. ptr,
  783. ctx
  784. );
  785. CHK_(ptr != nullptr);
  786. } // while
  787. message_done:
  788. return ptr;
  789. failure:
  790. ptr = nullptr;
  791. goto message_done;
  792. #undef CHK_
  793. }
  794. uint8_t* MoveMsg::_InternalSerialize(
  795. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  796. ) const
  797. {
  798. // @@protoc_insertion_point(serialize_to_array_start:protobuf.MoveMsg)
  799. uint32_t cached_has_bits = 0;
  800. (void)cached_has_bits;
  801. // int64 player_id = 1;
  802. if (this->_internal_player_id() != 0)
  803. {
  804. target = stream->EnsureSpace(target);
  805. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  806. }
  807. // .protobuf.PlayerType player_type = 2;
  808. if (this->_internal_player_type() != 0)
  809. {
  810. target = stream->EnsureSpace(target);
  811. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  812. 2, this->_internal_player_type(), target
  813. );
  814. }
  815. // double angle = 3;
  816. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  817. double tmp_angle = this->_internal_angle();
  818. uint64_t raw_angle;
  819. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  820. if (raw_angle != 0)
  821. {
  822. target = stream->EnsureSpace(target);
  823. target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_angle(), target);
  824. }
  825. // int64 time_in_milliseconds = 4;
  826. if (this->_internal_time_in_milliseconds() != 0)
  827. {
  828. target = stream->EnsureSpace(target);
  829. target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_time_in_milliseconds(), target);
  830. }
  831. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  832. {
  833. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  834. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  835. );
  836. }
  837. // @@protoc_insertion_point(serialize_to_array_end:protobuf.MoveMsg)
  838. return target;
  839. }
  840. size_t MoveMsg::ByteSizeLong() const
  841. {
  842. // @@protoc_insertion_point(message_byte_size_start:protobuf.MoveMsg)
  843. size_t total_size = 0;
  844. uint32_t cached_has_bits = 0;
  845. // Prevent compiler warnings about cached_has_bits being unused
  846. (void)cached_has_bits;
  847. // int64 player_id = 1;
  848. if (this->_internal_player_id() != 0)
  849. {
  850. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  851. }
  852. // double angle = 3;
  853. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  854. double tmp_angle = this->_internal_angle();
  855. uint64_t raw_angle;
  856. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  857. if (raw_angle != 0)
  858. {
  859. total_size += 1 + 8;
  860. }
  861. // int64 time_in_milliseconds = 4;
  862. if (this->_internal_time_in_milliseconds() != 0)
  863. {
  864. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_time_in_milliseconds());
  865. }
  866. // .protobuf.PlayerType player_type = 2;
  867. if (this->_internal_player_type() != 0)
  868. {
  869. total_size += 1 +
  870. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  871. }
  872. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  873. }
  874. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MoveMsg::_class_data_ = {
  875. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  876. MoveMsg::MergeImpl};
  877. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MoveMsg::GetClassData() const
  878. {
  879. return &_class_data_;
  880. }
  881. void MoveMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  882. {
  883. auto* const _this = static_cast<MoveMsg*>(&to_msg);
  884. auto& from = static_cast<const MoveMsg&>(from_msg);
  885. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MoveMsg)
  886. GOOGLE_DCHECK_NE(&from, _this);
  887. uint32_t cached_has_bits = 0;
  888. (void)cached_has_bits;
  889. if (from._internal_player_id() != 0)
  890. {
  891. _this->_internal_set_player_id(from._internal_player_id());
  892. }
  893. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  894. double tmp_angle = from._internal_angle();
  895. uint64_t raw_angle;
  896. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  897. if (raw_angle != 0)
  898. {
  899. _this->_internal_set_angle(from._internal_angle());
  900. }
  901. if (from._internal_time_in_milliseconds() != 0)
  902. {
  903. _this->_internal_set_time_in_milliseconds(from._internal_time_in_milliseconds());
  904. }
  905. if (from._internal_player_type() != 0)
  906. {
  907. _this->_internal_set_player_type(from._internal_player_type());
  908. }
  909. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  910. }
  911. void MoveMsg::CopyFrom(const MoveMsg& from)
  912. {
  913. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MoveMsg)
  914. if (&from == this)
  915. return;
  916. Clear();
  917. MergeFrom(from);
  918. }
  919. bool MoveMsg::IsInitialized() const
  920. {
  921. return true;
  922. }
  923. void MoveMsg::InternalSwap(MoveMsg* other)
  924. {
  925. using std::swap;
  926. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  927. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  928. PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.player_type_) + sizeof(MoveMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.player_id_)>(
  929. reinterpret_cast<char*>(&_impl_.player_id_),
  930. reinterpret_cast<char*>(&other->_impl_.player_id_)
  931. );
  932. }
  933. ::PROTOBUF_NAMESPACE_ID::Metadata MoveMsg::GetMetadata() const
  934. {
  935. return ::_pbi::AssignDescriptors(
  936. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[1]
  937. );
  938. }
  939. // ===================================================================
  940. class PropMsg::_Internal
  941. {
  942. public:
  943. };
  944. PropMsg::PropMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  945. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  946. {
  947. SharedCtor(arena, is_message_owned);
  948. // @@protoc_insertion_point(arena_constructor:protobuf.PropMsg)
  949. }
  950. PropMsg::PropMsg(const PropMsg& from) :
  951. ::PROTOBUF_NAMESPACE_ID::Message()
  952. {
  953. PropMsg* const _this = this;
  954. (void)_this;
  955. new (&_impl_) Impl_{
  956. decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.prop_type_){}, /*decltype(_impl_._cached_size_)*/ {}};
  957. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  958. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.prop_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.prop_type_));
  959. // @@protoc_insertion_point(copy_constructor:protobuf.PropMsg)
  960. }
  961. inline void PropMsg::SharedCtor(
  962. ::_pb::Arena* arena, bool is_message_owned
  963. )
  964. {
  965. (void)arena;
  966. (void)is_message_owned;
  967. new (&_impl_) Impl_{
  968. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.prop_type_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  969. }
  970. PropMsg::~PropMsg()
  971. {
  972. // @@protoc_insertion_point(destructor:protobuf.PropMsg)
  973. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  974. {
  975. (void)arena;
  976. return;
  977. }
  978. SharedDtor();
  979. }
  980. inline void PropMsg::SharedDtor()
  981. {
  982. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  983. }
  984. void PropMsg::SetCachedSize(int size) const
  985. {
  986. _impl_._cached_size_.Set(size);
  987. }
  988. void PropMsg::Clear()
  989. {
  990. // @@protoc_insertion_point(message_clear_start:protobuf.PropMsg)
  991. uint32_t cached_has_bits = 0;
  992. // Prevent compiler warnings about cached_has_bits being unused
  993. (void)cached_has_bits;
  994. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.prop_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.prop_type_));
  995. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  996. }
  997. const char* PropMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  998. {
  999. #define CHK_(x) \
  1000. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1001. goto failure
  1002. while (!ctx->Done(&ptr))
  1003. {
  1004. uint32_t tag;
  1005. ptr = ::_pbi::ReadTag(ptr, &tag);
  1006. switch (tag >> 3)
  1007. {
  1008. // int64 player_id = 1;
  1009. case 1:
  1010. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1011. {
  1012. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1013. CHK_(ptr);
  1014. }
  1015. else
  1016. goto handle_unusual;
  1017. continue;
  1018. // .protobuf.PlayerType player_type = 2;
  1019. case 2:
  1020. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  1021. {
  1022. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1023. CHK_(ptr);
  1024. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  1025. }
  1026. else
  1027. goto handle_unusual;
  1028. continue;
  1029. // .protobuf.PropType prop_type = 3;
  1030. case 3:
  1031. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
  1032. {
  1033. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1034. CHK_(ptr);
  1035. _internal_set_prop_type(static_cast<::protobuf::PropType>(val));
  1036. }
  1037. else
  1038. goto handle_unusual;
  1039. continue;
  1040. default:
  1041. goto handle_unusual;
  1042. } // switch
  1043. handle_unusual:
  1044. if ((tag == 0) || ((tag & 7) == 4))
  1045. {
  1046. CHK_(ptr);
  1047. ctx->SetLastTag(tag);
  1048. goto message_done;
  1049. }
  1050. ptr = UnknownFieldParse(
  1051. tag,
  1052. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1053. ptr,
  1054. ctx
  1055. );
  1056. CHK_(ptr != nullptr);
  1057. } // while
  1058. message_done:
  1059. return ptr;
  1060. failure:
  1061. ptr = nullptr;
  1062. goto message_done;
  1063. #undef CHK_
  1064. }
  1065. uint8_t* PropMsg::_InternalSerialize(
  1066. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1067. ) const
  1068. {
  1069. // @@protoc_insertion_point(serialize_to_array_start:protobuf.PropMsg)
  1070. uint32_t cached_has_bits = 0;
  1071. (void)cached_has_bits;
  1072. // int64 player_id = 1;
  1073. if (this->_internal_player_id() != 0)
  1074. {
  1075. target = stream->EnsureSpace(target);
  1076. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1077. }
  1078. // .protobuf.PlayerType player_type = 2;
  1079. if (this->_internal_player_type() != 0)
  1080. {
  1081. target = stream->EnsureSpace(target);
  1082. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1083. 2, this->_internal_player_type(), target
  1084. );
  1085. }
  1086. // .protobuf.PropType prop_type = 3;
  1087. if (this->_internal_prop_type() != 0)
  1088. {
  1089. target = stream->EnsureSpace(target);
  1090. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1091. 3, this->_internal_prop_type(), target
  1092. );
  1093. }
  1094. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1095. {
  1096. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1097. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1098. );
  1099. }
  1100. // @@protoc_insertion_point(serialize_to_array_end:protobuf.PropMsg)
  1101. return target;
  1102. }
  1103. size_t PropMsg::ByteSizeLong() const
  1104. {
  1105. // @@protoc_insertion_point(message_byte_size_start:protobuf.PropMsg)
  1106. size_t total_size = 0;
  1107. uint32_t cached_has_bits = 0;
  1108. // Prevent compiler warnings about cached_has_bits being unused
  1109. (void)cached_has_bits;
  1110. // int64 player_id = 1;
  1111. if (this->_internal_player_id() != 0)
  1112. {
  1113. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1114. }
  1115. // .protobuf.PlayerType player_type = 2;
  1116. if (this->_internal_player_type() != 0)
  1117. {
  1118. total_size += 1 +
  1119. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  1120. }
  1121. // .protobuf.PropType prop_type = 3;
  1122. if (this->_internal_prop_type() != 0)
  1123. {
  1124. total_size += 1 +
  1125. ::_pbi::WireFormatLite::EnumSize(this->_internal_prop_type());
  1126. }
  1127. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1128. }
  1129. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PropMsg::_class_data_ = {
  1130. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1131. PropMsg::MergeImpl};
  1132. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PropMsg::GetClassData() const
  1133. {
  1134. return &_class_data_;
  1135. }
  1136. void PropMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1137. {
  1138. auto* const _this = static_cast<PropMsg*>(&to_msg);
  1139. auto& from = static_cast<const PropMsg&>(from_msg);
  1140. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PropMsg)
  1141. GOOGLE_DCHECK_NE(&from, _this);
  1142. uint32_t cached_has_bits = 0;
  1143. (void)cached_has_bits;
  1144. if (from._internal_player_id() != 0)
  1145. {
  1146. _this->_internal_set_player_id(from._internal_player_id());
  1147. }
  1148. if (from._internal_player_type() != 0)
  1149. {
  1150. _this->_internal_set_player_type(from._internal_player_type());
  1151. }
  1152. if (from._internal_prop_type() != 0)
  1153. {
  1154. _this->_internal_set_prop_type(from._internal_prop_type());
  1155. }
  1156. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1157. }
  1158. void PropMsg::CopyFrom(const PropMsg& from)
  1159. {
  1160. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PropMsg)
  1161. if (&from == this)
  1162. return;
  1163. Clear();
  1164. MergeFrom(from);
  1165. }
  1166. bool PropMsg::IsInitialized() const
  1167. {
  1168. return true;
  1169. }
  1170. void PropMsg::InternalSwap(PropMsg* other)
  1171. {
  1172. using std::swap;
  1173. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1174. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1175. PROTOBUF_FIELD_OFFSET(PropMsg, _impl_.prop_type_) + sizeof(PropMsg::_impl_.prop_type_) - PROTOBUF_FIELD_OFFSET(PropMsg, _impl_.player_id_)>(
  1176. reinterpret_cast<char*>(&_impl_.player_id_),
  1177. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1178. );
  1179. }
  1180. ::PROTOBUF_NAMESPACE_ID::Metadata PropMsg::GetMetadata() const
  1181. {
  1182. return ::_pbi::AssignDescriptors(
  1183. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[2]
  1184. );
  1185. }
  1186. // ===================================================================
  1187. class SendMsg::_Internal
  1188. {
  1189. public:
  1190. };
  1191. SendMsg::SendMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1192. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1193. {
  1194. SharedCtor(arena, is_message_owned);
  1195. // @@protoc_insertion_point(arena_constructor:protobuf.SendMsg)
  1196. }
  1197. SendMsg::SendMsg(const SendMsg& from) :
  1198. ::PROTOBUF_NAMESPACE_ID::Message()
  1199. {
  1200. SendMsg* const _this = this;
  1201. (void)_this;
  1202. new (&_impl_) Impl_{
  1203. decltype(_impl_.message_){}, decltype(_impl_.player_id_){}, decltype(_impl_.to_player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.to_player_type_){}, /*decltype(_impl_._cached_size_)*/ {}};
  1204. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1205. _impl_.message_.InitDefault();
  1206. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1207. _impl_.message_.Set("", GetArenaForAllocation());
  1208. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1209. if (!from._internal_message().empty())
  1210. {
  1211. _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation());
  1212. }
  1213. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.to_player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.to_player_type_));
  1214. // @@protoc_insertion_point(copy_constructor:protobuf.SendMsg)
  1215. }
  1216. inline void SendMsg::SharedCtor(
  1217. ::_pb::Arena* arena, bool is_message_owned
  1218. )
  1219. {
  1220. (void)arena;
  1221. (void)is_message_owned;
  1222. new (&_impl_) Impl_{
  1223. decltype(_impl_.message_){}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.to_player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.to_player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  1224. _impl_.message_.InitDefault();
  1225. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1226. _impl_.message_.Set("", GetArenaForAllocation());
  1227. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1228. }
  1229. SendMsg::~SendMsg()
  1230. {
  1231. // @@protoc_insertion_point(destructor:protobuf.SendMsg)
  1232. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  1233. {
  1234. (void)arena;
  1235. return;
  1236. }
  1237. SharedDtor();
  1238. }
  1239. inline void SendMsg::SharedDtor()
  1240. {
  1241. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1242. _impl_.message_.Destroy();
  1243. }
  1244. void SendMsg::SetCachedSize(int size) const
  1245. {
  1246. _impl_._cached_size_.Set(size);
  1247. }
  1248. void SendMsg::Clear()
  1249. {
  1250. // @@protoc_insertion_point(message_clear_start:protobuf.SendMsg)
  1251. uint32_t cached_has_bits = 0;
  1252. // Prevent compiler warnings about cached_has_bits being unused
  1253. (void)cached_has_bits;
  1254. _impl_.message_.ClearToEmpty();
  1255. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.to_player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.to_player_type_));
  1256. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1257. }
  1258. const char* SendMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  1259. {
  1260. #define CHK_(x) \
  1261. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1262. goto failure
  1263. while (!ctx->Done(&ptr))
  1264. {
  1265. uint32_t tag;
  1266. ptr = ::_pbi::ReadTag(ptr, &tag);
  1267. switch (tag >> 3)
  1268. {
  1269. // int64 player_id = 1;
  1270. case 1:
  1271. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1272. {
  1273. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1274. CHK_(ptr);
  1275. }
  1276. else
  1277. goto handle_unusual;
  1278. continue;
  1279. // .protobuf.PlayerType player_type = 2;
  1280. case 2:
  1281. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  1282. {
  1283. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1284. CHK_(ptr);
  1285. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  1286. }
  1287. else
  1288. goto handle_unusual;
  1289. continue;
  1290. // int64 to_player_id = 3;
  1291. case 3:
  1292. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
  1293. {
  1294. _impl_.to_player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1295. CHK_(ptr);
  1296. }
  1297. else
  1298. goto handle_unusual;
  1299. continue;
  1300. // .protobuf.PlayerType to_player_type = 4;
  1301. case 4:
  1302. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32))
  1303. {
  1304. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1305. CHK_(ptr);
  1306. _internal_set_to_player_type(static_cast<::protobuf::PlayerType>(val));
  1307. }
  1308. else
  1309. goto handle_unusual;
  1310. continue;
  1311. // string message = 5;
  1312. case 5:
  1313. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42))
  1314. {
  1315. auto str = _internal_mutable_message();
  1316. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  1317. CHK_(ptr);
  1318. CHK_(::_pbi::VerifyUTF8(str, "protobuf.SendMsg.message"));
  1319. }
  1320. else
  1321. goto handle_unusual;
  1322. continue;
  1323. default:
  1324. goto handle_unusual;
  1325. } // switch
  1326. handle_unusual:
  1327. if ((tag == 0) || ((tag & 7) == 4))
  1328. {
  1329. CHK_(ptr);
  1330. ctx->SetLastTag(tag);
  1331. goto message_done;
  1332. }
  1333. ptr = UnknownFieldParse(
  1334. tag,
  1335. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1336. ptr,
  1337. ctx
  1338. );
  1339. CHK_(ptr != nullptr);
  1340. } // while
  1341. message_done:
  1342. return ptr;
  1343. failure:
  1344. ptr = nullptr;
  1345. goto message_done;
  1346. #undef CHK_
  1347. }
  1348. uint8_t* SendMsg::_InternalSerialize(
  1349. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1350. ) const
  1351. {
  1352. // @@protoc_insertion_point(serialize_to_array_start:protobuf.SendMsg)
  1353. uint32_t cached_has_bits = 0;
  1354. (void)cached_has_bits;
  1355. // int64 player_id = 1;
  1356. if (this->_internal_player_id() != 0)
  1357. {
  1358. target = stream->EnsureSpace(target);
  1359. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1360. }
  1361. // .protobuf.PlayerType player_type = 2;
  1362. if (this->_internal_player_type() != 0)
  1363. {
  1364. target = stream->EnsureSpace(target);
  1365. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1366. 2, this->_internal_player_type(), target
  1367. );
  1368. }
  1369. // int64 to_player_id = 3;
  1370. if (this->_internal_to_player_id() != 0)
  1371. {
  1372. target = stream->EnsureSpace(target);
  1373. target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_to_player_id(), target);
  1374. }
  1375. // .protobuf.PlayerType to_player_type = 4;
  1376. if (this->_internal_to_player_type() != 0)
  1377. {
  1378. target = stream->EnsureSpace(target);
  1379. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1380. 4, this->_internal_to_player_type(), target
  1381. );
  1382. }
  1383. // string message = 5;
  1384. if (!this->_internal_message().empty())
  1385. {
  1386. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1387. this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "protobuf.SendMsg.message"
  1388. );
  1389. target = stream->WriteStringMaybeAliased(
  1390. 5, this->_internal_message(), target
  1391. );
  1392. }
  1393. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1394. {
  1395. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1396. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1397. );
  1398. }
  1399. // @@protoc_insertion_point(serialize_to_array_end:protobuf.SendMsg)
  1400. return target;
  1401. }
  1402. size_t SendMsg::ByteSizeLong() const
  1403. {
  1404. // @@protoc_insertion_point(message_byte_size_start:protobuf.SendMsg)
  1405. size_t total_size = 0;
  1406. uint32_t cached_has_bits = 0;
  1407. // Prevent compiler warnings about cached_has_bits being unused
  1408. (void)cached_has_bits;
  1409. // string message = 5;
  1410. if (!this->_internal_message().empty())
  1411. {
  1412. total_size += 1 +
  1413. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1414. this->_internal_message()
  1415. );
  1416. }
  1417. // int64 player_id = 1;
  1418. if (this->_internal_player_id() != 0)
  1419. {
  1420. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1421. }
  1422. // int64 to_player_id = 3;
  1423. if (this->_internal_to_player_id() != 0)
  1424. {
  1425. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_to_player_id());
  1426. }
  1427. // .protobuf.PlayerType player_type = 2;
  1428. if (this->_internal_player_type() != 0)
  1429. {
  1430. total_size += 1 +
  1431. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  1432. }
  1433. // .protobuf.PlayerType to_player_type = 4;
  1434. if (this->_internal_to_player_type() != 0)
  1435. {
  1436. total_size += 1 +
  1437. ::_pbi::WireFormatLite::EnumSize(this->_internal_to_player_type());
  1438. }
  1439. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1440. }
  1441. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SendMsg::_class_data_ = {
  1442. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1443. SendMsg::MergeImpl};
  1444. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* SendMsg::GetClassData() const
  1445. {
  1446. return &_class_data_;
  1447. }
  1448. void SendMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1449. {
  1450. auto* const _this = static_cast<SendMsg*>(&to_msg);
  1451. auto& from = static_cast<const SendMsg&>(from_msg);
  1452. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.SendMsg)
  1453. GOOGLE_DCHECK_NE(&from, _this);
  1454. uint32_t cached_has_bits = 0;
  1455. (void)cached_has_bits;
  1456. if (!from._internal_message().empty())
  1457. {
  1458. _this->_internal_set_message(from._internal_message());
  1459. }
  1460. if (from._internal_player_id() != 0)
  1461. {
  1462. _this->_internal_set_player_id(from._internal_player_id());
  1463. }
  1464. if (from._internal_to_player_id() != 0)
  1465. {
  1466. _this->_internal_set_to_player_id(from._internal_to_player_id());
  1467. }
  1468. if (from._internal_player_type() != 0)
  1469. {
  1470. _this->_internal_set_player_type(from._internal_player_type());
  1471. }
  1472. if (from._internal_to_player_type() != 0)
  1473. {
  1474. _this->_internal_set_to_player_type(from._internal_to_player_type());
  1475. }
  1476. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1477. }
  1478. void SendMsg::CopyFrom(const SendMsg& from)
  1479. {
  1480. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.SendMsg)
  1481. if (&from == this)
  1482. return;
  1483. Clear();
  1484. MergeFrom(from);
  1485. }
  1486. bool SendMsg::IsInitialized() const
  1487. {
  1488. return true;
  1489. }
  1490. void SendMsg::InternalSwap(SendMsg* other)
  1491. {
  1492. using std::swap;
  1493. auto* lhs_arena = GetArenaForAllocation();
  1494. auto* rhs_arena = other->GetArenaForAllocation();
  1495. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1496. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1497. &_impl_.message_, lhs_arena, &other->_impl_.message_, rhs_arena
  1498. );
  1499. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1500. PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.to_player_type_) + sizeof(SendMsg::_impl_.to_player_type_) - PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.player_id_)>(
  1501. reinterpret_cast<char*>(&_impl_.player_id_),
  1502. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1503. );
  1504. }
  1505. ::PROTOBUF_NAMESPACE_ID::Metadata SendMsg::GetMetadata() const
  1506. {
  1507. return ::_pbi::AssignDescriptors(
  1508. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[3]
  1509. );
  1510. }
  1511. // ===================================================================
  1512. class AttackMsg::_Internal
  1513. {
  1514. public:
  1515. };
  1516. AttackMsg::AttackMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1517. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1518. {
  1519. SharedCtor(arena, is_message_owned);
  1520. // @@protoc_insertion_point(arena_constructor:protobuf.AttackMsg)
  1521. }
  1522. AttackMsg::AttackMsg(const AttackMsg& from) :
  1523. ::PROTOBUF_NAMESPACE_ID::Message()
  1524. {
  1525. AttackMsg* const _this = this;
  1526. (void)_this;
  1527. new (&_impl_) Impl_{
  1528. decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, decltype(_impl_.player_type_){}, /*decltype(_impl_._cached_size_)*/ {}};
  1529. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1530. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  1531. // @@protoc_insertion_point(copy_constructor:protobuf.AttackMsg)
  1532. }
  1533. inline void AttackMsg::SharedCtor(
  1534. ::_pb::Arena* arena, bool is_message_owned
  1535. )
  1536. {
  1537. (void)arena;
  1538. (void)is_message_owned;
  1539. new (&_impl_) Impl_{
  1540. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, decltype(_impl_.player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  1541. }
  1542. AttackMsg::~AttackMsg()
  1543. {
  1544. // @@protoc_insertion_point(destructor:protobuf.AttackMsg)
  1545. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  1546. {
  1547. (void)arena;
  1548. return;
  1549. }
  1550. SharedDtor();
  1551. }
  1552. inline void AttackMsg::SharedDtor()
  1553. {
  1554. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1555. }
  1556. void AttackMsg::SetCachedSize(int size) const
  1557. {
  1558. _impl_._cached_size_.Set(size);
  1559. }
  1560. void AttackMsg::Clear()
  1561. {
  1562. // @@protoc_insertion_point(message_clear_start:protobuf.AttackMsg)
  1563. uint32_t cached_has_bits = 0;
  1564. // Prevent compiler warnings about cached_has_bits being unused
  1565. (void)cached_has_bits;
  1566. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  1567. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1568. }
  1569. const char* AttackMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  1570. {
  1571. #define CHK_(x) \
  1572. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1573. goto failure
  1574. while (!ctx->Done(&ptr))
  1575. {
  1576. uint32_t tag;
  1577. ptr = ::_pbi::ReadTag(ptr, &tag);
  1578. switch (tag >> 3)
  1579. {
  1580. // int64 player_id = 1;
  1581. case 1:
  1582. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1583. {
  1584. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1585. CHK_(ptr);
  1586. }
  1587. else
  1588. goto handle_unusual;
  1589. continue;
  1590. // .protobuf.PlayerType player_type = 2;
  1591. case 2:
  1592. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  1593. {
  1594. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1595. CHK_(ptr);
  1596. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  1597. }
  1598. else
  1599. goto handle_unusual;
  1600. continue;
  1601. // double angle = 3;
  1602. case 3:
  1603. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25))
  1604. {
  1605. _impl_.angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
  1606. ptr += sizeof(double);
  1607. }
  1608. else
  1609. goto handle_unusual;
  1610. continue;
  1611. default:
  1612. goto handle_unusual;
  1613. } // switch
  1614. handle_unusual:
  1615. if ((tag == 0) || ((tag & 7) == 4))
  1616. {
  1617. CHK_(ptr);
  1618. ctx->SetLastTag(tag);
  1619. goto message_done;
  1620. }
  1621. ptr = UnknownFieldParse(
  1622. tag,
  1623. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1624. ptr,
  1625. ctx
  1626. );
  1627. CHK_(ptr != nullptr);
  1628. } // while
  1629. message_done:
  1630. return ptr;
  1631. failure:
  1632. ptr = nullptr;
  1633. goto message_done;
  1634. #undef CHK_
  1635. }
  1636. uint8_t* AttackMsg::_InternalSerialize(
  1637. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1638. ) const
  1639. {
  1640. // @@protoc_insertion_point(serialize_to_array_start:protobuf.AttackMsg)
  1641. uint32_t cached_has_bits = 0;
  1642. (void)cached_has_bits;
  1643. // int64 player_id = 1;
  1644. if (this->_internal_player_id() != 0)
  1645. {
  1646. target = stream->EnsureSpace(target);
  1647. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1648. }
  1649. // .protobuf.PlayerType player_type = 2;
  1650. if (this->_internal_player_type() != 0)
  1651. {
  1652. target = stream->EnsureSpace(target);
  1653. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1654. 2, this->_internal_player_type(), target
  1655. );
  1656. }
  1657. // double angle = 3;
  1658. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  1659. double tmp_angle = this->_internal_angle();
  1660. uint64_t raw_angle;
  1661. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  1662. if (raw_angle != 0)
  1663. {
  1664. target = stream->EnsureSpace(target);
  1665. target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_angle(), target);
  1666. }
  1667. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1668. {
  1669. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1670. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1671. );
  1672. }
  1673. // @@protoc_insertion_point(serialize_to_array_end:protobuf.AttackMsg)
  1674. return target;
  1675. }
  1676. size_t AttackMsg::ByteSizeLong() const
  1677. {
  1678. // @@protoc_insertion_point(message_byte_size_start:protobuf.AttackMsg)
  1679. size_t total_size = 0;
  1680. uint32_t cached_has_bits = 0;
  1681. // Prevent compiler warnings about cached_has_bits being unused
  1682. (void)cached_has_bits;
  1683. // int64 player_id = 1;
  1684. if (this->_internal_player_id() != 0)
  1685. {
  1686. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1687. }
  1688. // double angle = 3;
  1689. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  1690. double tmp_angle = this->_internal_angle();
  1691. uint64_t raw_angle;
  1692. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  1693. if (raw_angle != 0)
  1694. {
  1695. total_size += 1 + 8;
  1696. }
  1697. // .protobuf.PlayerType player_type = 2;
  1698. if (this->_internal_player_type() != 0)
  1699. {
  1700. total_size += 1 +
  1701. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  1702. }
  1703. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1704. }
  1705. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttackMsg::_class_data_ = {
  1706. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1707. AttackMsg::MergeImpl};
  1708. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* AttackMsg::GetClassData() const
  1709. {
  1710. return &_class_data_;
  1711. }
  1712. void AttackMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1713. {
  1714. auto* const _this = static_cast<AttackMsg*>(&to_msg);
  1715. auto& from = static_cast<const AttackMsg&>(from_msg);
  1716. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.AttackMsg)
  1717. GOOGLE_DCHECK_NE(&from, _this);
  1718. uint32_t cached_has_bits = 0;
  1719. (void)cached_has_bits;
  1720. if (from._internal_player_id() != 0)
  1721. {
  1722. _this->_internal_set_player_id(from._internal_player_id());
  1723. }
  1724. static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  1725. double tmp_angle = from._internal_angle();
  1726. uint64_t raw_angle;
  1727. memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
  1728. if (raw_angle != 0)
  1729. {
  1730. _this->_internal_set_angle(from._internal_angle());
  1731. }
  1732. if (from._internal_player_type() != 0)
  1733. {
  1734. _this->_internal_set_player_type(from._internal_player_type());
  1735. }
  1736. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1737. }
  1738. void AttackMsg::CopyFrom(const AttackMsg& from)
  1739. {
  1740. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.AttackMsg)
  1741. if (&from == this)
  1742. return;
  1743. Clear();
  1744. MergeFrom(from);
  1745. }
  1746. bool AttackMsg::IsInitialized() const
  1747. {
  1748. return true;
  1749. }
  1750. void AttackMsg::InternalSwap(AttackMsg* other)
  1751. {
  1752. using std::swap;
  1753. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1754. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1755. PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.player_type_) + sizeof(AttackMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.player_id_)>(
  1756. reinterpret_cast<char*>(&_impl_.player_id_),
  1757. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1758. );
  1759. }
  1760. ::PROTOBUF_NAMESPACE_ID::Metadata AttackMsg::GetMetadata() const
  1761. {
  1762. return ::_pbi::AssignDescriptors(
  1763. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[4]
  1764. );
  1765. }
  1766. // ===================================================================
  1767. class IDMsg::_Internal
  1768. {
  1769. public:
  1770. };
  1771. IDMsg::IDMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1772. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1773. {
  1774. SharedCtor(arena, is_message_owned);
  1775. // @@protoc_insertion_point(arena_constructor:protobuf.IDMsg)
  1776. }
  1777. IDMsg::IDMsg(const IDMsg& from) :
  1778. ::PROTOBUF_NAMESPACE_ID::Message()
  1779. {
  1780. IDMsg* const _this = this;
  1781. (void)_this;
  1782. new (&_impl_) Impl_{
  1783. decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, /*decltype(_impl_._cached_size_)*/ {}};
  1784. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1785. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  1786. // @@protoc_insertion_point(copy_constructor:protobuf.IDMsg)
  1787. }
  1788. inline void IDMsg::SharedCtor(
  1789. ::_pb::Arena* arena, bool is_message_owned
  1790. )
  1791. {
  1792. (void)arena;
  1793. (void)is_message_owned;
  1794. new (&_impl_) Impl_{
  1795. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  1796. }
  1797. IDMsg::~IDMsg()
  1798. {
  1799. // @@protoc_insertion_point(destructor:protobuf.IDMsg)
  1800. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  1801. {
  1802. (void)arena;
  1803. return;
  1804. }
  1805. SharedDtor();
  1806. }
  1807. inline void IDMsg::SharedDtor()
  1808. {
  1809. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1810. }
  1811. void IDMsg::SetCachedSize(int size) const
  1812. {
  1813. _impl_._cached_size_.Set(size);
  1814. }
  1815. void IDMsg::Clear()
  1816. {
  1817. // @@protoc_insertion_point(message_clear_start:protobuf.IDMsg)
  1818. uint32_t cached_has_bits = 0;
  1819. // Prevent compiler warnings about cached_has_bits being unused
  1820. (void)cached_has_bits;
  1821. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.player_type_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.player_type_));
  1822. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1823. }
  1824. const char* IDMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  1825. {
  1826. #define CHK_(x) \
  1827. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  1828. goto failure
  1829. while (!ctx->Done(&ptr))
  1830. {
  1831. uint32_t tag;
  1832. ptr = ::_pbi::ReadTag(ptr, &tag);
  1833. switch (tag >> 3)
  1834. {
  1835. // int64 player_id = 1;
  1836. case 1:
  1837. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  1838. {
  1839. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1840. CHK_(ptr);
  1841. }
  1842. else
  1843. goto handle_unusual;
  1844. continue;
  1845. // .protobuf.PlayerType player_type = 2;
  1846. case 2:
  1847. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  1848. {
  1849. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1850. CHK_(ptr);
  1851. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  1852. }
  1853. else
  1854. goto handle_unusual;
  1855. continue;
  1856. default:
  1857. goto handle_unusual;
  1858. } // switch
  1859. handle_unusual:
  1860. if ((tag == 0) || ((tag & 7) == 4))
  1861. {
  1862. CHK_(ptr);
  1863. ctx->SetLastTag(tag);
  1864. goto message_done;
  1865. }
  1866. ptr = UnknownFieldParse(
  1867. tag,
  1868. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1869. ptr,
  1870. ctx
  1871. );
  1872. CHK_(ptr != nullptr);
  1873. } // while
  1874. message_done:
  1875. return ptr;
  1876. failure:
  1877. ptr = nullptr;
  1878. goto message_done;
  1879. #undef CHK_
  1880. }
  1881. uint8_t* IDMsg::_InternalSerialize(
  1882. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  1883. ) const
  1884. {
  1885. // @@protoc_insertion_point(serialize_to_array_start:protobuf.IDMsg)
  1886. uint32_t cached_has_bits = 0;
  1887. (void)cached_has_bits;
  1888. // int64 player_id = 1;
  1889. if (this->_internal_player_id() != 0)
  1890. {
  1891. target = stream->EnsureSpace(target);
  1892. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  1893. }
  1894. // .protobuf.PlayerType player_type = 2;
  1895. if (this->_internal_player_type() != 0)
  1896. {
  1897. target = stream->EnsureSpace(target);
  1898. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1899. 2, this->_internal_player_type(), target
  1900. );
  1901. }
  1902. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  1903. {
  1904. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1905. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  1906. );
  1907. }
  1908. // @@protoc_insertion_point(serialize_to_array_end:protobuf.IDMsg)
  1909. return target;
  1910. }
  1911. size_t IDMsg::ByteSizeLong() const
  1912. {
  1913. // @@protoc_insertion_point(message_byte_size_start:protobuf.IDMsg)
  1914. size_t total_size = 0;
  1915. uint32_t cached_has_bits = 0;
  1916. // Prevent compiler warnings about cached_has_bits being unused
  1917. (void)cached_has_bits;
  1918. // int64 player_id = 1;
  1919. if (this->_internal_player_id() != 0)
  1920. {
  1921. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  1922. }
  1923. // .protobuf.PlayerType player_type = 2;
  1924. if (this->_internal_player_type() != 0)
  1925. {
  1926. total_size += 1 +
  1927. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  1928. }
  1929. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1930. }
  1931. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData IDMsg::_class_data_ = {
  1932. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1933. IDMsg::MergeImpl};
  1934. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* IDMsg::GetClassData() const
  1935. {
  1936. return &_class_data_;
  1937. }
  1938. void IDMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  1939. {
  1940. auto* const _this = static_cast<IDMsg*>(&to_msg);
  1941. auto& from = static_cast<const IDMsg&>(from_msg);
  1942. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.IDMsg)
  1943. GOOGLE_DCHECK_NE(&from, _this);
  1944. uint32_t cached_has_bits = 0;
  1945. (void)cached_has_bits;
  1946. if (from._internal_player_id() != 0)
  1947. {
  1948. _this->_internal_set_player_id(from._internal_player_id());
  1949. }
  1950. if (from._internal_player_type() != 0)
  1951. {
  1952. _this->_internal_set_player_type(from._internal_player_type());
  1953. }
  1954. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1955. }
  1956. void IDMsg::CopyFrom(const IDMsg& from)
  1957. {
  1958. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.IDMsg)
  1959. if (&from == this)
  1960. return;
  1961. Clear();
  1962. MergeFrom(from);
  1963. }
  1964. bool IDMsg::IsInitialized() const
  1965. {
  1966. return true;
  1967. }
  1968. void IDMsg::InternalSwap(IDMsg* other)
  1969. {
  1970. using std::swap;
  1971. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1972. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1973. PROTOBUF_FIELD_OFFSET(IDMsg, _impl_.player_type_) + sizeof(IDMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(IDMsg, _impl_.player_id_)>(
  1974. reinterpret_cast<char*>(&_impl_.player_id_),
  1975. reinterpret_cast<char*>(&other->_impl_.player_id_)
  1976. );
  1977. }
  1978. ::PROTOBUF_NAMESPACE_ID::Metadata IDMsg::GetMetadata() const
  1979. {
  1980. return ::_pbi::AssignDescriptors(
  1981. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[5]
  1982. );
  1983. }
  1984. // ===================================================================
  1985. class SkillMsg::_Internal
  1986. {
  1987. public:
  1988. };
  1989. SkillMsg::SkillMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
  1990. ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
  1991. {
  1992. SharedCtor(arena, is_message_owned);
  1993. // @@protoc_insertion_point(arena_constructor:protobuf.SkillMsg)
  1994. }
  1995. SkillMsg::SkillMsg(const SkillMsg& from) :
  1996. ::PROTOBUF_NAMESPACE_ID::Message()
  1997. {
  1998. SkillMsg* const _this = this;
  1999. (void)_this;
  2000. new (&_impl_) Impl_{
  2001. decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.skill_id_){}, /*decltype(_impl_._cached_size_)*/ {}};
  2002. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2003. ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.skill_id_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.skill_id_));
  2004. // @@protoc_insertion_point(copy_constructor:protobuf.SkillMsg)
  2005. }
  2006. inline void SkillMsg::SharedCtor(
  2007. ::_pb::Arena* arena, bool is_message_owned
  2008. )
  2009. {
  2010. (void)arena;
  2011. (void)is_message_owned;
  2012. new (&_impl_) Impl_{
  2013. decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.skill_id_){0}, /*decltype(_impl_._cached_size_)*/ {}};
  2014. }
  2015. SkillMsg::~SkillMsg()
  2016. {
  2017. // @@protoc_insertion_point(destructor:protobuf.SkillMsg)
  2018. if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>())
  2019. {
  2020. (void)arena;
  2021. return;
  2022. }
  2023. SharedDtor();
  2024. }
  2025. inline void SkillMsg::SharedDtor()
  2026. {
  2027. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  2028. }
  2029. void SkillMsg::SetCachedSize(int size) const
  2030. {
  2031. _impl_._cached_size_.Set(size);
  2032. }
  2033. void SkillMsg::Clear()
  2034. {
  2035. // @@protoc_insertion_point(message_clear_start:protobuf.SkillMsg)
  2036. uint32_t cached_has_bits = 0;
  2037. // Prevent compiler warnings about cached_has_bits being unused
  2038. (void)cached_has_bits;
  2039. ::memset(&_impl_.player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.skill_id_) - reinterpret_cast<char*>(&_impl_.player_id_)) + sizeof(_impl_.skill_id_));
  2040. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  2041. }
  2042. const char* SkillMsg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
  2043. {
  2044. #define CHK_(x) \
  2045. if (PROTOBUF_PREDICT_FALSE(!(x))) \
  2046. goto failure
  2047. while (!ctx->Done(&ptr))
  2048. {
  2049. uint32_t tag;
  2050. ptr = ::_pbi::ReadTag(ptr, &tag);
  2051. switch (tag >> 3)
  2052. {
  2053. // int64 player_id = 1;
  2054. case 1:
  2055. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
  2056. {
  2057. _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  2058. CHK_(ptr);
  2059. }
  2060. else
  2061. goto handle_unusual;
  2062. continue;
  2063. // .protobuf.PlayerType player_type = 2;
  2064. case 2:
  2065. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
  2066. {
  2067. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  2068. CHK_(ptr);
  2069. _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
  2070. }
  2071. else
  2072. goto handle_unusual;
  2073. continue;
  2074. // int32 skill_id = 3;
  2075. case 3:
  2076. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
  2077. {
  2078. _impl_.skill_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
  2079. CHK_(ptr);
  2080. }
  2081. else
  2082. goto handle_unusual;
  2083. continue;
  2084. default:
  2085. goto handle_unusual;
  2086. } // switch
  2087. handle_unusual:
  2088. if ((tag == 0) || ((tag & 7) == 4))
  2089. {
  2090. CHK_(ptr);
  2091. ctx->SetLastTag(tag);
  2092. goto message_done;
  2093. }
  2094. ptr = UnknownFieldParse(
  2095. tag,
  2096. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  2097. ptr,
  2098. ctx
  2099. );
  2100. CHK_(ptr != nullptr);
  2101. } // while
  2102. message_done:
  2103. return ptr;
  2104. failure:
  2105. ptr = nullptr;
  2106. goto message_done;
  2107. #undef CHK_
  2108. }
  2109. uint8_t* SkillMsg::_InternalSerialize(
  2110. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  2111. ) const
  2112. {
  2113. // @@protoc_insertion_point(serialize_to_array_start:protobuf.SkillMsg)
  2114. uint32_t cached_has_bits = 0;
  2115. (void)cached_has_bits;
  2116. // int64 player_id = 1;
  2117. if (this->_internal_player_id() != 0)
  2118. {
  2119. target = stream->EnsureSpace(target);
  2120. target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
  2121. }
  2122. // .protobuf.PlayerType player_type = 2;
  2123. if (this->_internal_player_type() != 0)
  2124. {
  2125. target = stream->EnsureSpace(target);
  2126. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  2127. 2, this->_internal_player_type(), target
  2128. );
  2129. }
  2130. // int32 skill_id = 3;
  2131. if (this->_internal_skill_id() != 0)
  2132. {
  2133. target = stream->EnsureSpace(target);
  2134. target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_skill_id(), target);
  2135. }
  2136. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
  2137. {
  2138. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  2139. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
  2140. );
  2141. }
  2142. // @@protoc_insertion_point(serialize_to_array_end:protobuf.SkillMsg)
  2143. return target;
  2144. }
  2145. size_t SkillMsg::ByteSizeLong() const
  2146. {
  2147. // @@protoc_insertion_point(message_byte_size_start:protobuf.SkillMsg)
  2148. size_t total_size = 0;
  2149. uint32_t cached_has_bits = 0;
  2150. // Prevent compiler warnings about cached_has_bits being unused
  2151. (void)cached_has_bits;
  2152. // int64 player_id = 1;
  2153. if (this->_internal_player_id() != 0)
  2154. {
  2155. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
  2156. }
  2157. // .protobuf.PlayerType player_type = 2;
  2158. if (this->_internal_player_type() != 0)
  2159. {
  2160. total_size += 1 +
  2161. ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type());
  2162. }
  2163. // int32 skill_id = 3;
  2164. if (this->_internal_skill_id() != 0)
  2165. {
  2166. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_skill_id());
  2167. }
  2168. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  2169. }
  2170. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SkillMsg::_class_data_ = {
  2171. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  2172. SkillMsg::MergeImpl};
  2173. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* SkillMsg::GetClassData() const
  2174. {
  2175. return &_class_data_;
  2176. }
  2177. void SkillMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg)
  2178. {
  2179. auto* const _this = static_cast<SkillMsg*>(&to_msg);
  2180. auto& from = static_cast<const SkillMsg&>(from_msg);
  2181. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.SkillMsg)
  2182. GOOGLE_DCHECK_NE(&from, _this);
  2183. uint32_t cached_has_bits = 0;
  2184. (void)cached_has_bits;
  2185. if (from._internal_player_id() != 0)
  2186. {
  2187. _this->_internal_set_player_id(from._internal_player_id());
  2188. }
  2189. if (from._internal_player_type() != 0)
  2190. {
  2191. _this->_internal_set_player_type(from._internal_player_type());
  2192. }
  2193. if (from._internal_skill_id() != 0)
  2194. {
  2195. _this->_internal_set_skill_id(from._internal_skill_id());
  2196. }
  2197. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2198. }
  2199. void SkillMsg::CopyFrom(const SkillMsg& from)
  2200. {
  2201. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.SkillMsg)
  2202. if (&from == this)
  2203. return;
  2204. Clear();
  2205. MergeFrom(from);
  2206. }
  2207. bool SkillMsg::IsInitialized() const
  2208. {
  2209. return true;
  2210. }
  2211. void SkillMsg::InternalSwap(SkillMsg* other)
  2212. {
  2213. using std::swap;
  2214. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  2215. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  2216. PROTOBUF_FIELD_OFFSET(SkillMsg, _impl_.skill_id_) + sizeof(SkillMsg::_impl_.skill_id_) - PROTOBUF_FIELD_OFFSET(SkillMsg, _impl_.player_id_)>(
  2217. reinterpret_cast<char*>(&_impl_.player_id_),
  2218. reinterpret_cast<char*>(&other->_impl_.player_id_)
  2219. );
  2220. }
  2221. ::PROTOBUF_NAMESPACE_ID::Metadata SkillMsg::GetMetadata() const
  2222. {
  2223. return ::_pbi::AssignDescriptors(
  2224. &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[6]
  2225. );
  2226. }
  2227. // @@protoc_insertion_point(namespace_scope)
  2228. } // namespace protobuf
  2229. PROTOBUF_NAMESPACE_OPEN
  2230. template<>
  2231. PROTOBUF_NOINLINE ::protobuf::PlayerMsg*
  2232. Arena::CreateMaybeMessage<::protobuf::PlayerMsg>(Arena* arena)
  2233. {
  2234. return Arena::CreateMessageInternal<::protobuf::PlayerMsg>(arena);
  2235. }
  2236. template<>
  2237. PROTOBUF_NOINLINE ::protobuf::MoveMsg*
  2238. Arena::CreateMaybeMessage<::protobuf::MoveMsg>(Arena* arena)
  2239. {
  2240. return Arena::CreateMessageInternal<::protobuf::MoveMsg>(arena);
  2241. }
  2242. template<>
  2243. PROTOBUF_NOINLINE ::protobuf::PropMsg*
  2244. Arena::CreateMaybeMessage<::protobuf::PropMsg>(Arena* arena)
  2245. {
  2246. return Arena::CreateMessageInternal<::protobuf::PropMsg>(arena);
  2247. }
  2248. template<>
  2249. PROTOBUF_NOINLINE ::protobuf::SendMsg*
  2250. Arena::CreateMaybeMessage<::protobuf::SendMsg>(Arena* arena)
  2251. {
  2252. return Arena::CreateMessageInternal<::protobuf::SendMsg>(arena);
  2253. }
  2254. template<>
  2255. PROTOBUF_NOINLINE ::protobuf::AttackMsg*
  2256. Arena::CreateMaybeMessage<::protobuf::AttackMsg>(Arena* arena)
  2257. {
  2258. return Arena::CreateMessageInternal<::protobuf::AttackMsg>(arena);
  2259. }
  2260. template<>
  2261. PROTOBUF_NOINLINE ::protobuf::IDMsg*
  2262. Arena::CreateMaybeMessage<::protobuf::IDMsg>(Arena* arena)
  2263. {
  2264. return Arena::CreateMessageInternal<::protobuf::IDMsg>(arena);
  2265. }
  2266. template<>
  2267. PROTOBUF_NOINLINE ::protobuf::SkillMsg*
  2268. Arena::CreateMaybeMessage<::protobuf::SkillMsg>(Arena* arena)
  2269. {
  2270. return Arena::CreateMessageInternal<::protobuf::SkillMsg>(arena);
  2271. }
  2272. PROTOBUF_NAMESPACE_CLOSE
  2273. // @@protoc_insertion_point(global_scope)
  2274. #include <google/protobuf/port_undef.inc>