12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751 |
- (function(global, factory) {
- if (typeof define === 'function' && define.amd)
- define(["protobufjs/minimal"], factory);
- else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
- module.exports = factory(require("protobufjs/minimal"));
- })(this, function($protobuf) {
- "use strict";
-
- var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
-
-
- var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
-
- $root.tutorial = (function() {
-
-
- var tutorial = {};
-
- tutorial.Message = (function() {
-
-
-
-
- function Message(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
-
- Message.prototype.type = 0;
-
-
- Message.prototype.dataMessage = null;
-
-
- Message.prototype.notificationMessage = null;
-
-
- Message.prototype.roleOptMessage = null;
-
-
- Message.prototype.reportData = null;
-
-
- Message.prototype.msg = "";
-
-
- Message.create = function create(properties) {
- return new Message(properties);
- };
-
-
- Message.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.type != null && message.hasOwnProperty("type"))
- writer.uint32(8).int32(message.type);
- if (message.dataMessage != null && message.hasOwnProperty("dataMessage"))
- $root.tutorial.Message.DataMessage.encode(message.dataMessage, writer.uint32(18).fork()).ldelim();
- if (message.notificationMessage != null && message.hasOwnProperty("notificationMessage"))
- $root.tutorial.Message.NotificationMessage.encode(message.notificationMessage, writer.uint32(26).fork()).ldelim();
- if (message.roleOptMessage != null && message.hasOwnProperty("roleOptMessage"))
- $root.tutorial.Message.RoleOptMessage.encode(message.roleOptMessage, writer.uint32(34).fork()).ldelim();
- if (message.reportData != null && message.hasOwnProperty("reportData"))
- $root.tutorial.Message.ReportData.encode(message.reportData, writer.uint32(42).fork()).ldelim();
- if (message.msg != null && message.hasOwnProperty("msg"))
- writer.uint32(50).string(message.msg);
- return writer;
- };
-
-
- Message.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
-
- Message.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tutorial.Message();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.type = reader.int32();
- break;
- case 2:
- message.dataMessage = $root.tutorial.Message.DataMessage.decode(reader, reader.uint32());
- break;
- case 3:
- message.notificationMessage = $root.tutorial.Message.NotificationMessage.decode(reader, reader.uint32());
- break;
- case 4:
- message.roleOptMessage = $root.tutorial.Message.RoleOptMessage.decode(reader, reader.uint32());
- break;
- case 5:
- message.reportData = $root.tutorial.Message.ReportData.decode(reader, reader.uint32());
- break;
- case 6:
- message.msg = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
-
- Message.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
-
- Message.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.type != null && message.hasOwnProperty("type"))
- switch (message.type) {
- default:
- return "type: enum value expected";
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- break;
- }
- if (message.dataMessage != null && message.hasOwnProperty("dataMessage")) {
- var error = $root.tutorial.Message.DataMessage.verify(message.dataMessage);
- if (error)
- return "dataMessage." + error;
- }
- if (message.notificationMessage != null && message.hasOwnProperty("notificationMessage")) {
- var error = $root.tutorial.Message.NotificationMessage.verify(message.notificationMessage);
- if (error)
- return "notificationMessage." + error;
- }
- if (message.roleOptMessage != null && message.hasOwnProperty("roleOptMessage")) {
- var error = $root.tutorial.Message.RoleOptMessage.verify(message.roleOptMessage);
- if (error)
- return "roleOptMessage." + error;
- }
- if (message.reportData != null && message.hasOwnProperty("reportData")) {
- var error = $root.tutorial.Message.ReportData.verify(message.reportData);
- if (error)
- return "reportData." + error;
- }
- if (message.msg != null && message.hasOwnProperty("msg"))
- if (!$util.isString(message.msg))
- return "msg: string expected";
- return null;
- };
-
-
- Message.fromObject = function fromObject(object) {
- if (object instanceof $root.tutorial.Message)
- return object;
- var message = new $root.tutorial.Message();
- switch (object.type) {
- case "SELF":
- case 0:
- message.type = 0;
- break;
- case "DATA":
- case 1:
- message.type = 1;
- break;
- case "NOTIFY":
- case 2:
- message.type = 2;
- break;
- case "ROLEOPT":
- case 3:
- message.type = 3;
- break;
- case "REPORT":
- case 4:
- message.type = 4;
- break;
- }
- if (object.dataMessage != null) {
- if (typeof object.dataMessage !== "object")
- throw TypeError(".tutorial.Message.dataMessage: object expected");
- message.dataMessage = $root.tutorial.Message.DataMessage.fromObject(object.dataMessage);
- }
- if (object.notificationMessage != null) {
- if (typeof object.notificationMessage !== "object")
- throw TypeError(".tutorial.Message.notificationMessage: object expected");
- message.notificationMessage = $root.tutorial.Message.NotificationMessage.fromObject(object.notificationMessage);
- }
- if (object.roleOptMessage != null) {
- if (typeof object.roleOptMessage !== "object")
- throw TypeError(".tutorial.Message.roleOptMessage: object expected");
- message.roleOptMessage = $root.tutorial.Message.RoleOptMessage.fromObject(object.roleOptMessage);
- }
- if (object.reportData != null) {
- if (typeof object.reportData !== "object")
- throw TypeError(".tutorial.Message.reportData: object expected");
- message.reportData = $root.tutorial.Message.ReportData.fromObject(object.reportData);
- }
- if (object.msg != null)
- message.msg = String(object.msg);
- return message;
- };
-
-
- Message.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.type = options.enums === String ? "SELF" : 0;
- object.dataMessage = null;
- object.notificationMessage = null;
- object.roleOptMessage = null;
- object.reportData = null;
- object.msg = "";
- }
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = options.enums === String ? $root.tutorial.Message.Type[message.type] : message.type;
- if (message.dataMessage != null && message.hasOwnProperty("dataMessage"))
- object.dataMessage = $root.tutorial.Message.DataMessage.toObject(message.dataMessage, options);
- if (message.notificationMessage != null && message.hasOwnProperty("notificationMessage"))
- object.notificationMessage = $root.tutorial.Message.NotificationMessage.toObject(message.notificationMessage, options);
- if (message.roleOptMessage != null && message.hasOwnProperty("roleOptMessage"))
- object.roleOptMessage = $root.tutorial.Message.RoleOptMessage.toObject(message.roleOptMessage, options);
- if (message.reportData != null && message.hasOwnProperty("reportData"))
- object.reportData = $root.tutorial.Message.ReportData.toObject(message.reportData, options);
- if (message.msg != null && message.hasOwnProperty("msg"))
- object.msg = message.msg;
- return object;
- };
-
-
- Message.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
-
- Message.Type = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "SELF"] = 0;
- values[valuesById[1] = "DATA"] = 1;
- values[valuesById[2] = "NOTIFY"] = 2;
- values[valuesById[3] = "ROLEOPT"] = 3;
- values[valuesById[4] = "REPORT"] = 4;
- return values;
- })();
-
- Message.DataMessage = (function() {
-
-
-
-
- function DataMessage(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
-
- DataMessage.prototype.code = 0;
-
-
- DataMessage.prototype.result = 0;
-
-
- DataMessage.prototype.data = "";
-
-
- DataMessage.prototype.msg = "";
-
-
- DataMessage.create = function create(properties) {
- return new DataMessage(properties);
- };
-
-
- DataMessage.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.code != null && message.hasOwnProperty("code"))
- writer.uint32(8).int32(message.code);
- if (message.result != null && message.hasOwnProperty("result"))
- writer.uint32(16).int32(message.result);
- if (message.data != null && message.hasOwnProperty("data"))
- writer.uint32(26).string(message.data);
- if (message.msg != null && message.hasOwnProperty("msg"))
- writer.uint32(34).string(message.msg);
- return writer;
- };
-
-
- DataMessage.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
-
- DataMessage.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tutorial.Message.DataMessage();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.code = reader.int32();
- break;
- case 2:
- message.result = reader.int32();
- break;
- case 3:
- message.data = reader.string();
- break;
- case 4:
- message.msg = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
-
- DataMessage.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
-
- DataMessage.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.code != null && message.hasOwnProperty("code"))
- if (!$util.isInteger(message.code))
- return "code: integer expected";
- if (message.result != null && message.hasOwnProperty("result"))
- if (!$util.isInteger(message.result))
- return "result: integer expected";
- if (message.data != null && message.hasOwnProperty("data"))
- if (!$util.isString(message.data))
- return "data: string expected";
- if (message.msg != null && message.hasOwnProperty("msg"))
- if (!$util.isString(message.msg))
- return "msg: string expected";
- return null;
- };
-
-
- DataMessage.fromObject = function fromObject(object) {
- if (object instanceof $root.tutorial.Message.DataMessage)
- return object;
- var message = new $root.tutorial.Message.DataMessage();
- if (object.code != null)
- message.code = object.code | 0;
- if (object.result != null)
- message.result = object.result | 0;
- if (object.data != null)
- message.data = String(object.data);
- if (object.msg != null)
- message.msg = String(object.msg);
- return message;
- };
-
-
- DataMessage.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.code = 0;
- object.result = 0;
- object.data = "";
- object.msg = "";
- }
- if (message.code != null && message.hasOwnProperty("code"))
- object.code = message.code;
- if (message.result != null && message.hasOwnProperty("result"))
- object.result = message.result;
- if (message.data != null && message.hasOwnProperty("data"))
- object.data = message.data;
- if (message.msg != null && message.hasOwnProperty("msg"))
- object.msg = message.msg;
- return object;
- };
-
-
- DataMessage.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return DataMessage;
- })();
-
- Message.NotificationMessage = (function() {
-
-
-
-
- function NotificationMessage(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
-
- NotificationMessage.prototype.nType = 0;
-
-
- NotificationMessage.create = function create(properties) {
- return new NotificationMessage(properties);
- };
-
-
- NotificationMessage.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.nType != null && message.hasOwnProperty("nType"))
- writer.uint32(8).int32(message.nType);
- return writer;
- };
-
-
- NotificationMessage.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
-
- NotificationMessage.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tutorial.Message.NotificationMessage();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.nType = reader.int32();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
-
- NotificationMessage.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
-
- NotificationMessage.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.nType != null && message.hasOwnProperty("nType"))
- if (!$util.isInteger(message.nType))
- return "nType: integer expected";
- return null;
- };
-
-
- NotificationMessage.fromObject = function fromObject(object) {
- if (object instanceof $root.tutorial.Message.NotificationMessage)
- return object;
- var message = new $root.tutorial.Message.NotificationMessage();
- if (object.nType != null)
- message.nType = object.nType | 0;
- return message;
- };
-
-
- NotificationMessage.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.nType = 0;
- if (message.nType != null && message.hasOwnProperty("nType"))
- object.nType = message.nType;
- return object;
- };
-
-
- NotificationMessage.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return NotificationMessage;
- })();
-
- Message.RoleOptMessage = (function() {
-
-
-
-
- function RoleOptMessage(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
-
- RoleOptMessage.prototype.targetUid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-
- RoleOptMessage.prototype.exBossUid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-
- RoleOptMessage.prototype.opt = 0;
-
-
- RoleOptMessage.create = function create(properties) {
- return new RoleOptMessage(properties);
- };
-
-
- RoleOptMessage.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.targetUid != null && message.hasOwnProperty("targetUid"))
- writer.uint32(8).int64(message.targetUid);
- if (message.exBossUid != null && message.hasOwnProperty("exBossUid"))
- writer.uint32(16).int64(message.exBossUid);
- if (message.opt != null && message.hasOwnProperty("opt"))
- writer.uint32(24).int32(message.opt);
- return writer;
- };
-
-
- RoleOptMessage.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
-
- RoleOptMessage.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tutorial.Message.RoleOptMessage();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.targetUid = reader.int64();
- break;
- case 2:
- message.exBossUid = reader.int64();
- break;
- case 3:
- message.opt = reader.int32();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
-
- RoleOptMessage.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
-
- RoleOptMessage.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.targetUid != null && message.hasOwnProperty("targetUid"))
- if (!$util.isInteger(message.targetUid) && !(message.targetUid && $util.isInteger(message.targetUid.low) && $util.isInteger(message.targetUid.high)))
- return "targetUid: integer|Long expected";
- if (message.exBossUid != null && message.hasOwnProperty("exBossUid"))
- if (!$util.isInteger(message.exBossUid) && !(message.exBossUid && $util.isInteger(message.exBossUid.low) && $util.isInteger(message.exBossUid.high)))
- return "exBossUid: integer|Long expected";
- if (message.opt != null && message.hasOwnProperty("opt"))
- if (!$util.isInteger(message.opt))
- return "opt: integer expected";
- return null;
- };
-
-
- RoleOptMessage.fromObject = function fromObject(object) {
- if (object instanceof $root.tutorial.Message.RoleOptMessage)
- return object;
- var message = new $root.tutorial.Message.RoleOptMessage();
- if (object.targetUid != null)
- if ($util.Long)
- (message.targetUid = $util.Long.fromValue(object.targetUid)).unsigned = false;
- else if (typeof object.targetUid === "string")
- message.targetUid = parseInt(object.targetUid, 10);
- else if (typeof object.targetUid === "number")
- message.targetUid = object.targetUid;
- else if (typeof object.targetUid === "object")
- message.targetUid = new $util.LongBits(object.targetUid.low >>> 0, object.targetUid.high >>> 0).toNumber();
- if (object.exBossUid != null)
- if ($util.Long)
- (message.exBossUid = $util.Long.fromValue(object.exBossUid)).unsigned = false;
- else if (typeof object.exBossUid === "string")
- message.exBossUid = parseInt(object.exBossUid, 10);
- else if (typeof object.exBossUid === "number")
- message.exBossUid = object.exBossUid;
- else if (typeof object.exBossUid === "object")
- message.exBossUid = new $util.LongBits(object.exBossUid.low >>> 0, object.exBossUid.high >>> 0).toNumber();
- if (object.opt != null)
- message.opt = object.opt | 0;
- return message;
- };
-
-
- RoleOptMessage.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.targetUid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.targetUid = options.longs === String ? "0" : 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.exBossUid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.exBossUid = options.longs === String ? "0" : 0;
- object.opt = 0;
- }
- if (message.targetUid != null && message.hasOwnProperty("targetUid"))
- if (typeof message.targetUid === "number")
- object.targetUid = options.longs === String ? String(message.targetUid) : message.targetUid;
- else
- object.targetUid = options.longs === String ? $util.Long.prototype.toString.call(message.targetUid) : options.longs === Number ? new $util.LongBits(message.targetUid.low >>> 0, message.targetUid.high >>> 0).toNumber() : message.targetUid;
- if (message.exBossUid != null && message.hasOwnProperty("exBossUid"))
- if (typeof message.exBossUid === "number")
- object.exBossUid = options.longs === String ? String(message.exBossUid) : message.exBossUid;
- else
- object.exBossUid = options.longs === String ? $util.Long.prototype.toString.call(message.exBossUid) : options.longs === Number ? new $util.LongBits(message.exBossUid.low >>> 0, message.exBossUid.high >>> 0).toNumber() : message.exBossUid;
- if (message.opt != null && message.hasOwnProperty("opt"))
- object.opt = message.opt;
- return object;
- };
-
-
- RoleOptMessage.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return RoleOptMessage;
- })();
-
- Message.ReportData = (function() {
-
-
-
-
- function ReportData(properties) {
- this.b = [];
- this.ub = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
-
- ReportData.prototype.seq = 0;
-
-
- ReportData.prototype.t = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-
- ReportData.prototype.cmd = 0;
-
-
- ReportData.prototype.gi = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-
- ReportData.prototype.s = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-
- ReportData.prototype.b = $util.emptyArray;
-
-
- ReportData.prototype.ub = $util.emptyArray;
-
-
- ReportData.create = function create(properties) {
- return new ReportData(properties);
- };
-
-
- ReportData.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.seq != null && message.hasOwnProperty("seq"))
- writer.uint32(8).int32(message.seq);
- if (message.t != null && message.hasOwnProperty("t"))
- writer.uint32(16).int64(message.t);
- if (message.cmd != null && message.hasOwnProperty("cmd"))
- writer.uint32(24).int32(message.cmd);
- if (message.gi != null && message.hasOwnProperty("gi"))
- writer.uint32(32).int64(message.gi);
- if (message.s != null && message.hasOwnProperty("s"))
- writer.uint32(40).int64(message.s);
- if (message.b != null && message.b.length)
- for (var i = 0; i < message.b.length; ++i)
- $root.tutorial.Message.BuildingInfo.encode(message.b[i], writer.uint32(50).fork()).ldelim();
- if (message.ub != null && message.ub.length)
- for (var i = 0; i < message.ub.length; ++i)
- $root.tutorial.Message.BuildingInfo.encode(message.ub[i], writer.uint32(58).fork()).ldelim();
- return writer;
- };
-
-
- ReportData.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
-
- ReportData.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tutorial.Message.ReportData();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.seq = reader.int32();
- break;
- case 2:
- message.t = reader.int64();
- break;
- case 3:
- message.cmd = reader.int32();
- break;
- case 4:
- message.gi = reader.int64();
- break;
- case 5:
- message.s = reader.int64();
- break;
- case 6:
- if (!(message.b && message.b.length))
- message.b = [];
- message.b.push($root.tutorial.Message.BuildingInfo.decode(reader, reader.uint32()));
- break;
- case 7:
- if (!(message.ub && message.ub.length))
- message.ub = [];
- message.ub.push($root.tutorial.Message.BuildingInfo.decode(reader, reader.uint32()));
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
-
- ReportData.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
-
- ReportData.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.seq != null && message.hasOwnProperty("seq"))
- if (!$util.isInteger(message.seq))
- return "seq: integer expected";
- if (message.t != null && message.hasOwnProperty("t"))
- if (!$util.isInteger(message.t) && !(message.t && $util.isInteger(message.t.low) && $util.isInteger(message.t.high)))
- return "t: integer|Long expected";
- if (message.cmd != null && message.hasOwnProperty("cmd"))
- if (!$util.isInteger(message.cmd))
- return "cmd: integer expected";
- if (message.gi != null && message.hasOwnProperty("gi"))
- if (!$util.isInteger(message.gi) && !(message.gi && $util.isInteger(message.gi.low) && $util.isInteger(message.gi.high)))
- return "gi: integer|Long expected";
- if (message.s != null && message.hasOwnProperty("s"))
- if (!$util.isInteger(message.s) && !(message.s && $util.isInteger(message.s.low) && $util.isInteger(message.s.high)))
- return "s: integer|Long expected";
- if (message.b != null && message.hasOwnProperty("b")) {
- if (!Array.isArray(message.b))
- return "b: array expected";
- for (var i = 0; i < message.b.length; ++i) {
- var error = $root.tutorial.Message.BuildingInfo.verify(message.b[i]);
- if (error)
- return "b." + error;
- }
- }
- if (message.ub != null && message.hasOwnProperty("ub")) {
- if (!Array.isArray(message.ub))
- return "ub: array expected";
- for (var i = 0; i < message.ub.length; ++i) {
- var error = $root.tutorial.Message.BuildingInfo.verify(message.ub[i]);
- if (error)
- return "ub." + error;
- }
- }
- return null;
- };
-
-
- ReportData.fromObject = function fromObject(object) {
- if (object instanceof $root.tutorial.Message.ReportData)
- return object;
- var message = new $root.tutorial.Message.ReportData();
- if (object.seq != null)
- message.seq = object.seq | 0;
- if (object.t != null)
- if ($util.Long)
- (message.t = $util.Long.fromValue(object.t)).unsigned = false;
- else if (typeof object.t === "string")
- message.t = parseInt(object.t, 10);
- else if (typeof object.t === "number")
- message.t = object.t;
- else if (typeof object.t === "object")
- message.t = new $util.LongBits(object.t.low >>> 0, object.t.high >>> 0).toNumber();
- if (object.cmd != null)
- message.cmd = object.cmd | 0;
- if (object.gi != null)
- if ($util.Long)
- (message.gi = $util.Long.fromValue(object.gi)).unsigned = false;
- else if (typeof object.gi === "string")
- message.gi = parseInt(object.gi, 10);
- else if (typeof object.gi === "number")
- message.gi = object.gi;
- else if (typeof object.gi === "object")
- message.gi = new $util.LongBits(object.gi.low >>> 0, object.gi.high >>> 0).toNumber();
- if (object.s != null)
- if ($util.Long)
- (message.s = $util.Long.fromValue(object.s)).unsigned = false;
- else if (typeof object.s === "string")
- message.s = parseInt(object.s, 10);
- else if (typeof object.s === "number")
- message.s = object.s;
- else if (typeof object.s === "object")
- message.s = new $util.LongBits(object.s.low >>> 0, object.s.high >>> 0).toNumber();
- if (object.b) {
- if (!Array.isArray(object.b))
- throw TypeError(".tutorial.Message.ReportData.b: array expected");
- message.b = [];
- for (var i = 0; i < object.b.length; ++i) {
- if (typeof object.b[i] !== "object")
- throw TypeError(".tutorial.Message.ReportData.b: object expected");
- message.b[i] = $root.tutorial.Message.BuildingInfo.fromObject(object.b[i]);
- }
- }
- if (object.ub) {
- if (!Array.isArray(object.ub))
- throw TypeError(".tutorial.Message.ReportData.ub: array expected");
- message.ub = [];
- for (var i = 0; i < object.ub.length; ++i) {
- if (typeof object.ub[i] !== "object")
- throw TypeError(".tutorial.Message.ReportData.ub: object expected");
- message.ub[i] = $root.tutorial.Message.BuildingInfo.fromObject(object.ub[i]);
- }
- }
- return message;
- };
-
-
- ReportData.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.b = [];
- object.ub = [];
- }
- if (options.defaults) {
- object.seq = 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.t = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.t = options.longs === String ? "0" : 0;
- object.cmd = 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.gi = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.gi = options.longs === String ? "0" : 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.s = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.s = options.longs === String ? "0" : 0;
- }
- if (message.seq != null && message.hasOwnProperty("seq"))
- object.seq = message.seq;
- if (message.t != null && message.hasOwnProperty("t"))
- if (typeof message.t === "number")
- object.t = options.longs === String ? String(message.t) : message.t;
- else
- object.t = options.longs === String ? $util.Long.prototype.toString.call(message.t) : options.longs === Number ? new $util.LongBits(message.t.low >>> 0, message.t.high >>> 0).toNumber() : message.t;
- if (message.cmd != null && message.hasOwnProperty("cmd"))
- object.cmd = message.cmd;
- if (message.gi != null && message.hasOwnProperty("gi"))
- if (typeof message.gi === "number")
- object.gi = options.longs === String ? String(message.gi) : message.gi;
- else
- object.gi = options.longs === String ? $util.Long.prototype.toString.call(message.gi) : options.longs === Number ? new $util.LongBits(message.gi.low >>> 0, message.gi.high >>> 0).toNumber() : message.gi;
- if (message.s != null && message.hasOwnProperty("s"))
- if (typeof message.s === "number")
- object.s = options.longs === String ? String(message.s) : message.s;
- else
- object.s = options.longs === String ? $util.Long.prototype.toString.call(message.s) : options.longs === Number ? new $util.LongBits(message.s.low >>> 0, message.s.high >>> 0).toNumber() : message.s;
- if (message.b && message.b.length) {
- object.b = [];
- for (var j = 0; j < message.b.length; ++j)
- object.b[j] = $root.tutorial.Message.BuildingInfo.toObject(message.b[j], options);
- }
- if (message.ub && message.ub.length) {
- object.ub = [];
- for (var j = 0; j < message.ub.length; ++j)
- object.ub[j] = $root.tutorial.Message.BuildingInfo.toObject(message.ub[j], options);
- }
- return object;
- };
-
-
- ReportData.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return ReportData;
- })();
-
- Message.BuildingInfo = (function() {
-
-
-
-
- function BuildingInfo(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
-
- BuildingInfo.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-
- BuildingInfo.prototype.l = 0;
-
-
- BuildingInfo.prototype.cc = 0;
-
-
- BuildingInfo.create = function create(properties) {
- return new BuildingInfo(properties);
- };
-
-
- BuildingInfo.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.id != null && message.hasOwnProperty("id"))
- writer.uint32(8).int64(message.id);
- if (message.l != null && message.hasOwnProperty("l"))
- writer.uint32(16).int32(message.l);
- if (message.cc != null && message.hasOwnProperty("cc"))
- writer.uint32(24).int32(message.cc);
- return writer;
- };
-
-
- BuildingInfo.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
-
- BuildingInfo.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tutorial.Message.BuildingInfo();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.id = reader.int64();
- break;
- case 2:
- message.l = reader.int32();
- break;
- case 3:
- message.cc = reader.int32();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
-
- BuildingInfo.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
-
- BuildingInfo.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.id != null && message.hasOwnProperty("id"))
- if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
- return "id: integer|Long expected";
- if (message.l != null && message.hasOwnProperty("l"))
- if (!$util.isInteger(message.l))
- return "l: integer expected";
- if (message.cc != null && message.hasOwnProperty("cc"))
- if (!$util.isInteger(message.cc))
- return "cc: integer expected";
- return null;
- };
-
-
- BuildingInfo.fromObject = function fromObject(object) {
- if (object instanceof $root.tutorial.Message.BuildingInfo)
- return object;
- var message = new $root.tutorial.Message.BuildingInfo();
- if (object.id != null)
- if ($util.Long)
- (message.id = $util.Long.fromValue(object.id)).unsigned = false;
- else if (typeof object.id === "string")
- message.id = parseInt(object.id, 10);
- else if (typeof object.id === "number")
- message.id = object.id;
- else if (typeof object.id === "object")
- message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
- if (object.l != null)
- message.l = object.l | 0;
- if (object.cc != null)
- message.cc = object.cc | 0;
- return message;
- };
-
-
- BuildingInfo.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.id = options.longs === String ? "0" : 0;
- object.l = 0;
- object.cc = 0;
- }
- if (message.id != null && message.hasOwnProperty("id"))
- if (typeof message.id === "number")
- object.id = options.longs === String ? String(message.id) : message.id;
- else
- object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id;
- if (message.l != null && message.hasOwnProperty("l"))
- object.l = message.l;
- if (message.cc != null && message.hasOwnProperty("cc"))
- object.cc = message.cc;
- return object;
- };
-
-
- BuildingInfo.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return BuildingInfo;
- })();
-
- return Message;
- })();
-
- return tutorial;
- })();
- return $root;
- });
|