client2world_chat.pb.cc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: client2world_chat.proto
  3. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  4. #include "client2world_chat.pb.h"
  5. #include <algorithm>
  6. #include <google/protobuf/stubs/common.h>
  7. #include <google/protobuf/stubs/once.h>
  8. #include <google/protobuf/io/coded_stream.h>
  9. #include <google/protobuf/wire_format_lite_inl.h>
  10. #include <google/protobuf/descriptor.h>
  11. #include <google/protobuf/generated_message_reflection.h>
  12. #include <google/protobuf/reflection_ops.h>
  13. #include <google/protobuf/wire_format.h>
  14. // @@protoc_insertion_point(includes)
  15. namespace client2world_protocols {
  16. namespace {
  17. const ::google::protobuf::Descriptor* packetw2c_notify_descriptor_ = NULL;
  18. const ::google::protobuf::internal::GeneratedMessageReflection*
  19. packetw2c_notify_reflection_ = NULL;
  20. } // namespace
  21. void protobuf_AssignDesc_client2world_5fchat_2eproto() {
  22. protobuf_AddDesc_client2world_5fchat_2eproto();
  23. const ::google::protobuf::FileDescriptor* file =
  24. ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
  25. "client2world_chat.proto");
  26. GOOGLE_CHECK(file != NULL);
  27. packetw2c_notify_descriptor_ = file->message_type(0);
  28. static const int packetw2c_notify_offsets_[10] = {
  29. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, packet_id_),
  30. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, content_),
  31. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, notifytype_),
  32. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, talkernickname_),
  33. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, playerid_),
  34. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, talkerviplevel_),
  35. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, hasmonthcard_),
  36. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, repcount_),
  37. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, interval_),
  38. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, showpos_),
  39. };
  40. packetw2c_notify_reflection_ =
  41. new ::google::protobuf::internal::GeneratedMessageReflection(
  42. packetw2c_notify_descriptor_,
  43. packetw2c_notify::default_instance_,
  44. packetw2c_notify_offsets_,
  45. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, _has_bits_[0]),
  46. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(packetw2c_notify, _unknown_fields_),
  47. -1,
  48. ::google::protobuf::DescriptorPool::generated_pool(),
  49. ::google::protobuf::MessageFactory::generated_factory(),
  50. sizeof(packetw2c_notify));
  51. }
  52. namespace {
  53. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
  54. inline void protobuf_AssignDescriptorsOnce() {
  55. ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
  56. &protobuf_AssignDesc_client2world_5fchat_2eproto);
  57. }
  58. void protobuf_RegisterTypes(const ::std::string&) {
  59. protobuf_AssignDescriptorsOnce();
  60. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  61. packetw2c_notify_descriptor_, &packetw2c_notify::default_instance());
  62. }
  63. } // namespace
  64. void protobuf_ShutdownFile_client2world_5fchat_2eproto() {
  65. delete packetw2c_notify::default_instance_;
  66. delete packetw2c_notify_reflection_;
  67. }
  68. void protobuf_AddDesc_client2world_5fchat_2eproto() {
  69. static bool already_here = false;
  70. if (already_here) return;
  71. already_here = true;
  72. GOOGLE_PROTOBUF_VERIFY_VERSION;
  73. ::client2world_protocols::protobuf_AddDesc_client2world_5fmsg_5ftype_2eproto();
  74. ::msg_type_def::protobuf_AddDesc_msg_5ftype_5fdef_2eproto();
  75. ::msg_info_def::protobuf_AddDesc_msg_5finfo_5fdef_2eproto();
  76. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  77. "\n\027client2world_chat.proto\022\026client2world_"
  78. "protocols\032\033client2world_msg_type.proto\032\022"
  79. "msg_type_def.proto\032\022msg_info_def.proto\"\232"
  80. "\002\n\020packetw2c_notify\022N\n\tpacket_id\030\001 \001(\0162)"
  81. ".client2world_protocols.e_server_msg_typ"
  82. "e:\020e_mst_w2c_notify\022\017\n\007content\030\002 \001(\t\022\022\n\n"
  83. "notifyType\030\003 \001(\005\022\026\n\016talkerNickName\030\004 \001(\t"
  84. "\022\020\n\010playerId\030\005 \001(\005\022\026\n\016talkerVIPLevel\030\006 \001"
  85. "(\005\022\024\n\014hasMonthCard\030\007 \001(\010\022\023\n\010repCount\030\010 \001"
  86. "(\005:\0011\022\023\n\010interval\030\t \001(\005:\0010\022\017\n\007showPos\030\n "
  87. "\001(\005", 403);
  88. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  89. "client2world_chat.proto", &protobuf_RegisterTypes);
  90. packetw2c_notify::default_instance_ = new packetw2c_notify();
  91. packetw2c_notify::default_instance_->InitAsDefaultInstance();
  92. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_client2world_5fchat_2eproto);
  93. }
  94. // Force AddDescriptors() to be called at static initialization time.
  95. struct StaticDescriptorInitializer_client2world_5fchat_2eproto {
  96. StaticDescriptorInitializer_client2world_5fchat_2eproto() {
  97. protobuf_AddDesc_client2world_5fchat_2eproto();
  98. }
  99. } static_descriptor_initializer_client2world_5fchat_2eproto_;
  100. // ===================================================================
  101. #ifndef _MSC_VER
  102. const int packetw2c_notify::kPacketIdFieldNumber;
  103. const int packetw2c_notify::kContentFieldNumber;
  104. const int packetw2c_notify::kNotifyTypeFieldNumber;
  105. const int packetw2c_notify::kTalkerNickNameFieldNumber;
  106. const int packetw2c_notify::kPlayerIdFieldNumber;
  107. const int packetw2c_notify::kTalkerVIPLevelFieldNumber;
  108. const int packetw2c_notify::kHasMonthCardFieldNumber;
  109. const int packetw2c_notify::kRepCountFieldNumber;
  110. const int packetw2c_notify::kIntervalFieldNumber;
  111. const int packetw2c_notify::kShowPosFieldNumber;
  112. #endif // !_MSC_VER
  113. packetw2c_notify::packetw2c_notify()
  114. : ::google::protobuf::Message() {
  115. SharedCtor();
  116. }
  117. void packetw2c_notify::InitAsDefaultInstance() {
  118. }
  119. packetw2c_notify::packetw2c_notify(const packetw2c_notify& from)
  120. : ::google::protobuf::Message() {
  121. SharedCtor();
  122. MergeFrom(from);
  123. }
  124. void packetw2c_notify::SharedCtor() {
  125. _cached_size_ = 0;
  126. packet_id_ = 7523;
  127. content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  128. notifytype_ = 0;
  129. talkernickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  130. playerid_ = 0;
  131. talkerviplevel_ = 0;
  132. hasmonthcard_ = false;
  133. repcount_ = 1;
  134. interval_ = 0;
  135. showpos_ = 0;
  136. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  137. }
  138. packetw2c_notify::~packetw2c_notify() {
  139. SharedDtor();
  140. }
  141. void packetw2c_notify::SharedDtor() {
  142. if (content_ != &::google::protobuf::internal::kEmptyString) {
  143. delete content_;
  144. }
  145. if (talkernickname_ != &::google::protobuf::internal::kEmptyString) {
  146. delete talkernickname_;
  147. }
  148. if (this != default_instance_) {
  149. }
  150. }
  151. void packetw2c_notify::SetCachedSize(int size) const {
  152. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  153. _cached_size_ = size;
  154. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  155. }
  156. const ::google::protobuf::Descriptor* packetw2c_notify::descriptor() {
  157. protobuf_AssignDescriptorsOnce();
  158. return packetw2c_notify_descriptor_;
  159. }
  160. const packetw2c_notify& packetw2c_notify::default_instance() {
  161. if (default_instance_ == NULL) protobuf_AddDesc_client2world_5fchat_2eproto();
  162. return *default_instance_;
  163. }
  164. packetw2c_notify* packetw2c_notify::default_instance_ = NULL;
  165. packetw2c_notify* packetw2c_notify::New() const {
  166. return new packetw2c_notify;
  167. }
  168. void packetw2c_notify::Clear() {
  169. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  170. packet_id_ = 7523;
  171. if (has_content()) {
  172. if (content_ != &::google::protobuf::internal::kEmptyString) {
  173. content_->clear();
  174. }
  175. }
  176. notifytype_ = 0;
  177. if (has_talkernickname()) {
  178. if (talkernickname_ != &::google::protobuf::internal::kEmptyString) {
  179. talkernickname_->clear();
  180. }
  181. }
  182. playerid_ = 0;
  183. talkerviplevel_ = 0;
  184. hasmonthcard_ = false;
  185. repcount_ = 1;
  186. }
  187. if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
  188. interval_ = 0;
  189. showpos_ = 0;
  190. }
  191. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  192. mutable_unknown_fields()->Clear();
  193. }
  194. bool packetw2c_notify::MergePartialFromCodedStream(
  195. ::google::protobuf::io::CodedInputStream* input) {
  196. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  197. ::google::protobuf::uint32 tag;
  198. while ((tag = input->ReadTag()) != 0) {
  199. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  200. // optional .client2world_protocols.e_server_msg_type packet_id = 1 [default = e_mst_w2c_notify];
  201. case 1: {
  202. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  203. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  204. int value;
  205. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  206. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  207. input, &value)));
  208. if (::client2world_protocols::e_server_msg_type_IsValid(value)) {
  209. set_packet_id(static_cast< ::client2world_protocols::e_server_msg_type >(value));
  210. } else {
  211. mutable_unknown_fields()->AddVarint(1, value);
  212. }
  213. } else {
  214. goto handle_uninterpreted;
  215. }
  216. if (input->ExpectTag(18)) goto parse_content;
  217. break;
  218. }
  219. // optional string content = 2;
  220. case 2: {
  221. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  222. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  223. parse_content:
  224. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  225. input, this->mutable_content()));
  226. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  227. this->content().data(), this->content().length(),
  228. ::google::protobuf::internal::WireFormat::PARSE);
  229. } else {
  230. goto handle_uninterpreted;
  231. }
  232. if (input->ExpectTag(24)) goto parse_notifyType;
  233. break;
  234. }
  235. // optional int32 notifyType = 3;
  236. case 3: {
  237. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  238. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  239. parse_notifyType:
  240. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  241. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  242. input, &notifytype_)));
  243. set_has_notifytype();
  244. } else {
  245. goto handle_uninterpreted;
  246. }
  247. if (input->ExpectTag(34)) goto parse_talkerNickName;
  248. break;
  249. }
  250. // optional string talkerNickName = 4;
  251. case 4: {
  252. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  253. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  254. parse_talkerNickName:
  255. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  256. input, this->mutable_talkernickname()));
  257. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  258. this->talkernickname().data(), this->talkernickname().length(),
  259. ::google::protobuf::internal::WireFormat::PARSE);
  260. } else {
  261. goto handle_uninterpreted;
  262. }
  263. if (input->ExpectTag(40)) goto parse_playerId;
  264. break;
  265. }
  266. // optional int32 playerId = 5;
  267. case 5: {
  268. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  269. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  270. parse_playerId:
  271. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  272. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  273. input, &playerid_)));
  274. set_has_playerid();
  275. } else {
  276. goto handle_uninterpreted;
  277. }
  278. if (input->ExpectTag(48)) goto parse_talkerVIPLevel;
  279. break;
  280. }
  281. // optional int32 talkerVIPLevel = 6;
  282. case 6: {
  283. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  284. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  285. parse_talkerVIPLevel:
  286. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  287. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  288. input, &talkerviplevel_)));
  289. set_has_talkerviplevel();
  290. } else {
  291. goto handle_uninterpreted;
  292. }
  293. if (input->ExpectTag(56)) goto parse_hasMonthCard;
  294. break;
  295. }
  296. // optional bool hasMonthCard = 7;
  297. case 7: {
  298. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  299. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  300. parse_hasMonthCard:
  301. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  302. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  303. input, &hasmonthcard_)));
  304. set_has_hasmonthcard();
  305. } else {
  306. goto handle_uninterpreted;
  307. }
  308. if (input->ExpectTag(64)) goto parse_repCount;
  309. break;
  310. }
  311. // optional int32 repCount = 8 [default = 1];
  312. case 8: {
  313. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  314. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  315. parse_repCount:
  316. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  317. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  318. input, &repcount_)));
  319. set_has_repcount();
  320. } else {
  321. goto handle_uninterpreted;
  322. }
  323. if (input->ExpectTag(72)) goto parse_interval;
  324. break;
  325. }
  326. // optional int32 interval = 9 [default = 0];
  327. case 9: {
  328. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  329. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  330. parse_interval:
  331. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  332. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  333. input, &interval_)));
  334. set_has_interval();
  335. } else {
  336. goto handle_uninterpreted;
  337. }
  338. if (input->ExpectTag(80)) goto parse_showPos;
  339. break;
  340. }
  341. // optional int32 showPos = 10;
  342. case 10: {
  343. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  344. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  345. parse_showPos:
  346. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  347. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  348. input, &showpos_)));
  349. set_has_showpos();
  350. } else {
  351. goto handle_uninterpreted;
  352. }
  353. if (input->ExpectAtEnd()) return true;
  354. break;
  355. }
  356. default: {
  357. handle_uninterpreted:
  358. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  359. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  360. return true;
  361. }
  362. DO_(::google::protobuf::internal::WireFormat::SkipField(
  363. input, tag, mutable_unknown_fields()));
  364. break;
  365. }
  366. }
  367. }
  368. return true;
  369. #undef DO_
  370. }
  371. void packetw2c_notify::SerializeWithCachedSizes(
  372. ::google::protobuf::io::CodedOutputStream* output) const {
  373. // optional .client2world_protocols.e_server_msg_type packet_id = 1 [default = e_mst_w2c_notify];
  374. if (has_packet_id()) {
  375. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  376. 1, this->packet_id(), output);
  377. }
  378. // optional string content = 2;
  379. if (has_content()) {
  380. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  381. this->content().data(), this->content().length(),
  382. ::google::protobuf::internal::WireFormat::SERIALIZE);
  383. ::google::protobuf::internal::WireFormatLite::WriteString(
  384. 2, this->content(), output);
  385. }
  386. // optional int32 notifyType = 3;
  387. if (has_notifytype()) {
  388. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->notifytype(), output);
  389. }
  390. // optional string talkerNickName = 4;
  391. if (has_talkernickname()) {
  392. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  393. this->talkernickname().data(), this->talkernickname().length(),
  394. ::google::protobuf::internal::WireFormat::SERIALIZE);
  395. ::google::protobuf::internal::WireFormatLite::WriteString(
  396. 4, this->talkernickname(), output);
  397. }
  398. // optional int32 playerId = 5;
  399. if (has_playerid()) {
  400. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->playerid(), output);
  401. }
  402. // optional int32 talkerVIPLevel = 6;
  403. if (has_talkerviplevel()) {
  404. ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->talkerviplevel(), output);
  405. }
  406. // optional bool hasMonthCard = 7;
  407. if (has_hasmonthcard()) {
  408. ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->hasmonthcard(), output);
  409. }
  410. // optional int32 repCount = 8 [default = 1];
  411. if (has_repcount()) {
  412. ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->repcount(), output);
  413. }
  414. // optional int32 interval = 9 [default = 0];
  415. if (has_interval()) {
  416. ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->interval(), output);
  417. }
  418. // optional int32 showPos = 10;
  419. if (has_showpos()) {
  420. ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->showpos(), output);
  421. }
  422. if (!unknown_fields().empty()) {
  423. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  424. unknown_fields(), output);
  425. }
  426. }
  427. ::google::protobuf::uint8* packetw2c_notify::SerializeWithCachedSizesToArray(
  428. ::google::protobuf::uint8* target) const {
  429. // optional .client2world_protocols.e_server_msg_type packet_id = 1 [default = e_mst_w2c_notify];
  430. if (has_packet_id()) {
  431. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  432. 1, this->packet_id(), target);
  433. }
  434. // optional string content = 2;
  435. if (has_content()) {
  436. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  437. this->content().data(), this->content().length(),
  438. ::google::protobuf::internal::WireFormat::SERIALIZE);
  439. target =
  440. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  441. 2, this->content(), target);
  442. }
  443. // optional int32 notifyType = 3;
  444. if (has_notifytype()) {
  445. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->notifytype(), target);
  446. }
  447. // optional string talkerNickName = 4;
  448. if (has_talkernickname()) {
  449. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  450. this->talkernickname().data(), this->talkernickname().length(),
  451. ::google::protobuf::internal::WireFormat::SERIALIZE);
  452. target =
  453. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  454. 4, this->talkernickname(), target);
  455. }
  456. // optional int32 playerId = 5;
  457. if (has_playerid()) {
  458. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->playerid(), target);
  459. }
  460. // optional int32 talkerVIPLevel = 6;
  461. if (has_talkerviplevel()) {
  462. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->talkerviplevel(), target);
  463. }
  464. // optional bool hasMonthCard = 7;
  465. if (has_hasmonthcard()) {
  466. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->hasmonthcard(), target);
  467. }
  468. // optional int32 repCount = 8 [default = 1];
  469. if (has_repcount()) {
  470. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->repcount(), target);
  471. }
  472. // optional int32 interval = 9 [default = 0];
  473. if (has_interval()) {
  474. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->interval(), target);
  475. }
  476. // optional int32 showPos = 10;
  477. if (has_showpos()) {
  478. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->showpos(), target);
  479. }
  480. if (!unknown_fields().empty()) {
  481. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  482. unknown_fields(), target);
  483. }
  484. return target;
  485. }
  486. int packetw2c_notify::ByteSize() const {
  487. int total_size = 0;
  488. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  489. // optional .client2world_protocols.e_server_msg_type packet_id = 1 [default = e_mst_w2c_notify];
  490. if (has_packet_id()) {
  491. total_size += 1 +
  492. ::google::protobuf::internal::WireFormatLite::EnumSize(this->packet_id());
  493. }
  494. // optional string content = 2;
  495. if (has_content()) {
  496. total_size += 1 +
  497. ::google::protobuf::internal::WireFormatLite::StringSize(
  498. this->content());
  499. }
  500. // optional int32 notifyType = 3;
  501. if (has_notifytype()) {
  502. total_size += 1 +
  503. ::google::protobuf::internal::WireFormatLite::Int32Size(
  504. this->notifytype());
  505. }
  506. // optional string talkerNickName = 4;
  507. if (has_talkernickname()) {
  508. total_size += 1 +
  509. ::google::protobuf::internal::WireFormatLite::StringSize(
  510. this->talkernickname());
  511. }
  512. // optional int32 playerId = 5;
  513. if (has_playerid()) {
  514. total_size += 1 +
  515. ::google::protobuf::internal::WireFormatLite::Int32Size(
  516. this->playerid());
  517. }
  518. // optional int32 talkerVIPLevel = 6;
  519. if (has_talkerviplevel()) {
  520. total_size += 1 +
  521. ::google::protobuf::internal::WireFormatLite::Int32Size(
  522. this->talkerviplevel());
  523. }
  524. // optional bool hasMonthCard = 7;
  525. if (has_hasmonthcard()) {
  526. total_size += 1 + 1;
  527. }
  528. // optional int32 repCount = 8 [default = 1];
  529. if (has_repcount()) {
  530. total_size += 1 +
  531. ::google::protobuf::internal::WireFormatLite::Int32Size(
  532. this->repcount());
  533. }
  534. }
  535. if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
  536. // optional int32 interval = 9 [default = 0];
  537. if (has_interval()) {
  538. total_size += 1 +
  539. ::google::protobuf::internal::WireFormatLite::Int32Size(
  540. this->interval());
  541. }
  542. // optional int32 showPos = 10;
  543. if (has_showpos()) {
  544. total_size += 1 +
  545. ::google::protobuf::internal::WireFormatLite::Int32Size(
  546. this->showpos());
  547. }
  548. }
  549. if (!unknown_fields().empty()) {
  550. total_size +=
  551. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  552. unknown_fields());
  553. }
  554. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  555. _cached_size_ = total_size;
  556. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  557. return total_size;
  558. }
  559. void packetw2c_notify::MergeFrom(const ::google::protobuf::Message& from) {
  560. GOOGLE_CHECK_NE(&from, this);
  561. const packetw2c_notify* source =
  562. ::google::protobuf::internal::dynamic_cast_if_available<const packetw2c_notify*>(
  563. &from);
  564. if (source == NULL) {
  565. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  566. } else {
  567. MergeFrom(*source);
  568. }
  569. }
  570. void packetw2c_notify::MergeFrom(const packetw2c_notify& from) {
  571. GOOGLE_CHECK_NE(&from, this);
  572. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  573. if (from.has_packet_id()) {
  574. set_packet_id(from.packet_id());
  575. }
  576. if (from.has_content()) {
  577. set_content(from.content());
  578. }
  579. if (from.has_notifytype()) {
  580. set_notifytype(from.notifytype());
  581. }
  582. if (from.has_talkernickname()) {
  583. set_talkernickname(from.talkernickname());
  584. }
  585. if (from.has_playerid()) {
  586. set_playerid(from.playerid());
  587. }
  588. if (from.has_talkerviplevel()) {
  589. set_talkerviplevel(from.talkerviplevel());
  590. }
  591. if (from.has_hasmonthcard()) {
  592. set_hasmonthcard(from.hasmonthcard());
  593. }
  594. if (from.has_repcount()) {
  595. set_repcount(from.repcount());
  596. }
  597. }
  598. if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
  599. if (from.has_interval()) {
  600. set_interval(from.interval());
  601. }
  602. if (from.has_showpos()) {
  603. set_showpos(from.showpos());
  604. }
  605. }
  606. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  607. }
  608. void packetw2c_notify::CopyFrom(const ::google::protobuf::Message& from) {
  609. if (&from == this) return;
  610. Clear();
  611. MergeFrom(from);
  612. }
  613. void packetw2c_notify::CopyFrom(const packetw2c_notify& from) {
  614. if (&from == this) return;
  615. Clear();
  616. MergeFrom(from);
  617. }
  618. bool packetw2c_notify::IsInitialized() const {
  619. return true;
  620. }
  621. void packetw2c_notify::Swap(packetw2c_notify* other) {
  622. if (other != this) {
  623. std::swap(packet_id_, other->packet_id_);
  624. std::swap(content_, other->content_);
  625. std::swap(notifytype_, other->notifytype_);
  626. std::swap(talkernickname_, other->talkernickname_);
  627. std::swap(playerid_, other->playerid_);
  628. std::swap(talkerviplevel_, other->talkerviplevel_);
  629. std::swap(hasmonthcard_, other->hasmonthcard_);
  630. std::swap(repcount_, other->repcount_);
  631. std::swap(interval_, other->interval_);
  632. std::swap(showpos_, other->showpos_);
  633. std::swap(_has_bits_[0], other->_has_bits_[0]);
  634. _unknown_fields_.Swap(&other->_unknown_fields_);
  635. std::swap(_cached_size_, other->_cached_size_);
  636. }
  637. }
  638. ::google::protobuf::Metadata packetw2c_notify::GetMetadata() const {
  639. protobuf_AssignDescriptorsOnce();
  640. ::google::protobuf::Metadata metadata;
  641. metadata.descriptor = packetw2c_notify_descriptor_;
  642. metadata.reflection = packetw2c_notify_reflection_;
  643. return metadata;
  644. }
  645. // @@protoc_insertion_point(namespace_scope)
  646. } // namespace client2world_protocols
  647. // @@protoc_insertion_point(global_scope)