/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ import * as $protobuf from "protobufjs/minimal"; // Common aliases const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); export const game = $root.game = (() => { /** * Namespace game. * @exports game * @namespace */ const game = {}; game.ping = (function() { /** * Properties of a ping. * @memberof game * @interface Iping */ /** * Constructs a new ping. * @memberof game * @classdesc Represents a ping. * @implements Iping * @constructor * @param {game.Iping=} [properties] Properties to set */ function ping(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new ping instance using the specified properties. * @function create * @memberof game.ping * @static * @param {game.Iping=} [properties] Properties to set * @returns {game.ping} ping instance */ ping.create = function create(properties) { return new ping(properties); }; /** * Encodes the specified ping message. Does not implicitly {@link game.ping.verify|verify} messages. * @function encode * @memberof game.ping * @static * @param {game.Iping} message ping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ping.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified ping message, length delimited. Does not implicitly {@link game.ping.verify|verify} messages. * @function encodeDelimited * @memberof game.ping * @static * @param {game.Iping} message ping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ping message from the specified reader or buffer. * @function decode * @memberof game.ping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.ping} ping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ping.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.ping(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ping message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.ping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.ping} ping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ping message. * @function verify * @memberof game.ping * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a ping message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.ping * @static * @param {Object.} object Plain object * @returns {game.ping} ping */ ping.fromObject = function fromObject(object) { if (object instanceof $root.game.ping) return object; return new $root.game.ping(); }; /** * Creates a plain object from a ping message. Also converts values to other types if specified. * @function toObject * @memberof game.ping * @static * @param {game.ping} message ping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ping.toObject = function toObject() { return {}; }; /** * Converts this ping to JSON. * @function toJSON * @memberof game.ping * @instance * @returns {Object.} JSON object */ ping.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return ping; })(); game.ping_rsp = (function() { /** * Properties of a ping_rsp. * @memberof game * @interface Iping_rsp * @property {number|Long|null} [time] ping_rsp time */ /** * Constructs a new ping_rsp. * @memberof game * @classdesc Represents a ping_rsp. * @implements Iping_rsp * @constructor * @param {game.Iping_rsp=} [properties] Properties to set */ function ping_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ping_rsp time. * @member {number|Long} time * @memberof game.ping_rsp * @instance */ ping_rsp.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new ping_rsp instance using the specified properties. * @function create * @memberof game.ping_rsp * @static * @param {game.Iping_rsp=} [properties] Properties to set * @returns {game.ping_rsp} ping_rsp instance */ ping_rsp.create = function create(properties) { return new ping_rsp(properties); }; /** * Encodes the specified ping_rsp message. Does not implicitly {@link game.ping_rsp.verify|verify} messages. * @function encode * @memberof game.ping_rsp * @static * @param {game.Iping_rsp} message ping_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ping_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.time); return writer; }; /** * Encodes the specified ping_rsp message, length delimited. Does not implicitly {@link game.ping_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.ping_rsp * @static * @param {game.Iping_rsp} message ping_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ping_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ping_rsp message from the specified reader or buffer. * @function decode * @memberof game.ping_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.ping_rsp} ping_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ping_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.ping_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.time = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ping_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.ping_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.ping_rsp} ping_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ping_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ping_rsp message. * @function verify * @memberof game.ping_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ping_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; return null; }; /** * Creates a ping_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.ping_rsp * @static * @param {Object.} object Plain object * @returns {game.ping_rsp} ping_rsp */ ping_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.ping_rsp) return object; let message = new $root.game.ping_rsp(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a ping_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.ping_rsp * @static * @param {game.ping_rsp} message ping_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ping_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; return object; }; /** * Converts this ping_rsp to JSON. * @function toJSON * @memberof game.ping_rsp * @instance * @returns {Object.} JSON object */ ping_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return ping_rsp; })(); game.login = (function() { /** * Properties of a login. * @memberof game * @interface Ilogin * @property {number|Long|null} [sid] login sid * @property {string|null} [account] login account * @property {string|null} [channel] login channel */ /** * Constructs a new login. * @memberof game * @classdesc Represents a login. * @implements Ilogin * @constructor * @param {game.Ilogin=} [properties] Properties to set */ function login(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * login sid. * @member {number|Long} sid * @memberof game.login * @instance */ login.prototype.sid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * login account. * @member {string} account * @memberof game.login * @instance */ login.prototype.account = ""; /** * login channel. * @member {string} channel * @memberof game.login * @instance */ login.prototype.channel = ""; /** * Creates a new login instance using the specified properties. * @function create * @memberof game.login * @static * @param {game.Ilogin=} [properties] Properties to set * @returns {game.login} login instance */ login.create = function create(properties) { return new login(properties); }; /** * Encodes the specified login message. Does not implicitly {@link game.login.verify|verify} messages. * @function encode * @memberof game.login * @static * @param {game.Ilogin} message login message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ login.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.sid); if (message.account != null && Object.hasOwnProperty.call(message, "account")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.account); if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.channel); return writer; }; /** * Encodes the specified login message, length delimited. Does not implicitly {@link game.login.verify|verify} messages. * @function encodeDelimited * @memberof game.login * @static * @param {game.Ilogin} message login message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ login.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a login message from the specified reader or buffer. * @function decode * @memberof game.login * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.login} login * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ login.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.login(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.int64(); break; case 2: message.account = reader.string(); break; case 3: message.channel = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a login message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.login * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.login} login * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ login.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a login message. * @function verify * @memberof game.login * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ login.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isInteger(message.sid) && !(message.sid && $util.isInteger(message.sid.low) && $util.isInteger(message.sid.high))) return "sid: integer|Long expected"; if (message.account != null && message.hasOwnProperty("account")) if (!$util.isString(message.account)) return "account: string expected"; if (message.channel != null && message.hasOwnProperty("channel")) if (!$util.isString(message.channel)) return "channel: string expected"; return null; }; /** * Creates a login message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.login * @static * @param {Object.} object Plain object * @returns {game.login} login */ login.fromObject = function fromObject(object) { if (object instanceof $root.game.login) return object; let message = new $root.game.login(); if (object.sid != null) if ($util.Long) (message.sid = $util.Long.fromValue(object.sid)).unsigned = false; else if (typeof object.sid === "string") message.sid = parseInt(object.sid, 10); else if (typeof object.sid === "number") message.sid = object.sid; else if (typeof object.sid === "object") message.sid = new $util.LongBits(object.sid.low >>> 0, object.sid.high >>> 0).toNumber(); if (object.account != null) message.account = String(object.account); if (object.channel != null) message.channel = String(object.channel); return message; }; /** * Creates a plain object from a login message. Also converts values to other types if specified. * @function toObject * @memberof game.login * @static * @param {game.login} message login * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ login.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.sid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.sid = options.longs === String ? "0" : 0; object.account = ""; object.channel = ""; } if (message.sid != null && message.hasOwnProperty("sid")) if (typeof message.sid === "number") object.sid = options.longs === String ? String(message.sid) : message.sid; else object.sid = options.longs === String ? $util.Long.prototype.toString.call(message.sid) : options.longs === Number ? new $util.LongBits(message.sid.low >>> 0, message.sid.high >>> 0).toNumber() : message.sid; if (message.account != null && message.hasOwnProperty("account")) object.account = message.account; if (message.channel != null && message.hasOwnProperty("channel")) object.channel = message.channel; return object; }; /** * Converts this login to JSON. * @function toJSON * @memberof game.login * @instance * @returns {Object.} JSON object */ login.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return login; })(); game.login_rsp = (function() { /** * Properties of a login_rsp. * @memberof game * @interface Ilogin_rsp * @property {number|Long|null} [errno] login_rsp errno */ /** * Constructs a new login_rsp. * @memberof game * @classdesc Represents a login_rsp. * @implements Ilogin_rsp * @constructor * @param {game.Ilogin_rsp=} [properties] Properties to set */ function login_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * login_rsp errno. * @member {number|Long} errno * @memberof game.login_rsp * @instance */ login_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new login_rsp instance using the specified properties. * @function create * @memberof game.login_rsp * @static * @param {game.Ilogin_rsp=} [properties] Properties to set * @returns {game.login_rsp} login_rsp instance */ login_rsp.create = function create(properties) { return new login_rsp(properties); }; /** * Encodes the specified login_rsp message. Does not implicitly {@link game.login_rsp.verify|verify} messages. * @function encode * @memberof game.login_rsp * @static * @param {game.Ilogin_rsp} message login_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ login_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified login_rsp message, length delimited. Does not implicitly {@link game.login_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.login_rsp * @static * @param {game.Ilogin_rsp} message login_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ login_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a login_rsp message from the specified reader or buffer. * @function decode * @memberof game.login_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.login_rsp} login_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ login_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.login_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a login_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.login_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.login_rsp} login_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ login_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a login_rsp message. * @function verify * @memberof game.login_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ login_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a login_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.login_rsp * @static * @param {Object.} object Plain object * @returns {game.login_rsp} login_rsp */ login_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.login_rsp) return object; let message = new $root.game.login_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a login_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.login_rsp * @static * @param {game.login_rsp} message login_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ login_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this login_rsp to JSON. * @function toJSON * @memberof game.login_rsp * @instance * @returns {Object.} JSON object */ login_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return login_rsp; })(); game.create = (function() { /** * Properties of a create. * @memberof game * @interface Icreate * @property {string|null} [nickname] create nickname */ /** * Constructs a new create. * @memberof game * @classdesc Represents a create. * @implements Icreate * @constructor * @param {game.Icreate=} [properties] Properties to set */ function create(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * create nickname. * @member {string} nickname * @memberof game.create * @instance */ create.prototype.nickname = ""; /** * Creates a new create instance using the specified properties. * @function create * @memberof game.create * @static * @param {game.Icreate=} [properties] Properties to set * @returns {game.create} create instance */ create.create = function create(properties) { return new create(properties); }; /** * Encodes the specified create message. Does not implicitly {@link game.create.verify|verify} messages. * @function encode * @memberof game.create * @static * @param {game.Icreate} message create message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ create.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.nickname); return writer; }; /** * Encodes the specified create message, length delimited. Does not implicitly {@link game.create.verify|verify} messages. * @function encodeDelimited * @memberof game.create * @static * @param {game.Icreate} message create message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ create.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a create message from the specified reader or buffer. * @function decode * @memberof game.create * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.create} create * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ create.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.create(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.nickname = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a create message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.create * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.create} create * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ create.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a create message. * @function verify * @memberof game.create * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ create.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.nickname != null && message.hasOwnProperty("nickname")) if (!$util.isString(message.nickname)) return "nickname: string expected"; return null; }; /** * Creates a create message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.create * @static * @param {Object.} object Plain object * @returns {game.create} create */ create.fromObject = function fromObject(object) { if (object instanceof $root.game.create) return object; let message = new $root.game.create(); if (object.nickname != null) message.nickname = String(object.nickname); return message; }; /** * Creates a plain object from a create message. Also converts values to other types if specified. * @function toObject * @memberof game.create * @static * @param {game.create} message create * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ create.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.nickname = ""; if (message.nickname != null && message.hasOwnProperty("nickname")) object.nickname = message.nickname; return object; }; /** * Converts this create to JSON. * @function toJSON * @memberof game.create * @instance * @returns {Object.} JSON object */ create.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return create; })(); game.create_rsp = (function() { /** * Properties of a create_rsp. * @memberof game * @interface Icreate_rsp * @property {number|Long|null} [errno] create_rsp errno */ /** * Constructs a new create_rsp. * @memberof game * @classdesc Represents a create_rsp. * @implements Icreate_rsp * @constructor * @param {game.Icreate_rsp=} [properties] Properties to set */ function create_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * create_rsp errno. * @member {number|Long} errno * @memberof game.create_rsp * @instance */ create_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new create_rsp instance using the specified properties. * @function create * @memberof game.create_rsp * @static * @param {game.Icreate_rsp=} [properties] Properties to set * @returns {game.create_rsp} create_rsp instance */ create_rsp.create = function create(properties) { return new create_rsp(properties); }; /** * Encodes the specified create_rsp message. Does not implicitly {@link game.create_rsp.verify|verify} messages. * @function encode * @memberof game.create_rsp * @static * @param {game.Icreate_rsp} message create_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ create_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified create_rsp message, length delimited. Does not implicitly {@link game.create_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.create_rsp * @static * @param {game.Icreate_rsp} message create_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ create_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a create_rsp message from the specified reader or buffer. * @function decode * @memberof game.create_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.create_rsp} create_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ create_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.create_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a create_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.create_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.create_rsp} create_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ create_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a create_rsp message. * @function verify * @memberof game.create_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ create_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a create_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.create_rsp * @static * @param {Object.} object Plain object * @returns {game.create_rsp} create_rsp */ create_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.create_rsp) return object; let message = new $root.game.create_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a create_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.create_rsp * @static * @param {game.create_rsp} message create_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ create_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this create_rsp to JSON. * @function toJSON * @memberof game.create_rsp * @instance * @returns {Object.} JSON object */ create_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return create_rsp; })(); game.user = (function() { /** * Properties of a user. * @memberof game * @interface Iuser * @property {string|null} [uid] user uid * @property {string|null} [nickname] user nickname * @property {number|Long|null} [level] user level * @property {number|Long|null} [exp] user exp * @property {number|Long|null} [avatar] user avatar * @property {number|Long|null} [svrtime] user svrtime * @property {number|Long|null} [renameTime] user renameTime * @property {number|Long|null} [createtime] user createtime * @property {Array.|null} [currency] user currency */ /** * Constructs a new user. * @memberof game * @classdesc Represents a user. * @implements Iuser * @constructor * @param {game.Iuser=} [properties] Properties to set */ function user(properties) { this.currency = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * user uid. * @member {string} uid * @memberof game.user * @instance */ user.prototype.uid = ""; /** * user nickname. * @member {string} nickname * @memberof game.user * @instance */ user.prototype.nickname = ""; /** * user level. * @member {number|Long} level * @memberof game.user * @instance */ user.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * user exp. * @member {number|Long} exp * @memberof game.user * @instance */ user.prototype.exp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * user avatar. * @member {number|Long} avatar * @memberof game.user * @instance */ user.prototype.avatar = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * user svrtime. * @member {number|Long} svrtime * @memberof game.user * @instance */ user.prototype.svrtime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * user renameTime. * @member {number|Long} renameTime * @memberof game.user * @instance */ user.prototype.renameTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * user createtime. * @member {number|Long} createtime * @memberof game.user * @instance */ user.prototype.createtime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * user currency. * @member {Array.} currency * @memberof game.user * @instance */ user.prototype.currency = $util.emptyArray; /** * Creates a new user instance using the specified properties. * @function create * @memberof game.user * @static * @param {game.Iuser=} [properties] Properties to set * @returns {game.user} user instance */ user.create = function create(properties) { return new user(properties); }; /** * Encodes the specified user message. Does not implicitly {@link game.user.verify|verify} messages. * @function encode * @memberof game.user * @static * @param {game.Iuser} message user message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ user.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid); if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nickname); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.level); if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.exp); if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.avatar); if (message.svrtime != null && Object.hasOwnProperty.call(message, "svrtime")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.svrtime); if (message.renameTime != null && Object.hasOwnProperty.call(message, "renameTime")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.renameTime); if (message.createtime != null && Object.hasOwnProperty.call(message, "createtime")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.createtime); if (message.currency != null && message.currency.length) for (let i = 0; i < message.currency.length; ++i) $root.game.id_num.encode(message.currency[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); return writer; }; /** * Encodes the specified user message, length delimited. Does not implicitly {@link game.user.verify|verify} messages. * @function encodeDelimited * @memberof game.user * @static * @param {game.Iuser} message user message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ user.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a user message from the specified reader or buffer. * @function decode * @memberof game.user * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.user} user * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ user.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.user(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.uid = reader.string(); break; case 2: message.nickname = reader.string(); break; case 3: message.level = reader.int64(); break; case 4: message.exp = reader.int64(); break; case 5: message.avatar = reader.int64(); break; case 6: message.svrtime = reader.int64(); break; case 7: message.renameTime = reader.int64(); break; case 8: message.createtime = reader.int64(); break; case 20: if (!(message.currency && message.currency.length)) message.currency = []; message.currency.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a user message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.user * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.user} user * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ user.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a user message. * @function verify * @memberof game.user * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ user.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; if (message.nickname != null && message.hasOwnProperty("nickname")) if (!$util.isString(message.nickname)) return "nickname: string expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp) && !(message.exp && $util.isInteger(message.exp.low) && $util.isInteger(message.exp.high))) return "exp: integer|Long expected"; if (message.avatar != null && message.hasOwnProperty("avatar")) if (!$util.isInteger(message.avatar) && !(message.avatar && $util.isInteger(message.avatar.low) && $util.isInteger(message.avatar.high))) return "avatar: integer|Long expected"; if (message.svrtime != null && message.hasOwnProperty("svrtime")) if (!$util.isInteger(message.svrtime) && !(message.svrtime && $util.isInteger(message.svrtime.low) && $util.isInteger(message.svrtime.high))) return "svrtime: integer|Long expected"; if (message.renameTime != null && message.hasOwnProperty("renameTime")) if (!$util.isInteger(message.renameTime) && !(message.renameTime && $util.isInteger(message.renameTime.low) && $util.isInteger(message.renameTime.high))) return "renameTime: integer|Long expected"; if (message.createtime != null && message.hasOwnProperty("createtime")) if (!$util.isInteger(message.createtime) && !(message.createtime && $util.isInteger(message.createtime.low) && $util.isInteger(message.createtime.high))) return "createtime: integer|Long expected"; if (message.currency != null && message.hasOwnProperty("currency")) { if (!Array.isArray(message.currency)) return "currency: array expected"; for (let i = 0; i < message.currency.length; ++i) { let error = $root.game.id_num.verify(message.currency[i]); if (error) return "currency." + error; } } return null; }; /** * Creates a user message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.user * @static * @param {Object.} object Plain object * @returns {game.user} user */ user.fromObject = function fromObject(object) { if (object instanceof $root.game.user) return object; let message = new $root.game.user(); if (object.uid != null) message.uid = String(object.uid); if (object.nickname != null) message.nickname = String(object.nickname); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.exp != null) if ($util.Long) (message.exp = $util.Long.fromValue(object.exp)).unsigned = false; else if (typeof object.exp === "string") message.exp = parseInt(object.exp, 10); else if (typeof object.exp === "number") message.exp = object.exp; else if (typeof object.exp === "object") message.exp = new $util.LongBits(object.exp.low >>> 0, object.exp.high >>> 0).toNumber(); if (object.avatar != null) if ($util.Long) (message.avatar = $util.Long.fromValue(object.avatar)).unsigned = false; else if (typeof object.avatar === "string") message.avatar = parseInt(object.avatar, 10); else if (typeof object.avatar === "number") message.avatar = object.avatar; else if (typeof object.avatar === "object") message.avatar = new $util.LongBits(object.avatar.low >>> 0, object.avatar.high >>> 0).toNumber(); if (object.svrtime != null) if ($util.Long) (message.svrtime = $util.Long.fromValue(object.svrtime)).unsigned = false; else if (typeof object.svrtime === "string") message.svrtime = parseInt(object.svrtime, 10); else if (typeof object.svrtime === "number") message.svrtime = object.svrtime; else if (typeof object.svrtime === "object") message.svrtime = new $util.LongBits(object.svrtime.low >>> 0, object.svrtime.high >>> 0).toNumber(); if (object.renameTime != null) if ($util.Long) (message.renameTime = $util.Long.fromValue(object.renameTime)).unsigned = false; else if (typeof object.renameTime === "string") message.renameTime = parseInt(object.renameTime, 10); else if (typeof object.renameTime === "number") message.renameTime = object.renameTime; else if (typeof object.renameTime === "object") message.renameTime = new $util.LongBits(object.renameTime.low >>> 0, object.renameTime.high >>> 0).toNumber(); if (object.createtime != null) if ($util.Long) (message.createtime = $util.Long.fromValue(object.createtime)).unsigned = false; else if (typeof object.createtime === "string") message.createtime = parseInt(object.createtime, 10); else if (typeof object.createtime === "number") message.createtime = object.createtime; else if (typeof object.createtime === "object") message.createtime = new $util.LongBits(object.createtime.low >>> 0, object.createtime.high >>> 0).toNumber(); if (object.currency) { if (!Array.isArray(object.currency)) throw TypeError(".game.user.currency: array expected"); message.currency = []; for (let i = 0; i < object.currency.length; ++i) { if (typeof object.currency[i] !== "object") throw TypeError(".game.user.currency: object expected"); message.currency[i] = $root.game.id_num.fromObject(object.currency[i]); } } return message; }; /** * Creates a plain object from a user message. Also converts values to other types if specified. * @function toObject * @memberof game.user * @static * @param {game.user} message user * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ user.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.currency = []; if (options.defaults) { object.uid = ""; object.nickname = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exp = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.avatar = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.avatar = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.svrtime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.svrtime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.renameTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.renameTime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.createtime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.createtime = options.longs === String ? "0" : 0; } if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; if (message.nickname != null && message.hasOwnProperty("nickname")) object.nickname = message.nickname; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.exp != null && message.hasOwnProperty("exp")) if (typeof message.exp === "number") object.exp = options.longs === String ? String(message.exp) : message.exp; else object.exp = options.longs === String ? $util.Long.prototype.toString.call(message.exp) : options.longs === Number ? new $util.LongBits(message.exp.low >>> 0, message.exp.high >>> 0).toNumber() : message.exp; if (message.avatar != null && message.hasOwnProperty("avatar")) if (typeof message.avatar === "number") object.avatar = options.longs === String ? String(message.avatar) : message.avatar; else object.avatar = options.longs === String ? $util.Long.prototype.toString.call(message.avatar) : options.longs === Number ? new $util.LongBits(message.avatar.low >>> 0, message.avatar.high >>> 0).toNumber() : message.avatar; if (message.svrtime != null && message.hasOwnProperty("svrtime")) if (typeof message.svrtime === "number") object.svrtime = options.longs === String ? String(message.svrtime) : message.svrtime; else object.svrtime = options.longs === String ? $util.Long.prototype.toString.call(message.svrtime) : options.longs === Number ? new $util.LongBits(message.svrtime.low >>> 0, message.svrtime.high >>> 0).toNumber() : message.svrtime; if (message.renameTime != null && message.hasOwnProperty("renameTime")) if (typeof message.renameTime === "number") object.renameTime = options.longs === String ? String(message.renameTime) : message.renameTime; else object.renameTime = options.longs === String ? $util.Long.prototype.toString.call(message.renameTime) : options.longs === Number ? new $util.LongBits(message.renameTime.low >>> 0, message.renameTime.high >>> 0).toNumber() : message.renameTime; if (message.createtime != null && message.hasOwnProperty("createtime")) if (typeof message.createtime === "number") object.createtime = options.longs === String ? String(message.createtime) : message.createtime; else object.createtime = options.longs === String ? $util.Long.prototype.toString.call(message.createtime) : options.longs === Number ? new $util.LongBits(message.createtime.low >>> 0, message.createtime.high >>> 0).toNumber() : message.createtime; if (message.currency && message.currency.length) { object.currency = []; for (let j = 0; j < message.currency.length; ++j) object.currency[j] = $root.game.id_num.toObject(message.currency[j], options); } return object; }; /** * Converts this user to JSON. * @function toJSON * @memberof game.user * @instance * @returns {Object.} JSON object */ user.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return user; })(); game.reward_info = (function() { /** * Properties of a reward_info. * @memberof game * @interface Ireward_info * @property {string|null} [flags] reward_info flags * @property {game.Ireward|null} [added] reward_info added */ /** * Constructs a new reward_info. * @memberof game * @classdesc Represents a reward_info. * @implements Ireward_info * @constructor * @param {game.Ireward_info=} [properties] Properties to set */ function reward_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * reward_info flags. * @member {string} flags * @memberof game.reward_info * @instance */ reward_info.prototype.flags = ""; /** * reward_info added. * @member {game.Ireward|null|undefined} added * @memberof game.reward_info * @instance */ reward_info.prototype.added = null; /** * Creates a new reward_info instance using the specified properties. * @function create * @memberof game.reward_info * @static * @param {game.Ireward_info=} [properties] Properties to set * @returns {game.reward_info} reward_info instance */ reward_info.create = function create(properties) { return new reward_info(properties); }; /** * Encodes the specified reward_info message. Does not implicitly {@link game.reward_info.verify|verify} messages. * @function encode * @memberof game.reward_info * @static * @param {game.Ireward_info} message reward_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ reward_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.flags); if (message.added != null && Object.hasOwnProperty.call(message, "added")) $root.game.reward.encode(message.added, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified reward_info message, length delimited. Does not implicitly {@link game.reward_info.verify|verify} messages. * @function encodeDelimited * @memberof game.reward_info * @static * @param {game.Ireward_info} message reward_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ reward_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a reward_info message from the specified reader or buffer. * @function decode * @memberof game.reward_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.reward_info} reward_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ reward_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.reward_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.flags = reader.string(); break; case 2: message.added = $root.game.reward.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a reward_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.reward_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.reward_info} reward_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ reward_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a reward_info message. * @function verify * @memberof game.reward_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ reward_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.flags != null && message.hasOwnProperty("flags")) if (!$util.isString(message.flags)) return "flags: string expected"; if (message.added != null && message.hasOwnProperty("added")) { let error = $root.game.reward.verify(message.added); if (error) return "added." + error; } return null; }; /** * Creates a reward_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.reward_info * @static * @param {Object.} object Plain object * @returns {game.reward_info} reward_info */ reward_info.fromObject = function fromObject(object) { if (object instanceof $root.game.reward_info) return object; let message = new $root.game.reward_info(); if (object.flags != null) message.flags = String(object.flags); if (object.added != null) { if (typeof object.added !== "object") throw TypeError(".game.reward_info.added: object expected"); message.added = $root.game.reward.fromObject(object.added); } return message; }; /** * Creates a plain object from a reward_info message. Also converts values to other types if specified. * @function toObject * @memberof game.reward_info * @static * @param {game.reward_info} message reward_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ reward_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.flags = ""; object.added = null; } if (message.flags != null && message.hasOwnProperty("flags")) object.flags = message.flags; if (message.added != null && message.hasOwnProperty("added")) object.added = $root.game.reward.toObject(message.added, options); return object; }; /** * Converts this reward_info to JSON. * @function toJSON * @memberof game.reward_info * @instance * @returns {Object.} JSON object */ reward_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return reward_info; })(); game.city_change = (function() { /** * Properties of a city_change. * @memberof game * @interface Icity_change * @property {game.Iid_num|null} [currency] city_change currency * @property {number|Long|null} [time] city_change time */ /** * Constructs a new city_change. * @memberof game * @classdesc Represents a city_change. * @implements Icity_change * @constructor * @param {game.Icity_change=} [properties] Properties to set */ function city_change(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_change currency. * @member {game.Iid_num|null|undefined} currency * @memberof game.city_change * @instance */ city_change.prototype.currency = null; /** * city_change time. * @member {number|Long} time * @memberof game.city_change * @instance */ city_change.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new city_change instance using the specified properties. * @function create * @memberof game.city_change * @static * @param {game.Icity_change=} [properties] Properties to set * @returns {game.city_change} city_change instance */ city_change.create = function create(properties) { return new city_change(properties); }; /** * Encodes the specified city_change message. Does not implicitly {@link game.city_change.verify|verify} messages. * @function encode * @memberof game.city_change * @static * @param {game.Icity_change} message city_change message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_change.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) $root.game.id_num.encode(message.currency, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time); return writer; }; /** * Encodes the specified city_change message, length delimited. Does not implicitly {@link game.city_change.verify|verify} messages. * @function encodeDelimited * @memberof game.city_change * @static * @param {game.Icity_change} message city_change message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_change.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_change message from the specified reader or buffer. * @function decode * @memberof game.city_change * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_change} city_change * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_change.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_change(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.currency = $root.game.id_num.decode(reader, reader.uint32()); break; case 3: message.time = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_change message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_change * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_change} city_change * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_change.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_change message. * @function verify * @memberof game.city_change * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_change.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.currency != null && message.hasOwnProperty("currency")) { let error = $root.game.id_num.verify(message.currency); if (error) return "currency." + error; } if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; return null; }; /** * Creates a city_change message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_change * @static * @param {Object.} object Plain object * @returns {game.city_change} city_change */ city_change.fromObject = function fromObject(object) { if (object instanceof $root.game.city_change) return object; let message = new $root.game.city_change(); if (object.currency != null) { if (typeof object.currency !== "object") throw TypeError(".game.city_change.currency: object expected"); message.currency = $root.game.id_num.fromObject(object.currency); } if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a city_change message. Also converts values to other types if specified. * @function toObject * @memberof game.city_change * @static * @param {game.city_change} message city_change * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_change.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.currency = null; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; } if (message.currency != null && message.hasOwnProperty("currency")) object.currency = $root.game.id_num.toObject(message.currency, options); if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; return object; }; /** * Converts this city_change to JSON. * @function toJSON * @memberof game.city_change * @instance * @returns {Object.} JSON object */ city_change.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_change; })(); game.pay_currency = (function() { /** * Properties of a pay_currency. * @memberof game * @interface Ipay_currency * @property {Array.|null} [now] pay_currency now * @property {Array.|null} [pay] pay_currency pay */ /** * Constructs a new pay_currency. * @memberof game * @classdesc Represents a pay_currency. * @implements Ipay_currency * @constructor * @param {game.Ipay_currency=} [properties] Properties to set */ function pay_currency(properties) { this.now = []; this.pay = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pay_currency now. * @member {Array.} now * @memberof game.pay_currency * @instance */ pay_currency.prototype.now = $util.emptyArray; /** * pay_currency pay. * @member {Array.} pay * @memberof game.pay_currency * @instance */ pay_currency.prototype.pay = $util.emptyArray; /** * Creates a new pay_currency instance using the specified properties. * @function create * @memberof game.pay_currency * @static * @param {game.Ipay_currency=} [properties] Properties to set * @returns {game.pay_currency} pay_currency instance */ pay_currency.create = function create(properties) { return new pay_currency(properties); }; /** * Encodes the specified pay_currency message. Does not implicitly {@link game.pay_currency.verify|verify} messages. * @function encode * @memberof game.pay_currency * @static * @param {game.Ipay_currency} message pay_currency message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pay_currency.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.now != null && message.now.length) for (let i = 0; i < message.now.length; ++i) $root.game.id_num.encode(message.now[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.pay != null && message.pay.length) for (let i = 0; i < message.pay.length; ++i) $root.game.id_num.encode(message.pay[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified pay_currency message, length delimited. Does not implicitly {@link game.pay_currency.verify|verify} messages. * @function encodeDelimited * @memberof game.pay_currency * @static * @param {game.Ipay_currency} message pay_currency message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pay_currency.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pay_currency message from the specified reader or buffer. * @function decode * @memberof game.pay_currency * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pay_currency} pay_currency * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pay_currency.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pay_currency(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.now && message.now.length)) message.now = []; message.now.push($root.game.id_num.decode(reader, reader.uint32())); break; case 2: if (!(message.pay && message.pay.length)) message.pay = []; message.pay.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pay_currency message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pay_currency * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pay_currency} pay_currency * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pay_currency.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pay_currency message. * @function verify * @memberof game.pay_currency * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pay_currency.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.now != null && message.hasOwnProperty("now")) { if (!Array.isArray(message.now)) return "now: array expected"; for (let i = 0; i < message.now.length; ++i) { let error = $root.game.id_num.verify(message.now[i]); if (error) return "now." + error; } } if (message.pay != null && message.hasOwnProperty("pay")) { if (!Array.isArray(message.pay)) return "pay: array expected"; for (let i = 0; i < message.pay.length; ++i) { let error = $root.game.id_num.verify(message.pay[i]); if (error) return "pay." + error; } } return null; }; /** * Creates a pay_currency message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pay_currency * @static * @param {Object.} object Plain object * @returns {game.pay_currency} pay_currency */ pay_currency.fromObject = function fromObject(object) { if (object instanceof $root.game.pay_currency) return object; let message = new $root.game.pay_currency(); if (object.now) { if (!Array.isArray(object.now)) throw TypeError(".game.pay_currency.now: array expected"); message.now = []; for (let i = 0; i < object.now.length; ++i) { if (typeof object.now[i] !== "object") throw TypeError(".game.pay_currency.now: object expected"); message.now[i] = $root.game.id_num.fromObject(object.now[i]); } } if (object.pay) { if (!Array.isArray(object.pay)) throw TypeError(".game.pay_currency.pay: array expected"); message.pay = []; for (let i = 0; i < object.pay.length; ++i) { if (typeof object.pay[i] !== "object") throw TypeError(".game.pay_currency.pay: object expected"); message.pay[i] = $root.game.id_num.fromObject(object.pay[i]); } } return message; }; /** * Creates a plain object from a pay_currency message. Also converts values to other types if specified. * @function toObject * @memberof game.pay_currency * @static * @param {game.pay_currency} message pay_currency * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pay_currency.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.now = []; object.pay = []; } if (message.now && message.now.length) { object.now = []; for (let j = 0; j < message.now.length; ++j) object.now[j] = $root.game.id_num.toObject(message.now[j], options); } if (message.pay && message.pay.length) { object.pay = []; for (let j = 0; j < message.pay.length; ++j) object.pay[j] = $root.game.id_num.toObject(message.pay[j], options); } return object; }; /** * Converts this pay_currency to JSON. * @function toJSON * @memberof game.pay_currency * @instance * @returns {Object.} JSON object */ pay_currency.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pay_currency; })(); game.pay_debris_nty = (function() { /** * Properties of a pay_debris_nty. * @memberof game * @interface Ipay_debris_nty * @property {Array.|null} [list] pay_debris_nty list */ /** * Constructs a new pay_debris_nty. * @memberof game * @classdesc Represents a pay_debris_nty. * @implements Ipay_debris_nty * @constructor * @param {game.Ipay_debris_nty=} [properties] Properties to set */ function pay_debris_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pay_debris_nty list. * @member {Array.} list * @memberof game.pay_debris_nty * @instance */ pay_debris_nty.prototype.list = $util.emptyArray; /** * Creates a new pay_debris_nty instance using the specified properties. * @function create * @memberof game.pay_debris_nty * @static * @param {game.Ipay_debris_nty=} [properties] Properties to set * @returns {game.pay_debris_nty} pay_debris_nty instance */ pay_debris_nty.create = function create(properties) { return new pay_debris_nty(properties); }; /** * Encodes the specified pay_debris_nty message. Does not implicitly {@link game.pay_debris_nty.verify|verify} messages. * @function encode * @memberof game.pay_debris_nty * @static * @param {game.Ipay_debris_nty} message pay_debris_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pay_debris_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.id_num.encode(message.list[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified pay_debris_nty message, length delimited. Does not implicitly {@link game.pay_debris_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.pay_debris_nty * @static * @param {game.Ipay_debris_nty} message pay_debris_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pay_debris_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pay_debris_nty message from the specified reader or buffer. * @function decode * @memberof game.pay_debris_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pay_debris_nty} pay_debris_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pay_debris_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pay_debris_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pay_debris_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pay_debris_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pay_debris_nty} pay_debris_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pay_debris_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pay_debris_nty message. * @function verify * @memberof game.pay_debris_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pay_debris_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.id_num.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a pay_debris_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pay_debris_nty * @static * @param {Object.} object Plain object * @returns {game.pay_debris_nty} pay_debris_nty */ pay_debris_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.pay_debris_nty) return object; let message = new $root.game.pay_debris_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.pay_debris_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.pay_debris_nty.list: object expected"); message.list[i] = $root.game.id_num.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a pay_debris_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.pay_debris_nty * @static * @param {game.pay_debris_nty} message pay_debris_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pay_debris_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.id_num.toObject(message.list[j], options); } return object; }; /** * Converts this pay_debris_nty to JSON. * @function toJSON * @memberof game.pay_debris_nty * @instance * @returns {Object.} JSON object */ pay_debris_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pay_debris_nty; })(); game.exception_nty = (function() { /** * Properties of an exception_nty. * @memberof game * @interface Iexception_nty * @property {number|Long|null} [errno] exception_nty errno */ /** * Constructs a new exception_nty. * @memberof game * @classdesc Represents an exception_nty. * @implements Iexception_nty * @constructor * @param {game.Iexception_nty=} [properties] Properties to set */ function exception_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * exception_nty errno. * @member {number|Long} errno * @memberof game.exception_nty * @instance */ exception_nty.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new exception_nty instance using the specified properties. * @function create * @memberof game.exception_nty * @static * @param {game.Iexception_nty=} [properties] Properties to set * @returns {game.exception_nty} exception_nty instance */ exception_nty.create = function create(properties) { return new exception_nty(properties); }; /** * Encodes the specified exception_nty message. Does not implicitly {@link game.exception_nty.verify|verify} messages. * @function encode * @memberof game.exception_nty * @static * @param {game.Iexception_nty} message exception_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ exception_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified exception_nty message, length delimited. Does not implicitly {@link game.exception_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.exception_nty * @static * @param {game.Iexception_nty} message exception_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ exception_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an exception_nty message from the specified reader or buffer. * @function decode * @memberof game.exception_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.exception_nty} exception_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ exception_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.exception_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an exception_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.exception_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.exception_nty} exception_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ exception_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an exception_nty message. * @function verify * @memberof game.exception_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ exception_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an exception_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.exception_nty * @static * @param {Object.} object Plain object * @returns {game.exception_nty} exception_nty */ exception_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.exception_nty) return object; let message = new $root.game.exception_nty(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an exception_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.exception_nty * @static * @param {game.exception_nty} message exception_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ exception_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this exception_nty to JSON. * @function toJSON * @memberof game.exception_nty * @instance * @returns {Object.} JSON object */ exception_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return exception_nty; })(); game.create_order_nty = (function() { /** * Properties of a create_order_nty. * @memberof game * @interface Icreate_order_nty * @property {string|null} [id] create_order_nty id * @property {number|Long|null} [cfid] create_order_nty cfid */ /** * Constructs a new create_order_nty. * @memberof game * @classdesc Represents a create_order_nty. * @implements Icreate_order_nty * @constructor * @param {game.Icreate_order_nty=} [properties] Properties to set */ function create_order_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * create_order_nty id. * @member {string} id * @memberof game.create_order_nty * @instance */ create_order_nty.prototype.id = ""; /** * create_order_nty cfid. * @member {number|Long} cfid * @memberof game.create_order_nty * @instance */ create_order_nty.prototype.cfid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new create_order_nty instance using the specified properties. * @function create * @memberof game.create_order_nty * @static * @param {game.Icreate_order_nty=} [properties] Properties to set * @returns {game.create_order_nty} create_order_nty instance */ create_order_nty.create = function create(properties) { return new create_order_nty(properties); }; /** * Encodes the specified create_order_nty message. Does not implicitly {@link game.create_order_nty.verify|verify} messages. * @function encode * @memberof game.create_order_nty * @static * @param {game.Icreate_order_nty} message create_order_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ create_order_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.cfid != null && Object.hasOwnProperty.call(message, "cfid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.cfid); return writer; }; /** * Encodes the specified create_order_nty message, length delimited. Does not implicitly {@link game.create_order_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.create_order_nty * @static * @param {game.Icreate_order_nty} message create_order_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ create_order_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a create_order_nty message from the specified reader or buffer. * @function decode * @memberof game.create_order_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.create_order_nty} create_order_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ create_order_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.create_order_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.string(); break; case 2: message.cfid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a create_order_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.create_order_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.create_order_nty} create_order_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ create_order_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a create_order_nty message. * @function verify * @memberof game.create_order_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ create_order_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; if (message.cfid != null && message.hasOwnProperty("cfid")) if (!$util.isInteger(message.cfid) && !(message.cfid && $util.isInteger(message.cfid.low) && $util.isInteger(message.cfid.high))) return "cfid: integer|Long expected"; return null; }; /** * Creates a create_order_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.create_order_nty * @static * @param {Object.} object Plain object * @returns {game.create_order_nty} create_order_nty */ create_order_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.create_order_nty) return object; let message = new $root.game.create_order_nty(); if (object.id != null) message.id = String(object.id); if (object.cfid != null) if ($util.Long) (message.cfid = $util.Long.fromValue(object.cfid)).unsigned = false; else if (typeof object.cfid === "string") message.cfid = parseInt(object.cfid, 10); else if (typeof object.cfid === "number") message.cfid = object.cfid; else if (typeof object.cfid === "object") message.cfid = new $util.LongBits(object.cfid.low >>> 0, object.cfid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a create_order_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.create_order_nty * @static * @param {game.create_order_nty} message create_order_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ create_order_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.id = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.cfid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.cfid = options.longs === String ? "0" : 0; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.cfid != null && message.hasOwnProperty("cfid")) if (typeof message.cfid === "number") object.cfid = options.longs === String ? String(message.cfid) : message.cfid; else object.cfid = options.longs === String ? $util.Long.prototype.toString.call(message.cfid) : options.longs === Number ? new $util.LongBits(message.cfid.low >>> 0, message.cfid.high >>> 0).toNumber() : message.cfid; return object; }; /** * Converts this create_order_nty to JSON. * @function toJSON * @memberof game.create_order_nty * @instance * @returns {Object.} JSON object */ create_order_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return create_order_nty; })(); game.city_data = (function() { /** * Properties of a city_data. * @memberof game * @interface Icity_data */ /** * Constructs a new city_data. * @memberof game * @classdesc Represents a city_data. * @implements Icity_data * @constructor * @param {game.Icity_data=} [properties] Properties to set */ function city_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new city_data instance using the specified properties. * @function create * @memberof game.city_data * @static * @param {game.Icity_data=} [properties] Properties to set * @returns {game.city_data} city_data instance */ city_data.create = function create(properties) { return new city_data(properties); }; /** * Encodes the specified city_data message. Does not implicitly {@link game.city_data.verify|verify} messages. * @function encode * @memberof game.city_data * @static * @param {game.Icity_data} message city_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified city_data message, length delimited. Does not implicitly {@link game.city_data.verify|verify} messages. * @function encodeDelimited * @memberof game.city_data * @static * @param {game.Icity_data} message city_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_data message from the specified reader or buffer. * @function decode * @memberof game.city_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_data} city_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_data} city_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_data message. * @function verify * @memberof game.city_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a city_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_data * @static * @param {Object.} object Plain object * @returns {game.city_data} city_data */ city_data.fromObject = function fromObject(object) { if (object instanceof $root.game.city_data) return object; return new $root.game.city_data(); }; /** * Creates a plain object from a city_data message. Also converts values to other types if specified. * @function toObject * @memberof game.city_data * @static * @param {game.city_data} message city_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_data.toObject = function toObject() { return {}; }; /** * Converts this city_data to JSON. * @function toJSON * @memberof game.city_data * @instance * @returns {Object.} JSON object */ city_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_data; })(); game.city_data_rsp = (function() { /** * Properties of a city_data_rsp. * @memberof game * @interface Icity_data_rsp * @property {number|Long|null} [errno] city_data_rsp errno * @property {number|Long|null} [time] city_data_rsp time * @property {Array.|null} [list] city_data_rsp list * @property {Array.|null} [skillList] city_data_rsp skillList * @property {number|Long|null} [skillid] city_data_rsp skillid */ /** * Constructs a new city_data_rsp. * @memberof game * @classdesc Represents a city_data_rsp. * @implements Icity_data_rsp * @constructor * @param {game.Icity_data_rsp=} [properties] Properties to set */ function city_data_rsp(properties) { this.list = []; this.skillList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_data_rsp errno. * @member {number|Long} errno * @memberof game.city_data_rsp * @instance */ city_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * city_data_rsp time. * @member {number|Long} time * @memberof game.city_data_rsp * @instance */ city_data_rsp.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * city_data_rsp list. * @member {Array.} list * @memberof game.city_data_rsp * @instance */ city_data_rsp.prototype.list = $util.emptyArray; /** * city_data_rsp skillList. * @member {Array.} skillList * @memberof game.city_data_rsp * @instance */ city_data_rsp.prototype.skillList = $util.emptyArray; /** * city_data_rsp skillid. * @member {number|Long} skillid * @memberof game.city_data_rsp * @instance */ city_data_rsp.prototype.skillid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new city_data_rsp instance using the specified properties. * @function create * @memberof game.city_data_rsp * @static * @param {game.Icity_data_rsp=} [properties] Properties to set * @returns {game.city_data_rsp} city_data_rsp instance */ city_data_rsp.create = function create(properties) { return new city_data_rsp(properties); }; /** * Encodes the specified city_data_rsp message. Does not implicitly {@link game.city_data_rsp.verify|verify} messages. * @function encode * @memberof game.city_data_rsp * @static * @param {game.Icity_data_rsp} message city_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.time); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.building.encode(message.list[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.skillList != null && message.skillList.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (let i = 0; i < message.skillList.length; ++i) writer.int64(message.skillList[i]); writer.ldelim(); } if (message.skillid != null && Object.hasOwnProperty.call(message, "skillid")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.skillid); return writer; }; /** * Encodes the specified city_data_rsp message, length delimited. Does not implicitly {@link game.city_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.city_data_rsp * @static * @param {game.Icity_data_rsp} message city_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.city_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_data_rsp} city_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.time = reader.int64(); break; case 3: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.building.decode(reader, reader.uint32())); break; case 4: if (!(message.skillList && message.skillList.length)) message.skillList = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.skillList.push(reader.int64()); } else message.skillList.push(reader.int64()); break; case 5: message.skillid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_data_rsp} city_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_data_rsp message. * @function verify * @memberof game.city_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.building.verify(message.list[i]); if (error) return "list." + error; } } if (message.skillList != null && message.hasOwnProperty("skillList")) { if (!Array.isArray(message.skillList)) return "skillList: array expected"; for (let i = 0; i < message.skillList.length; ++i) if (!$util.isInteger(message.skillList[i]) && !(message.skillList[i] && $util.isInteger(message.skillList[i].low) && $util.isInteger(message.skillList[i].high))) return "skillList: integer|Long[] expected"; } if (message.skillid != null && message.hasOwnProperty("skillid")) if (!$util.isInteger(message.skillid) && !(message.skillid && $util.isInteger(message.skillid.low) && $util.isInteger(message.skillid.high))) return "skillid: integer|Long expected"; return null; }; /** * Creates a city_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_data_rsp * @static * @param {Object.} object Plain object * @returns {game.city_data_rsp} city_data_rsp */ city_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.city_data_rsp) return object; let message = new $root.game.city_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.city_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.city_data_rsp.list: object expected"); message.list[i] = $root.game.building.fromObject(object.list[i]); } } if (object.skillList) { if (!Array.isArray(object.skillList)) throw TypeError(".game.city_data_rsp.skillList: array expected"); message.skillList = []; for (let i = 0; i < object.skillList.length; ++i) if ($util.Long) (message.skillList[i] = $util.Long.fromValue(object.skillList[i])).unsigned = false; else if (typeof object.skillList[i] === "string") message.skillList[i] = parseInt(object.skillList[i], 10); else if (typeof object.skillList[i] === "number") message.skillList[i] = object.skillList[i]; else if (typeof object.skillList[i] === "object") message.skillList[i] = new $util.LongBits(object.skillList[i].low >>> 0, object.skillList[i].high >>> 0).toNumber(); } if (object.skillid != null) if ($util.Long) (message.skillid = $util.Long.fromValue(object.skillid)).unsigned = false; else if (typeof object.skillid === "string") message.skillid = parseInt(object.skillid, 10); else if (typeof object.skillid === "number") message.skillid = object.skillid; else if (typeof object.skillid === "object") message.skillid = new $util.LongBits(object.skillid.low >>> 0, object.skillid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a city_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.city_data_rsp * @static * @param {game.city_data_rsp} message city_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.list = []; object.skillList = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.skillid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.skillid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.building.toObject(message.list[j], options); } if (message.skillList && message.skillList.length) { object.skillList = []; for (let j = 0; j < message.skillList.length; ++j) if (typeof message.skillList[j] === "number") object.skillList[j] = options.longs === String ? String(message.skillList[j]) : message.skillList[j]; else object.skillList[j] = options.longs === String ? $util.Long.prototype.toString.call(message.skillList[j]) : options.longs === Number ? new $util.LongBits(message.skillList[j].low >>> 0, message.skillList[j].high >>> 0).toNumber() : message.skillList[j]; } if (message.skillid != null && message.hasOwnProperty("skillid")) if (typeof message.skillid === "number") object.skillid = options.longs === String ? String(message.skillid) : message.skillid; else object.skillid = options.longs === String ? $util.Long.prototype.toString.call(message.skillid) : options.longs === Number ? new $util.LongBits(message.skillid.low >>> 0, message.skillid.high >>> 0).toNumber() : message.skillid; return object; }; /** * Converts this city_data_rsp to JSON. * @function toJSON * @memberof game.city_data_rsp * @instance * @returns {Object.} JSON object */ city_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_data_rsp; })(); game.city_data_send = (function() { /** * Properties of a city_data_send. * @memberof game * @interface Icity_data_send * @property {number|Long|null} [time] city_data_send time * @property {Array.|null} [list] city_data_send list */ /** * Constructs a new city_data_send. * @memberof game * @classdesc Represents a city_data_send. * @implements Icity_data_send * @constructor * @param {game.Icity_data_send=} [properties] Properties to set */ function city_data_send(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_data_send time. * @member {number|Long} time * @memberof game.city_data_send * @instance */ city_data_send.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * city_data_send list. * @member {Array.} list * @memberof game.city_data_send * @instance */ city_data_send.prototype.list = $util.emptyArray; /** * Creates a new city_data_send instance using the specified properties. * @function create * @memberof game.city_data_send * @static * @param {game.Icity_data_send=} [properties] Properties to set * @returns {game.city_data_send} city_data_send instance */ city_data_send.create = function create(properties) { return new city_data_send(properties); }; /** * Encodes the specified city_data_send message. Does not implicitly {@link game.city_data_send.verify|verify} messages. * @function encode * @memberof game.city_data_send * @static * @param {game.Icity_data_send} message city_data_send message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_data_send.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.time); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.building.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified city_data_send message, length delimited. Does not implicitly {@link game.city_data_send.verify|verify} messages. * @function encodeDelimited * @memberof game.city_data_send * @static * @param {game.Icity_data_send} message city_data_send message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_data_send.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_data_send message from the specified reader or buffer. * @function decode * @memberof game.city_data_send * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_data_send} city_data_send * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_data_send.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_data_send(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.time = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.building.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_data_send message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_data_send * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_data_send} city_data_send * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_data_send.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_data_send message. * @function verify * @memberof game.city_data_send * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_data_send.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.building.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a city_data_send message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_data_send * @static * @param {Object.} object Plain object * @returns {game.city_data_send} city_data_send */ city_data_send.fromObject = function fromObject(object) { if (object instanceof $root.game.city_data_send) return object; let message = new $root.game.city_data_send(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.city_data_send.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.city_data_send.list: object expected"); message.list[i] = $root.game.building.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a city_data_send message. Also converts values to other types if specified. * @function toObject * @memberof game.city_data_send * @static * @param {game.city_data_send} message city_data_send * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_data_send.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.building.toObject(message.list[j], options); } return object; }; /** * Converts this city_data_send to JSON. * @function toJSON * @memberof game.city_data_send * @instance * @returns {Object.} JSON object */ city_data_send.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_data_send; })(); game.building_upgrade = (function() { /** * Properties of a building_upgrade. * @memberof game * @interface Ibuilding_upgrade * @property {number|Long|null} [id] building_upgrade id */ /** * Constructs a new building_upgrade. * @memberof game * @classdesc Represents a building_upgrade. * @implements Ibuilding_upgrade * @constructor * @param {game.Ibuilding_upgrade=} [properties] Properties to set */ function building_upgrade(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_upgrade id. * @member {number|Long} id * @memberof game.building_upgrade * @instance */ building_upgrade.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new building_upgrade instance using the specified properties. * @function create * @memberof game.building_upgrade * @static * @param {game.Ibuilding_upgrade=} [properties] Properties to set * @returns {game.building_upgrade} building_upgrade instance */ building_upgrade.create = function create(properties) { return new building_upgrade(properties); }; /** * Encodes the specified building_upgrade message. Does not implicitly {@link game.building_upgrade.verify|verify} messages. * @function encode * @memberof game.building_upgrade * @static * @param {game.Ibuilding_upgrade} message building_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_upgrade.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified building_upgrade message, length delimited. Does not implicitly {@link game.building_upgrade.verify|verify} messages. * @function encodeDelimited * @memberof game.building_upgrade * @static * @param {game.Ibuilding_upgrade} message building_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_upgrade.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_upgrade message from the specified reader or buffer. * @function decode * @memberof game.building_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_upgrade} building_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_upgrade.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_upgrade(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_upgrade message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_upgrade} building_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_upgrade.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_upgrade message. * @function verify * @memberof game.building_upgrade * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_upgrade.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"; return null; }; /** * Creates a building_upgrade message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_upgrade * @static * @param {Object.} object Plain object * @returns {game.building_upgrade} building_upgrade */ building_upgrade.fromObject = function fromObject(object) { if (object instanceof $root.game.building_upgrade) return object; let message = new $root.game.building_upgrade(); 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(); return message; }; /** * Creates a plain object from a building_upgrade message. Also converts values to other types if specified. * @function toObject * @memberof game.building_upgrade * @static * @param {game.building_upgrade} message building_upgrade * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_upgrade.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this building_upgrade to JSON. * @function toJSON * @memberof game.building_upgrade * @instance * @returns {Object.} JSON object */ building_upgrade.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_upgrade; })(); game.building_upgrade_rsp = (function() { /** * Properties of a building_upgrade_rsp. * @memberof game * @interface Ibuilding_upgrade_rsp * @property {number|Long|null} [errno] building_upgrade_rsp errno * @property {game.Ibuilding|null} [data] building_upgrade_rsp data */ /** * Constructs a new building_upgrade_rsp. * @memberof game * @classdesc Represents a building_upgrade_rsp. * @implements Ibuilding_upgrade_rsp * @constructor * @param {game.Ibuilding_upgrade_rsp=} [properties] Properties to set */ function building_upgrade_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_upgrade_rsp errno. * @member {number|Long} errno * @memberof game.building_upgrade_rsp * @instance */ building_upgrade_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_upgrade_rsp data. * @member {game.Ibuilding|null|undefined} data * @memberof game.building_upgrade_rsp * @instance */ building_upgrade_rsp.prototype.data = null; /** * Creates a new building_upgrade_rsp instance using the specified properties. * @function create * @memberof game.building_upgrade_rsp * @static * @param {game.Ibuilding_upgrade_rsp=} [properties] Properties to set * @returns {game.building_upgrade_rsp} building_upgrade_rsp instance */ building_upgrade_rsp.create = function create(properties) { return new building_upgrade_rsp(properties); }; /** * Encodes the specified building_upgrade_rsp message. Does not implicitly {@link game.building_upgrade_rsp.verify|verify} messages. * @function encode * @memberof game.building_upgrade_rsp * @static * @param {game.Ibuilding_upgrade_rsp} message building_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_upgrade_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.building.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified building_upgrade_rsp message, length delimited. Does not implicitly {@link game.building_upgrade_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.building_upgrade_rsp * @static * @param {game.Ibuilding_upgrade_rsp} message building_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_upgrade_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_upgrade_rsp message from the specified reader or buffer. * @function decode * @memberof game.building_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_upgrade_rsp} building_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_upgrade_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_upgrade_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.building.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_upgrade_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_upgrade_rsp} building_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_upgrade_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_upgrade_rsp message. * @function verify * @memberof game.building_upgrade_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_upgrade_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.building.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a building_upgrade_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_upgrade_rsp * @static * @param {Object.} object Plain object * @returns {game.building_upgrade_rsp} building_upgrade_rsp */ building_upgrade_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.building_upgrade_rsp) return object; let message = new $root.game.building_upgrade_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.building_upgrade_rsp.data: object expected"); message.data = $root.game.building.fromObject(object.data); } return message; }; /** * Creates a plain object from a building_upgrade_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.building_upgrade_rsp * @static * @param {game.building_upgrade_rsp} message building_upgrade_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_upgrade_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.building.toObject(message.data, options); return object; }; /** * Converts this building_upgrade_rsp to JSON. * @function toJSON * @memberof game.building_upgrade_rsp * @instance * @returns {Object.} JSON object */ building_upgrade_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_upgrade_rsp; })(); game.building_one_key = (function() { /** * Properties of a building_one_key. * @memberof game * @interface Ibuilding_one_key */ /** * Constructs a new building_one_key. * @memberof game * @classdesc Represents a building_one_key. * @implements Ibuilding_one_key * @constructor * @param {game.Ibuilding_one_key=} [properties] Properties to set */ function building_one_key(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new building_one_key instance using the specified properties. * @function create * @memberof game.building_one_key * @static * @param {game.Ibuilding_one_key=} [properties] Properties to set * @returns {game.building_one_key} building_one_key instance */ building_one_key.create = function create(properties) { return new building_one_key(properties); }; /** * Encodes the specified building_one_key message. Does not implicitly {@link game.building_one_key.verify|verify} messages. * @function encode * @memberof game.building_one_key * @static * @param {game.Ibuilding_one_key} message building_one_key message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_one_key.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified building_one_key message, length delimited. Does not implicitly {@link game.building_one_key.verify|verify} messages. * @function encodeDelimited * @memberof game.building_one_key * @static * @param {game.Ibuilding_one_key} message building_one_key message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_one_key.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_one_key message from the specified reader or buffer. * @function decode * @memberof game.building_one_key * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_one_key} building_one_key * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_one_key.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_one_key(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_one_key message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_one_key * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_one_key} building_one_key * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_one_key.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_one_key message. * @function verify * @memberof game.building_one_key * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_one_key.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a building_one_key message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_one_key * @static * @param {Object.} object Plain object * @returns {game.building_one_key} building_one_key */ building_one_key.fromObject = function fromObject(object) { if (object instanceof $root.game.building_one_key) return object; return new $root.game.building_one_key(); }; /** * Creates a plain object from a building_one_key message. Also converts values to other types if specified. * @function toObject * @memberof game.building_one_key * @static * @param {game.building_one_key} message building_one_key * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_one_key.toObject = function toObject() { return {}; }; /** * Converts this building_one_key to JSON. * @function toJSON * @memberof game.building_one_key * @instance * @returns {Object.} JSON object */ building_one_key.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_one_key; })(); game.building_one_key_rsp = (function() { /** * Properties of a building_one_key_rsp. * @memberof game * @interface Ibuilding_one_key_rsp * @property {number|Long|null} [errno] building_one_key_rsp errno * @property {Array.|null} [list] building_one_key_rsp list */ /** * Constructs a new building_one_key_rsp. * @memberof game * @classdesc Represents a building_one_key_rsp. * @implements Ibuilding_one_key_rsp * @constructor * @param {game.Ibuilding_one_key_rsp=} [properties] Properties to set */ function building_one_key_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_one_key_rsp errno. * @member {number|Long} errno * @memberof game.building_one_key_rsp * @instance */ building_one_key_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_one_key_rsp list. * @member {Array.} list * @memberof game.building_one_key_rsp * @instance */ building_one_key_rsp.prototype.list = $util.emptyArray; /** * Creates a new building_one_key_rsp instance using the specified properties. * @function create * @memberof game.building_one_key_rsp * @static * @param {game.Ibuilding_one_key_rsp=} [properties] Properties to set * @returns {game.building_one_key_rsp} building_one_key_rsp instance */ building_one_key_rsp.create = function create(properties) { return new building_one_key_rsp(properties); }; /** * Encodes the specified building_one_key_rsp message. Does not implicitly {@link game.building_one_key_rsp.verify|verify} messages. * @function encode * @memberof game.building_one_key_rsp * @static * @param {game.Ibuilding_one_key_rsp} message building_one_key_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_one_key_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.building.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified building_one_key_rsp message, length delimited. Does not implicitly {@link game.building_one_key_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.building_one_key_rsp * @static * @param {game.Ibuilding_one_key_rsp} message building_one_key_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_one_key_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_one_key_rsp message from the specified reader or buffer. * @function decode * @memberof game.building_one_key_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_one_key_rsp} building_one_key_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_one_key_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_one_key_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.building.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_one_key_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_one_key_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_one_key_rsp} building_one_key_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_one_key_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_one_key_rsp message. * @function verify * @memberof game.building_one_key_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_one_key_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.building.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a building_one_key_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_one_key_rsp * @static * @param {Object.} object Plain object * @returns {game.building_one_key_rsp} building_one_key_rsp */ building_one_key_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.building_one_key_rsp) return object; let message = new $root.game.building_one_key_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.building_one_key_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.building_one_key_rsp.list: object expected"); message.list[i] = $root.game.building.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a building_one_key_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.building_one_key_rsp * @static * @param {game.building_one_key_rsp} message building_one_key_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_one_key_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.building.toObject(message.list[j], options); } return object; }; /** * Converts this building_one_key_rsp to JSON. * @function toJSON * @memberof game.building_one_key_rsp * @instance * @returns {Object.} JSON object */ building_one_key_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_one_key_rsp; })(); game.adventure_data = (function() { /** * Properties of an adventure_data. * @memberof game * @interface Iadventure_data */ /** * Constructs a new adventure_data. * @memberof game * @classdesc Represents an adventure_data. * @implements Iadventure_data * @constructor * @param {game.Iadventure_data=} [properties] Properties to set */ function adventure_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new adventure_data instance using the specified properties. * @function create * @memberof game.adventure_data * @static * @param {game.Iadventure_data=} [properties] Properties to set * @returns {game.adventure_data} adventure_data instance */ adventure_data.create = function create(properties) { return new adventure_data(properties); }; /** * Encodes the specified adventure_data message. Does not implicitly {@link game.adventure_data.verify|verify} messages. * @function encode * @memberof game.adventure_data * @static * @param {game.Iadventure_data} message adventure_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified adventure_data message, length delimited. Does not implicitly {@link game.adventure_data.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_data * @static * @param {game.Iadventure_data} message adventure_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_data message from the specified reader or buffer. * @function decode * @memberof game.adventure_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_data} adventure_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_data} adventure_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_data message. * @function verify * @memberof game.adventure_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an adventure_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_data * @static * @param {Object.} object Plain object * @returns {game.adventure_data} adventure_data */ adventure_data.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_data) return object; return new $root.game.adventure_data(); }; /** * Creates a plain object from an adventure_data message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_data * @static * @param {game.adventure_data} message adventure_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_data.toObject = function toObject() { return {}; }; /** * Converts this adventure_data to JSON. * @function toJSON * @memberof game.adventure_data * @instance * @returns {Object.} JSON object */ adventure_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_data; })(); game.adventure_data_rsp = (function() { /** * Properties of an adventure_data_rsp. * @memberof game * @interface Iadventure_data_rsp * @property {number|Long|null} [errno] adventure_data_rsp errno * @property {number|Long|null} [id1] adventure_data_rsp id1 * @property {Array.|null} [award1] adventure_data_rsp award1 * @property {number|Long|null} [id2] adventure_data_rsp id2 * @property {Array.|null} [award2] adventure_data_rsp award2 * @property {number|Long|null} [type] adventure_data_rsp type * @property {number|Long|null} [layer] adventure_data_rsp layer * @property {number|Long|null} [cost] adventure_data_rsp cost */ /** * Constructs a new adventure_data_rsp. * @memberof game * @classdesc Represents an adventure_data_rsp. * @implements Iadventure_data_rsp * @constructor * @param {game.Iadventure_data_rsp=} [properties] Properties to set */ function adventure_data_rsp(properties) { this.award1 = []; this.award2 = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_data_rsp errno. * @member {number|Long} errno * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_data_rsp id1. * @member {number|Long} id1 * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.id1 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_data_rsp award1. * @member {Array.} award1 * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.award1 = $util.emptyArray; /** * adventure_data_rsp id2. * @member {number|Long} id2 * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.id2 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_data_rsp award2. * @member {Array.} award2 * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.award2 = $util.emptyArray; /** * adventure_data_rsp type. * @member {number|Long} type * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_data_rsp layer. * @member {number|Long} layer * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.layer = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_data_rsp cost. * @member {number|Long} cost * @memberof game.adventure_data_rsp * @instance */ adventure_data_rsp.prototype.cost = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_data_rsp instance using the specified properties. * @function create * @memberof game.adventure_data_rsp * @static * @param {game.Iadventure_data_rsp=} [properties] Properties to set * @returns {game.adventure_data_rsp} adventure_data_rsp instance */ adventure_data_rsp.create = function create(properties) { return new adventure_data_rsp(properties); }; /** * Encodes the specified adventure_data_rsp message. Does not implicitly {@link game.adventure_data_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_data_rsp * @static * @param {game.Iadventure_data_rsp} message adventure_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id1); if (message.award1 != null && message.award1.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (let i = 0; i < message.award1.length; ++i) writer.int64(message.award1[i]); writer.ldelim(); } if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.id2); if (message.award2 != null && message.award2.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (let i = 0; i < message.award2.length; ++i) writer.int64(message.award2[i]); writer.ldelim(); } if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.type); if (message.layer != null && Object.hasOwnProperty.call(message, "layer")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.layer); if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.cost); return writer; }; /** * Encodes the specified adventure_data_rsp message, length delimited. Does not implicitly {@link game.adventure_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_data_rsp * @static * @param {game.Iadventure_data_rsp} message adventure_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_data_rsp} adventure_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id1 = reader.int64(); break; case 3: if (!(message.award1 && message.award1.length)) message.award1 = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.award1.push(reader.int64()); } else message.award1.push(reader.int64()); break; case 4: message.id2 = reader.int64(); break; case 5: if (!(message.award2 && message.award2.length)) message.award2 = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.award2.push(reader.int64()); } else message.award2.push(reader.int64()); break; case 6: message.type = reader.int64(); break; case 7: message.layer = reader.int64(); break; case 8: message.cost = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_data_rsp} adventure_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_data_rsp message. * @function verify * @memberof game.adventure_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.id1 != null && message.hasOwnProperty("id1")) if (!$util.isInteger(message.id1) && !(message.id1 && $util.isInteger(message.id1.low) && $util.isInteger(message.id1.high))) return "id1: integer|Long expected"; if (message.award1 != null && message.hasOwnProperty("award1")) { if (!Array.isArray(message.award1)) return "award1: array expected"; for (let i = 0; i < message.award1.length; ++i) if (!$util.isInteger(message.award1[i]) && !(message.award1[i] && $util.isInteger(message.award1[i].low) && $util.isInteger(message.award1[i].high))) return "award1: integer|Long[] expected"; } if (message.id2 != null && message.hasOwnProperty("id2")) if (!$util.isInteger(message.id2) && !(message.id2 && $util.isInteger(message.id2.low) && $util.isInteger(message.id2.high))) return "id2: integer|Long expected"; if (message.award2 != null && message.hasOwnProperty("award2")) { if (!Array.isArray(message.award2)) return "award2: array expected"; for (let i = 0; i < message.award2.length; ++i) if (!$util.isInteger(message.award2[i]) && !(message.award2[i] && $util.isInteger(message.award2[i].low) && $util.isInteger(message.award2[i].high))) return "award2: integer|Long[] expected"; } if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.layer != null && message.hasOwnProperty("layer")) if (!$util.isInteger(message.layer) && !(message.layer && $util.isInteger(message.layer.low) && $util.isInteger(message.layer.high))) return "layer: integer|Long expected"; if (message.cost != null && message.hasOwnProperty("cost")) if (!$util.isInteger(message.cost) && !(message.cost && $util.isInteger(message.cost.low) && $util.isInteger(message.cost.high))) return "cost: integer|Long expected"; return null; }; /** * Creates an adventure_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_data_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_data_rsp} adventure_data_rsp */ adventure_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_data_rsp) return object; let message = new $root.game.adventure_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.id1 != null) if ($util.Long) (message.id1 = $util.Long.fromValue(object.id1)).unsigned = false; else if (typeof object.id1 === "string") message.id1 = parseInt(object.id1, 10); else if (typeof object.id1 === "number") message.id1 = object.id1; else if (typeof object.id1 === "object") message.id1 = new $util.LongBits(object.id1.low >>> 0, object.id1.high >>> 0).toNumber(); if (object.award1) { if (!Array.isArray(object.award1)) throw TypeError(".game.adventure_data_rsp.award1: array expected"); message.award1 = []; for (let i = 0; i < object.award1.length; ++i) if ($util.Long) (message.award1[i] = $util.Long.fromValue(object.award1[i])).unsigned = false; else if (typeof object.award1[i] === "string") message.award1[i] = parseInt(object.award1[i], 10); else if (typeof object.award1[i] === "number") message.award1[i] = object.award1[i]; else if (typeof object.award1[i] === "object") message.award1[i] = new $util.LongBits(object.award1[i].low >>> 0, object.award1[i].high >>> 0).toNumber(); } if (object.id2 != null) if ($util.Long) (message.id2 = $util.Long.fromValue(object.id2)).unsigned = false; else if (typeof object.id2 === "string") message.id2 = parseInt(object.id2, 10); else if (typeof object.id2 === "number") message.id2 = object.id2; else if (typeof object.id2 === "object") message.id2 = new $util.LongBits(object.id2.low >>> 0, object.id2.high >>> 0).toNumber(); if (object.award2) { if (!Array.isArray(object.award2)) throw TypeError(".game.adventure_data_rsp.award2: array expected"); message.award2 = []; for (let i = 0; i < object.award2.length; ++i) if ($util.Long) (message.award2[i] = $util.Long.fromValue(object.award2[i])).unsigned = false; else if (typeof object.award2[i] === "string") message.award2[i] = parseInt(object.award2[i], 10); else if (typeof object.award2[i] === "number") message.award2[i] = object.award2[i]; else if (typeof object.award2[i] === "object") message.award2[i] = new $util.LongBits(object.award2[i].low >>> 0, object.award2[i].high >>> 0).toNumber(); } if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.layer != null) if ($util.Long) (message.layer = $util.Long.fromValue(object.layer)).unsigned = false; else if (typeof object.layer === "string") message.layer = parseInt(object.layer, 10); else if (typeof object.layer === "number") message.layer = object.layer; else if (typeof object.layer === "object") message.layer = new $util.LongBits(object.layer.low >>> 0, object.layer.high >>> 0).toNumber(); if (object.cost != null) if ($util.Long) (message.cost = $util.Long.fromValue(object.cost)).unsigned = false; else if (typeof object.cost === "string") message.cost = parseInt(object.cost, 10); else if (typeof object.cost === "number") message.cost = object.cost; else if (typeof object.cost === "object") message.cost = new $util.LongBits(object.cost.low >>> 0, object.cost.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_data_rsp * @static * @param {game.adventure_data_rsp} message adventure_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.award1 = []; object.award2 = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.id1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.id1 = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.id2 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.id2 = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.layer = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.layer = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.cost = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.cost = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.id1 != null && message.hasOwnProperty("id1")) if (typeof message.id1 === "number") object.id1 = options.longs === String ? String(message.id1) : message.id1; else object.id1 = options.longs === String ? $util.Long.prototype.toString.call(message.id1) : options.longs === Number ? new $util.LongBits(message.id1.low >>> 0, message.id1.high >>> 0).toNumber() : message.id1; if (message.award1 && message.award1.length) { object.award1 = []; for (let j = 0; j < message.award1.length; ++j) if (typeof message.award1[j] === "number") object.award1[j] = options.longs === String ? String(message.award1[j]) : message.award1[j]; else object.award1[j] = options.longs === String ? $util.Long.prototype.toString.call(message.award1[j]) : options.longs === Number ? new $util.LongBits(message.award1[j].low >>> 0, message.award1[j].high >>> 0).toNumber() : message.award1[j]; } if (message.id2 != null && message.hasOwnProperty("id2")) if (typeof message.id2 === "number") object.id2 = options.longs === String ? String(message.id2) : message.id2; else object.id2 = options.longs === String ? $util.Long.prototype.toString.call(message.id2) : options.longs === Number ? new $util.LongBits(message.id2.low >>> 0, message.id2.high >>> 0).toNumber() : message.id2; if (message.award2 && message.award2.length) { object.award2 = []; for (let j = 0; j < message.award2.length; ++j) if (typeof message.award2[j] === "number") object.award2[j] = options.longs === String ? String(message.award2[j]) : message.award2[j]; else object.award2[j] = options.longs === String ? $util.Long.prototype.toString.call(message.award2[j]) : options.longs === Number ? new $util.LongBits(message.award2[j].low >>> 0, message.award2[j].high >>> 0).toNumber() : message.award2[j]; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.layer != null && message.hasOwnProperty("layer")) if (typeof message.layer === "number") object.layer = options.longs === String ? String(message.layer) : message.layer; else object.layer = options.longs === String ? $util.Long.prototype.toString.call(message.layer) : options.longs === Number ? new $util.LongBits(message.layer.low >>> 0, message.layer.high >>> 0).toNumber() : message.layer; if (message.cost != null && message.hasOwnProperty("cost")) if (typeof message.cost === "number") object.cost = options.longs === String ? String(message.cost) : message.cost; else object.cost = options.longs === String ? $util.Long.prototype.toString.call(message.cost) : options.longs === Number ? new $util.LongBits(message.cost.low >>> 0, message.cost.high >>> 0).toNumber() : message.cost; return object; }; /** * Converts this adventure_data_rsp to JSON. * @function toJSON * @memberof game.adventure_data_rsp * @instance * @returns {Object.} JSON object */ adventure_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_data_rsp; })(); game.adventure_start = (function() { /** * Properties of an adventure_start. * @memberof game * @interface Iadventure_start * @property {number|Long|null} [id] adventure_start id * @property {number|Long|null} [type] adventure_start type */ /** * Constructs a new adventure_start. * @memberof game * @classdesc Represents an adventure_start. * @implements Iadventure_start * @constructor * @param {game.Iadventure_start=} [properties] Properties to set */ function adventure_start(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_start id. * @member {number|Long} id * @memberof game.adventure_start * @instance */ adventure_start.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_start type. * @member {number|Long} type * @memberof game.adventure_start * @instance */ adventure_start.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_start instance using the specified properties. * @function create * @memberof game.adventure_start * @static * @param {game.Iadventure_start=} [properties] Properties to set * @returns {game.adventure_start} adventure_start instance */ adventure_start.create = function create(properties) { return new adventure_start(properties); }; /** * Encodes the specified adventure_start message. Does not implicitly {@link game.adventure_start.verify|verify} messages. * @function encode * @memberof game.adventure_start * @static * @param {game.Iadventure_start} message adventure_start message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_start.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); return writer; }; /** * Encodes the specified adventure_start message, length delimited. Does not implicitly {@link game.adventure_start.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_start * @static * @param {game.Iadventure_start} message adventure_start message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_start.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_start message from the specified reader or buffer. * @function decode * @memberof game.adventure_start * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_start} adventure_start * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_start.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_start(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_start message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_start * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_start} adventure_start * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_start.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_start message. * @function verify * @memberof game.adventure_start * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_start.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.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates an adventure_start message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_start * @static * @param {Object.} object Plain object * @returns {game.adventure_start} adventure_start */ adventure_start.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_start) return object; let message = new $root.game.adventure_start(); 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.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_start message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_start * @static * @param {game.adventure_start} message adventure_start * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_start.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 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.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this adventure_start to JSON. * @function toJSON * @memberof game.adventure_start * @instance * @returns {Object.} JSON object */ adventure_start.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_start; })(); game.adventure_start_rsp = (function() { /** * Properties of an adventure_start_rsp. * @memberof game * @interface Iadventure_start_rsp * @property {number|Long|null} [errno] adventure_start_rsp errno * @property {boolean|null} [btrial] adventure_start_rsp btrial * @property {number|Long|null} [trialId] adventure_start_rsp trialId * @property {number|Long|null} [trialNum] adventure_start_rsp trialNum */ /** * Constructs a new adventure_start_rsp. * @memberof game * @classdesc Represents an adventure_start_rsp. * @implements Iadventure_start_rsp * @constructor * @param {game.Iadventure_start_rsp=} [properties] Properties to set */ function adventure_start_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_start_rsp errno. * @member {number|Long} errno * @memberof game.adventure_start_rsp * @instance */ adventure_start_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_start_rsp btrial. * @member {boolean} btrial * @memberof game.adventure_start_rsp * @instance */ adventure_start_rsp.prototype.btrial = false; /** * adventure_start_rsp trialId. * @member {number|Long} trialId * @memberof game.adventure_start_rsp * @instance */ adventure_start_rsp.prototype.trialId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_start_rsp trialNum. * @member {number|Long} trialNum * @memberof game.adventure_start_rsp * @instance */ adventure_start_rsp.prototype.trialNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_start_rsp instance using the specified properties. * @function create * @memberof game.adventure_start_rsp * @static * @param {game.Iadventure_start_rsp=} [properties] Properties to set * @returns {game.adventure_start_rsp} adventure_start_rsp instance */ adventure_start_rsp.create = function create(properties) { return new adventure_start_rsp(properties); }; /** * Encodes the specified adventure_start_rsp message. Does not implicitly {@link game.adventure_start_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_start_rsp * @static * @param {game.Iadventure_start_rsp} message adventure_start_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_start_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.btrial != null && Object.hasOwnProperty.call(message, "btrial")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.btrial); if (message.trialId != null && Object.hasOwnProperty.call(message, "trialId")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.trialId); if (message.trialNum != null && Object.hasOwnProperty.call(message, "trialNum")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.trialNum); return writer; }; /** * Encodes the specified adventure_start_rsp message, length delimited. Does not implicitly {@link game.adventure_start_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_start_rsp * @static * @param {game.Iadventure_start_rsp} message adventure_start_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_start_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_start_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_start_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_start_rsp} adventure_start_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_start_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_start_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.btrial = reader.bool(); break; case 3: message.trialId = reader.int64(); break; case 4: message.trialNum = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_start_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_start_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_start_rsp} adventure_start_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_start_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_start_rsp message. * @function verify * @memberof game.adventure_start_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_start_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.btrial != null && message.hasOwnProperty("btrial")) if (typeof message.btrial !== "boolean") return "btrial: boolean expected"; if (message.trialId != null && message.hasOwnProperty("trialId")) if (!$util.isInteger(message.trialId) && !(message.trialId && $util.isInteger(message.trialId.low) && $util.isInteger(message.trialId.high))) return "trialId: integer|Long expected"; if (message.trialNum != null && message.hasOwnProperty("trialNum")) if (!$util.isInteger(message.trialNum) && !(message.trialNum && $util.isInteger(message.trialNum.low) && $util.isInteger(message.trialNum.high))) return "trialNum: integer|Long expected"; return null; }; /** * Creates an adventure_start_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_start_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_start_rsp} adventure_start_rsp */ adventure_start_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_start_rsp) return object; let message = new $root.game.adventure_start_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.btrial != null) message.btrial = Boolean(object.btrial); if (object.trialId != null) if ($util.Long) (message.trialId = $util.Long.fromValue(object.trialId)).unsigned = false; else if (typeof object.trialId === "string") message.trialId = parseInt(object.trialId, 10); else if (typeof object.trialId === "number") message.trialId = object.trialId; else if (typeof object.trialId === "object") message.trialId = new $util.LongBits(object.trialId.low >>> 0, object.trialId.high >>> 0).toNumber(); if (object.trialNum != null) if ($util.Long) (message.trialNum = $util.Long.fromValue(object.trialNum)).unsigned = false; else if (typeof object.trialNum === "string") message.trialNum = parseInt(object.trialNum, 10); else if (typeof object.trialNum === "number") message.trialNum = object.trialNum; else if (typeof object.trialNum === "object") message.trialNum = new $util.LongBits(object.trialNum.low >>> 0, object.trialNum.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_start_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_start_rsp * @static * @param {game.adventure_start_rsp} message adventure_start_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_start_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.btrial = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.trialId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.trialId = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.trialNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.trialNum = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.btrial != null && message.hasOwnProperty("btrial")) object.btrial = message.btrial; if (message.trialId != null && message.hasOwnProperty("trialId")) if (typeof message.trialId === "number") object.trialId = options.longs === String ? String(message.trialId) : message.trialId; else object.trialId = options.longs === String ? $util.Long.prototype.toString.call(message.trialId) : options.longs === Number ? new $util.LongBits(message.trialId.low >>> 0, message.trialId.high >>> 0).toNumber() : message.trialId; if (message.trialNum != null && message.hasOwnProperty("trialNum")) if (typeof message.trialNum === "number") object.trialNum = options.longs === String ? String(message.trialNum) : message.trialNum; else object.trialNum = options.longs === String ? $util.Long.prototype.toString.call(message.trialNum) : options.longs === Number ? new $util.LongBits(message.trialNum.low >>> 0, message.trialNum.high >>> 0).toNumber() : message.trialNum; return object; }; /** * Converts this adventure_start_rsp to JSON. * @function toJSON * @memberof game.adventure_start_rsp * @instance * @returns {Object.} JSON object */ adventure_start_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_start_rsp; })(); game.adventure_end = (function() { /** * Properties of an adventure_end. * @memberof game * @interface Iadventure_end * @property {boolean|null} [win] adventure_end win * @property {number|Long|null} [monsterNum] adventure_end monsterNum * @property {number|Long|null} [bossNum] adventure_end bossNum * @property {number|Long|null} [eliteNum] adventure_end eliteNum */ /** * Constructs a new adventure_end. * @memberof game * @classdesc Represents an adventure_end. * @implements Iadventure_end * @constructor * @param {game.Iadventure_end=} [properties] Properties to set */ function adventure_end(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_end win. * @member {boolean} win * @memberof game.adventure_end * @instance */ adventure_end.prototype.win = false; /** * adventure_end monsterNum. * @member {number|Long} monsterNum * @memberof game.adventure_end * @instance */ adventure_end.prototype.monsterNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_end bossNum. * @member {number|Long} bossNum * @memberof game.adventure_end * @instance */ adventure_end.prototype.bossNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_end eliteNum. * @member {number|Long} eliteNum * @memberof game.adventure_end * @instance */ adventure_end.prototype.eliteNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_end instance using the specified properties. * @function create * @memberof game.adventure_end * @static * @param {game.Iadventure_end=} [properties] Properties to set * @returns {game.adventure_end} adventure_end instance */ adventure_end.create = function create(properties) { return new adventure_end(properties); }; /** * Encodes the specified adventure_end message. Does not implicitly {@link game.adventure_end.verify|verify} messages. * @function encode * @memberof game.adventure_end * @static * @param {game.Iadventure_end} message adventure_end message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_end.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.win != null && Object.hasOwnProperty.call(message, "win")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.win); if (message.monsterNum != null && Object.hasOwnProperty.call(message, "monsterNum")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.monsterNum); if (message.bossNum != null && Object.hasOwnProperty.call(message, "bossNum")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.bossNum); if (message.eliteNum != null && Object.hasOwnProperty.call(message, "eliteNum")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.eliteNum); return writer; }; /** * Encodes the specified adventure_end message, length delimited. Does not implicitly {@link game.adventure_end.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_end * @static * @param {game.Iadventure_end} message adventure_end message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_end.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_end message from the specified reader or buffer. * @function decode * @memberof game.adventure_end * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_end} adventure_end * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_end.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_end(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.win = reader.bool(); break; case 2: message.monsterNum = reader.int64(); break; case 3: message.bossNum = reader.int64(); break; case 4: message.eliteNum = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_end message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_end * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_end} adventure_end * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_end.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_end message. * @function verify * @memberof game.adventure_end * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_end.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.win != null && message.hasOwnProperty("win")) if (typeof message.win !== "boolean") return "win: boolean expected"; if (message.monsterNum != null && message.hasOwnProperty("monsterNum")) if (!$util.isInteger(message.monsterNum) && !(message.monsterNum && $util.isInteger(message.monsterNum.low) && $util.isInteger(message.monsterNum.high))) return "monsterNum: integer|Long expected"; if (message.bossNum != null && message.hasOwnProperty("bossNum")) if (!$util.isInteger(message.bossNum) && !(message.bossNum && $util.isInteger(message.bossNum.low) && $util.isInteger(message.bossNum.high))) return "bossNum: integer|Long expected"; if (message.eliteNum != null && message.hasOwnProperty("eliteNum")) if (!$util.isInteger(message.eliteNum) && !(message.eliteNum && $util.isInteger(message.eliteNum.low) && $util.isInteger(message.eliteNum.high))) return "eliteNum: integer|Long expected"; return null; }; /** * Creates an adventure_end message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_end * @static * @param {Object.} object Plain object * @returns {game.adventure_end} adventure_end */ adventure_end.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_end) return object; let message = new $root.game.adventure_end(); if (object.win != null) message.win = Boolean(object.win); if (object.monsterNum != null) if ($util.Long) (message.monsterNum = $util.Long.fromValue(object.monsterNum)).unsigned = false; else if (typeof object.monsterNum === "string") message.monsterNum = parseInt(object.monsterNum, 10); else if (typeof object.monsterNum === "number") message.monsterNum = object.monsterNum; else if (typeof object.monsterNum === "object") message.monsterNum = new $util.LongBits(object.monsterNum.low >>> 0, object.monsterNum.high >>> 0).toNumber(); if (object.bossNum != null) if ($util.Long) (message.bossNum = $util.Long.fromValue(object.bossNum)).unsigned = false; else if (typeof object.bossNum === "string") message.bossNum = parseInt(object.bossNum, 10); else if (typeof object.bossNum === "number") message.bossNum = object.bossNum; else if (typeof object.bossNum === "object") message.bossNum = new $util.LongBits(object.bossNum.low >>> 0, object.bossNum.high >>> 0).toNumber(); if (object.eliteNum != null) if ($util.Long) (message.eliteNum = $util.Long.fromValue(object.eliteNum)).unsigned = false; else if (typeof object.eliteNum === "string") message.eliteNum = parseInt(object.eliteNum, 10); else if (typeof object.eliteNum === "number") message.eliteNum = object.eliteNum; else if (typeof object.eliteNum === "object") message.eliteNum = new $util.LongBits(object.eliteNum.low >>> 0, object.eliteNum.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_end message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_end * @static * @param {game.adventure_end} message adventure_end * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_end.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.win = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.monsterNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.monsterNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.bossNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.bossNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.eliteNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.eliteNum = options.longs === String ? "0" : 0; } if (message.win != null && message.hasOwnProperty("win")) object.win = message.win; if (message.monsterNum != null && message.hasOwnProperty("monsterNum")) if (typeof message.monsterNum === "number") object.monsterNum = options.longs === String ? String(message.monsterNum) : message.monsterNum; else object.monsterNum = options.longs === String ? $util.Long.prototype.toString.call(message.monsterNum) : options.longs === Number ? new $util.LongBits(message.monsterNum.low >>> 0, message.monsterNum.high >>> 0).toNumber() : message.monsterNum; if (message.bossNum != null && message.hasOwnProperty("bossNum")) if (typeof message.bossNum === "number") object.bossNum = options.longs === String ? String(message.bossNum) : message.bossNum; else object.bossNum = options.longs === String ? $util.Long.prototype.toString.call(message.bossNum) : options.longs === Number ? new $util.LongBits(message.bossNum.low >>> 0, message.bossNum.high >>> 0).toNumber() : message.bossNum; if (message.eliteNum != null && message.hasOwnProperty("eliteNum")) if (typeof message.eliteNum === "number") object.eliteNum = options.longs === String ? String(message.eliteNum) : message.eliteNum; else object.eliteNum = options.longs === String ? $util.Long.prototype.toString.call(message.eliteNum) : options.longs === Number ? new $util.LongBits(message.eliteNum.low >>> 0, message.eliteNum.high >>> 0).toNumber() : message.eliteNum; return object; }; /** * Converts this adventure_end to JSON. * @function toJSON * @memberof game.adventure_end * @instance * @returns {Object.} JSON object */ adventure_end.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_end; })(); game.adventure_end_rsp = (function() { /** * Properties of an adventure_end_rsp. * @memberof game * @interface Iadventure_end_rsp * @property {number|Long|null} [errno] adventure_end_rsp errno */ /** * Constructs a new adventure_end_rsp. * @memberof game * @classdesc Represents an adventure_end_rsp. * @implements Iadventure_end_rsp * @constructor * @param {game.Iadventure_end_rsp=} [properties] Properties to set */ function adventure_end_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_end_rsp errno. * @member {number|Long} errno * @memberof game.adventure_end_rsp * @instance */ adventure_end_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_end_rsp instance using the specified properties. * @function create * @memberof game.adventure_end_rsp * @static * @param {game.Iadventure_end_rsp=} [properties] Properties to set * @returns {game.adventure_end_rsp} adventure_end_rsp instance */ adventure_end_rsp.create = function create(properties) { return new adventure_end_rsp(properties); }; /** * Encodes the specified adventure_end_rsp message. Does not implicitly {@link game.adventure_end_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_end_rsp * @static * @param {game.Iadventure_end_rsp} message adventure_end_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_end_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adventure_end_rsp message, length delimited. Does not implicitly {@link game.adventure_end_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_end_rsp * @static * @param {game.Iadventure_end_rsp} message adventure_end_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_end_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_end_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_end_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_end_rsp} adventure_end_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_end_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_end_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_end_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_end_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_end_rsp} adventure_end_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_end_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_end_rsp message. * @function verify * @memberof game.adventure_end_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_end_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adventure_end_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_end_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_end_rsp} adventure_end_rsp */ adventure_end_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_end_rsp) return object; let message = new $root.game.adventure_end_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_end_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_end_rsp * @static * @param {game.adventure_end_rsp} message adventure_end_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_end_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adventure_end_rsp to JSON. * @function toJSON * @memberof game.adventure_end_rsp * @instance * @returns {Object.} JSON object */ adventure_end_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_end_rsp; })(); game.adventure_layer = (function() { /** * Properties of an adventure_layer. * @memberof game * @interface Iadventure_layer * @property {number|Long|null} [layer] adventure_layer layer * @property {number|Long|null} [cost] adventure_layer cost * @property {number|Long|null} [monsterNum] adventure_layer monsterNum * @property {number|Long|null} [bossNum] adventure_layer bossNum * @property {number|Long|null} [eliteNum] adventure_layer eliteNum */ /** * Constructs a new adventure_layer. * @memberof game * @classdesc Represents an adventure_layer. * @implements Iadventure_layer * @constructor * @param {game.Iadventure_layer=} [properties] Properties to set */ function adventure_layer(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_layer layer. * @member {number|Long} layer * @memberof game.adventure_layer * @instance */ adventure_layer.prototype.layer = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_layer cost. * @member {number|Long} cost * @memberof game.adventure_layer * @instance */ adventure_layer.prototype.cost = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_layer monsterNum. * @member {number|Long} monsterNum * @memberof game.adventure_layer * @instance */ adventure_layer.prototype.monsterNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_layer bossNum. * @member {number|Long} bossNum * @memberof game.adventure_layer * @instance */ adventure_layer.prototype.bossNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_layer eliteNum. * @member {number|Long} eliteNum * @memberof game.adventure_layer * @instance */ adventure_layer.prototype.eliteNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_layer instance using the specified properties. * @function create * @memberof game.adventure_layer * @static * @param {game.Iadventure_layer=} [properties] Properties to set * @returns {game.adventure_layer} adventure_layer instance */ adventure_layer.create = function create(properties) { return new adventure_layer(properties); }; /** * Encodes the specified adventure_layer message. Does not implicitly {@link game.adventure_layer.verify|verify} messages. * @function encode * @memberof game.adventure_layer * @static * @param {game.Iadventure_layer} message adventure_layer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_layer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.layer != null && Object.hasOwnProperty.call(message, "layer")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.layer); if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.cost); if (message.monsterNum != null && Object.hasOwnProperty.call(message, "monsterNum")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.monsterNum); if (message.bossNum != null && Object.hasOwnProperty.call(message, "bossNum")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.bossNum); if (message.eliteNum != null && Object.hasOwnProperty.call(message, "eliteNum")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.eliteNum); return writer; }; /** * Encodes the specified adventure_layer message, length delimited. Does not implicitly {@link game.adventure_layer.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_layer * @static * @param {game.Iadventure_layer} message adventure_layer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_layer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_layer message from the specified reader or buffer. * @function decode * @memberof game.adventure_layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_layer} adventure_layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_layer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_layer(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.layer = reader.int64(); break; case 2: message.cost = reader.int64(); break; case 3: message.monsterNum = reader.int64(); break; case 4: message.bossNum = reader.int64(); break; case 5: message.eliteNum = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_layer message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_layer} adventure_layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_layer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_layer message. * @function verify * @memberof game.adventure_layer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_layer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.layer != null && message.hasOwnProperty("layer")) if (!$util.isInteger(message.layer) && !(message.layer && $util.isInteger(message.layer.low) && $util.isInteger(message.layer.high))) return "layer: integer|Long expected"; if (message.cost != null && message.hasOwnProperty("cost")) if (!$util.isInteger(message.cost) && !(message.cost && $util.isInteger(message.cost.low) && $util.isInteger(message.cost.high))) return "cost: integer|Long expected"; if (message.monsterNum != null && message.hasOwnProperty("monsterNum")) if (!$util.isInteger(message.monsterNum) && !(message.monsterNum && $util.isInteger(message.monsterNum.low) && $util.isInteger(message.monsterNum.high))) return "monsterNum: integer|Long expected"; if (message.bossNum != null && message.hasOwnProperty("bossNum")) if (!$util.isInteger(message.bossNum) && !(message.bossNum && $util.isInteger(message.bossNum.low) && $util.isInteger(message.bossNum.high))) return "bossNum: integer|Long expected"; if (message.eliteNum != null && message.hasOwnProperty("eliteNum")) if (!$util.isInteger(message.eliteNum) && !(message.eliteNum && $util.isInteger(message.eliteNum.low) && $util.isInteger(message.eliteNum.high))) return "eliteNum: integer|Long expected"; return null; }; /** * Creates an adventure_layer message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_layer * @static * @param {Object.} object Plain object * @returns {game.adventure_layer} adventure_layer */ adventure_layer.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_layer) return object; let message = new $root.game.adventure_layer(); if (object.layer != null) if ($util.Long) (message.layer = $util.Long.fromValue(object.layer)).unsigned = false; else if (typeof object.layer === "string") message.layer = parseInt(object.layer, 10); else if (typeof object.layer === "number") message.layer = object.layer; else if (typeof object.layer === "object") message.layer = new $util.LongBits(object.layer.low >>> 0, object.layer.high >>> 0).toNumber(); if (object.cost != null) if ($util.Long) (message.cost = $util.Long.fromValue(object.cost)).unsigned = false; else if (typeof object.cost === "string") message.cost = parseInt(object.cost, 10); else if (typeof object.cost === "number") message.cost = object.cost; else if (typeof object.cost === "object") message.cost = new $util.LongBits(object.cost.low >>> 0, object.cost.high >>> 0).toNumber(); if (object.monsterNum != null) if ($util.Long) (message.monsterNum = $util.Long.fromValue(object.monsterNum)).unsigned = false; else if (typeof object.monsterNum === "string") message.monsterNum = parseInt(object.monsterNum, 10); else if (typeof object.monsterNum === "number") message.monsterNum = object.monsterNum; else if (typeof object.monsterNum === "object") message.monsterNum = new $util.LongBits(object.monsterNum.low >>> 0, object.monsterNum.high >>> 0).toNumber(); if (object.bossNum != null) if ($util.Long) (message.bossNum = $util.Long.fromValue(object.bossNum)).unsigned = false; else if (typeof object.bossNum === "string") message.bossNum = parseInt(object.bossNum, 10); else if (typeof object.bossNum === "number") message.bossNum = object.bossNum; else if (typeof object.bossNum === "object") message.bossNum = new $util.LongBits(object.bossNum.low >>> 0, object.bossNum.high >>> 0).toNumber(); if (object.eliteNum != null) if ($util.Long) (message.eliteNum = $util.Long.fromValue(object.eliteNum)).unsigned = false; else if (typeof object.eliteNum === "string") message.eliteNum = parseInt(object.eliteNum, 10); else if (typeof object.eliteNum === "number") message.eliteNum = object.eliteNum; else if (typeof object.eliteNum === "object") message.eliteNum = new $util.LongBits(object.eliteNum.low >>> 0, object.eliteNum.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_layer message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_layer * @static * @param {game.adventure_layer} message adventure_layer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_layer.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.layer = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.layer = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.cost = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.cost = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.monsterNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.monsterNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.bossNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.bossNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.eliteNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.eliteNum = options.longs === String ? "0" : 0; } if (message.layer != null && message.hasOwnProperty("layer")) if (typeof message.layer === "number") object.layer = options.longs === String ? String(message.layer) : message.layer; else object.layer = options.longs === String ? $util.Long.prototype.toString.call(message.layer) : options.longs === Number ? new $util.LongBits(message.layer.low >>> 0, message.layer.high >>> 0).toNumber() : message.layer; if (message.cost != null && message.hasOwnProperty("cost")) if (typeof message.cost === "number") object.cost = options.longs === String ? String(message.cost) : message.cost; else object.cost = options.longs === String ? $util.Long.prototype.toString.call(message.cost) : options.longs === Number ? new $util.LongBits(message.cost.low >>> 0, message.cost.high >>> 0).toNumber() : message.cost; if (message.monsterNum != null && message.hasOwnProperty("monsterNum")) if (typeof message.monsterNum === "number") object.monsterNum = options.longs === String ? String(message.monsterNum) : message.monsterNum; else object.monsterNum = options.longs === String ? $util.Long.prototype.toString.call(message.monsterNum) : options.longs === Number ? new $util.LongBits(message.monsterNum.low >>> 0, message.monsterNum.high >>> 0).toNumber() : message.monsterNum; if (message.bossNum != null && message.hasOwnProperty("bossNum")) if (typeof message.bossNum === "number") object.bossNum = options.longs === String ? String(message.bossNum) : message.bossNum; else object.bossNum = options.longs === String ? $util.Long.prototype.toString.call(message.bossNum) : options.longs === Number ? new $util.LongBits(message.bossNum.low >>> 0, message.bossNum.high >>> 0).toNumber() : message.bossNum; if (message.eliteNum != null && message.hasOwnProperty("eliteNum")) if (typeof message.eliteNum === "number") object.eliteNum = options.longs === String ? String(message.eliteNum) : message.eliteNum; else object.eliteNum = options.longs === String ? $util.Long.prototype.toString.call(message.eliteNum) : options.longs === Number ? new $util.LongBits(message.eliteNum.low >>> 0, message.eliteNum.high >>> 0).toNumber() : message.eliteNum; return object; }; /** * Converts this adventure_layer to JSON. * @function toJSON * @memberof game.adventure_layer * @instance * @returns {Object.} JSON object */ adventure_layer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_layer; })(); game.adventure_layer_rsp = (function() { /** * Properties of an adventure_layer_rsp. * @memberof game * @interface Iadventure_layer_rsp * @property {number|Long|null} [errno] adventure_layer_rsp errno */ /** * Constructs a new adventure_layer_rsp. * @memberof game * @classdesc Represents an adventure_layer_rsp. * @implements Iadventure_layer_rsp * @constructor * @param {game.Iadventure_layer_rsp=} [properties] Properties to set */ function adventure_layer_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_layer_rsp errno. * @member {number|Long} errno * @memberof game.adventure_layer_rsp * @instance */ adventure_layer_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_layer_rsp instance using the specified properties. * @function create * @memberof game.adventure_layer_rsp * @static * @param {game.Iadventure_layer_rsp=} [properties] Properties to set * @returns {game.adventure_layer_rsp} adventure_layer_rsp instance */ adventure_layer_rsp.create = function create(properties) { return new adventure_layer_rsp(properties); }; /** * Encodes the specified adventure_layer_rsp message. Does not implicitly {@link game.adventure_layer_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_layer_rsp * @static * @param {game.Iadventure_layer_rsp} message adventure_layer_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_layer_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adventure_layer_rsp message, length delimited. Does not implicitly {@link game.adventure_layer_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_layer_rsp * @static * @param {game.Iadventure_layer_rsp} message adventure_layer_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_layer_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_layer_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_layer_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_layer_rsp} adventure_layer_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_layer_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_layer_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_layer_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_layer_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_layer_rsp} adventure_layer_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_layer_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_layer_rsp message. * @function verify * @memberof game.adventure_layer_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_layer_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adventure_layer_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_layer_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_layer_rsp} adventure_layer_rsp */ adventure_layer_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_layer_rsp) return object; let message = new $root.game.adventure_layer_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_layer_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_layer_rsp * @static * @param {game.adventure_layer_rsp} message adventure_layer_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_layer_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adventure_layer_rsp to JSON. * @function toJSON * @memberof game.adventure_layer_rsp * @instance * @returns {Object.} JSON object */ adventure_layer_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_layer_rsp; })(); game.adventure_sweep = (function() { /** * Properties of an adventure_sweep. * @memberof game * @interface Iadventure_sweep * @property {number|Long|null} [id] adventure_sweep id * @property {number|Long|null} [type] adventure_sweep type */ /** * Constructs a new adventure_sweep. * @memberof game * @classdesc Represents an adventure_sweep. * @implements Iadventure_sweep * @constructor * @param {game.Iadventure_sweep=} [properties] Properties to set */ function adventure_sweep(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_sweep id. * @member {number|Long} id * @memberof game.adventure_sweep * @instance */ adventure_sweep.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_sweep type. * @member {number|Long} type * @memberof game.adventure_sweep * @instance */ adventure_sweep.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_sweep instance using the specified properties. * @function create * @memberof game.adventure_sweep * @static * @param {game.Iadventure_sweep=} [properties] Properties to set * @returns {game.adventure_sweep} adventure_sweep instance */ adventure_sweep.create = function create(properties) { return new adventure_sweep(properties); }; /** * Encodes the specified adventure_sweep message. Does not implicitly {@link game.adventure_sweep.verify|verify} messages. * @function encode * @memberof game.adventure_sweep * @static * @param {game.Iadventure_sweep} message adventure_sweep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_sweep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); return writer; }; /** * Encodes the specified adventure_sweep message, length delimited. Does not implicitly {@link game.adventure_sweep.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_sweep * @static * @param {game.Iadventure_sweep} message adventure_sweep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_sweep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_sweep message from the specified reader or buffer. * @function decode * @memberof game.adventure_sweep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_sweep} adventure_sweep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_sweep.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_sweep(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_sweep message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_sweep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_sweep} adventure_sweep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_sweep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_sweep message. * @function verify * @memberof game.adventure_sweep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_sweep.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.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates an adventure_sweep message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_sweep * @static * @param {Object.} object Plain object * @returns {game.adventure_sweep} adventure_sweep */ adventure_sweep.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_sweep) return object; let message = new $root.game.adventure_sweep(); 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.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_sweep message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_sweep * @static * @param {game.adventure_sweep} message adventure_sweep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_sweep.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 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.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this adventure_sweep to JSON. * @function toJSON * @memberof game.adventure_sweep * @instance * @returns {Object.} JSON object */ adventure_sweep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_sweep; })(); game.adventure_sweep_rsp = (function() { /** * Properties of an adventure_sweep_rsp. * @memberof game * @interface Iadventure_sweep_rsp * @property {number|Long|null} [errno] adventure_sweep_rsp errno */ /** * Constructs a new adventure_sweep_rsp. * @memberof game * @classdesc Represents an adventure_sweep_rsp. * @implements Iadventure_sweep_rsp * @constructor * @param {game.Iadventure_sweep_rsp=} [properties] Properties to set */ function adventure_sweep_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_sweep_rsp errno. * @member {number|Long} errno * @memberof game.adventure_sweep_rsp * @instance */ adventure_sweep_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_sweep_rsp instance using the specified properties. * @function create * @memberof game.adventure_sweep_rsp * @static * @param {game.Iadventure_sweep_rsp=} [properties] Properties to set * @returns {game.adventure_sweep_rsp} adventure_sweep_rsp instance */ adventure_sweep_rsp.create = function create(properties) { return new adventure_sweep_rsp(properties); }; /** * Encodes the specified adventure_sweep_rsp message. Does not implicitly {@link game.adventure_sweep_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_sweep_rsp * @static * @param {game.Iadventure_sweep_rsp} message adventure_sweep_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_sweep_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adventure_sweep_rsp message, length delimited. Does not implicitly {@link game.adventure_sweep_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_sweep_rsp * @static * @param {game.Iadventure_sweep_rsp} message adventure_sweep_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_sweep_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_sweep_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_sweep_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_sweep_rsp} adventure_sweep_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_sweep_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_sweep_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_sweep_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_sweep_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_sweep_rsp} adventure_sweep_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_sweep_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_sweep_rsp message. * @function verify * @memberof game.adventure_sweep_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_sweep_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adventure_sweep_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_sweep_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_sweep_rsp} adventure_sweep_rsp */ adventure_sweep_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_sweep_rsp) return object; let message = new $root.game.adventure_sweep_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_sweep_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_sweep_rsp * @static * @param {game.adventure_sweep_rsp} message adventure_sweep_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_sweep_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adventure_sweep_rsp to JSON. * @function toJSON * @memberof game.adventure_sweep_rsp * @instance * @returns {Object.} JSON object */ adventure_sweep_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_sweep_rsp; })(); game.adventure_pass_award = (function() { /** * Properties of an adventure_pass_award. * @memberof game * @interface Iadventure_pass_award * @property {number|Long|null} [id] adventure_pass_award id * @property {number|Long|null} [type] adventure_pass_award type */ /** * Constructs a new adventure_pass_award. * @memberof game * @classdesc Represents an adventure_pass_award. * @implements Iadventure_pass_award * @constructor * @param {game.Iadventure_pass_award=} [properties] Properties to set */ function adventure_pass_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_pass_award id. * @member {number|Long} id * @memberof game.adventure_pass_award * @instance */ adventure_pass_award.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_pass_award type. * @member {number|Long} type * @memberof game.adventure_pass_award * @instance */ adventure_pass_award.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_pass_award instance using the specified properties. * @function create * @memberof game.adventure_pass_award * @static * @param {game.Iadventure_pass_award=} [properties] Properties to set * @returns {game.adventure_pass_award} adventure_pass_award instance */ adventure_pass_award.create = function create(properties) { return new adventure_pass_award(properties); }; /** * Encodes the specified adventure_pass_award message. Does not implicitly {@link game.adventure_pass_award.verify|verify} messages. * @function encode * @memberof game.adventure_pass_award * @static * @param {game.Iadventure_pass_award} message adventure_pass_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_pass_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); return writer; }; /** * Encodes the specified adventure_pass_award message, length delimited. Does not implicitly {@link game.adventure_pass_award.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_pass_award * @static * @param {game.Iadventure_pass_award} message adventure_pass_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_pass_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_pass_award message from the specified reader or buffer. * @function decode * @memberof game.adventure_pass_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_pass_award} adventure_pass_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_pass_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_pass_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_pass_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_pass_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_pass_award} adventure_pass_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_pass_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_pass_award message. * @function verify * @memberof game.adventure_pass_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_pass_award.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.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates an adventure_pass_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_pass_award * @static * @param {Object.} object Plain object * @returns {game.adventure_pass_award} adventure_pass_award */ adventure_pass_award.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_pass_award) return object; let message = new $root.game.adventure_pass_award(); 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.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_pass_award message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_pass_award * @static * @param {game.adventure_pass_award} message adventure_pass_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_pass_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 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.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this adventure_pass_award to JSON. * @function toJSON * @memberof game.adventure_pass_award * @instance * @returns {Object.} JSON object */ adventure_pass_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_pass_award; })(); game.adventure_pass_award_rsp = (function() { /** * Properties of an adventure_pass_award_rsp. * @memberof game * @interface Iadventure_pass_award_rsp * @property {number|Long|null} [errno] adventure_pass_award_rsp errno * @property {number|Long|null} [id] adventure_pass_award_rsp id * @property {number|Long|null} [type] adventure_pass_award_rsp type */ /** * Constructs a new adventure_pass_award_rsp. * @memberof game * @classdesc Represents an adventure_pass_award_rsp. * @implements Iadventure_pass_award_rsp * @constructor * @param {game.Iadventure_pass_award_rsp=} [properties] Properties to set */ function adventure_pass_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_pass_award_rsp errno. * @member {number|Long} errno * @memberof game.adventure_pass_award_rsp * @instance */ adventure_pass_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_pass_award_rsp id. * @member {number|Long} id * @memberof game.adventure_pass_award_rsp * @instance */ adventure_pass_award_rsp.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * adventure_pass_award_rsp type. * @member {number|Long} type * @memberof game.adventure_pass_award_rsp * @instance */ adventure_pass_award_rsp.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_pass_award_rsp instance using the specified properties. * @function create * @memberof game.adventure_pass_award_rsp * @static * @param {game.Iadventure_pass_award_rsp=} [properties] Properties to set * @returns {game.adventure_pass_award_rsp} adventure_pass_award_rsp instance */ adventure_pass_award_rsp.create = function create(properties) { return new adventure_pass_award_rsp(properties); }; /** * Encodes the specified adventure_pass_award_rsp message. Does not implicitly {@link game.adventure_pass_award_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_pass_award_rsp * @static * @param {game.Iadventure_pass_award_rsp} message adventure_pass_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_pass_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.type); return writer; }; /** * Encodes the specified adventure_pass_award_rsp message, length delimited. Does not implicitly {@link game.adventure_pass_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_pass_award_rsp * @static * @param {game.Iadventure_pass_award_rsp} message adventure_pass_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_pass_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_pass_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_pass_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_pass_award_rsp} adventure_pass_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_pass_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_pass_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id = reader.int64(); break; case 3: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_pass_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_pass_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_pass_award_rsp} adventure_pass_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_pass_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_pass_award_rsp message. * @function verify * @memberof game.adventure_pass_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_pass_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long 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.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates an adventure_pass_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_pass_award_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_pass_award_rsp} adventure_pass_award_rsp */ adventure_pass_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_pass_award_rsp) return object; let message = new $root.game.adventure_pass_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); 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.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_pass_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_pass_award_rsp * @static * @param {game.adventure_pass_award_rsp} message adventure_pass_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_pass_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; 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.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this adventure_pass_award_rsp to JSON. * @function toJSON * @memberof game.adventure_pass_award_rsp * @instance * @returns {Object.} JSON object */ adventure_pass_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_pass_award_rsp; })(); game.adventure_ad_award = (function() { /** * Properties of an adventure_ad_award. * @memberof game * @interface Iadventure_ad_award */ /** * Constructs a new adventure_ad_award. * @memberof game * @classdesc Represents an adventure_ad_award. * @implements Iadventure_ad_award * @constructor * @param {game.Iadventure_ad_award=} [properties] Properties to set */ function adventure_ad_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new adventure_ad_award instance using the specified properties. * @function create * @memberof game.adventure_ad_award * @static * @param {game.Iadventure_ad_award=} [properties] Properties to set * @returns {game.adventure_ad_award} adventure_ad_award instance */ adventure_ad_award.create = function create(properties) { return new adventure_ad_award(properties); }; /** * Encodes the specified adventure_ad_award message. Does not implicitly {@link game.adventure_ad_award.verify|verify} messages. * @function encode * @memberof game.adventure_ad_award * @static * @param {game.Iadventure_ad_award} message adventure_ad_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_ad_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified adventure_ad_award message, length delimited. Does not implicitly {@link game.adventure_ad_award.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_ad_award * @static * @param {game.Iadventure_ad_award} message adventure_ad_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_ad_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_ad_award message from the specified reader or buffer. * @function decode * @memberof game.adventure_ad_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_ad_award} adventure_ad_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_ad_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_ad_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_ad_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_ad_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_ad_award} adventure_ad_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_ad_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_ad_award message. * @function verify * @memberof game.adventure_ad_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_ad_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an adventure_ad_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_ad_award * @static * @param {Object.} object Plain object * @returns {game.adventure_ad_award} adventure_ad_award */ adventure_ad_award.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_ad_award) return object; return new $root.game.adventure_ad_award(); }; /** * Creates a plain object from an adventure_ad_award message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_ad_award * @static * @param {game.adventure_ad_award} message adventure_ad_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_ad_award.toObject = function toObject() { return {}; }; /** * Converts this adventure_ad_award to JSON. * @function toJSON * @memberof game.adventure_ad_award * @instance * @returns {Object.} JSON object */ adventure_ad_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_ad_award; })(); game.adventure_ad_award_rsp = (function() { /** * Properties of an adventure_ad_award_rsp. * @memberof game * @interface Iadventure_ad_award_rsp * @property {number|Long|null} [errno] adventure_ad_award_rsp errno */ /** * Constructs a new adventure_ad_award_rsp. * @memberof game * @classdesc Represents an adventure_ad_award_rsp. * @implements Iadventure_ad_award_rsp * @constructor * @param {game.Iadventure_ad_award_rsp=} [properties] Properties to set */ function adventure_ad_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_ad_award_rsp errno. * @member {number|Long} errno * @memberof game.adventure_ad_award_rsp * @instance */ adventure_ad_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_ad_award_rsp instance using the specified properties. * @function create * @memberof game.adventure_ad_award_rsp * @static * @param {game.Iadventure_ad_award_rsp=} [properties] Properties to set * @returns {game.adventure_ad_award_rsp} adventure_ad_award_rsp instance */ adventure_ad_award_rsp.create = function create(properties) { return new adventure_ad_award_rsp(properties); }; /** * Encodes the specified adventure_ad_award_rsp message. Does not implicitly {@link game.adventure_ad_award_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_ad_award_rsp * @static * @param {game.Iadventure_ad_award_rsp} message adventure_ad_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_ad_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adventure_ad_award_rsp message, length delimited. Does not implicitly {@link game.adventure_ad_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_ad_award_rsp * @static * @param {game.Iadventure_ad_award_rsp} message adventure_ad_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_ad_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_ad_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_ad_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_ad_award_rsp} adventure_ad_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_ad_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_ad_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_ad_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_ad_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_ad_award_rsp} adventure_ad_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_ad_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_ad_award_rsp message. * @function verify * @memberof game.adventure_ad_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_ad_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adventure_ad_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_ad_award_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_ad_award_rsp} adventure_ad_award_rsp */ adventure_ad_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_ad_award_rsp) return object; let message = new $root.game.adventure_ad_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_ad_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_ad_award_rsp * @static * @param {game.adventure_ad_award_rsp} message adventure_ad_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_ad_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adventure_ad_award_rsp to JSON. * @function toJSON * @memberof game.adventure_ad_award_rsp * @instance * @returns {Object.} JSON object */ adventure_ad_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_ad_award_rsp; })(); game.adventure_trial = (function() { /** * Properties of an adventure_trial. * @memberof game * @interface Iadventure_trial */ /** * Constructs a new adventure_trial. * @memberof game * @classdesc Represents an adventure_trial. * @implements Iadventure_trial * @constructor * @param {game.Iadventure_trial=} [properties] Properties to set */ function adventure_trial(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new adventure_trial instance using the specified properties. * @function create * @memberof game.adventure_trial * @static * @param {game.Iadventure_trial=} [properties] Properties to set * @returns {game.adventure_trial} adventure_trial instance */ adventure_trial.create = function create(properties) { return new adventure_trial(properties); }; /** * Encodes the specified adventure_trial message. Does not implicitly {@link game.adventure_trial.verify|verify} messages. * @function encode * @memberof game.adventure_trial * @static * @param {game.Iadventure_trial} message adventure_trial message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_trial.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified adventure_trial message, length delimited. Does not implicitly {@link game.adventure_trial.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_trial * @static * @param {game.Iadventure_trial} message adventure_trial message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_trial.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_trial message from the specified reader or buffer. * @function decode * @memberof game.adventure_trial * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_trial} adventure_trial * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_trial.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_trial(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_trial message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_trial * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_trial} adventure_trial * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_trial.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_trial message. * @function verify * @memberof game.adventure_trial * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_trial.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an adventure_trial message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_trial * @static * @param {Object.} object Plain object * @returns {game.adventure_trial} adventure_trial */ adventure_trial.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_trial) return object; return new $root.game.adventure_trial(); }; /** * Creates a plain object from an adventure_trial message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_trial * @static * @param {game.adventure_trial} message adventure_trial * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_trial.toObject = function toObject() { return {}; }; /** * Converts this adventure_trial to JSON. * @function toJSON * @memberof game.adventure_trial * @instance * @returns {Object.} JSON object */ adventure_trial.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_trial; })(); game.adventure_trial_rsp = (function() { /** * Properties of an adventure_trial_rsp. * @memberof game * @interface Iadventure_trial_rsp * @property {number|Long|null} [errno] adventure_trial_rsp errno */ /** * Constructs a new adventure_trial_rsp. * @memberof game * @classdesc Represents an adventure_trial_rsp. * @implements Iadventure_trial_rsp * @constructor * @param {game.Iadventure_trial_rsp=} [properties] Properties to set */ function adventure_trial_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adventure_trial_rsp errno. * @member {number|Long} errno * @memberof game.adventure_trial_rsp * @instance */ adventure_trial_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adventure_trial_rsp instance using the specified properties. * @function create * @memberof game.adventure_trial_rsp * @static * @param {game.Iadventure_trial_rsp=} [properties] Properties to set * @returns {game.adventure_trial_rsp} adventure_trial_rsp instance */ adventure_trial_rsp.create = function create(properties) { return new adventure_trial_rsp(properties); }; /** * Encodes the specified adventure_trial_rsp message. Does not implicitly {@link game.adventure_trial_rsp.verify|verify} messages. * @function encode * @memberof game.adventure_trial_rsp * @static * @param {game.Iadventure_trial_rsp} message adventure_trial_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_trial_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adventure_trial_rsp message, length delimited. Does not implicitly {@link game.adventure_trial_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adventure_trial_rsp * @static * @param {game.Iadventure_trial_rsp} message adventure_trial_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adventure_trial_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adventure_trial_rsp message from the specified reader or buffer. * @function decode * @memberof game.adventure_trial_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adventure_trial_rsp} adventure_trial_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_trial_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adventure_trial_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adventure_trial_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adventure_trial_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adventure_trial_rsp} adventure_trial_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adventure_trial_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adventure_trial_rsp message. * @function verify * @memberof game.adventure_trial_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adventure_trial_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adventure_trial_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adventure_trial_rsp * @static * @param {Object.} object Plain object * @returns {game.adventure_trial_rsp} adventure_trial_rsp */ adventure_trial_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adventure_trial_rsp) return object; let message = new $root.game.adventure_trial_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adventure_trial_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adventure_trial_rsp * @static * @param {game.adventure_trial_rsp} message adventure_trial_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adventure_trial_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adventure_trial_rsp to JSON. * @function toJSON * @memberof game.adventure_trial_rsp * @instance * @returns {Object.} JSON object */ adventure_trial_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adventure_trial_rsp; })(); game.get_mail = (function() { /** * Properties of a get_mail. * @memberof game * @interface Iget_mail */ /** * Constructs a new get_mail. * @memberof game * @classdesc Represents a get_mail. * @implements Iget_mail * @constructor * @param {game.Iget_mail=} [properties] Properties to set */ function get_mail(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new get_mail instance using the specified properties. * @function create * @memberof game.get_mail * @static * @param {game.Iget_mail=} [properties] Properties to set * @returns {game.get_mail} get_mail instance */ get_mail.create = function create(properties) { return new get_mail(properties); }; /** * Encodes the specified get_mail message. Does not implicitly {@link game.get_mail.verify|verify} messages. * @function encode * @memberof game.get_mail * @static * @param {game.Iget_mail} message get_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified get_mail message, length delimited. Does not implicitly {@link game.get_mail.verify|verify} messages. * @function encodeDelimited * @memberof game.get_mail * @static * @param {game.Iget_mail} message get_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a get_mail message from the specified reader or buffer. * @function decode * @memberof game.get_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.get_mail} get_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.get_mail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a get_mail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.get_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.get_mail} get_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a get_mail message. * @function verify * @memberof game.get_mail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ get_mail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a get_mail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.get_mail * @static * @param {Object.} object Plain object * @returns {game.get_mail} get_mail */ get_mail.fromObject = function fromObject(object) { if (object instanceof $root.game.get_mail) return object; return new $root.game.get_mail(); }; /** * Creates a plain object from a get_mail message. Also converts values to other types if specified. * @function toObject * @memberof game.get_mail * @static * @param {game.get_mail} message get_mail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ get_mail.toObject = function toObject() { return {}; }; /** * Converts this get_mail to JSON. * @function toJSON * @memberof game.get_mail * @instance * @returns {Object.} JSON object */ get_mail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return get_mail; })(); game.get_mail_rsp = (function() { /** * Properties of a get_mail_rsp. * @memberof game * @interface Iget_mail_rsp * @property {number|Long|null} [errno] get_mail_rsp errno * @property {Array.|null} [list] get_mail_rsp list */ /** * Constructs a new get_mail_rsp. * @memberof game * @classdesc Represents a get_mail_rsp. * @implements Iget_mail_rsp * @constructor * @param {game.Iget_mail_rsp=} [properties] Properties to set */ function get_mail_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * get_mail_rsp errno. * @member {number|Long} errno * @memberof game.get_mail_rsp * @instance */ get_mail_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * get_mail_rsp list. * @member {Array.} list * @memberof game.get_mail_rsp * @instance */ get_mail_rsp.prototype.list = $util.emptyArray; /** * Creates a new get_mail_rsp instance using the specified properties. * @function create * @memberof game.get_mail_rsp * @static * @param {game.Iget_mail_rsp=} [properties] Properties to set * @returns {game.get_mail_rsp} get_mail_rsp instance */ get_mail_rsp.create = function create(properties) { return new get_mail_rsp(properties); }; /** * Encodes the specified get_mail_rsp message. Does not implicitly {@link game.get_mail_rsp.verify|verify} messages. * @function encode * @memberof game.get_mail_rsp * @static * @param {game.Iget_mail_rsp} message get_mail_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.mail.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified get_mail_rsp message, length delimited. Does not implicitly {@link game.get_mail_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.get_mail_rsp * @static * @param {game.Iget_mail_rsp} message get_mail_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a get_mail_rsp message from the specified reader or buffer. * @function decode * @memberof game.get_mail_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.get_mail_rsp} get_mail_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.get_mail_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.mail.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a get_mail_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.get_mail_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.get_mail_rsp} get_mail_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a get_mail_rsp message. * @function verify * @memberof game.get_mail_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ get_mail_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.mail.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a get_mail_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.get_mail_rsp * @static * @param {Object.} object Plain object * @returns {game.get_mail_rsp} get_mail_rsp */ get_mail_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.get_mail_rsp) return object; let message = new $root.game.get_mail_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.get_mail_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.get_mail_rsp.list: object expected"); message.list[i] = $root.game.mail.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a get_mail_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.get_mail_rsp * @static * @param {game.get_mail_rsp} message get_mail_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ get_mail_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.mail.toObject(message.list[j], options); } return object; }; /** * Converts this get_mail_rsp to JSON. * @function toJSON * @memberof game.get_mail_rsp * @instance * @returns {Object.} JSON object */ get_mail_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return get_mail_rsp; })(); game.get_mail_goods = (function() { /** * Properties of a get_mail_goods. * @memberof game * @interface Iget_mail_goods * @property {Array.|null} [list] get_mail_goods list * @property {boolean|null} [bonekey] get_mail_goods bonekey */ /** * Constructs a new get_mail_goods. * @memberof game * @classdesc Represents a get_mail_goods. * @implements Iget_mail_goods * @constructor * @param {game.Iget_mail_goods=} [properties] Properties to set */ function get_mail_goods(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * get_mail_goods list. * @member {Array.} list * @memberof game.get_mail_goods * @instance */ get_mail_goods.prototype.list = $util.emptyArray; /** * get_mail_goods bonekey. * @member {boolean} bonekey * @memberof game.get_mail_goods * @instance */ get_mail_goods.prototype.bonekey = false; /** * Creates a new get_mail_goods instance using the specified properties. * @function create * @memberof game.get_mail_goods * @static * @param {game.Iget_mail_goods=} [properties] Properties to set * @returns {game.get_mail_goods} get_mail_goods instance */ get_mail_goods.create = function create(properties) { return new get_mail_goods(properties); }; /** * Encodes the specified get_mail_goods message. Does not implicitly {@link game.get_mail_goods.verify|verify} messages. * @function encode * @memberof game.get_mail_goods * @static * @param {game.Iget_mail_goods} message get_mail_goods message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail_goods.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.list[i]); if (message.bonekey != null && Object.hasOwnProperty.call(message, "bonekey")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.bonekey); return writer; }; /** * Encodes the specified get_mail_goods message, length delimited. Does not implicitly {@link game.get_mail_goods.verify|verify} messages. * @function encodeDelimited * @memberof game.get_mail_goods * @static * @param {game.Iget_mail_goods} message get_mail_goods message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail_goods.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a get_mail_goods message from the specified reader or buffer. * @function decode * @memberof game.get_mail_goods * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.get_mail_goods} get_mail_goods * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail_goods.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.get_mail_goods(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; case 2: message.bonekey = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a get_mail_goods message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.get_mail_goods * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.get_mail_goods} get_mail_goods * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail_goods.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a get_mail_goods message. * @function verify * @memberof game.get_mail_goods * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ get_mail_goods.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } if (message.bonekey != null && message.hasOwnProperty("bonekey")) if (typeof message.bonekey !== "boolean") return "bonekey: boolean expected"; return null; }; /** * Creates a get_mail_goods message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.get_mail_goods * @static * @param {Object.} object Plain object * @returns {game.get_mail_goods} get_mail_goods */ get_mail_goods.fromObject = function fromObject(object) { if (object instanceof $root.game.get_mail_goods) return object; let message = new $root.game.get_mail_goods(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.get_mail_goods.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } if (object.bonekey != null) message.bonekey = Boolean(object.bonekey); return message; }; /** * Creates a plain object from a get_mail_goods message. Also converts values to other types if specified. * @function toObject * @memberof game.get_mail_goods * @static * @param {game.get_mail_goods} message get_mail_goods * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ get_mail_goods.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) object.bonekey = false; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } if (message.bonekey != null && message.hasOwnProperty("bonekey")) object.bonekey = message.bonekey; return object; }; /** * Converts this get_mail_goods to JSON. * @function toJSON * @memberof game.get_mail_goods * @instance * @returns {Object.} JSON object */ get_mail_goods.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return get_mail_goods; })(); game.get_mail_goods_rsp = (function() { /** * Properties of a get_mail_goods_rsp. * @memberof game * @interface Iget_mail_goods_rsp * @property {number|Long|null} [errno] get_mail_goods_rsp errno * @property {Array.|null} [list] get_mail_goods_rsp list */ /** * Constructs a new get_mail_goods_rsp. * @memberof game * @classdesc Represents a get_mail_goods_rsp. * @implements Iget_mail_goods_rsp * @constructor * @param {game.Iget_mail_goods_rsp=} [properties] Properties to set */ function get_mail_goods_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * get_mail_goods_rsp errno. * @member {number|Long} errno * @memberof game.get_mail_goods_rsp * @instance */ get_mail_goods_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * get_mail_goods_rsp list. * @member {Array.} list * @memberof game.get_mail_goods_rsp * @instance */ get_mail_goods_rsp.prototype.list = $util.emptyArray; /** * Creates a new get_mail_goods_rsp instance using the specified properties. * @function create * @memberof game.get_mail_goods_rsp * @static * @param {game.Iget_mail_goods_rsp=} [properties] Properties to set * @returns {game.get_mail_goods_rsp} get_mail_goods_rsp instance */ get_mail_goods_rsp.create = function create(properties) { return new get_mail_goods_rsp(properties); }; /** * Encodes the specified get_mail_goods_rsp message. Does not implicitly {@link game.get_mail_goods_rsp.verify|verify} messages. * @function encode * @memberof game.get_mail_goods_rsp * @static * @param {game.Iget_mail_goods_rsp} message get_mail_goods_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail_goods_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.list[i]); return writer; }; /** * Encodes the specified get_mail_goods_rsp message, length delimited. Does not implicitly {@link game.get_mail_goods_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.get_mail_goods_rsp * @static * @param {game.Iget_mail_goods_rsp} message get_mail_goods_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_mail_goods_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a get_mail_goods_rsp message from the specified reader or buffer. * @function decode * @memberof game.get_mail_goods_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.get_mail_goods_rsp} get_mail_goods_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail_goods_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.get_mail_goods_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a get_mail_goods_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.get_mail_goods_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.get_mail_goods_rsp} get_mail_goods_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_mail_goods_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a get_mail_goods_rsp message. * @function verify * @memberof game.get_mail_goods_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ get_mail_goods_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates a get_mail_goods_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.get_mail_goods_rsp * @static * @param {Object.} object Plain object * @returns {game.get_mail_goods_rsp} get_mail_goods_rsp */ get_mail_goods_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.get_mail_goods_rsp) return object; let message = new $root.game.get_mail_goods_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.get_mail_goods_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from a get_mail_goods_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.get_mail_goods_rsp * @static * @param {game.get_mail_goods_rsp} message get_mail_goods_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ get_mail_goods_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this get_mail_goods_rsp to JSON. * @function toJSON * @memberof game.get_mail_goods_rsp * @instance * @returns {Object.} JSON object */ get_mail_goods_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return get_mail_goods_rsp; })(); game.del_mail = (function() { /** * Properties of a del_mail. * @memberof game * @interface Idel_mail * @property {Array.|null} [list] del_mail list */ /** * Constructs a new del_mail. * @memberof game * @classdesc Represents a del_mail. * @implements Idel_mail * @constructor * @param {game.Idel_mail=} [properties] Properties to set */ function del_mail(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * del_mail list. * @member {Array.} list * @memberof game.del_mail * @instance */ del_mail.prototype.list = $util.emptyArray; /** * Creates a new del_mail instance using the specified properties. * @function create * @memberof game.del_mail * @static * @param {game.Idel_mail=} [properties] Properties to set * @returns {game.del_mail} del_mail instance */ del_mail.create = function create(properties) { return new del_mail(properties); }; /** * Encodes the specified del_mail message. Does not implicitly {@link game.del_mail.verify|verify} messages. * @function encode * @memberof game.del_mail * @static * @param {game.Idel_mail} message del_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ del_mail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.list[i]); return writer; }; /** * Encodes the specified del_mail message, length delimited. Does not implicitly {@link game.del_mail.verify|verify} messages. * @function encodeDelimited * @memberof game.del_mail * @static * @param {game.Idel_mail} message del_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ del_mail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a del_mail message from the specified reader or buffer. * @function decode * @memberof game.del_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.del_mail} del_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ del_mail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.del_mail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a del_mail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.del_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.del_mail} del_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ del_mail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a del_mail message. * @function verify * @memberof game.del_mail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ del_mail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates a del_mail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.del_mail * @static * @param {Object.} object Plain object * @returns {game.del_mail} del_mail */ del_mail.fromObject = function fromObject(object) { if (object instanceof $root.game.del_mail) return object; let message = new $root.game.del_mail(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.del_mail.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from a del_mail message. Also converts values to other types if specified. * @function toObject * @memberof game.del_mail * @static * @param {game.del_mail} message del_mail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ del_mail.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this del_mail to JSON. * @function toJSON * @memberof game.del_mail * @instance * @returns {Object.} JSON object */ del_mail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return del_mail; })(); game.del_mail_rsp = (function() { /** * Properties of a del_mail_rsp. * @memberof game * @interface Idel_mail_rsp * @property {number|Long|null} [errno] del_mail_rsp errno * @property {Array.|null} [list] del_mail_rsp list */ /** * Constructs a new del_mail_rsp. * @memberof game * @classdesc Represents a del_mail_rsp. * @implements Idel_mail_rsp * @constructor * @param {game.Idel_mail_rsp=} [properties] Properties to set */ function del_mail_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * del_mail_rsp errno. * @member {number|Long} errno * @memberof game.del_mail_rsp * @instance */ del_mail_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * del_mail_rsp list. * @member {Array.} list * @memberof game.del_mail_rsp * @instance */ del_mail_rsp.prototype.list = $util.emptyArray; /** * Creates a new del_mail_rsp instance using the specified properties. * @function create * @memberof game.del_mail_rsp * @static * @param {game.Idel_mail_rsp=} [properties] Properties to set * @returns {game.del_mail_rsp} del_mail_rsp instance */ del_mail_rsp.create = function create(properties) { return new del_mail_rsp(properties); }; /** * Encodes the specified del_mail_rsp message. Does not implicitly {@link game.del_mail_rsp.verify|verify} messages. * @function encode * @memberof game.del_mail_rsp * @static * @param {game.Idel_mail_rsp} message del_mail_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ del_mail_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.list[i]); return writer; }; /** * Encodes the specified del_mail_rsp message, length delimited. Does not implicitly {@link game.del_mail_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.del_mail_rsp * @static * @param {game.Idel_mail_rsp} message del_mail_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ del_mail_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a del_mail_rsp message from the specified reader or buffer. * @function decode * @memberof game.del_mail_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.del_mail_rsp} del_mail_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ del_mail_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.del_mail_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a del_mail_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.del_mail_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.del_mail_rsp} del_mail_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ del_mail_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a del_mail_rsp message. * @function verify * @memberof game.del_mail_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ del_mail_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates a del_mail_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.del_mail_rsp * @static * @param {Object.} object Plain object * @returns {game.del_mail_rsp} del_mail_rsp */ del_mail_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.del_mail_rsp) return object; let message = new $root.game.del_mail_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.del_mail_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from a del_mail_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.del_mail_rsp * @static * @param {game.del_mail_rsp} message del_mail_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ del_mail_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this del_mail_rsp to JSON. * @function toJSON * @memberof game.del_mail_rsp * @instance * @returns {Object.} JSON object */ del_mail_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return del_mail_rsp; })(); game.flag_mail = (function() { /** * Properties of a flag_mail. * @memberof game * @interface Iflag_mail * @property {Array.|null} [list] flag_mail list */ /** * Constructs a new flag_mail. * @memberof game * @classdesc Represents a flag_mail. * @implements Iflag_mail * @constructor * @param {game.Iflag_mail=} [properties] Properties to set */ function flag_mail(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * flag_mail list. * @member {Array.} list * @memberof game.flag_mail * @instance */ flag_mail.prototype.list = $util.emptyArray; /** * Creates a new flag_mail instance using the specified properties. * @function create * @memberof game.flag_mail * @static * @param {game.Iflag_mail=} [properties] Properties to set * @returns {game.flag_mail} flag_mail instance */ flag_mail.create = function create(properties) { return new flag_mail(properties); }; /** * Encodes the specified flag_mail message. Does not implicitly {@link game.flag_mail.verify|verify} messages. * @function encode * @memberof game.flag_mail * @static * @param {game.Iflag_mail} message flag_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ flag_mail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.list[i]); return writer; }; /** * Encodes the specified flag_mail message, length delimited. Does not implicitly {@link game.flag_mail.verify|verify} messages. * @function encodeDelimited * @memberof game.flag_mail * @static * @param {game.Iflag_mail} message flag_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ flag_mail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a flag_mail message from the specified reader or buffer. * @function decode * @memberof game.flag_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.flag_mail} flag_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ flag_mail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.flag_mail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a flag_mail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.flag_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.flag_mail} flag_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ flag_mail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a flag_mail message. * @function verify * @memberof game.flag_mail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ flag_mail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates a flag_mail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.flag_mail * @static * @param {Object.} object Plain object * @returns {game.flag_mail} flag_mail */ flag_mail.fromObject = function fromObject(object) { if (object instanceof $root.game.flag_mail) return object; let message = new $root.game.flag_mail(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.flag_mail.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from a flag_mail message. Also converts values to other types if specified. * @function toObject * @memberof game.flag_mail * @static * @param {game.flag_mail} message flag_mail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ flag_mail.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this flag_mail to JSON. * @function toJSON * @memberof game.flag_mail * @instance * @returns {Object.} JSON object */ flag_mail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return flag_mail; })(); game.flag_mail_rsp = (function() { /** * Properties of a flag_mail_rsp. * @memberof game * @interface Iflag_mail_rsp * @property {number|Long|null} [errno] flag_mail_rsp errno */ /** * Constructs a new flag_mail_rsp. * @memberof game * @classdesc Represents a flag_mail_rsp. * @implements Iflag_mail_rsp * @constructor * @param {game.Iflag_mail_rsp=} [properties] Properties to set */ function flag_mail_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * flag_mail_rsp errno. * @member {number|Long} errno * @memberof game.flag_mail_rsp * @instance */ flag_mail_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new flag_mail_rsp instance using the specified properties. * @function create * @memberof game.flag_mail_rsp * @static * @param {game.Iflag_mail_rsp=} [properties] Properties to set * @returns {game.flag_mail_rsp} flag_mail_rsp instance */ flag_mail_rsp.create = function create(properties) { return new flag_mail_rsp(properties); }; /** * Encodes the specified flag_mail_rsp message. Does not implicitly {@link game.flag_mail_rsp.verify|verify} messages. * @function encode * @memberof game.flag_mail_rsp * @static * @param {game.Iflag_mail_rsp} message flag_mail_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ flag_mail_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified flag_mail_rsp message, length delimited. Does not implicitly {@link game.flag_mail_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.flag_mail_rsp * @static * @param {game.Iflag_mail_rsp} message flag_mail_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ flag_mail_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a flag_mail_rsp message from the specified reader or buffer. * @function decode * @memberof game.flag_mail_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.flag_mail_rsp} flag_mail_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ flag_mail_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.flag_mail_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a flag_mail_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.flag_mail_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.flag_mail_rsp} flag_mail_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ flag_mail_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a flag_mail_rsp message. * @function verify * @memberof game.flag_mail_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ flag_mail_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a flag_mail_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.flag_mail_rsp * @static * @param {Object.} object Plain object * @returns {game.flag_mail_rsp} flag_mail_rsp */ flag_mail_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.flag_mail_rsp) return object; let message = new $root.game.flag_mail_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a flag_mail_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.flag_mail_rsp * @static * @param {game.flag_mail_rsp} message flag_mail_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ flag_mail_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this flag_mail_rsp to JSON. * @function toJSON * @memberof game.flag_mail_rsp * @instance * @returns {Object.} JSON object */ flag_mail_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return flag_mail_rsp; })(); game.send_mail = (function() { /** * Properties of a send_mail. * @memberof game * @interface Isend_mail * @property {Array.|null} [list] send_mail list */ /** * Constructs a new send_mail. * @memberof game * @classdesc Represents a send_mail. * @implements Isend_mail * @constructor * @param {game.Isend_mail=} [properties] Properties to set */ function send_mail(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * send_mail list. * @member {Array.} list * @memberof game.send_mail * @instance */ send_mail.prototype.list = $util.emptyArray; /** * Creates a new send_mail instance using the specified properties. * @function create * @memberof game.send_mail * @static * @param {game.Isend_mail=} [properties] Properties to set * @returns {game.send_mail} send_mail instance */ send_mail.create = function create(properties) { return new send_mail(properties); }; /** * Encodes the specified send_mail message. Does not implicitly {@link game.send_mail.verify|verify} messages. * @function encode * @memberof game.send_mail * @static * @param {game.Isend_mail} message send_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ send_mail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.mail.encode(message.list[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified send_mail message, length delimited. Does not implicitly {@link game.send_mail.verify|verify} messages. * @function encodeDelimited * @memberof game.send_mail * @static * @param {game.Isend_mail} message send_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ send_mail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a send_mail message from the specified reader or buffer. * @function decode * @memberof game.send_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.send_mail} send_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ send_mail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.send_mail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.mail.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a send_mail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.send_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.send_mail} send_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ send_mail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a send_mail message. * @function verify * @memberof game.send_mail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ send_mail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.mail.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a send_mail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.send_mail * @static * @param {Object.} object Plain object * @returns {game.send_mail} send_mail */ send_mail.fromObject = function fromObject(object) { if (object instanceof $root.game.send_mail) return object; let message = new $root.game.send_mail(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.send_mail.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.send_mail.list: object expected"); message.list[i] = $root.game.mail.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a send_mail message. Also converts values to other types if specified. * @function toObject * @memberof game.send_mail * @static * @param {game.send_mail} message send_mail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ send_mail.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.mail.toObject(message.list[j], options); } return object; }; /** * Converts this send_mail to JSON. * @function toJSON * @memberof game.send_mail * @instance * @returns {Object.} JSON object */ send_mail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return send_mail; })(); game.simple_mail = (function() { /** * Properties of a simple_mail. * @memberof game * @interface Isimple_mail * @property {number|Long|null} [num] simple_mail num * @property {number|Long|null} [noread] simple_mail noread * @property {number|Long|null} [needread] simple_mail needread */ /** * Constructs a new simple_mail. * @memberof game * @classdesc Represents a simple_mail. * @implements Isimple_mail * @constructor * @param {game.Isimple_mail=} [properties] Properties to set */ function simple_mail(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * simple_mail num. * @member {number|Long} num * @memberof game.simple_mail * @instance */ simple_mail.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * simple_mail noread. * @member {number|Long} noread * @memberof game.simple_mail * @instance */ simple_mail.prototype.noread = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * simple_mail needread. * @member {number|Long} needread * @memberof game.simple_mail * @instance */ simple_mail.prototype.needread = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new simple_mail instance using the specified properties. * @function create * @memberof game.simple_mail * @static * @param {game.Isimple_mail=} [properties] Properties to set * @returns {game.simple_mail} simple_mail instance */ simple_mail.create = function create(properties) { return new simple_mail(properties); }; /** * Encodes the specified simple_mail message. Does not implicitly {@link game.simple_mail.verify|verify} messages. * @function encode * @memberof game.simple_mail * @static * @param {game.Isimple_mail} message simple_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ simple_mail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.num); if (message.noread != null && Object.hasOwnProperty.call(message, "noread")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.noread); if (message.needread != null && Object.hasOwnProperty.call(message, "needread")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.needread); return writer; }; /** * Encodes the specified simple_mail message, length delimited. Does not implicitly {@link game.simple_mail.verify|verify} messages. * @function encodeDelimited * @memberof game.simple_mail * @static * @param {game.Isimple_mail} message simple_mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ simple_mail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a simple_mail message from the specified reader or buffer. * @function decode * @memberof game.simple_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.simple_mail} simple_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ simple_mail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.simple_mail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.num = reader.int64(); break; case 2: message.noread = reader.int64(); break; case 3: message.needread = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a simple_mail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.simple_mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.simple_mail} simple_mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ simple_mail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a simple_mail message. * @function verify * @memberof game.simple_mail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ simple_mail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.noread != null && message.hasOwnProperty("noread")) if (!$util.isInteger(message.noread) && !(message.noread && $util.isInteger(message.noread.low) && $util.isInteger(message.noread.high))) return "noread: integer|Long expected"; if (message.needread != null && message.hasOwnProperty("needread")) if (!$util.isInteger(message.needread) && !(message.needread && $util.isInteger(message.needread.low) && $util.isInteger(message.needread.high))) return "needread: integer|Long expected"; return null; }; /** * Creates a simple_mail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.simple_mail * @static * @param {Object.} object Plain object * @returns {game.simple_mail} simple_mail */ simple_mail.fromObject = function fromObject(object) { if (object instanceof $root.game.simple_mail) return object; let message = new $root.game.simple_mail(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.noread != null) if ($util.Long) (message.noread = $util.Long.fromValue(object.noread)).unsigned = false; else if (typeof object.noread === "string") message.noread = parseInt(object.noread, 10); else if (typeof object.noread === "number") message.noread = object.noread; else if (typeof object.noread === "object") message.noread = new $util.LongBits(object.noread.low >>> 0, object.noread.high >>> 0).toNumber(); if (object.needread != null) if ($util.Long) (message.needread = $util.Long.fromValue(object.needread)).unsigned = false; else if (typeof object.needread === "string") message.needread = parseInt(object.needread, 10); else if (typeof object.needread === "number") message.needread = object.needread; else if (typeof object.needread === "object") message.needread = new $util.LongBits(object.needread.low >>> 0, object.needread.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a simple_mail message. Also converts values to other types if specified. * @function toObject * @memberof game.simple_mail * @static * @param {game.simple_mail} message simple_mail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ simple_mail.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.noread = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.noread = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.needread = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.needread = options.longs === String ? "0" : 0; } if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.noread != null && message.hasOwnProperty("noread")) if (typeof message.noread === "number") object.noread = options.longs === String ? String(message.noread) : message.noread; else object.noread = options.longs === String ? $util.Long.prototype.toString.call(message.noread) : options.longs === Number ? new $util.LongBits(message.noread.low >>> 0, message.noread.high >>> 0).toNumber() : message.noread; if (message.needread != null && message.hasOwnProperty("needread")) if (typeof message.needread === "number") object.needread = options.longs === String ? String(message.needread) : message.needread; else object.needread = options.longs === String ? $util.Long.prototype.toString.call(message.needread) : options.longs === Number ? new $util.LongBits(message.needread.low >>> 0, message.needread.high >>> 0).toNumber() : message.needread; return object; }; /** * Converts this simple_mail to JSON. * @function toJSON * @memberof game.simple_mail * @instance * @returns {Object.} JSON object */ simple_mail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return simple_mail; })(); game.embattle_get_data = (function() { /** * Properties of an embattle_get_data. * @memberof game * @interface Iembattle_get_data */ /** * Constructs a new embattle_get_data. * @memberof game * @classdesc Represents an embattle_get_data. * @implements Iembattle_get_data * @constructor * @param {game.Iembattle_get_data=} [properties] Properties to set */ function embattle_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new embattle_get_data instance using the specified properties. * @function create * @memberof game.embattle_get_data * @static * @param {game.Iembattle_get_data=} [properties] Properties to set * @returns {game.embattle_get_data} embattle_get_data instance */ embattle_get_data.create = function create(properties) { return new embattle_get_data(properties); }; /** * Encodes the specified embattle_get_data message. Does not implicitly {@link game.embattle_get_data.verify|verify} messages. * @function encode * @memberof game.embattle_get_data * @static * @param {game.Iembattle_get_data} message embattle_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified embattle_get_data message, length delimited. Does not implicitly {@link game.embattle_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.embattle_get_data * @static * @param {game.Iembattle_get_data} message embattle_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an embattle_get_data message from the specified reader or buffer. * @function decode * @memberof game.embattle_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.embattle_get_data} embattle_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.embattle_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an embattle_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.embattle_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.embattle_get_data} embattle_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an embattle_get_data message. * @function verify * @memberof game.embattle_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ embattle_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an embattle_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.embattle_get_data * @static * @param {Object.} object Plain object * @returns {game.embattle_get_data} embattle_get_data */ embattle_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.embattle_get_data) return object; return new $root.game.embattle_get_data(); }; /** * Creates a plain object from an embattle_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.embattle_get_data * @static * @param {game.embattle_get_data} message embattle_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ embattle_get_data.toObject = function toObject() { return {}; }; /** * Converts this embattle_get_data to JSON. * @function toJSON * @memberof game.embattle_get_data * @instance * @returns {Object.} JSON object */ embattle_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return embattle_get_data; })(); game.embattle_get_data_rsp = (function() { /** * Properties of an embattle_get_data_rsp. * @memberof game * @interface Iembattle_get_data_rsp * @property {number|Long|null} [errno] embattle_get_data_rsp errno * @property {Array.|null} [list] embattle_get_data_rsp list * @property {Array.|null} [cardList] embattle_get_data_rsp cardList */ /** * Constructs a new embattle_get_data_rsp. * @memberof game * @classdesc Represents an embattle_get_data_rsp. * @implements Iembattle_get_data_rsp * @constructor * @param {game.Iembattle_get_data_rsp=} [properties] Properties to set */ function embattle_get_data_rsp(properties) { this.list = []; this.cardList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * embattle_get_data_rsp errno. * @member {number|Long} errno * @memberof game.embattle_get_data_rsp * @instance */ embattle_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * embattle_get_data_rsp list. * @member {Array.} list * @memberof game.embattle_get_data_rsp * @instance */ embattle_get_data_rsp.prototype.list = $util.emptyArray; /** * embattle_get_data_rsp cardList. * @member {Array.} cardList * @memberof game.embattle_get_data_rsp * @instance */ embattle_get_data_rsp.prototype.cardList = $util.emptyArray; /** * Creates a new embattle_get_data_rsp instance using the specified properties. * @function create * @memberof game.embattle_get_data_rsp * @static * @param {game.Iembattle_get_data_rsp=} [properties] Properties to set * @returns {game.embattle_get_data_rsp} embattle_get_data_rsp instance */ embattle_get_data_rsp.create = function create(properties) { return new embattle_get_data_rsp(properties); }; /** * Encodes the specified embattle_get_data_rsp message. Does not implicitly {@link game.embattle_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.embattle_get_data_rsp * @static * @param {game.Iembattle_get_data_rsp} message embattle_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.sid_pos.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.cardList != null && message.cardList.length) for (let i = 0; i < message.cardList.length; ++i) $root.game.sid_pos.encode(message.cardList[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified embattle_get_data_rsp message, length delimited. Does not implicitly {@link game.embattle_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.embattle_get_data_rsp * @static * @param {game.Iembattle_get_data_rsp} message embattle_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an embattle_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.embattle_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.embattle_get_data_rsp} embattle_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.embattle_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.sid_pos.decode(reader, reader.uint32())); break; case 3: if (!(message.cardList && message.cardList.length)) message.cardList = []; message.cardList.push($root.game.sid_pos.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an embattle_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.embattle_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.embattle_get_data_rsp} embattle_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an embattle_get_data_rsp message. * @function verify * @memberof game.embattle_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ embattle_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.sid_pos.verify(message.list[i]); if (error) return "list." + error; } } if (message.cardList != null && message.hasOwnProperty("cardList")) { if (!Array.isArray(message.cardList)) return "cardList: array expected"; for (let i = 0; i < message.cardList.length; ++i) { let error = $root.game.sid_pos.verify(message.cardList[i]); if (error) return "cardList." + error; } } return null; }; /** * Creates an embattle_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.embattle_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.embattle_get_data_rsp} embattle_get_data_rsp */ embattle_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.embattle_get_data_rsp) return object; let message = new $root.game.embattle_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.embattle_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.embattle_get_data_rsp.list: object expected"); message.list[i] = $root.game.sid_pos.fromObject(object.list[i]); } } if (object.cardList) { if (!Array.isArray(object.cardList)) throw TypeError(".game.embattle_get_data_rsp.cardList: array expected"); message.cardList = []; for (let i = 0; i < object.cardList.length; ++i) { if (typeof object.cardList[i] !== "object") throw TypeError(".game.embattle_get_data_rsp.cardList: object expected"); message.cardList[i] = $root.game.sid_pos.fromObject(object.cardList[i]); } } return message; }; /** * Creates a plain object from an embattle_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.embattle_get_data_rsp * @static * @param {game.embattle_get_data_rsp} message embattle_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ embattle_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.list = []; object.cardList = []; } if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.sid_pos.toObject(message.list[j], options); } if (message.cardList && message.cardList.length) { object.cardList = []; for (let j = 0; j < message.cardList.length; ++j) object.cardList[j] = $root.game.sid_pos.toObject(message.cardList[j], options); } return object; }; /** * Converts this embattle_get_data_rsp to JSON. * @function toJSON * @memberof game.embattle_get_data_rsp * @instance * @returns {Object.} JSON object */ embattle_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return embattle_get_data_rsp; })(); game.embattle_battle = (function() { /** * Properties of an embattle_battle. * @memberof game * @interface Iembattle_battle * @property {boolean|null} [skill] embattle_battle skill * @property {string|null} [sid] embattle_battle sid * @property {number|Long|null} [pos] embattle_battle pos */ /** * Constructs a new embattle_battle. * @memberof game * @classdesc Represents an embattle_battle. * @implements Iembattle_battle * @constructor * @param {game.Iembattle_battle=} [properties] Properties to set */ function embattle_battle(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * embattle_battle skill. * @member {boolean} skill * @memberof game.embattle_battle * @instance */ embattle_battle.prototype.skill = false; /** * embattle_battle sid. * @member {string} sid * @memberof game.embattle_battle * @instance */ embattle_battle.prototype.sid = ""; /** * embattle_battle pos. * @member {number|Long} pos * @memberof game.embattle_battle * @instance */ embattle_battle.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new embattle_battle instance using the specified properties. * @function create * @memberof game.embattle_battle * @static * @param {game.Iembattle_battle=} [properties] Properties to set * @returns {game.embattle_battle} embattle_battle instance */ embattle_battle.create = function create(properties) { return new embattle_battle(properties); }; /** * Encodes the specified embattle_battle message. Does not implicitly {@link game.embattle_battle.verify|verify} messages. * @function encode * @memberof game.embattle_battle * @static * @param {game.Iembattle_battle} message embattle_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_battle.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.skill != null && Object.hasOwnProperty.call(message, "skill")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.skill); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.pos); return writer; }; /** * Encodes the specified embattle_battle message, length delimited. Does not implicitly {@link game.embattle_battle.verify|verify} messages. * @function encodeDelimited * @memberof game.embattle_battle * @static * @param {game.Iembattle_battle} message embattle_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_battle.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an embattle_battle message from the specified reader or buffer. * @function decode * @memberof game.embattle_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.embattle_battle} embattle_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_battle.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.embattle_battle(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.skill = reader.bool(); break; case 2: message.sid = reader.string(); break; case 3: message.pos = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an embattle_battle message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.embattle_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.embattle_battle} embattle_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_battle.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an embattle_battle message. * @function verify * @memberof game.embattle_battle * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ embattle_battle.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.skill != null && message.hasOwnProperty("skill")) if (typeof message.skill !== "boolean") return "skill: boolean expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; return null; }; /** * Creates an embattle_battle message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.embattle_battle * @static * @param {Object.} object Plain object * @returns {game.embattle_battle} embattle_battle */ embattle_battle.fromObject = function fromObject(object) { if (object instanceof $root.game.embattle_battle) return object; let message = new $root.game.embattle_battle(); if (object.skill != null) message.skill = Boolean(object.skill); if (object.sid != null) message.sid = String(object.sid); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an embattle_battle message. Also converts values to other types if specified. * @function toObject * @memberof game.embattle_battle * @static * @param {game.embattle_battle} message embattle_battle * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ embattle_battle.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.skill = false; object.sid = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; } if (message.skill != null && message.hasOwnProperty("skill")) object.skill = message.skill; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; return object; }; /** * Converts this embattle_battle to JSON. * @function toJSON * @memberof game.embattle_battle * @instance * @returns {Object.} JSON object */ embattle_battle.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return embattle_battle; })(); game.embattle_battle_rsp = (function() { /** * Properties of an embattle_battle_rsp. * @memberof game * @interface Iembattle_battle_rsp * @property {number|Long|null} [errno] embattle_battle_rsp errno * @property {Array.|null} [list] embattle_battle_rsp list * @property {Array.|null} [cardList] embattle_battle_rsp cardList */ /** * Constructs a new embattle_battle_rsp. * @memberof game * @classdesc Represents an embattle_battle_rsp. * @implements Iembattle_battle_rsp * @constructor * @param {game.Iembattle_battle_rsp=} [properties] Properties to set */ function embattle_battle_rsp(properties) { this.list = []; this.cardList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * embattle_battle_rsp errno. * @member {number|Long} errno * @memberof game.embattle_battle_rsp * @instance */ embattle_battle_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * embattle_battle_rsp list. * @member {Array.} list * @memberof game.embattle_battle_rsp * @instance */ embattle_battle_rsp.prototype.list = $util.emptyArray; /** * embattle_battle_rsp cardList. * @member {Array.} cardList * @memberof game.embattle_battle_rsp * @instance */ embattle_battle_rsp.prototype.cardList = $util.emptyArray; /** * Creates a new embattle_battle_rsp instance using the specified properties. * @function create * @memberof game.embattle_battle_rsp * @static * @param {game.Iembattle_battle_rsp=} [properties] Properties to set * @returns {game.embattle_battle_rsp} embattle_battle_rsp instance */ embattle_battle_rsp.create = function create(properties) { return new embattle_battle_rsp(properties); }; /** * Encodes the specified embattle_battle_rsp message. Does not implicitly {@link game.embattle_battle_rsp.verify|verify} messages. * @function encode * @memberof game.embattle_battle_rsp * @static * @param {game.Iembattle_battle_rsp} message embattle_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_battle_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.sid_pos.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.cardList != null && message.cardList.length) for (let i = 0; i < message.cardList.length; ++i) $root.game.sid_pos.encode(message.cardList[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified embattle_battle_rsp message, length delimited. Does not implicitly {@link game.embattle_battle_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.embattle_battle_rsp * @static * @param {game.Iembattle_battle_rsp} message embattle_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ embattle_battle_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an embattle_battle_rsp message from the specified reader or buffer. * @function decode * @memberof game.embattle_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.embattle_battle_rsp} embattle_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_battle_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.embattle_battle_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.sid_pos.decode(reader, reader.uint32())); break; case 3: if (!(message.cardList && message.cardList.length)) message.cardList = []; message.cardList.push($root.game.sid_pos.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an embattle_battle_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.embattle_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.embattle_battle_rsp} embattle_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ embattle_battle_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an embattle_battle_rsp message. * @function verify * @memberof game.embattle_battle_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ embattle_battle_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.sid_pos.verify(message.list[i]); if (error) return "list." + error; } } if (message.cardList != null && message.hasOwnProperty("cardList")) { if (!Array.isArray(message.cardList)) return "cardList: array expected"; for (let i = 0; i < message.cardList.length; ++i) { let error = $root.game.sid_pos.verify(message.cardList[i]); if (error) return "cardList." + error; } } return null; }; /** * Creates an embattle_battle_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.embattle_battle_rsp * @static * @param {Object.} object Plain object * @returns {game.embattle_battle_rsp} embattle_battle_rsp */ embattle_battle_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.embattle_battle_rsp) return object; let message = new $root.game.embattle_battle_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.embattle_battle_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.embattle_battle_rsp.list: object expected"); message.list[i] = $root.game.sid_pos.fromObject(object.list[i]); } } if (object.cardList) { if (!Array.isArray(object.cardList)) throw TypeError(".game.embattle_battle_rsp.cardList: array expected"); message.cardList = []; for (let i = 0; i < object.cardList.length; ++i) { if (typeof object.cardList[i] !== "object") throw TypeError(".game.embattle_battle_rsp.cardList: object expected"); message.cardList[i] = $root.game.sid_pos.fromObject(object.cardList[i]); } } return message; }; /** * Creates a plain object from an embattle_battle_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.embattle_battle_rsp * @static * @param {game.embattle_battle_rsp} message embattle_battle_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ embattle_battle_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.list = []; object.cardList = []; } if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.sid_pos.toObject(message.list[j], options); } if (message.cardList && message.cardList.length) { object.cardList = []; for (let j = 0; j < message.cardList.length; ++j) object.cardList[j] = $root.game.sid_pos.toObject(message.cardList[j], options); } return object; }; /** * Converts this embattle_battle_rsp to JSON. * @function toJSON * @memberof game.embattle_battle_rsp * @instance * @returns {Object.} JSON object */ embattle_battle_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return embattle_battle_rsp; })(); game.hero_get_data = (function() { /** * Properties of a hero_get_data. * @memberof game * @interface Ihero_get_data */ /** * Constructs a new hero_get_data. * @memberof game * @classdesc Represents a hero_get_data. * @implements Ihero_get_data * @constructor * @param {game.Ihero_get_data=} [properties] Properties to set */ function hero_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new hero_get_data instance using the specified properties. * @function create * @memberof game.hero_get_data * @static * @param {game.Ihero_get_data=} [properties] Properties to set * @returns {game.hero_get_data} hero_get_data instance */ hero_get_data.create = function create(properties) { return new hero_get_data(properties); }; /** * Encodes the specified hero_get_data message. Does not implicitly {@link game.hero_get_data.verify|verify} messages. * @function encode * @memberof game.hero_get_data * @static * @param {game.Ihero_get_data} message hero_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified hero_get_data message, length delimited. Does not implicitly {@link game.hero_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_get_data * @static * @param {game.Ihero_get_data} message hero_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_get_data message from the specified reader or buffer. * @function decode * @memberof game.hero_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_get_data} hero_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_get_data} hero_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_get_data message. * @function verify * @memberof game.hero_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a hero_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_get_data * @static * @param {Object.} object Plain object * @returns {game.hero_get_data} hero_get_data */ hero_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_get_data) return object; return new $root.game.hero_get_data(); }; /** * Creates a plain object from a hero_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_get_data * @static * @param {game.hero_get_data} message hero_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_get_data.toObject = function toObject() { return {}; }; /** * Converts this hero_get_data to JSON. * @function toJSON * @memberof game.hero_get_data * @instance * @returns {Object.} JSON object */ hero_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_get_data; })(); game.hero_get_data_rsp = (function() { /** * Properties of a hero_get_data_rsp. * @memberof game * @interface Ihero_get_data_rsp * @property {number|Long|null} [errno] hero_get_data_rsp errno * @property {Array.|null} [list] hero_get_data_rsp list */ /** * Constructs a new hero_get_data_rsp. * @memberof game * @classdesc Represents a hero_get_data_rsp. * @implements Ihero_get_data_rsp * @constructor * @param {game.Ihero_get_data_rsp=} [properties] Properties to set */ function hero_get_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_get_data_rsp errno. * @member {number|Long} errno * @memberof game.hero_get_data_rsp * @instance */ hero_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_get_data_rsp list. * @member {Array.} list * @memberof game.hero_get_data_rsp * @instance */ hero_get_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new hero_get_data_rsp instance using the specified properties. * @function create * @memberof game.hero_get_data_rsp * @static * @param {game.Ihero_get_data_rsp=} [properties] Properties to set * @returns {game.hero_get_data_rsp} hero_get_data_rsp instance */ hero_get_data_rsp.create = function create(properties) { return new hero_get_data_rsp(properties); }; /** * Encodes the specified hero_get_data_rsp message. Does not implicitly {@link game.hero_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.hero_get_data_rsp * @static * @param {game.Ihero_get_data_rsp} message hero_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.hero.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_get_data_rsp message, length delimited. Does not implicitly {@link game.hero_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_get_data_rsp * @static * @param {game.Ihero_get_data_rsp} message hero_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.hero_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_get_data_rsp} hero_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.hero.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_get_data_rsp} hero_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_get_data_rsp message. * @function verify * @memberof game.hero_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.hero.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a hero_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.hero_get_data_rsp} hero_get_data_rsp */ hero_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_get_data_rsp) return object; let message = new $root.game.hero_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.hero_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.hero_get_data_rsp.list: object expected"); message.list[i] = $root.game.hero.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a hero_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_get_data_rsp * @static * @param {game.hero_get_data_rsp} message hero_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.hero.toObject(message.list[j], options); } return object; }; /** * Converts this hero_get_data_rsp to JSON. * @function toJSON * @memberof game.hero_get_data_rsp * @instance * @returns {Object.} JSON object */ hero_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_get_data_rsp; })(); game.hero_upgrade = (function() { /** * Properties of a hero_upgrade. * @memberof game * @interface Ihero_upgrade * @property {string|null} [sid] hero_upgrade sid * @property {number|Long|null} [num] hero_upgrade num */ /** * Constructs a new hero_upgrade. * @memberof game * @classdesc Represents a hero_upgrade. * @implements Ihero_upgrade * @constructor * @param {game.Ihero_upgrade=} [properties] Properties to set */ function hero_upgrade(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_upgrade sid. * @member {string} sid * @memberof game.hero_upgrade * @instance */ hero_upgrade.prototype.sid = ""; /** * hero_upgrade num. * @member {number|Long} num * @memberof game.hero_upgrade * @instance */ hero_upgrade.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new hero_upgrade instance using the specified properties. * @function create * @memberof game.hero_upgrade * @static * @param {game.Ihero_upgrade=} [properties] Properties to set * @returns {game.hero_upgrade} hero_upgrade instance */ hero_upgrade.create = function create(properties) { return new hero_upgrade(properties); }; /** * Encodes the specified hero_upgrade message. Does not implicitly {@link game.hero_upgrade.verify|verify} messages. * @function encode * @memberof game.hero_upgrade * @static * @param {game.Ihero_upgrade} message hero_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); return writer; }; /** * Encodes the specified hero_upgrade message, length delimited. Does not implicitly {@link game.hero_upgrade.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_upgrade * @static * @param {game.Ihero_upgrade} message hero_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_upgrade message from the specified reader or buffer. * @function decode * @memberof game.hero_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_upgrade} hero_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_upgrade(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_upgrade message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_upgrade} hero_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_upgrade message. * @function verify * @memberof game.hero_upgrade * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_upgrade.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a hero_upgrade message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_upgrade * @static * @param {Object.} object Plain object * @returns {game.hero_upgrade} hero_upgrade */ hero_upgrade.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_upgrade) return object; let message = new $root.game.hero_upgrade(); if (object.sid != null) message.sid = String(object.sid); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a hero_upgrade message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_upgrade * @static * @param {game.hero_upgrade} message hero_upgrade * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_upgrade.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this hero_upgrade to JSON. * @function toJSON * @memberof game.hero_upgrade * @instance * @returns {Object.} JSON object */ hero_upgrade.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_upgrade; })(); game.hero_upgrade_rsp = (function() { /** * Properties of a hero_upgrade_rsp. * @memberof game * @interface Ihero_upgrade_rsp * @property {number|Long|null} [errno] hero_upgrade_rsp errno * @property {game.Ihero|null} [data] hero_upgrade_rsp data */ /** * Constructs a new hero_upgrade_rsp. * @memberof game * @classdesc Represents a hero_upgrade_rsp. * @implements Ihero_upgrade_rsp * @constructor * @param {game.Ihero_upgrade_rsp=} [properties] Properties to set */ function hero_upgrade_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_upgrade_rsp errno. * @member {number|Long} errno * @memberof game.hero_upgrade_rsp * @instance */ hero_upgrade_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_upgrade_rsp data. * @member {game.Ihero|null|undefined} data * @memberof game.hero_upgrade_rsp * @instance */ hero_upgrade_rsp.prototype.data = null; /** * Creates a new hero_upgrade_rsp instance using the specified properties. * @function create * @memberof game.hero_upgrade_rsp * @static * @param {game.Ihero_upgrade_rsp=} [properties] Properties to set * @returns {game.hero_upgrade_rsp} hero_upgrade_rsp instance */ hero_upgrade_rsp.create = function create(properties) { return new hero_upgrade_rsp(properties); }; /** * Encodes the specified hero_upgrade_rsp message. Does not implicitly {@link game.hero_upgrade_rsp.verify|verify} messages. * @function encode * @memberof game.hero_upgrade_rsp * @static * @param {game.Ihero_upgrade_rsp} message hero_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.hero.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_upgrade_rsp message, length delimited. Does not implicitly {@link game.hero_upgrade_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_upgrade_rsp * @static * @param {game.Ihero_upgrade_rsp} message hero_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_upgrade_rsp message from the specified reader or buffer. * @function decode * @memberof game.hero_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_upgrade_rsp} hero_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_upgrade_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.hero.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_upgrade_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_upgrade_rsp} hero_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_upgrade_rsp message. * @function verify * @memberof game.hero_upgrade_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_upgrade_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.hero.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a hero_upgrade_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_upgrade_rsp * @static * @param {Object.} object Plain object * @returns {game.hero_upgrade_rsp} hero_upgrade_rsp */ hero_upgrade_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_upgrade_rsp) return object; let message = new $root.game.hero_upgrade_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.hero_upgrade_rsp.data: object expected"); message.data = $root.game.hero.fromObject(object.data); } return message; }; /** * Creates a plain object from a hero_upgrade_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_upgrade_rsp * @static * @param {game.hero_upgrade_rsp} message hero_upgrade_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_upgrade_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.hero.toObject(message.data, options); return object; }; /** * Converts this hero_upgrade_rsp to JSON. * @function toJSON * @memberof game.hero_upgrade_rsp * @instance * @returns {Object.} JSON object */ hero_upgrade_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_upgrade_rsp; })(); game.hero_upgrade_star = (function() { /** * Properties of a hero_upgrade_star. * @memberof game * @interface Ihero_upgrade_star * @property {string|null} [sid] hero_upgrade_star sid * @property {Array.|null} [same] hero_upgrade_star same * @property {Array.|null} [other] hero_upgrade_star other * @property {game.Iid_num|null} [currency] hero_upgrade_star currency */ /** * Constructs a new hero_upgrade_star. * @memberof game * @classdesc Represents a hero_upgrade_star. * @implements Ihero_upgrade_star * @constructor * @param {game.Ihero_upgrade_star=} [properties] Properties to set */ function hero_upgrade_star(properties) { this.same = []; this.other = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_upgrade_star sid. * @member {string} sid * @memberof game.hero_upgrade_star * @instance */ hero_upgrade_star.prototype.sid = ""; /** * hero_upgrade_star same. * @member {Array.} same * @memberof game.hero_upgrade_star * @instance */ hero_upgrade_star.prototype.same = $util.emptyArray; /** * hero_upgrade_star other. * @member {Array.} other * @memberof game.hero_upgrade_star * @instance */ hero_upgrade_star.prototype.other = $util.emptyArray; /** * hero_upgrade_star currency. * @member {game.Iid_num|null|undefined} currency * @memberof game.hero_upgrade_star * @instance */ hero_upgrade_star.prototype.currency = null; /** * Creates a new hero_upgrade_star instance using the specified properties. * @function create * @memberof game.hero_upgrade_star * @static * @param {game.Ihero_upgrade_star=} [properties] Properties to set * @returns {game.hero_upgrade_star} hero_upgrade_star instance */ hero_upgrade_star.create = function create(properties) { return new hero_upgrade_star(properties); }; /** * Encodes the specified hero_upgrade_star message. Does not implicitly {@link game.hero_upgrade_star.verify|verify} messages. * @function encode * @memberof game.hero_upgrade_star * @static * @param {game.Ihero_upgrade_star} message hero_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade_star.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.same != null && message.same.length) for (let i = 0; i < message.same.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.same[i]); if (message.other != null && message.other.length) for (let i = 0; i < message.other.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.other[i]); if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) $root.game.id_num.encode(message.currency, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_upgrade_star message, length delimited. Does not implicitly {@link game.hero_upgrade_star.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_upgrade_star * @static * @param {game.Ihero_upgrade_star} message hero_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade_star.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_upgrade_star message from the specified reader or buffer. * @function decode * @memberof game.hero_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_upgrade_star} hero_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade_star.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_upgrade_star(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: if (!(message.same && message.same.length)) message.same = []; message.same.push(reader.string()); break; case 3: if (!(message.other && message.other.length)) message.other = []; message.other.push(reader.string()); break; case 4: message.currency = $root.game.id_num.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_upgrade_star message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_upgrade_star} hero_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade_star.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_upgrade_star message. * @function verify * @memberof game.hero_upgrade_star * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_upgrade_star.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.same != null && message.hasOwnProperty("same")) { if (!Array.isArray(message.same)) return "same: array expected"; for (let i = 0; i < message.same.length; ++i) if (!$util.isString(message.same[i])) return "same: string[] expected"; } if (message.other != null && message.hasOwnProperty("other")) { if (!Array.isArray(message.other)) return "other: array expected"; for (let i = 0; i < message.other.length; ++i) if (!$util.isString(message.other[i])) return "other: string[] expected"; } if (message.currency != null && message.hasOwnProperty("currency")) { let error = $root.game.id_num.verify(message.currency); if (error) return "currency." + error; } return null; }; /** * Creates a hero_upgrade_star message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_upgrade_star * @static * @param {Object.} object Plain object * @returns {game.hero_upgrade_star} hero_upgrade_star */ hero_upgrade_star.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_upgrade_star) return object; let message = new $root.game.hero_upgrade_star(); if (object.sid != null) message.sid = String(object.sid); if (object.same) { if (!Array.isArray(object.same)) throw TypeError(".game.hero_upgrade_star.same: array expected"); message.same = []; for (let i = 0; i < object.same.length; ++i) message.same[i] = String(object.same[i]); } if (object.other) { if (!Array.isArray(object.other)) throw TypeError(".game.hero_upgrade_star.other: array expected"); message.other = []; for (let i = 0; i < object.other.length; ++i) message.other[i] = String(object.other[i]); } if (object.currency != null) { if (typeof object.currency !== "object") throw TypeError(".game.hero_upgrade_star.currency: object expected"); message.currency = $root.game.id_num.fromObject(object.currency); } return message; }; /** * Creates a plain object from a hero_upgrade_star message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_upgrade_star * @static * @param {game.hero_upgrade_star} message hero_upgrade_star * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_upgrade_star.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.same = []; object.other = []; } if (options.defaults) { object.sid = ""; object.currency = null; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.same && message.same.length) { object.same = []; for (let j = 0; j < message.same.length; ++j) object.same[j] = message.same[j]; } if (message.other && message.other.length) { object.other = []; for (let j = 0; j < message.other.length; ++j) object.other[j] = message.other[j]; } if (message.currency != null && message.hasOwnProperty("currency")) object.currency = $root.game.id_num.toObject(message.currency, options); return object; }; /** * Converts this hero_upgrade_star to JSON. * @function toJSON * @memberof game.hero_upgrade_star * @instance * @returns {Object.} JSON object */ hero_upgrade_star.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_upgrade_star; })(); game.hero_upgrade_star_rsp = (function() { /** * Properties of a hero_upgrade_star_rsp. * @memberof game * @interface Ihero_upgrade_star_rsp * @property {number|Long|null} [errno] hero_upgrade_star_rsp errno * @property {game.Ihero|null} [data] hero_upgrade_star_rsp data * @property {Array.|null} [same] hero_upgrade_star_rsp same * @property {Array.|null} [other] hero_upgrade_star_rsp other * @property {game.Iid_num|null} [currency] hero_upgrade_star_rsp currency */ /** * Constructs a new hero_upgrade_star_rsp. * @memberof game * @classdesc Represents a hero_upgrade_star_rsp. * @implements Ihero_upgrade_star_rsp * @constructor * @param {game.Ihero_upgrade_star_rsp=} [properties] Properties to set */ function hero_upgrade_star_rsp(properties) { this.same = []; this.other = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_upgrade_star_rsp errno. * @member {number|Long} errno * @memberof game.hero_upgrade_star_rsp * @instance */ hero_upgrade_star_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_upgrade_star_rsp data. * @member {game.Ihero|null|undefined} data * @memberof game.hero_upgrade_star_rsp * @instance */ hero_upgrade_star_rsp.prototype.data = null; /** * hero_upgrade_star_rsp same. * @member {Array.} same * @memberof game.hero_upgrade_star_rsp * @instance */ hero_upgrade_star_rsp.prototype.same = $util.emptyArray; /** * hero_upgrade_star_rsp other. * @member {Array.} other * @memberof game.hero_upgrade_star_rsp * @instance */ hero_upgrade_star_rsp.prototype.other = $util.emptyArray; /** * hero_upgrade_star_rsp currency. * @member {game.Iid_num|null|undefined} currency * @memberof game.hero_upgrade_star_rsp * @instance */ hero_upgrade_star_rsp.prototype.currency = null; /** * Creates a new hero_upgrade_star_rsp instance using the specified properties. * @function create * @memberof game.hero_upgrade_star_rsp * @static * @param {game.Ihero_upgrade_star_rsp=} [properties] Properties to set * @returns {game.hero_upgrade_star_rsp} hero_upgrade_star_rsp instance */ hero_upgrade_star_rsp.create = function create(properties) { return new hero_upgrade_star_rsp(properties); }; /** * Encodes the specified hero_upgrade_star_rsp message. Does not implicitly {@link game.hero_upgrade_star_rsp.verify|verify} messages. * @function encode * @memberof game.hero_upgrade_star_rsp * @static * @param {game.Ihero_upgrade_star_rsp} message hero_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade_star_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.hero.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.same != null && message.same.length) for (let i = 0; i < message.same.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.same[i]); if (message.other != null && message.other.length) for (let i = 0; i < message.other.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.other[i]); if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) $root.game.id_num.encode(message.currency, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_upgrade_star_rsp message, length delimited. Does not implicitly {@link game.hero_upgrade_star_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_upgrade_star_rsp * @static * @param {game.Ihero_upgrade_star_rsp} message hero_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_upgrade_star_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_upgrade_star_rsp message from the specified reader or buffer. * @function decode * @memberof game.hero_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_upgrade_star_rsp} hero_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade_star_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_upgrade_star_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.hero.decode(reader, reader.uint32()); break; case 3: if (!(message.same && message.same.length)) message.same = []; message.same.push(reader.string()); break; case 4: if (!(message.other && message.other.length)) message.other = []; message.other.push(reader.string()); break; case 5: message.currency = $root.game.id_num.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_upgrade_star_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_upgrade_star_rsp} hero_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_upgrade_star_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_upgrade_star_rsp message. * @function verify * @memberof game.hero_upgrade_star_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_upgrade_star_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.hero.verify(message.data); if (error) return "data." + error; } if (message.same != null && message.hasOwnProperty("same")) { if (!Array.isArray(message.same)) return "same: array expected"; for (let i = 0; i < message.same.length; ++i) if (!$util.isString(message.same[i])) return "same: string[] expected"; } if (message.other != null && message.hasOwnProperty("other")) { if (!Array.isArray(message.other)) return "other: array expected"; for (let i = 0; i < message.other.length; ++i) if (!$util.isString(message.other[i])) return "other: string[] expected"; } if (message.currency != null && message.hasOwnProperty("currency")) { let error = $root.game.id_num.verify(message.currency); if (error) return "currency." + error; } return null; }; /** * Creates a hero_upgrade_star_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_upgrade_star_rsp * @static * @param {Object.} object Plain object * @returns {game.hero_upgrade_star_rsp} hero_upgrade_star_rsp */ hero_upgrade_star_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_upgrade_star_rsp) return object; let message = new $root.game.hero_upgrade_star_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.hero_upgrade_star_rsp.data: object expected"); message.data = $root.game.hero.fromObject(object.data); } if (object.same) { if (!Array.isArray(object.same)) throw TypeError(".game.hero_upgrade_star_rsp.same: array expected"); message.same = []; for (let i = 0; i < object.same.length; ++i) message.same[i] = String(object.same[i]); } if (object.other) { if (!Array.isArray(object.other)) throw TypeError(".game.hero_upgrade_star_rsp.other: array expected"); message.other = []; for (let i = 0; i < object.other.length; ++i) message.other[i] = String(object.other[i]); } if (object.currency != null) { if (typeof object.currency !== "object") throw TypeError(".game.hero_upgrade_star_rsp.currency: object expected"); message.currency = $root.game.id_num.fromObject(object.currency); } return message; }; /** * Creates a plain object from a hero_upgrade_star_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_upgrade_star_rsp * @static * @param {game.hero_upgrade_star_rsp} message hero_upgrade_star_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_upgrade_star_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.same = []; object.other = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; object.currency = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.hero.toObject(message.data, options); if (message.same && message.same.length) { object.same = []; for (let j = 0; j < message.same.length; ++j) object.same[j] = message.same[j]; } if (message.other && message.other.length) { object.other = []; for (let j = 0; j < message.other.length; ++j) object.other[j] = message.other[j]; } if (message.currency != null && message.hasOwnProperty("currency")) object.currency = $root.game.id_num.toObject(message.currency, options); return object; }; /** * Converts this hero_upgrade_star_rsp to JSON. * @function toJSON * @memberof game.hero_upgrade_star_rsp * @instance * @returns {Object.} JSON object */ hero_upgrade_star_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_upgrade_star_rsp; })(); game.hero_onekey_upgrade_star = (function() { /** * Properties of a hero_onekey_upgrade_star. * @memberof game * @interface Ihero_onekey_upgrade_star */ /** * Constructs a new hero_onekey_upgrade_star. * @memberof game * @classdesc Represents a hero_onekey_upgrade_star. * @implements Ihero_onekey_upgrade_star * @constructor * @param {game.Ihero_onekey_upgrade_star=} [properties] Properties to set */ function hero_onekey_upgrade_star(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new hero_onekey_upgrade_star instance using the specified properties. * @function create * @memberof game.hero_onekey_upgrade_star * @static * @param {game.Ihero_onekey_upgrade_star=} [properties] Properties to set * @returns {game.hero_onekey_upgrade_star} hero_onekey_upgrade_star instance */ hero_onekey_upgrade_star.create = function create(properties) { return new hero_onekey_upgrade_star(properties); }; /** * Encodes the specified hero_onekey_upgrade_star message. Does not implicitly {@link game.hero_onekey_upgrade_star.verify|verify} messages. * @function encode * @memberof game.hero_onekey_upgrade_star * @static * @param {game.Ihero_onekey_upgrade_star} message hero_onekey_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_onekey_upgrade_star.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified hero_onekey_upgrade_star message, length delimited. Does not implicitly {@link game.hero_onekey_upgrade_star.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_onekey_upgrade_star * @static * @param {game.Ihero_onekey_upgrade_star} message hero_onekey_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_onekey_upgrade_star.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_onekey_upgrade_star message from the specified reader or buffer. * @function decode * @memberof game.hero_onekey_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_onekey_upgrade_star} hero_onekey_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_onekey_upgrade_star.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_onekey_upgrade_star(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_onekey_upgrade_star message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_onekey_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_onekey_upgrade_star} hero_onekey_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_onekey_upgrade_star.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_onekey_upgrade_star message. * @function verify * @memberof game.hero_onekey_upgrade_star * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_onekey_upgrade_star.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a hero_onekey_upgrade_star message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_onekey_upgrade_star * @static * @param {Object.} object Plain object * @returns {game.hero_onekey_upgrade_star} hero_onekey_upgrade_star */ hero_onekey_upgrade_star.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_onekey_upgrade_star) return object; return new $root.game.hero_onekey_upgrade_star(); }; /** * Creates a plain object from a hero_onekey_upgrade_star message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_onekey_upgrade_star * @static * @param {game.hero_onekey_upgrade_star} message hero_onekey_upgrade_star * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_onekey_upgrade_star.toObject = function toObject() { return {}; }; /** * Converts this hero_onekey_upgrade_star to JSON. * @function toJSON * @memberof game.hero_onekey_upgrade_star * @instance * @returns {Object.} JSON object */ hero_onekey_upgrade_star.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_onekey_upgrade_star; })(); game.hero_onekey_upgrade_star_rsp = (function() { /** * Properties of a hero_onekey_upgrade_star_rsp. * @memberof game * @interface Ihero_onekey_upgrade_star_rsp * @property {number|Long|null} [errno] hero_onekey_upgrade_star_rsp errno * @property {Array.|null} [delList] hero_onekey_upgrade_star_rsp delList * @property {Array.|null} [changeList] hero_onekey_upgrade_star_rsp changeList */ /** * Constructs a new hero_onekey_upgrade_star_rsp. * @memberof game * @classdesc Represents a hero_onekey_upgrade_star_rsp. * @implements Ihero_onekey_upgrade_star_rsp * @constructor * @param {game.Ihero_onekey_upgrade_star_rsp=} [properties] Properties to set */ function hero_onekey_upgrade_star_rsp(properties) { this.delList = []; this.changeList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_onekey_upgrade_star_rsp errno. * @member {number|Long} errno * @memberof game.hero_onekey_upgrade_star_rsp * @instance */ hero_onekey_upgrade_star_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_onekey_upgrade_star_rsp delList. * @member {Array.} delList * @memberof game.hero_onekey_upgrade_star_rsp * @instance */ hero_onekey_upgrade_star_rsp.prototype.delList = $util.emptyArray; /** * hero_onekey_upgrade_star_rsp changeList. * @member {Array.} changeList * @memberof game.hero_onekey_upgrade_star_rsp * @instance */ hero_onekey_upgrade_star_rsp.prototype.changeList = $util.emptyArray; /** * Creates a new hero_onekey_upgrade_star_rsp instance using the specified properties. * @function create * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {game.Ihero_onekey_upgrade_star_rsp=} [properties] Properties to set * @returns {game.hero_onekey_upgrade_star_rsp} hero_onekey_upgrade_star_rsp instance */ hero_onekey_upgrade_star_rsp.create = function create(properties) { return new hero_onekey_upgrade_star_rsp(properties); }; /** * Encodes the specified hero_onekey_upgrade_star_rsp message. Does not implicitly {@link game.hero_onekey_upgrade_star_rsp.verify|verify} messages. * @function encode * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {game.Ihero_onekey_upgrade_star_rsp} message hero_onekey_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_onekey_upgrade_star_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.delList != null && message.delList.length) for (let i = 0; i < message.delList.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.delList[i]); if (message.changeList != null && message.changeList.length) for (let i = 0; i < message.changeList.length; ++i) $root.game.hero.encode(message.changeList[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_onekey_upgrade_star_rsp message, length delimited. Does not implicitly {@link game.hero_onekey_upgrade_star_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {game.Ihero_onekey_upgrade_star_rsp} message hero_onekey_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_onekey_upgrade_star_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_onekey_upgrade_star_rsp message from the specified reader or buffer. * @function decode * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_onekey_upgrade_star_rsp} hero_onekey_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_onekey_upgrade_star_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_onekey_upgrade_star_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.delList && message.delList.length)) message.delList = []; message.delList.push(reader.string()); break; case 3: if (!(message.changeList && message.changeList.length)) message.changeList = []; message.changeList.push($root.game.hero.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_onekey_upgrade_star_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_onekey_upgrade_star_rsp} hero_onekey_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_onekey_upgrade_star_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_onekey_upgrade_star_rsp message. * @function verify * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_onekey_upgrade_star_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.delList != null && message.hasOwnProperty("delList")) { if (!Array.isArray(message.delList)) return "delList: array expected"; for (let i = 0; i < message.delList.length; ++i) if (!$util.isString(message.delList[i])) return "delList: string[] expected"; } if (message.changeList != null && message.hasOwnProperty("changeList")) { if (!Array.isArray(message.changeList)) return "changeList: array expected"; for (let i = 0; i < message.changeList.length; ++i) { let error = $root.game.hero.verify(message.changeList[i]); if (error) return "changeList." + error; } } return null; }; /** * Creates a hero_onekey_upgrade_star_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {Object.} object Plain object * @returns {game.hero_onekey_upgrade_star_rsp} hero_onekey_upgrade_star_rsp */ hero_onekey_upgrade_star_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_onekey_upgrade_star_rsp) return object; let message = new $root.game.hero_onekey_upgrade_star_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.delList) { if (!Array.isArray(object.delList)) throw TypeError(".game.hero_onekey_upgrade_star_rsp.delList: array expected"); message.delList = []; for (let i = 0; i < object.delList.length; ++i) message.delList[i] = String(object.delList[i]); } if (object.changeList) { if (!Array.isArray(object.changeList)) throw TypeError(".game.hero_onekey_upgrade_star_rsp.changeList: array expected"); message.changeList = []; for (let i = 0; i < object.changeList.length; ++i) { if (typeof object.changeList[i] !== "object") throw TypeError(".game.hero_onekey_upgrade_star_rsp.changeList: object expected"); message.changeList[i] = $root.game.hero.fromObject(object.changeList[i]); } } return message; }; /** * Creates a plain object from a hero_onekey_upgrade_star_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_onekey_upgrade_star_rsp * @static * @param {game.hero_onekey_upgrade_star_rsp} message hero_onekey_upgrade_star_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_onekey_upgrade_star_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.delList = []; object.changeList = []; } if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.delList && message.delList.length) { object.delList = []; for (let j = 0; j < message.delList.length; ++j) object.delList[j] = message.delList[j]; } if (message.changeList && message.changeList.length) { object.changeList = []; for (let j = 0; j < message.changeList.length; ++j) object.changeList[j] = $root.game.hero.toObject(message.changeList[j], options); } return object; }; /** * Converts this hero_onekey_upgrade_star_rsp to JSON. * @function toJSON * @memberof game.hero_onekey_upgrade_star_rsp * @instance * @returns {Object.} JSON object */ hero_onekey_upgrade_star_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_onekey_upgrade_star_rsp; })(); game.hero_reset = (function() { /** * Properties of a hero_reset. * @memberof game * @interface Ihero_reset * @property {boolean|null} [level] hero_reset level * @property {string|null} [sid] hero_reset sid */ /** * Constructs a new hero_reset. * @memberof game * @classdesc Represents a hero_reset. * @implements Ihero_reset * @constructor * @param {game.Ihero_reset=} [properties] Properties to set */ function hero_reset(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_reset level. * @member {boolean} level * @memberof game.hero_reset * @instance */ hero_reset.prototype.level = false; /** * hero_reset sid. * @member {string} sid * @memberof game.hero_reset * @instance */ hero_reset.prototype.sid = ""; /** * Creates a new hero_reset instance using the specified properties. * @function create * @memberof game.hero_reset * @static * @param {game.Ihero_reset=} [properties] Properties to set * @returns {game.hero_reset} hero_reset instance */ hero_reset.create = function create(properties) { return new hero_reset(properties); }; /** * Encodes the specified hero_reset message. Does not implicitly {@link game.hero_reset.verify|verify} messages. * @function encode * @memberof game.hero_reset * @static * @param {game.Ihero_reset} message hero_reset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_reset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.level); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); return writer; }; /** * Encodes the specified hero_reset message, length delimited. Does not implicitly {@link game.hero_reset.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_reset * @static * @param {game.Ihero_reset} message hero_reset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_reset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_reset message from the specified reader or buffer. * @function decode * @memberof game.hero_reset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_reset} hero_reset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_reset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_reset(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.level = reader.bool(); break; case 2: message.sid = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_reset message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_reset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_reset} hero_reset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_reset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_reset message. * @function verify * @memberof game.hero_reset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_reset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level !== "boolean") return "level: boolean expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; return null; }; /** * Creates a hero_reset message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_reset * @static * @param {Object.} object Plain object * @returns {game.hero_reset} hero_reset */ hero_reset.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_reset) return object; let message = new $root.game.hero_reset(); if (object.level != null) message.level = Boolean(object.level); if (object.sid != null) message.sid = String(object.sid); return message; }; /** * Creates a plain object from a hero_reset message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_reset * @static * @param {game.hero_reset} message hero_reset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_reset.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.level = false; object.sid = ""; } if (message.level != null && message.hasOwnProperty("level")) object.level = message.level; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; return object; }; /** * Converts this hero_reset to JSON. * @function toJSON * @memberof game.hero_reset * @instance * @returns {Object.} JSON object */ hero_reset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_reset; })(); game.hero_reset_rsp = (function() { /** * Properties of a hero_reset_rsp. * @memberof game * @interface Ihero_reset_rsp * @property {number|Long|null} [errno] hero_reset_rsp errno * @property {game.Ihero|null} [data] hero_reset_rsp data */ /** * Constructs a new hero_reset_rsp. * @memberof game * @classdesc Represents a hero_reset_rsp. * @implements Ihero_reset_rsp * @constructor * @param {game.Ihero_reset_rsp=} [properties] Properties to set */ function hero_reset_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_reset_rsp errno. * @member {number|Long} errno * @memberof game.hero_reset_rsp * @instance */ hero_reset_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_reset_rsp data. * @member {game.Ihero|null|undefined} data * @memberof game.hero_reset_rsp * @instance */ hero_reset_rsp.prototype.data = null; /** * Creates a new hero_reset_rsp instance using the specified properties. * @function create * @memberof game.hero_reset_rsp * @static * @param {game.Ihero_reset_rsp=} [properties] Properties to set * @returns {game.hero_reset_rsp} hero_reset_rsp instance */ hero_reset_rsp.create = function create(properties) { return new hero_reset_rsp(properties); }; /** * Encodes the specified hero_reset_rsp message. Does not implicitly {@link game.hero_reset_rsp.verify|verify} messages. * @function encode * @memberof game.hero_reset_rsp * @static * @param {game.Ihero_reset_rsp} message hero_reset_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_reset_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.hero.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_reset_rsp message, length delimited. Does not implicitly {@link game.hero_reset_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_reset_rsp * @static * @param {game.Ihero_reset_rsp} message hero_reset_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_reset_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_reset_rsp message from the specified reader or buffer. * @function decode * @memberof game.hero_reset_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_reset_rsp} hero_reset_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_reset_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_reset_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.hero.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_reset_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_reset_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_reset_rsp} hero_reset_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_reset_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_reset_rsp message. * @function verify * @memberof game.hero_reset_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_reset_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.hero.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a hero_reset_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_reset_rsp * @static * @param {Object.} object Plain object * @returns {game.hero_reset_rsp} hero_reset_rsp */ hero_reset_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_reset_rsp) return object; let message = new $root.game.hero_reset_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.hero_reset_rsp.data: object expected"); message.data = $root.game.hero.fromObject(object.data); } return message; }; /** * Creates a plain object from a hero_reset_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_reset_rsp * @static * @param {game.hero_reset_rsp} message hero_reset_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_reset_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.hero.toObject(message.data, options); return object; }; /** * Converts this hero_reset_rsp to JSON. * @function toJSON * @memberof game.hero_reset_rsp * @instance * @returns {Object.} JSON object */ hero_reset_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_reset_rsp; })(); game.hero_wear_equip = (function() { /** * Properties of a hero_wear_equip. * @memberof game * @interface Ihero_wear_equip * @property {string|null} [sid] hero_wear_equip sid * @property {Array.|null} [list] hero_wear_equip list */ /** * Constructs a new hero_wear_equip. * @memberof game * @classdesc Represents a hero_wear_equip. * @implements Ihero_wear_equip * @constructor * @param {game.Ihero_wear_equip=} [properties] Properties to set */ function hero_wear_equip(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_wear_equip sid. * @member {string} sid * @memberof game.hero_wear_equip * @instance */ hero_wear_equip.prototype.sid = ""; /** * hero_wear_equip list. * @member {Array.} list * @memberof game.hero_wear_equip * @instance */ hero_wear_equip.prototype.list = $util.emptyArray; /** * Creates a new hero_wear_equip instance using the specified properties. * @function create * @memberof game.hero_wear_equip * @static * @param {game.Ihero_wear_equip=} [properties] Properties to set * @returns {game.hero_wear_equip} hero_wear_equip instance */ hero_wear_equip.create = function create(properties) { return new hero_wear_equip(properties); }; /** * Encodes the specified hero_wear_equip message. Does not implicitly {@link game.hero_wear_equip.verify|verify} messages. * @function encode * @memberof game.hero_wear_equip * @static * @param {game.Ihero_wear_equip} message hero_wear_equip message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_wear_equip.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.list[i]); return writer; }; /** * Encodes the specified hero_wear_equip message, length delimited. Does not implicitly {@link game.hero_wear_equip.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_wear_equip * @static * @param {game.Ihero_wear_equip} message hero_wear_equip message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_wear_equip.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_wear_equip message from the specified reader or buffer. * @function decode * @memberof game.hero_wear_equip * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_wear_equip} hero_wear_equip * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_wear_equip.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_wear_equip(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_wear_equip message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_wear_equip * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_wear_equip} hero_wear_equip * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_wear_equip.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_wear_equip message. * @function verify * @memberof game.hero_wear_equip * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_wear_equip.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates a hero_wear_equip message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_wear_equip * @static * @param {Object.} object Plain object * @returns {game.hero_wear_equip} hero_wear_equip */ hero_wear_equip.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_wear_equip) return object; let message = new $root.game.hero_wear_equip(); if (object.sid != null) message.sid = String(object.sid); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.hero_wear_equip.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from a hero_wear_equip message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_wear_equip * @static * @param {game.hero_wear_equip} message hero_wear_equip * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_wear_equip.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) object.sid = ""; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this hero_wear_equip to JSON. * @function toJSON * @memberof game.hero_wear_equip * @instance * @returns {Object.} JSON object */ hero_wear_equip.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_wear_equip; })(); game.hero_wear_equip_rsp = (function() { /** * Properties of a hero_wear_equip_rsp. * @memberof game * @interface Ihero_wear_equip_rsp * @property {number|Long|null} [errno] hero_wear_equip_rsp errno * @property {Array.|null} [list] hero_wear_equip_rsp list * @property {game.Ihero|null} [data] hero_wear_equip_rsp data */ /** * Constructs a new hero_wear_equip_rsp. * @memberof game * @classdesc Represents a hero_wear_equip_rsp. * @implements Ihero_wear_equip_rsp * @constructor * @param {game.Ihero_wear_equip_rsp=} [properties] Properties to set */ function hero_wear_equip_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_wear_equip_rsp errno. * @member {number|Long} errno * @memberof game.hero_wear_equip_rsp * @instance */ hero_wear_equip_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_wear_equip_rsp list. * @member {Array.} list * @memberof game.hero_wear_equip_rsp * @instance */ hero_wear_equip_rsp.prototype.list = $util.emptyArray; /** * hero_wear_equip_rsp data. * @member {game.Ihero|null|undefined} data * @memberof game.hero_wear_equip_rsp * @instance */ hero_wear_equip_rsp.prototype.data = null; /** * Creates a new hero_wear_equip_rsp instance using the specified properties. * @function create * @memberof game.hero_wear_equip_rsp * @static * @param {game.Ihero_wear_equip_rsp=} [properties] Properties to set * @returns {game.hero_wear_equip_rsp} hero_wear_equip_rsp instance */ hero_wear_equip_rsp.create = function create(properties) { return new hero_wear_equip_rsp(properties); }; /** * Encodes the specified hero_wear_equip_rsp message. Does not implicitly {@link game.hero_wear_equip_rsp.verify|verify} messages. * @function encode * @memberof game.hero_wear_equip_rsp * @static * @param {game.Ihero_wear_equip_rsp} message hero_wear_equip_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_wear_equip_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.list[i]); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.hero.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_wear_equip_rsp message, length delimited. Does not implicitly {@link game.hero_wear_equip_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_wear_equip_rsp * @static * @param {game.Ihero_wear_equip_rsp} message hero_wear_equip_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_wear_equip_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_wear_equip_rsp message from the specified reader or buffer. * @function decode * @memberof game.hero_wear_equip_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_wear_equip_rsp} hero_wear_equip_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_wear_equip_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_wear_equip_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; case 3: message.data = $root.game.hero.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_wear_equip_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_wear_equip_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_wear_equip_rsp} hero_wear_equip_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_wear_equip_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_wear_equip_rsp message. * @function verify * @memberof game.hero_wear_equip_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_wear_equip_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.hero.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a hero_wear_equip_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_wear_equip_rsp * @static * @param {Object.} object Plain object * @returns {game.hero_wear_equip_rsp} hero_wear_equip_rsp */ hero_wear_equip_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_wear_equip_rsp) return object; let message = new $root.game.hero_wear_equip_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.hero_wear_equip_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.hero_wear_equip_rsp.data: object expected"); message.data = $root.game.hero.fromObject(object.data); } return message; }; /** * Creates a plain object from a hero_wear_equip_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_wear_equip_rsp * @static * @param {game.hero_wear_equip_rsp} message hero_wear_equip_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_wear_equip_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.hero.toObject(message.data, options); return object; }; /** * Converts this hero_wear_equip_rsp to JSON. * @function toJSON * @memberof game.hero_wear_equip_rsp * @instance * @returns {Object.} JSON object */ hero_wear_equip_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_wear_equip_rsp; })(); game.hero_change_nty = (function() { /** * Properties of a hero_change_nty. * @memberof game * @interface Ihero_change_nty * @property {Array.|null} [list] hero_change_nty list */ /** * Constructs a new hero_change_nty. * @memberof game * @classdesc Represents a hero_change_nty. * @implements Ihero_change_nty * @constructor * @param {game.Ihero_change_nty=} [properties] Properties to set */ function hero_change_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_change_nty list. * @member {Array.} list * @memberof game.hero_change_nty * @instance */ hero_change_nty.prototype.list = $util.emptyArray; /** * Creates a new hero_change_nty instance using the specified properties. * @function create * @memberof game.hero_change_nty * @static * @param {game.Ihero_change_nty=} [properties] Properties to set * @returns {game.hero_change_nty} hero_change_nty instance */ hero_change_nty.create = function create(properties) { return new hero_change_nty(properties); }; /** * Encodes the specified hero_change_nty message. Does not implicitly {@link game.hero_change_nty.verify|verify} messages. * @function encode * @memberof game.hero_change_nty * @static * @param {game.Ihero_change_nty} message hero_change_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_change_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.hero.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified hero_change_nty message, length delimited. Does not implicitly {@link game.hero_change_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_change_nty * @static * @param {game.Ihero_change_nty} message hero_change_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_change_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_change_nty message from the specified reader or buffer. * @function decode * @memberof game.hero_change_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_change_nty} hero_change_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_change_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_change_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.hero.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_change_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_change_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_change_nty} hero_change_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_change_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_change_nty message. * @function verify * @memberof game.hero_change_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_change_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.hero.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a hero_change_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_change_nty * @static * @param {Object.} object Plain object * @returns {game.hero_change_nty} hero_change_nty */ hero_change_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_change_nty) return object; let message = new $root.game.hero_change_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.hero_change_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.hero_change_nty.list: object expected"); message.list[i] = $root.game.hero.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a hero_change_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_change_nty * @static * @param {game.hero_change_nty} message hero_change_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_change_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.hero.toObject(message.list[j], options); } return object; }; /** * Converts this hero_change_nty to JSON. * @function toJSON * @memberof game.hero_change_nty * @instance * @returns {Object.} JSON object */ hero_change_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_change_nty; })(); game.skill_card_get_data = (function() { /** * Properties of a skill_card_get_data. * @memberof game * @interface Iskill_card_get_data */ /** * Constructs a new skill_card_get_data. * @memberof game * @classdesc Represents a skill_card_get_data. * @implements Iskill_card_get_data * @constructor * @param {game.Iskill_card_get_data=} [properties] Properties to set */ function skill_card_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new skill_card_get_data instance using the specified properties. * @function create * @memberof game.skill_card_get_data * @static * @param {game.Iskill_card_get_data=} [properties] Properties to set * @returns {game.skill_card_get_data} skill_card_get_data instance */ skill_card_get_data.create = function create(properties) { return new skill_card_get_data(properties); }; /** * Encodes the specified skill_card_get_data message. Does not implicitly {@link game.skill_card_get_data.verify|verify} messages. * @function encode * @memberof game.skill_card_get_data * @static * @param {game.Iskill_card_get_data} message skill_card_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified skill_card_get_data message, length delimited. Does not implicitly {@link game.skill_card_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.skill_card_get_data * @static * @param {game.Iskill_card_get_data} message skill_card_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a skill_card_get_data message from the specified reader or buffer. * @function decode * @memberof game.skill_card_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.skill_card_get_data} skill_card_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.skill_card_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a skill_card_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.skill_card_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.skill_card_get_data} skill_card_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a skill_card_get_data message. * @function verify * @memberof game.skill_card_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ skill_card_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a skill_card_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.skill_card_get_data * @static * @param {Object.} object Plain object * @returns {game.skill_card_get_data} skill_card_get_data */ skill_card_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.skill_card_get_data) return object; return new $root.game.skill_card_get_data(); }; /** * Creates a plain object from a skill_card_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.skill_card_get_data * @static * @param {game.skill_card_get_data} message skill_card_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ skill_card_get_data.toObject = function toObject() { return {}; }; /** * Converts this skill_card_get_data to JSON. * @function toJSON * @memberof game.skill_card_get_data * @instance * @returns {Object.} JSON object */ skill_card_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return skill_card_get_data; })(); game.skill_card_get_data_rsp = (function() { /** * Properties of a skill_card_get_data_rsp. * @memberof game * @interface Iskill_card_get_data_rsp * @property {number|Long|null} [errno] skill_card_get_data_rsp errno * @property {Array.|null} [list] skill_card_get_data_rsp list */ /** * Constructs a new skill_card_get_data_rsp. * @memberof game * @classdesc Represents a skill_card_get_data_rsp. * @implements Iskill_card_get_data_rsp * @constructor * @param {game.Iskill_card_get_data_rsp=} [properties] Properties to set */ function skill_card_get_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * skill_card_get_data_rsp errno. * @member {number|Long} errno * @memberof game.skill_card_get_data_rsp * @instance */ skill_card_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * skill_card_get_data_rsp list. * @member {Array.} list * @memberof game.skill_card_get_data_rsp * @instance */ skill_card_get_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new skill_card_get_data_rsp instance using the specified properties. * @function create * @memberof game.skill_card_get_data_rsp * @static * @param {game.Iskill_card_get_data_rsp=} [properties] Properties to set * @returns {game.skill_card_get_data_rsp} skill_card_get_data_rsp instance */ skill_card_get_data_rsp.create = function create(properties) { return new skill_card_get_data_rsp(properties); }; /** * Encodes the specified skill_card_get_data_rsp message. Does not implicitly {@link game.skill_card_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.skill_card_get_data_rsp * @static * @param {game.Iskill_card_get_data_rsp} message skill_card_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.card.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified skill_card_get_data_rsp message, length delimited. Does not implicitly {@link game.skill_card_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.skill_card_get_data_rsp * @static * @param {game.Iskill_card_get_data_rsp} message skill_card_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a skill_card_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.skill_card_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.skill_card_get_data_rsp} skill_card_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.skill_card_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.card.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a skill_card_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.skill_card_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.skill_card_get_data_rsp} skill_card_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a skill_card_get_data_rsp message. * @function verify * @memberof game.skill_card_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ skill_card_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.card.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a skill_card_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.skill_card_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.skill_card_get_data_rsp} skill_card_get_data_rsp */ skill_card_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.skill_card_get_data_rsp) return object; let message = new $root.game.skill_card_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.skill_card_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.skill_card_get_data_rsp.list: object expected"); message.list[i] = $root.game.card.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a skill_card_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.skill_card_get_data_rsp * @static * @param {game.skill_card_get_data_rsp} message skill_card_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ skill_card_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.card.toObject(message.list[j], options); } return object; }; /** * Converts this skill_card_get_data_rsp to JSON. * @function toJSON * @memberof game.skill_card_get_data_rsp * @instance * @returns {Object.} JSON object */ skill_card_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return skill_card_get_data_rsp; })(); game.skill_card_upgrade = (function() { /** * Properties of a skill_card_upgrade. * @memberof game * @interface Iskill_card_upgrade * @property {string|null} [sid] skill_card_upgrade sid * @property {number|Long|null} [num] skill_card_upgrade num */ /** * Constructs a new skill_card_upgrade. * @memberof game * @classdesc Represents a skill_card_upgrade. * @implements Iskill_card_upgrade * @constructor * @param {game.Iskill_card_upgrade=} [properties] Properties to set */ function skill_card_upgrade(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * skill_card_upgrade sid. * @member {string} sid * @memberof game.skill_card_upgrade * @instance */ skill_card_upgrade.prototype.sid = ""; /** * skill_card_upgrade num. * @member {number|Long} num * @memberof game.skill_card_upgrade * @instance */ skill_card_upgrade.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new skill_card_upgrade instance using the specified properties. * @function create * @memberof game.skill_card_upgrade * @static * @param {game.Iskill_card_upgrade=} [properties] Properties to set * @returns {game.skill_card_upgrade} skill_card_upgrade instance */ skill_card_upgrade.create = function create(properties) { return new skill_card_upgrade(properties); }; /** * Encodes the specified skill_card_upgrade message. Does not implicitly {@link game.skill_card_upgrade.verify|verify} messages. * @function encode * @memberof game.skill_card_upgrade * @static * @param {game.Iskill_card_upgrade} message skill_card_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); return writer; }; /** * Encodes the specified skill_card_upgrade message, length delimited. Does not implicitly {@link game.skill_card_upgrade.verify|verify} messages. * @function encodeDelimited * @memberof game.skill_card_upgrade * @static * @param {game.Iskill_card_upgrade} message skill_card_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a skill_card_upgrade message from the specified reader or buffer. * @function decode * @memberof game.skill_card_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.skill_card_upgrade} skill_card_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.skill_card_upgrade(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a skill_card_upgrade message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.skill_card_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.skill_card_upgrade} skill_card_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a skill_card_upgrade message. * @function verify * @memberof game.skill_card_upgrade * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ skill_card_upgrade.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a skill_card_upgrade message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.skill_card_upgrade * @static * @param {Object.} object Plain object * @returns {game.skill_card_upgrade} skill_card_upgrade */ skill_card_upgrade.fromObject = function fromObject(object) { if (object instanceof $root.game.skill_card_upgrade) return object; let message = new $root.game.skill_card_upgrade(); if (object.sid != null) message.sid = String(object.sid); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a skill_card_upgrade message. Also converts values to other types if specified. * @function toObject * @memberof game.skill_card_upgrade * @static * @param {game.skill_card_upgrade} message skill_card_upgrade * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ skill_card_upgrade.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this skill_card_upgrade to JSON. * @function toJSON * @memberof game.skill_card_upgrade * @instance * @returns {Object.} JSON object */ skill_card_upgrade.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return skill_card_upgrade; })(); game.skill_card_upgrade_rsp = (function() { /** * Properties of a skill_card_upgrade_rsp. * @memberof game * @interface Iskill_card_upgrade_rsp * @property {number|Long|null} [errno] skill_card_upgrade_rsp errno * @property {game.Icard|null} [data] skill_card_upgrade_rsp data */ /** * Constructs a new skill_card_upgrade_rsp. * @memberof game * @classdesc Represents a skill_card_upgrade_rsp. * @implements Iskill_card_upgrade_rsp * @constructor * @param {game.Iskill_card_upgrade_rsp=} [properties] Properties to set */ function skill_card_upgrade_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * skill_card_upgrade_rsp errno. * @member {number|Long} errno * @memberof game.skill_card_upgrade_rsp * @instance */ skill_card_upgrade_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * skill_card_upgrade_rsp data. * @member {game.Icard|null|undefined} data * @memberof game.skill_card_upgrade_rsp * @instance */ skill_card_upgrade_rsp.prototype.data = null; /** * Creates a new skill_card_upgrade_rsp instance using the specified properties. * @function create * @memberof game.skill_card_upgrade_rsp * @static * @param {game.Iskill_card_upgrade_rsp=} [properties] Properties to set * @returns {game.skill_card_upgrade_rsp} skill_card_upgrade_rsp instance */ skill_card_upgrade_rsp.create = function create(properties) { return new skill_card_upgrade_rsp(properties); }; /** * Encodes the specified skill_card_upgrade_rsp message. Does not implicitly {@link game.skill_card_upgrade_rsp.verify|verify} messages. * @function encode * @memberof game.skill_card_upgrade_rsp * @static * @param {game.Iskill_card_upgrade_rsp} message skill_card_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.card.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified skill_card_upgrade_rsp message, length delimited. Does not implicitly {@link game.skill_card_upgrade_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.skill_card_upgrade_rsp * @static * @param {game.Iskill_card_upgrade_rsp} message skill_card_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a skill_card_upgrade_rsp message from the specified reader or buffer. * @function decode * @memberof game.skill_card_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.skill_card_upgrade_rsp} skill_card_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.skill_card_upgrade_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.card.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a skill_card_upgrade_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.skill_card_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.skill_card_upgrade_rsp} skill_card_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a skill_card_upgrade_rsp message. * @function verify * @memberof game.skill_card_upgrade_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ skill_card_upgrade_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.card.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a skill_card_upgrade_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.skill_card_upgrade_rsp * @static * @param {Object.} object Plain object * @returns {game.skill_card_upgrade_rsp} skill_card_upgrade_rsp */ skill_card_upgrade_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.skill_card_upgrade_rsp) return object; let message = new $root.game.skill_card_upgrade_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.skill_card_upgrade_rsp.data: object expected"); message.data = $root.game.card.fromObject(object.data); } return message; }; /** * Creates a plain object from a skill_card_upgrade_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.skill_card_upgrade_rsp * @static * @param {game.skill_card_upgrade_rsp} message skill_card_upgrade_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ skill_card_upgrade_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.card.toObject(message.data, options); return object; }; /** * Converts this skill_card_upgrade_rsp to JSON. * @function toJSON * @memberof game.skill_card_upgrade_rsp * @instance * @returns {Object.} JSON object */ skill_card_upgrade_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return skill_card_upgrade_rsp; })(); game.skill_card_upgrade_star = (function() { /** * Properties of a skill_card_upgrade_star. * @memberof game * @interface Iskill_card_upgrade_star * @property {string|null} [sid] skill_card_upgrade_star sid */ /** * Constructs a new skill_card_upgrade_star. * @memberof game * @classdesc Represents a skill_card_upgrade_star. * @implements Iskill_card_upgrade_star * @constructor * @param {game.Iskill_card_upgrade_star=} [properties] Properties to set */ function skill_card_upgrade_star(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * skill_card_upgrade_star sid. * @member {string} sid * @memberof game.skill_card_upgrade_star * @instance */ skill_card_upgrade_star.prototype.sid = ""; /** * Creates a new skill_card_upgrade_star instance using the specified properties. * @function create * @memberof game.skill_card_upgrade_star * @static * @param {game.Iskill_card_upgrade_star=} [properties] Properties to set * @returns {game.skill_card_upgrade_star} skill_card_upgrade_star instance */ skill_card_upgrade_star.create = function create(properties) { return new skill_card_upgrade_star(properties); }; /** * Encodes the specified skill_card_upgrade_star message. Does not implicitly {@link game.skill_card_upgrade_star.verify|verify} messages. * @function encode * @memberof game.skill_card_upgrade_star * @static * @param {game.Iskill_card_upgrade_star} message skill_card_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade_star.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); return writer; }; /** * Encodes the specified skill_card_upgrade_star message, length delimited. Does not implicitly {@link game.skill_card_upgrade_star.verify|verify} messages. * @function encodeDelimited * @memberof game.skill_card_upgrade_star * @static * @param {game.Iskill_card_upgrade_star} message skill_card_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade_star.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a skill_card_upgrade_star message from the specified reader or buffer. * @function decode * @memberof game.skill_card_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.skill_card_upgrade_star} skill_card_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade_star.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.skill_card_upgrade_star(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a skill_card_upgrade_star message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.skill_card_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.skill_card_upgrade_star} skill_card_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade_star.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a skill_card_upgrade_star message. * @function verify * @memberof game.skill_card_upgrade_star * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ skill_card_upgrade_star.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; return null; }; /** * Creates a skill_card_upgrade_star message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.skill_card_upgrade_star * @static * @param {Object.} object Plain object * @returns {game.skill_card_upgrade_star} skill_card_upgrade_star */ skill_card_upgrade_star.fromObject = function fromObject(object) { if (object instanceof $root.game.skill_card_upgrade_star) return object; let message = new $root.game.skill_card_upgrade_star(); if (object.sid != null) message.sid = String(object.sid); return message; }; /** * Creates a plain object from a skill_card_upgrade_star message. Also converts values to other types if specified. * @function toObject * @memberof game.skill_card_upgrade_star * @static * @param {game.skill_card_upgrade_star} message skill_card_upgrade_star * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ skill_card_upgrade_star.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.sid = ""; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; return object; }; /** * Converts this skill_card_upgrade_star to JSON. * @function toJSON * @memberof game.skill_card_upgrade_star * @instance * @returns {Object.} JSON object */ skill_card_upgrade_star.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return skill_card_upgrade_star; })(); game.skill_card_upgrade_star_rsp = (function() { /** * Properties of a skill_card_upgrade_star_rsp. * @memberof game * @interface Iskill_card_upgrade_star_rsp * @property {number|Long|null} [errno] skill_card_upgrade_star_rsp errno * @property {game.Icard|null} [data] skill_card_upgrade_star_rsp data */ /** * Constructs a new skill_card_upgrade_star_rsp. * @memberof game * @classdesc Represents a skill_card_upgrade_star_rsp. * @implements Iskill_card_upgrade_star_rsp * @constructor * @param {game.Iskill_card_upgrade_star_rsp=} [properties] Properties to set */ function skill_card_upgrade_star_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * skill_card_upgrade_star_rsp errno. * @member {number|Long} errno * @memberof game.skill_card_upgrade_star_rsp * @instance */ skill_card_upgrade_star_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * skill_card_upgrade_star_rsp data. * @member {game.Icard|null|undefined} data * @memberof game.skill_card_upgrade_star_rsp * @instance */ skill_card_upgrade_star_rsp.prototype.data = null; /** * Creates a new skill_card_upgrade_star_rsp instance using the specified properties. * @function create * @memberof game.skill_card_upgrade_star_rsp * @static * @param {game.Iskill_card_upgrade_star_rsp=} [properties] Properties to set * @returns {game.skill_card_upgrade_star_rsp} skill_card_upgrade_star_rsp instance */ skill_card_upgrade_star_rsp.create = function create(properties) { return new skill_card_upgrade_star_rsp(properties); }; /** * Encodes the specified skill_card_upgrade_star_rsp message. Does not implicitly {@link game.skill_card_upgrade_star_rsp.verify|verify} messages. * @function encode * @memberof game.skill_card_upgrade_star_rsp * @static * @param {game.Iskill_card_upgrade_star_rsp} message skill_card_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade_star_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.card.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified skill_card_upgrade_star_rsp message, length delimited. Does not implicitly {@link game.skill_card_upgrade_star_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.skill_card_upgrade_star_rsp * @static * @param {game.Iskill_card_upgrade_star_rsp} message skill_card_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ skill_card_upgrade_star_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a skill_card_upgrade_star_rsp message from the specified reader or buffer. * @function decode * @memberof game.skill_card_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.skill_card_upgrade_star_rsp} skill_card_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade_star_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.skill_card_upgrade_star_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.card.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a skill_card_upgrade_star_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.skill_card_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.skill_card_upgrade_star_rsp} skill_card_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ skill_card_upgrade_star_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a skill_card_upgrade_star_rsp message. * @function verify * @memberof game.skill_card_upgrade_star_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ skill_card_upgrade_star_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.card.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a skill_card_upgrade_star_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.skill_card_upgrade_star_rsp * @static * @param {Object.} object Plain object * @returns {game.skill_card_upgrade_star_rsp} skill_card_upgrade_star_rsp */ skill_card_upgrade_star_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.skill_card_upgrade_star_rsp) return object; let message = new $root.game.skill_card_upgrade_star_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.skill_card_upgrade_star_rsp.data: object expected"); message.data = $root.game.card.fromObject(object.data); } return message; }; /** * Creates a plain object from a skill_card_upgrade_star_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.skill_card_upgrade_star_rsp * @static * @param {game.skill_card_upgrade_star_rsp} message skill_card_upgrade_star_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ skill_card_upgrade_star_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.card.toObject(message.data, options); return object; }; /** * Converts this skill_card_upgrade_star_rsp to JSON. * @function toJSON * @memberof game.skill_card_upgrade_star_rsp * @instance * @returns {Object.} JSON object */ skill_card_upgrade_star_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return skill_card_upgrade_star_rsp; })(); game.role_get_data = (function() { /** * Properties of a role_get_data. * @memberof game * @interface Irole_get_data */ /** * Constructs a new role_get_data. * @memberof game * @classdesc Represents a role_get_data. * @implements Irole_get_data * @constructor * @param {game.Irole_get_data=} [properties] Properties to set */ function role_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new role_get_data instance using the specified properties. * @function create * @memberof game.role_get_data * @static * @param {game.Irole_get_data=} [properties] Properties to set * @returns {game.role_get_data} role_get_data instance */ role_get_data.create = function create(properties) { return new role_get_data(properties); }; /** * Encodes the specified role_get_data message. Does not implicitly {@link game.role_get_data.verify|verify} messages. * @function encode * @memberof game.role_get_data * @static * @param {game.Irole_get_data} message role_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified role_get_data message, length delimited. Does not implicitly {@link game.role_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.role_get_data * @static * @param {game.Irole_get_data} message role_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_get_data message from the specified reader or buffer. * @function decode * @memberof game.role_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_get_data} role_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_get_data} role_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_get_data message. * @function verify * @memberof game.role_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a role_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_get_data * @static * @param {Object.} object Plain object * @returns {game.role_get_data} role_get_data */ role_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.role_get_data) return object; return new $root.game.role_get_data(); }; /** * Creates a plain object from a role_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.role_get_data * @static * @param {game.role_get_data} message role_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_get_data.toObject = function toObject() { return {}; }; /** * Converts this role_get_data to JSON. * @function toJSON * @memberof game.role_get_data * @instance * @returns {Object.} JSON object */ role_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_get_data; })(); game.role_get_data_rsp = (function() { /** * Properties of a role_get_data_rsp. * @memberof game * @interface Irole_get_data_rsp * @property {number|Long|null} [errno] role_get_data_rsp errno * @property {number|Long|null} [level] role_get_data_rsp level * @property {number|Long|null} [exp] role_get_data_rsp exp */ /** * Constructs a new role_get_data_rsp. * @memberof game * @classdesc Represents a role_get_data_rsp. * @implements Irole_get_data_rsp * @constructor * @param {game.Irole_get_data_rsp=} [properties] Properties to set */ function role_get_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * role_get_data_rsp errno. * @member {number|Long} errno * @memberof game.role_get_data_rsp * @instance */ role_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * role_get_data_rsp level. * @member {number|Long} level * @memberof game.role_get_data_rsp * @instance */ role_get_data_rsp.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * role_get_data_rsp exp. * @member {number|Long} exp * @memberof game.role_get_data_rsp * @instance */ role_get_data_rsp.prototype.exp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new role_get_data_rsp instance using the specified properties. * @function create * @memberof game.role_get_data_rsp * @static * @param {game.Irole_get_data_rsp=} [properties] Properties to set * @returns {game.role_get_data_rsp} role_get_data_rsp instance */ role_get_data_rsp.create = function create(properties) { return new role_get_data_rsp(properties); }; /** * Encodes the specified role_get_data_rsp message. Does not implicitly {@link game.role_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.role_get_data_rsp * @static * @param {game.Irole_get_data_rsp} message role_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.level); if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.exp); return writer; }; /** * Encodes the specified role_get_data_rsp message, length delimited. Does not implicitly {@link game.role_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.role_get_data_rsp * @static * @param {game.Irole_get_data_rsp} message role_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.role_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_get_data_rsp} role_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.level = reader.int64(); break; case 3: message.exp = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_get_data_rsp} role_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_get_data_rsp message. * @function verify * @memberof game.role_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp) && !(message.exp && $util.isInteger(message.exp.low) && $util.isInteger(message.exp.high))) return "exp: integer|Long expected"; return null; }; /** * Creates a role_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.role_get_data_rsp} role_get_data_rsp */ role_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.role_get_data_rsp) return object; let message = new $root.game.role_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.exp != null) if ($util.Long) (message.exp = $util.Long.fromValue(object.exp)).unsigned = false; else if (typeof object.exp === "string") message.exp = parseInt(object.exp, 10); else if (typeof object.exp === "number") message.exp = object.exp; else if (typeof object.exp === "object") message.exp = new $util.LongBits(object.exp.low >>> 0, object.exp.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a role_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.role_get_data_rsp * @static * @param {game.role_get_data_rsp} message role_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exp = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.exp != null && message.hasOwnProperty("exp")) if (typeof message.exp === "number") object.exp = options.longs === String ? String(message.exp) : message.exp; else object.exp = options.longs === String ? $util.Long.prototype.toString.call(message.exp) : options.longs === Number ? new $util.LongBits(message.exp.low >>> 0, message.exp.high >>> 0).toNumber() : message.exp; return object; }; /** * Converts this role_get_data_rsp to JSON. * @function toJSON * @memberof game.role_get_data_rsp * @instance * @returns {Object.} JSON object */ role_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_get_data_rsp; })(); game.role_upgrade = (function() { /** * Properties of a role_upgrade. * @memberof game * @interface Irole_upgrade */ /** * Constructs a new role_upgrade. * @memberof game * @classdesc Represents a role_upgrade. * @implements Irole_upgrade * @constructor * @param {game.Irole_upgrade=} [properties] Properties to set */ function role_upgrade(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new role_upgrade instance using the specified properties. * @function create * @memberof game.role_upgrade * @static * @param {game.Irole_upgrade=} [properties] Properties to set * @returns {game.role_upgrade} role_upgrade instance */ role_upgrade.create = function create(properties) { return new role_upgrade(properties); }; /** * Encodes the specified role_upgrade message. Does not implicitly {@link game.role_upgrade.verify|verify} messages. * @function encode * @memberof game.role_upgrade * @static * @param {game.Irole_upgrade} message role_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_upgrade.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified role_upgrade message, length delimited. Does not implicitly {@link game.role_upgrade.verify|verify} messages. * @function encodeDelimited * @memberof game.role_upgrade * @static * @param {game.Irole_upgrade} message role_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_upgrade.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_upgrade message from the specified reader or buffer. * @function decode * @memberof game.role_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_upgrade} role_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_upgrade.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_upgrade(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_upgrade message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_upgrade} role_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_upgrade.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_upgrade message. * @function verify * @memberof game.role_upgrade * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_upgrade.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a role_upgrade message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_upgrade * @static * @param {Object.} object Plain object * @returns {game.role_upgrade} role_upgrade */ role_upgrade.fromObject = function fromObject(object) { if (object instanceof $root.game.role_upgrade) return object; return new $root.game.role_upgrade(); }; /** * Creates a plain object from a role_upgrade message. Also converts values to other types if specified. * @function toObject * @memberof game.role_upgrade * @static * @param {game.role_upgrade} message role_upgrade * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_upgrade.toObject = function toObject() { return {}; }; /** * Converts this role_upgrade to JSON. * @function toJSON * @memberof game.role_upgrade * @instance * @returns {Object.} JSON object */ role_upgrade.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_upgrade; })(); game.role_upgrade_rsp = (function() { /** * Properties of a role_upgrade_rsp. * @memberof game * @interface Irole_upgrade_rsp * @property {number|Long|null} [errno] role_upgrade_rsp errno * @property {number|Long|null} [level] role_upgrade_rsp level * @property {number|Long|null} [exp] role_upgrade_rsp exp */ /** * Constructs a new role_upgrade_rsp. * @memberof game * @classdesc Represents a role_upgrade_rsp. * @implements Irole_upgrade_rsp * @constructor * @param {game.Irole_upgrade_rsp=} [properties] Properties to set */ function role_upgrade_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * role_upgrade_rsp errno. * @member {number|Long} errno * @memberof game.role_upgrade_rsp * @instance */ role_upgrade_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * role_upgrade_rsp level. * @member {number|Long} level * @memberof game.role_upgrade_rsp * @instance */ role_upgrade_rsp.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * role_upgrade_rsp exp. * @member {number|Long} exp * @memberof game.role_upgrade_rsp * @instance */ role_upgrade_rsp.prototype.exp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new role_upgrade_rsp instance using the specified properties. * @function create * @memberof game.role_upgrade_rsp * @static * @param {game.Irole_upgrade_rsp=} [properties] Properties to set * @returns {game.role_upgrade_rsp} role_upgrade_rsp instance */ role_upgrade_rsp.create = function create(properties) { return new role_upgrade_rsp(properties); }; /** * Encodes the specified role_upgrade_rsp message. Does not implicitly {@link game.role_upgrade_rsp.verify|verify} messages. * @function encode * @memberof game.role_upgrade_rsp * @static * @param {game.Irole_upgrade_rsp} message role_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_upgrade_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.level); if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.exp); return writer; }; /** * Encodes the specified role_upgrade_rsp message, length delimited. Does not implicitly {@link game.role_upgrade_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.role_upgrade_rsp * @static * @param {game.Irole_upgrade_rsp} message role_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_upgrade_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_upgrade_rsp message from the specified reader or buffer. * @function decode * @memberof game.role_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_upgrade_rsp} role_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_upgrade_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_upgrade_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.level = reader.int64(); break; case 3: message.exp = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_upgrade_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_upgrade_rsp} role_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_upgrade_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_upgrade_rsp message. * @function verify * @memberof game.role_upgrade_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_upgrade_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp) && !(message.exp && $util.isInteger(message.exp.low) && $util.isInteger(message.exp.high))) return "exp: integer|Long expected"; return null; }; /** * Creates a role_upgrade_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_upgrade_rsp * @static * @param {Object.} object Plain object * @returns {game.role_upgrade_rsp} role_upgrade_rsp */ role_upgrade_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.role_upgrade_rsp) return object; let message = new $root.game.role_upgrade_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.exp != null) if ($util.Long) (message.exp = $util.Long.fromValue(object.exp)).unsigned = false; else if (typeof object.exp === "string") message.exp = parseInt(object.exp, 10); else if (typeof object.exp === "number") message.exp = object.exp; else if (typeof object.exp === "object") message.exp = new $util.LongBits(object.exp.low >>> 0, object.exp.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a role_upgrade_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.role_upgrade_rsp * @static * @param {game.role_upgrade_rsp} message role_upgrade_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_upgrade_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exp = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.exp != null && message.hasOwnProperty("exp")) if (typeof message.exp === "number") object.exp = options.longs === String ? String(message.exp) : message.exp; else object.exp = options.longs === String ? $util.Long.prototype.toString.call(message.exp) : options.longs === Number ? new $util.LongBits(message.exp.low >>> 0, message.exp.high >>> 0).toNumber() : message.exp; return object; }; /** * Converts this role_upgrade_rsp to JSON. * @function toJSON * @memberof game.role_upgrade_rsp * @instance * @returns {Object.} JSON object */ role_upgrade_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_upgrade_rsp; })(); game.role_rename = (function() { /** * Properties of a role_rename. * @memberof game * @interface Irole_rename * @property {string|null} [name] role_rename name */ /** * Constructs a new role_rename. * @memberof game * @classdesc Represents a role_rename. * @implements Irole_rename * @constructor * @param {game.Irole_rename=} [properties] Properties to set */ function role_rename(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * role_rename name. * @member {string} name * @memberof game.role_rename * @instance */ role_rename.prototype.name = ""; /** * Creates a new role_rename instance using the specified properties. * @function create * @memberof game.role_rename * @static * @param {game.Irole_rename=} [properties] Properties to set * @returns {game.role_rename} role_rename instance */ role_rename.create = function create(properties) { return new role_rename(properties); }; /** * Encodes the specified role_rename message. Does not implicitly {@link game.role_rename.verify|verify} messages. * @function encode * @memberof game.role_rename * @static * @param {game.Irole_rename} message role_rename message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_rename.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** * Encodes the specified role_rename message, length delimited. Does not implicitly {@link game.role_rename.verify|verify} messages. * @function encodeDelimited * @memberof game.role_rename * @static * @param {game.Irole_rename} message role_rename message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_rename.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_rename message from the specified reader or buffer. * @function decode * @memberof game.role_rename * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_rename} role_rename * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_rename.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_rename(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_rename message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_rename * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_rename} role_rename * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_rename.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_rename message. * @function verify * @memberof game.role_rename * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_rename.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; }; /** * Creates a role_rename message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_rename * @static * @param {Object.} object Plain object * @returns {game.role_rename} role_rename */ role_rename.fromObject = function fromObject(object) { if (object instanceof $root.game.role_rename) return object; let message = new $root.game.role_rename(); if (object.name != null) message.name = String(object.name); return message; }; /** * Creates a plain object from a role_rename message. Also converts values to other types if specified. * @function toObject * @memberof game.role_rename * @static * @param {game.role_rename} message role_rename * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_rename.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** * Converts this role_rename to JSON. * @function toJSON * @memberof game.role_rename * @instance * @returns {Object.} JSON object */ role_rename.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_rename; })(); game.role_rename_rsp = (function() { /** * Properties of a role_rename_rsp. * @memberof game * @interface Irole_rename_rsp * @property {number|Long|null} [errno] role_rename_rsp errno * @property {string|null} [name] role_rename_rsp name * @property {number|Long|null} [time] role_rename_rsp time */ /** * Constructs a new role_rename_rsp. * @memberof game * @classdesc Represents a role_rename_rsp. * @implements Irole_rename_rsp * @constructor * @param {game.Irole_rename_rsp=} [properties] Properties to set */ function role_rename_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * role_rename_rsp errno. * @member {number|Long} errno * @memberof game.role_rename_rsp * @instance */ role_rename_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * role_rename_rsp name. * @member {string} name * @memberof game.role_rename_rsp * @instance */ role_rename_rsp.prototype.name = ""; /** * role_rename_rsp time. * @member {number|Long} time * @memberof game.role_rename_rsp * @instance */ role_rename_rsp.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new role_rename_rsp instance using the specified properties. * @function create * @memberof game.role_rename_rsp * @static * @param {game.Irole_rename_rsp=} [properties] Properties to set * @returns {game.role_rename_rsp} role_rename_rsp instance */ role_rename_rsp.create = function create(properties) { return new role_rename_rsp(properties); }; /** * Encodes the specified role_rename_rsp message. Does not implicitly {@link game.role_rename_rsp.verify|verify} messages. * @function encode * @memberof game.role_rename_rsp * @static * @param {game.Irole_rename_rsp} message role_rename_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_rename_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time); return writer; }; /** * Encodes the specified role_rename_rsp message, length delimited. Does not implicitly {@link game.role_rename_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.role_rename_rsp * @static * @param {game.Irole_rename_rsp} message role_rename_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_rename_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_rename_rsp message from the specified reader or buffer. * @function decode * @memberof game.role_rename_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_rename_rsp} role_rename_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_rename_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_rename_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.name = reader.string(); break; case 3: message.time = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_rename_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_rename_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_rename_rsp} role_rename_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_rename_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_rename_rsp message. * @function verify * @memberof game.role_rename_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_rename_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; return null; }; /** * Creates a role_rename_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_rename_rsp * @static * @param {Object.} object Plain object * @returns {game.role_rename_rsp} role_rename_rsp */ role_rename_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.role_rename_rsp) return object; let message = new $root.game.role_rename_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.name != null) message.name = String(object.name); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a role_rename_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.role_rename_rsp * @static * @param {game.role_rename_rsp} message role_rename_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_rename_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.name = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; return object; }; /** * Converts this role_rename_rsp to JSON. * @function toJSON * @memberof game.role_rename_rsp * @instance * @returns {Object.} JSON object */ role_rename_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_rename_rsp; })(); game.debris_get_data = (function() { /** * Properties of a debris_get_data. * @memberof game * @interface Idebris_get_data */ /** * Constructs a new debris_get_data. * @memberof game * @classdesc Represents a debris_get_data. * @implements Idebris_get_data * @constructor * @param {game.Idebris_get_data=} [properties] Properties to set */ function debris_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new debris_get_data instance using the specified properties. * @function create * @memberof game.debris_get_data * @static * @param {game.Idebris_get_data=} [properties] Properties to set * @returns {game.debris_get_data} debris_get_data instance */ debris_get_data.create = function create(properties) { return new debris_get_data(properties); }; /** * Encodes the specified debris_get_data message. Does not implicitly {@link game.debris_get_data.verify|verify} messages. * @function encode * @memberof game.debris_get_data * @static * @param {game.Idebris_get_data} message debris_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified debris_get_data message, length delimited. Does not implicitly {@link game.debris_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.debris_get_data * @static * @param {game.Idebris_get_data} message debris_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a debris_get_data message from the specified reader or buffer. * @function decode * @memberof game.debris_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.debris_get_data} debris_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.debris_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a debris_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.debris_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.debris_get_data} debris_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a debris_get_data message. * @function verify * @memberof game.debris_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ debris_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a debris_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.debris_get_data * @static * @param {Object.} object Plain object * @returns {game.debris_get_data} debris_get_data */ debris_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.debris_get_data) return object; return new $root.game.debris_get_data(); }; /** * Creates a plain object from a debris_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.debris_get_data * @static * @param {game.debris_get_data} message debris_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ debris_get_data.toObject = function toObject() { return {}; }; /** * Converts this debris_get_data to JSON. * @function toJSON * @memberof game.debris_get_data * @instance * @returns {Object.} JSON object */ debris_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return debris_get_data; })(); game.debris_get_data_rsp = (function() { /** * Properties of a debris_get_data_rsp. * @memberof game * @interface Idebris_get_data_rsp * @property {number|Long|null} [errno] debris_get_data_rsp errno * @property {Array.|null} [list] debris_get_data_rsp list */ /** * Constructs a new debris_get_data_rsp. * @memberof game * @classdesc Represents a debris_get_data_rsp. * @implements Idebris_get_data_rsp * @constructor * @param {game.Idebris_get_data_rsp=} [properties] Properties to set */ function debris_get_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * debris_get_data_rsp errno. * @member {number|Long} errno * @memberof game.debris_get_data_rsp * @instance */ debris_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * debris_get_data_rsp list. * @member {Array.} list * @memberof game.debris_get_data_rsp * @instance */ debris_get_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new debris_get_data_rsp instance using the specified properties. * @function create * @memberof game.debris_get_data_rsp * @static * @param {game.Idebris_get_data_rsp=} [properties] Properties to set * @returns {game.debris_get_data_rsp} debris_get_data_rsp instance */ debris_get_data_rsp.create = function create(properties) { return new debris_get_data_rsp(properties); }; /** * Encodes the specified debris_get_data_rsp message. Does not implicitly {@link game.debris_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.debris_get_data_rsp * @static * @param {game.Idebris_get_data_rsp} message debris_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.id_num.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified debris_get_data_rsp message, length delimited. Does not implicitly {@link game.debris_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.debris_get_data_rsp * @static * @param {game.Idebris_get_data_rsp} message debris_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a debris_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.debris_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.debris_get_data_rsp} debris_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.debris_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a debris_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.debris_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.debris_get_data_rsp} debris_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a debris_get_data_rsp message. * @function verify * @memberof game.debris_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ debris_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.id_num.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a debris_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.debris_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.debris_get_data_rsp} debris_get_data_rsp */ debris_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.debris_get_data_rsp) return object; let message = new $root.game.debris_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.debris_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.debris_get_data_rsp.list: object expected"); message.list[i] = $root.game.id_num.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a debris_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.debris_get_data_rsp * @static * @param {game.debris_get_data_rsp} message debris_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ debris_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.id_num.toObject(message.list[j], options); } return object; }; /** * Converts this debris_get_data_rsp to JSON. * @function toJSON * @memberof game.debris_get_data_rsp * @instance * @returns {Object.} JSON object */ debris_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return debris_get_data_rsp; })(); game.debris_merge = (function() { /** * Properties of a debris_merge. * @memberof game * @interface Idebris_merge * @property {number|Long|null} [id] debris_merge id */ /** * Constructs a new debris_merge. * @memberof game * @classdesc Represents a debris_merge. * @implements Idebris_merge * @constructor * @param {game.Idebris_merge=} [properties] Properties to set */ function debris_merge(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * debris_merge id. * @member {number|Long} id * @memberof game.debris_merge * @instance */ debris_merge.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new debris_merge instance using the specified properties. * @function create * @memberof game.debris_merge * @static * @param {game.Idebris_merge=} [properties] Properties to set * @returns {game.debris_merge} debris_merge instance */ debris_merge.create = function create(properties) { return new debris_merge(properties); }; /** * Encodes the specified debris_merge message. Does not implicitly {@link game.debris_merge.verify|verify} messages. * @function encode * @memberof game.debris_merge * @static * @param {game.Idebris_merge} message debris_merge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_merge.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified debris_merge message, length delimited. Does not implicitly {@link game.debris_merge.verify|verify} messages. * @function encodeDelimited * @memberof game.debris_merge * @static * @param {game.Idebris_merge} message debris_merge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_merge.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a debris_merge message from the specified reader or buffer. * @function decode * @memberof game.debris_merge * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.debris_merge} debris_merge * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_merge.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.debris_merge(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a debris_merge message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.debris_merge * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.debris_merge} debris_merge * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_merge.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a debris_merge message. * @function verify * @memberof game.debris_merge * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ debris_merge.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"; return null; }; /** * Creates a debris_merge message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.debris_merge * @static * @param {Object.} object Plain object * @returns {game.debris_merge} debris_merge */ debris_merge.fromObject = function fromObject(object) { if (object instanceof $root.game.debris_merge) return object; let message = new $root.game.debris_merge(); 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(); return message; }; /** * Creates a plain object from a debris_merge message. Also converts values to other types if specified. * @function toObject * @memberof game.debris_merge * @static * @param {game.debris_merge} message debris_merge * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ debris_merge.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this debris_merge to JSON. * @function toJSON * @memberof game.debris_merge * @instance * @returns {Object.} JSON object */ debris_merge.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return debris_merge; })(); game.debris_merge_rsp = (function() { /** * Properties of a debris_merge_rsp. * @memberof game * @interface Idebris_merge_rsp * @property {number|Long|null} [errno] debris_merge_rsp errno */ /** * Constructs a new debris_merge_rsp. * @memberof game * @classdesc Represents a debris_merge_rsp. * @implements Idebris_merge_rsp * @constructor * @param {game.Idebris_merge_rsp=} [properties] Properties to set */ function debris_merge_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * debris_merge_rsp errno. * @member {number|Long} errno * @memberof game.debris_merge_rsp * @instance */ debris_merge_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new debris_merge_rsp instance using the specified properties. * @function create * @memberof game.debris_merge_rsp * @static * @param {game.Idebris_merge_rsp=} [properties] Properties to set * @returns {game.debris_merge_rsp} debris_merge_rsp instance */ debris_merge_rsp.create = function create(properties) { return new debris_merge_rsp(properties); }; /** * Encodes the specified debris_merge_rsp message. Does not implicitly {@link game.debris_merge_rsp.verify|verify} messages. * @function encode * @memberof game.debris_merge_rsp * @static * @param {game.Idebris_merge_rsp} message debris_merge_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_merge_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified debris_merge_rsp message, length delimited. Does not implicitly {@link game.debris_merge_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.debris_merge_rsp * @static * @param {game.Idebris_merge_rsp} message debris_merge_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ debris_merge_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a debris_merge_rsp message from the specified reader or buffer. * @function decode * @memberof game.debris_merge_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.debris_merge_rsp} debris_merge_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_merge_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.debris_merge_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a debris_merge_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.debris_merge_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.debris_merge_rsp} debris_merge_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ debris_merge_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a debris_merge_rsp message. * @function verify * @memberof game.debris_merge_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ debris_merge_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a debris_merge_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.debris_merge_rsp * @static * @param {Object.} object Plain object * @returns {game.debris_merge_rsp} debris_merge_rsp */ debris_merge_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.debris_merge_rsp) return object; let message = new $root.game.debris_merge_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a debris_merge_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.debris_merge_rsp * @static * @param {game.debris_merge_rsp} message debris_merge_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ debris_merge_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this debris_merge_rsp to JSON. * @function toJSON * @memberof game.debris_merge_rsp * @instance * @returns {Object.} JSON object */ debris_merge_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return debris_merge_rsp; })(); game.equip_get_data = (function() { /** * Properties of an equip_get_data. * @memberof game * @interface Iequip_get_data */ /** * Constructs a new equip_get_data. * @memberof game * @classdesc Represents an equip_get_data. * @implements Iequip_get_data * @constructor * @param {game.Iequip_get_data=} [properties] Properties to set */ function equip_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new equip_get_data instance using the specified properties. * @function create * @memberof game.equip_get_data * @static * @param {game.Iequip_get_data=} [properties] Properties to set * @returns {game.equip_get_data} equip_get_data instance */ equip_get_data.create = function create(properties) { return new equip_get_data(properties); }; /** * Encodes the specified equip_get_data message. Does not implicitly {@link game.equip_get_data.verify|verify} messages. * @function encode * @memberof game.equip_get_data * @static * @param {game.Iequip_get_data} message equip_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified equip_get_data message, length delimited. Does not implicitly {@link game.equip_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_get_data * @static * @param {game.Iequip_get_data} message equip_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_get_data message from the specified reader or buffer. * @function decode * @memberof game.equip_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_get_data} equip_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_get_data} equip_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_get_data message. * @function verify * @memberof game.equip_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an equip_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_get_data * @static * @param {Object.} object Plain object * @returns {game.equip_get_data} equip_get_data */ equip_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_get_data) return object; return new $root.game.equip_get_data(); }; /** * Creates a plain object from an equip_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_get_data * @static * @param {game.equip_get_data} message equip_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_get_data.toObject = function toObject() { return {}; }; /** * Converts this equip_get_data to JSON. * @function toJSON * @memberof game.equip_get_data * @instance * @returns {Object.} JSON object */ equip_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_get_data; })(); game.equip_get_data_rsp = (function() { /** * Properties of an equip_get_data_rsp. * @memberof game * @interface Iequip_get_data_rsp * @property {number|Long|null} [errno] equip_get_data_rsp errno * @property {Array.|null} [list] equip_get_data_rsp list */ /** * Constructs a new equip_get_data_rsp. * @memberof game * @classdesc Represents an equip_get_data_rsp. * @implements Iequip_get_data_rsp * @constructor * @param {game.Iequip_get_data_rsp=} [properties] Properties to set */ function equip_get_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_get_data_rsp errno. * @member {number|Long} errno * @memberof game.equip_get_data_rsp * @instance */ equip_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip_get_data_rsp list. * @member {Array.} list * @memberof game.equip_get_data_rsp * @instance */ equip_get_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new equip_get_data_rsp instance using the specified properties. * @function create * @memberof game.equip_get_data_rsp * @static * @param {game.Iequip_get_data_rsp=} [properties] Properties to set * @returns {game.equip_get_data_rsp} equip_get_data_rsp instance */ equip_get_data_rsp.create = function create(properties) { return new equip_get_data_rsp(properties); }; /** * Encodes the specified equip_get_data_rsp message. Does not implicitly {@link game.equip_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.equip_get_data_rsp * @static * @param {game.Iequip_get_data_rsp} message equip_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.equip.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_get_data_rsp message, length delimited. Does not implicitly {@link game.equip_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_get_data_rsp * @static * @param {game.Iequip_get_data_rsp} message equip_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.equip_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_get_data_rsp} equip_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.equip.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_get_data_rsp} equip_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_get_data_rsp message. * @function verify * @memberof game.equip_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.equip.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an equip_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.equip_get_data_rsp} equip_get_data_rsp */ equip_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_get_data_rsp) return object; let message = new $root.game.equip_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.equip_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.equip_get_data_rsp.list: object expected"); message.list[i] = $root.game.equip.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an equip_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_get_data_rsp * @static * @param {game.equip_get_data_rsp} message equip_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.equip.toObject(message.list[j], options); } return object; }; /** * Converts this equip_get_data_rsp to JSON. * @function toJSON * @memberof game.equip_get_data_rsp * @instance * @returns {Object.} JSON object */ equip_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_get_data_rsp; })(); game.equip_upgrade = (function() { /** * Properties of an equip_upgrade. * @memberof game * @interface Iequip_upgrade * @property {string|null} [sid] equip_upgrade sid * @property {number|Long|null} [num] equip_upgrade num */ /** * Constructs a new equip_upgrade. * @memberof game * @classdesc Represents an equip_upgrade. * @implements Iequip_upgrade * @constructor * @param {game.Iequip_upgrade=} [properties] Properties to set */ function equip_upgrade(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_upgrade sid. * @member {string} sid * @memberof game.equip_upgrade * @instance */ equip_upgrade.prototype.sid = ""; /** * equip_upgrade num. * @member {number|Long} num * @memberof game.equip_upgrade * @instance */ equip_upgrade.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new equip_upgrade instance using the specified properties. * @function create * @memberof game.equip_upgrade * @static * @param {game.Iequip_upgrade=} [properties] Properties to set * @returns {game.equip_upgrade} equip_upgrade instance */ equip_upgrade.create = function create(properties) { return new equip_upgrade(properties); }; /** * Encodes the specified equip_upgrade message. Does not implicitly {@link game.equip_upgrade.verify|verify} messages. * @function encode * @memberof game.equip_upgrade * @static * @param {game.Iequip_upgrade} message equip_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); return writer; }; /** * Encodes the specified equip_upgrade message, length delimited. Does not implicitly {@link game.equip_upgrade.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_upgrade * @static * @param {game.Iequip_upgrade} message equip_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_upgrade message from the specified reader or buffer. * @function decode * @memberof game.equip_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_upgrade} equip_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_upgrade(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_upgrade message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_upgrade} equip_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_upgrade message. * @function verify * @memberof game.equip_upgrade * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_upgrade.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates an equip_upgrade message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_upgrade * @static * @param {Object.} object Plain object * @returns {game.equip_upgrade} equip_upgrade */ equip_upgrade.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_upgrade) return object; let message = new $root.game.equip_upgrade(); if (object.sid != null) message.sid = String(object.sid); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an equip_upgrade message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_upgrade * @static * @param {game.equip_upgrade} message equip_upgrade * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_upgrade.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this equip_upgrade to JSON. * @function toJSON * @memberof game.equip_upgrade * @instance * @returns {Object.} JSON object */ equip_upgrade.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_upgrade; })(); game.equip_upgrade_rsp = (function() { /** * Properties of an equip_upgrade_rsp. * @memberof game * @interface Iequip_upgrade_rsp * @property {number|Long|null} [errno] equip_upgrade_rsp errno * @property {game.Iequip|null} [data] equip_upgrade_rsp data */ /** * Constructs a new equip_upgrade_rsp. * @memberof game * @classdesc Represents an equip_upgrade_rsp. * @implements Iequip_upgrade_rsp * @constructor * @param {game.Iequip_upgrade_rsp=} [properties] Properties to set */ function equip_upgrade_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_upgrade_rsp errno. * @member {number|Long} errno * @memberof game.equip_upgrade_rsp * @instance */ equip_upgrade_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip_upgrade_rsp data. * @member {game.Iequip|null|undefined} data * @memberof game.equip_upgrade_rsp * @instance */ equip_upgrade_rsp.prototype.data = null; /** * Creates a new equip_upgrade_rsp instance using the specified properties. * @function create * @memberof game.equip_upgrade_rsp * @static * @param {game.Iequip_upgrade_rsp=} [properties] Properties to set * @returns {game.equip_upgrade_rsp} equip_upgrade_rsp instance */ equip_upgrade_rsp.create = function create(properties) { return new equip_upgrade_rsp(properties); }; /** * Encodes the specified equip_upgrade_rsp message. Does not implicitly {@link game.equip_upgrade_rsp.verify|verify} messages. * @function encode * @memberof game.equip_upgrade_rsp * @static * @param {game.Iequip_upgrade_rsp} message equip_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.equip.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_upgrade_rsp message, length delimited. Does not implicitly {@link game.equip_upgrade_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_upgrade_rsp * @static * @param {game.Iequip_upgrade_rsp} message equip_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_upgrade_rsp message from the specified reader or buffer. * @function decode * @memberof game.equip_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_upgrade_rsp} equip_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_upgrade_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.equip.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_upgrade_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_upgrade_rsp} equip_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_upgrade_rsp message. * @function verify * @memberof game.equip_upgrade_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_upgrade_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.equip.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates an equip_upgrade_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_upgrade_rsp * @static * @param {Object.} object Plain object * @returns {game.equip_upgrade_rsp} equip_upgrade_rsp */ equip_upgrade_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_upgrade_rsp) return object; let message = new $root.game.equip_upgrade_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.equip_upgrade_rsp.data: object expected"); message.data = $root.game.equip.fromObject(object.data); } return message; }; /** * Creates a plain object from an equip_upgrade_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_upgrade_rsp * @static * @param {game.equip_upgrade_rsp} message equip_upgrade_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_upgrade_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.equip.toObject(message.data, options); return object; }; /** * Converts this equip_upgrade_rsp to JSON. * @function toJSON * @memberof game.equip_upgrade_rsp * @instance * @returns {Object.} JSON object */ equip_upgrade_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_upgrade_rsp; })(); game.equip_upgrade_star = (function() { /** * Properties of an equip_upgrade_star. * @memberof game * @interface Iequip_upgrade_star * @property {string|null} [sid] equip_upgrade_star sid * @property {Array.|null} [same] equip_upgrade_star same * @property {Array.|null} [other] equip_upgrade_star other * @property {game.Iid_num|null} [currency] equip_upgrade_star currency */ /** * Constructs a new equip_upgrade_star. * @memberof game * @classdesc Represents an equip_upgrade_star. * @implements Iequip_upgrade_star * @constructor * @param {game.Iequip_upgrade_star=} [properties] Properties to set */ function equip_upgrade_star(properties) { this.same = []; this.other = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_upgrade_star sid. * @member {string} sid * @memberof game.equip_upgrade_star * @instance */ equip_upgrade_star.prototype.sid = ""; /** * equip_upgrade_star same. * @member {Array.} same * @memberof game.equip_upgrade_star * @instance */ equip_upgrade_star.prototype.same = $util.emptyArray; /** * equip_upgrade_star other. * @member {Array.} other * @memberof game.equip_upgrade_star * @instance */ equip_upgrade_star.prototype.other = $util.emptyArray; /** * equip_upgrade_star currency. * @member {game.Iid_num|null|undefined} currency * @memberof game.equip_upgrade_star * @instance */ equip_upgrade_star.prototype.currency = null; /** * Creates a new equip_upgrade_star instance using the specified properties. * @function create * @memberof game.equip_upgrade_star * @static * @param {game.Iequip_upgrade_star=} [properties] Properties to set * @returns {game.equip_upgrade_star} equip_upgrade_star instance */ equip_upgrade_star.create = function create(properties) { return new equip_upgrade_star(properties); }; /** * Encodes the specified equip_upgrade_star message. Does not implicitly {@link game.equip_upgrade_star.verify|verify} messages. * @function encode * @memberof game.equip_upgrade_star * @static * @param {game.Iequip_upgrade_star} message equip_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade_star.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.same != null && message.same.length) for (let i = 0; i < message.same.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.same[i]); if (message.other != null && message.other.length) for (let i = 0; i < message.other.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.other[i]); if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) $root.game.id_num.encode(message.currency, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_upgrade_star message, length delimited. Does not implicitly {@link game.equip_upgrade_star.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_upgrade_star * @static * @param {game.Iequip_upgrade_star} message equip_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade_star.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_upgrade_star message from the specified reader or buffer. * @function decode * @memberof game.equip_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_upgrade_star} equip_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade_star.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_upgrade_star(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: if (!(message.same && message.same.length)) message.same = []; message.same.push(reader.string()); break; case 3: if (!(message.other && message.other.length)) message.other = []; message.other.push(reader.string()); break; case 4: message.currency = $root.game.id_num.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_upgrade_star message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_upgrade_star} equip_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade_star.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_upgrade_star message. * @function verify * @memberof game.equip_upgrade_star * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_upgrade_star.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.same != null && message.hasOwnProperty("same")) { if (!Array.isArray(message.same)) return "same: array expected"; for (let i = 0; i < message.same.length; ++i) if (!$util.isString(message.same[i])) return "same: string[] expected"; } if (message.other != null && message.hasOwnProperty("other")) { if (!Array.isArray(message.other)) return "other: array expected"; for (let i = 0; i < message.other.length; ++i) if (!$util.isString(message.other[i])) return "other: string[] expected"; } if (message.currency != null && message.hasOwnProperty("currency")) { let error = $root.game.id_num.verify(message.currency); if (error) return "currency." + error; } return null; }; /** * Creates an equip_upgrade_star message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_upgrade_star * @static * @param {Object.} object Plain object * @returns {game.equip_upgrade_star} equip_upgrade_star */ equip_upgrade_star.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_upgrade_star) return object; let message = new $root.game.equip_upgrade_star(); if (object.sid != null) message.sid = String(object.sid); if (object.same) { if (!Array.isArray(object.same)) throw TypeError(".game.equip_upgrade_star.same: array expected"); message.same = []; for (let i = 0; i < object.same.length; ++i) message.same[i] = String(object.same[i]); } if (object.other) { if (!Array.isArray(object.other)) throw TypeError(".game.equip_upgrade_star.other: array expected"); message.other = []; for (let i = 0; i < object.other.length; ++i) message.other[i] = String(object.other[i]); } if (object.currency != null) { if (typeof object.currency !== "object") throw TypeError(".game.equip_upgrade_star.currency: object expected"); message.currency = $root.game.id_num.fromObject(object.currency); } return message; }; /** * Creates a plain object from an equip_upgrade_star message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_upgrade_star * @static * @param {game.equip_upgrade_star} message equip_upgrade_star * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_upgrade_star.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.same = []; object.other = []; } if (options.defaults) { object.sid = ""; object.currency = null; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.same && message.same.length) { object.same = []; for (let j = 0; j < message.same.length; ++j) object.same[j] = message.same[j]; } if (message.other && message.other.length) { object.other = []; for (let j = 0; j < message.other.length; ++j) object.other[j] = message.other[j]; } if (message.currency != null && message.hasOwnProperty("currency")) object.currency = $root.game.id_num.toObject(message.currency, options); return object; }; /** * Converts this equip_upgrade_star to JSON. * @function toJSON * @memberof game.equip_upgrade_star * @instance * @returns {Object.} JSON object */ equip_upgrade_star.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_upgrade_star; })(); game.equip_upgrade_star_rsp = (function() { /** * Properties of an equip_upgrade_star_rsp. * @memberof game * @interface Iequip_upgrade_star_rsp * @property {number|Long|null} [errno] equip_upgrade_star_rsp errno * @property {game.Iequip|null} [data] equip_upgrade_star_rsp data * @property {Array.|null} [same] equip_upgrade_star_rsp same * @property {Array.|null} [other] equip_upgrade_star_rsp other * @property {game.Iid_num|null} [currency] equip_upgrade_star_rsp currency */ /** * Constructs a new equip_upgrade_star_rsp. * @memberof game * @classdesc Represents an equip_upgrade_star_rsp. * @implements Iequip_upgrade_star_rsp * @constructor * @param {game.Iequip_upgrade_star_rsp=} [properties] Properties to set */ function equip_upgrade_star_rsp(properties) { this.same = []; this.other = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_upgrade_star_rsp errno. * @member {number|Long} errno * @memberof game.equip_upgrade_star_rsp * @instance */ equip_upgrade_star_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip_upgrade_star_rsp data. * @member {game.Iequip|null|undefined} data * @memberof game.equip_upgrade_star_rsp * @instance */ equip_upgrade_star_rsp.prototype.data = null; /** * equip_upgrade_star_rsp same. * @member {Array.} same * @memberof game.equip_upgrade_star_rsp * @instance */ equip_upgrade_star_rsp.prototype.same = $util.emptyArray; /** * equip_upgrade_star_rsp other. * @member {Array.} other * @memberof game.equip_upgrade_star_rsp * @instance */ equip_upgrade_star_rsp.prototype.other = $util.emptyArray; /** * equip_upgrade_star_rsp currency. * @member {game.Iid_num|null|undefined} currency * @memberof game.equip_upgrade_star_rsp * @instance */ equip_upgrade_star_rsp.prototype.currency = null; /** * Creates a new equip_upgrade_star_rsp instance using the specified properties. * @function create * @memberof game.equip_upgrade_star_rsp * @static * @param {game.Iequip_upgrade_star_rsp=} [properties] Properties to set * @returns {game.equip_upgrade_star_rsp} equip_upgrade_star_rsp instance */ equip_upgrade_star_rsp.create = function create(properties) { return new equip_upgrade_star_rsp(properties); }; /** * Encodes the specified equip_upgrade_star_rsp message. Does not implicitly {@link game.equip_upgrade_star_rsp.verify|verify} messages. * @function encode * @memberof game.equip_upgrade_star_rsp * @static * @param {game.Iequip_upgrade_star_rsp} message equip_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade_star_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.equip.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.same != null && message.same.length) for (let i = 0; i < message.same.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.same[i]); if (message.other != null && message.other.length) for (let i = 0; i < message.other.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.other[i]); if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) $root.game.id_num.encode(message.currency, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_upgrade_star_rsp message, length delimited. Does not implicitly {@link game.equip_upgrade_star_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_upgrade_star_rsp * @static * @param {game.Iequip_upgrade_star_rsp} message equip_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_upgrade_star_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_upgrade_star_rsp message from the specified reader or buffer. * @function decode * @memberof game.equip_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_upgrade_star_rsp} equip_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade_star_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_upgrade_star_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.equip.decode(reader, reader.uint32()); break; case 3: if (!(message.same && message.same.length)) message.same = []; message.same.push(reader.string()); break; case 4: if (!(message.other && message.other.length)) message.other = []; message.other.push(reader.string()); break; case 5: message.currency = $root.game.id_num.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_upgrade_star_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_upgrade_star_rsp} equip_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_upgrade_star_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_upgrade_star_rsp message. * @function verify * @memberof game.equip_upgrade_star_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_upgrade_star_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.equip.verify(message.data); if (error) return "data." + error; } if (message.same != null && message.hasOwnProperty("same")) { if (!Array.isArray(message.same)) return "same: array expected"; for (let i = 0; i < message.same.length; ++i) if (!$util.isString(message.same[i])) return "same: string[] expected"; } if (message.other != null && message.hasOwnProperty("other")) { if (!Array.isArray(message.other)) return "other: array expected"; for (let i = 0; i < message.other.length; ++i) if (!$util.isString(message.other[i])) return "other: string[] expected"; } if (message.currency != null && message.hasOwnProperty("currency")) { let error = $root.game.id_num.verify(message.currency); if (error) return "currency." + error; } return null; }; /** * Creates an equip_upgrade_star_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_upgrade_star_rsp * @static * @param {Object.} object Plain object * @returns {game.equip_upgrade_star_rsp} equip_upgrade_star_rsp */ equip_upgrade_star_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_upgrade_star_rsp) return object; let message = new $root.game.equip_upgrade_star_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.equip_upgrade_star_rsp.data: object expected"); message.data = $root.game.equip.fromObject(object.data); } if (object.same) { if (!Array.isArray(object.same)) throw TypeError(".game.equip_upgrade_star_rsp.same: array expected"); message.same = []; for (let i = 0; i < object.same.length; ++i) message.same[i] = String(object.same[i]); } if (object.other) { if (!Array.isArray(object.other)) throw TypeError(".game.equip_upgrade_star_rsp.other: array expected"); message.other = []; for (let i = 0; i < object.other.length; ++i) message.other[i] = String(object.other[i]); } if (object.currency != null) { if (typeof object.currency !== "object") throw TypeError(".game.equip_upgrade_star_rsp.currency: object expected"); message.currency = $root.game.id_num.fromObject(object.currency); } return message; }; /** * Creates a plain object from an equip_upgrade_star_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_upgrade_star_rsp * @static * @param {game.equip_upgrade_star_rsp} message equip_upgrade_star_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_upgrade_star_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.same = []; object.other = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; object.currency = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.equip.toObject(message.data, options); if (message.same && message.same.length) { object.same = []; for (let j = 0; j < message.same.length; ++j) object.same[j] = message.same[j]; } if (message.other && message.other.length) { object.other = []; for (let j = 0; j < message.other.length; ++j) object.other[j] = message.other[j]; } if (message.currency != null && message.hasOwnProperty("currency")) object.currency = $root.game.id_num.toObject(message.currency, options); return object; }; /** * Converts this equip_upgrade_star_rsp to JSON. * @function toJSON * @memberof game.equip_upgrade_star_rsp * @instance * @returns {Object.} JSON object */ equip_upgrade_star_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_upgrade_star_rsp; })(); game.equip_onekey_upgrade_star = (function() { /** * Properties of an equip_onekey_upgrade_star. * @memberof game * @interface Iequip_onekey_upgrade_star */ /** * Constructs a new equip_onekey_upgrade_star. * @memberof game * @classdesc Represents an equip_onekey_upgrade_star. * @implements Iequip_onekey_upgrade_star * @constructor * @param {game.Iequip_onekey_upgrade_star=} [properties] Properties to set */ function equip_onekey_upgrade_star(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new equip_onekey_upgrade_star instance using the specified properties. * @function create * @memberof game.equip_onekey_upgrade_star * @static * @param {game.Iequip_onekey_upgrade_star=} [properties] Properties to set * @returns {game.equip_onekey_upgrade_star} equip_onekey_upgrade_star instance */ equip_onekey_upgrade_star.create = function create(properties) { return new equip_onekey_upgrade_star(properties); }; /** * Encodes the specified equip_onekey_upgrade_star message. Does not implicitly {@link game.equip_onekey_upgrade_star.verify|verify} messages. * @function encode * @memberof game.equip_onekey_upgrade_star * @static * @param {game.Iequip_onekey_upgrade_star} message equip_onekey_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_onekey_upgrade_star.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified equip_onekey_upgrade_star message, length delimited. Does not implicitly {@link game.equip_onekey_upgrade_star.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_onekey_upgrade_star * @static * @param {game.Iequip_onekey_upgrade_star} message equip_onekey_upgrade_star message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_onekey_upgrade_star.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_onekey_upgrade_star message from the specified reader or buffer. * @function decode * @memberof game.equip_onekey_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_onekey_upgrade_star} equip_onekey_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_onekey_upgrade_star.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_onekey_upgrade_star(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_onekey_upgrade_star message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_onekey_upgrade_star * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_onekey_upgrade_star} equip_onekey_upgrade_star * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_onekey_upgrade_star.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_onekey_upgrade_star message. * @function verify * @memberof game.equip_onekey_upgrade_star * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_onekey_upgrade_star.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an equip_onekey_upgrade_star message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_onekey_upgrade_star * @static * @param {Object.} object Plain object * @returns {game.equip_onekey_upgrade_star} equip_onekey_upgrade_star */ equip_onekey_upgrade_star.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_onekey_upgrade_star) return object; return new $root.game.equip_onekey_upgrade_star(); }; /** * Creates a plain object from an equip_onekey_upgrade_star message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_onekey_upgrade_star * @static * @param {game.equip_onekey_upgrade_star} message equip_onekey_upgrade_star * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_onekey_upgrade_star.toObject = function toObject() { return {}; }; /** * Converts this equip_onekey_upgrade_star to JSON. * @function toJSON * @memberof game.equip_onekey_upgrade_star * @instance * @returns {Object.} JSON object */ equip_onekey_upgrade_star.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_onekey_upgrade_star; })(); game.equip_onekey_upgrade_star_rsp = (function() { /** * Properties of an equip_onekey_upgrade_star_rsp. * @memberof game * @interface Iequip_onekey_upgrade_star_rsp * @property {number|Long|null} [errno] equip_onekey_upgrade_star_rsp errno * @property {Array.|null} [delList] equip_onekey_upgrade_star_rsp delList * @property {Array.|null} [changeList] equip_onekey_upgrade_star_rsp changeList */ /** * Constructs a new equip_onekey_upgrade_star_rsp. * @memberof game * @classdesc Represents an equip_onekey_upgrade_star_rsp. * @implements Iequip_onekey_upgrade_star_rsp * @constructor * @param {game.Iequip_onekey_upgrade_star_rsp=} [properties] Properties to set */ function equip_onekey_upgrade_star_rsp(properties) { this.delList = []; this.changeList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_onekey_upgrade_star_rsp errno. * @member {number|Long} errno * @memberof game.equip_onekey_upgrade_star_rsp * @instance */ equip_onekey_upgrade_star_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip_onekey_upgrade_star_rsp delList. * @member {Array.} delList * @memberof game.equip_onekey_upgrade_star_rsp * @instance */ equip_onekey_upgrade_star_rsp.prototype.delList = $util.emptyArray; /** * equip_onekey_upgrade_star_rsp changeList. * @member {Array.} changeList * @memberof game.equip_onekey_upgrade_star_rsp * @instance */ equip_onekey_upgrade_star_rsp.prototype.changeList = $util.emptyArray; /** * Creates a new equip_onekey_upgrade_star_rsp instance using the specified properties. * @function create * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {game.Iequip_onekey_upgrade_star_rsp=} [properties] Properties to set * @returns {game.equip_onekey_upgrade_star_rsp} equip_onekey_upgrade_star_rsp instance */ equip_onekey_upgrade_star_rsp.create = function create(properties) { return new equip_onekey_upgrade_star_rsp(properties); }; /** * Encodes the specified equip_onekey_upgrade_star_rsp message. Does not implicitly {@link game.equip_onekey_upgrade_star_rsp.verify|verify} messages. * @function encode * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {game.Iequip_onekey_upgrade_star_rsp} message equip_onekey_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_onekey_upgrade_star_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.delList != null && message.delList.length) for (let i = 0; i < message.delList.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.delList[i]); if (message.changeList != null && message.changeList.length) for (let i = 0; i < message.changeList.length; ++i) $root.game.equip.encode(message.changeList[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_onekey_upgrade_star_rsp message, length delimited. Does not implicitly {@link game.equip_onekey_upgrade_star_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {game.Iequip_onekey_upgrade_star_rsp} message equip_onekey_upgrade_star_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_onekey_upgrade_star_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_onekey_upgrade_star_rsp message from the specified reader or buffer. * @function decode * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_onekey_upgrade_star_rsp} equip_onekey_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_onekey_upgrade_star_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_onekey_upgrade_star_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.delList && message.delList.length)) message.delList = []; message.delList.push(reader.string()); break; case 3: if (!(message.changeList && message.changeList.length)) message.changeList = []; message.changeList.push($root.game.equip.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_onekey_upgrade_star_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_onekey_upgrade_star_rsp} equip_onekey_upgrade_star_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_onekey_upgrade_star_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_onekey_upgrade_star_rsp message. * @function verify * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_onekey_upgrade_star_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.delList != null && message.hasOwnProperty("delList")) { if (!Array.isArray(message.delList)) return "delList: array expected"; for (let i = 0; i < message.delList.length; ++i) if (!$util.isString(message.delList[i])) return "delList: string[] expected"; } if (message.changeList != null && message.hasOwnProperty("changeList")) { if (!Array.isArray(message.changeList)) return "changeList: array expected"; for (let i = 0; i < message.changeList.length; ++i) { let error = $root.game.equip.verify(message.changeList[i]); if (error) return "changeList." + error; } } return null; }; /** * Creates an equip_onekey_upgrade_star_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {Object.} object Plain object * @returns {game.equip_onekey_upgrade_star_rsp} equip_onekey_upgrade_star_rsp */ equip_onekey_upgrade_star_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_onekey_upgrade_star_rsp) return object; let message = new $root.game.equip_onekey_upgrade_star_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.delList) { if (!Array.isArray(object.delList)) throw TypeError(".game.equip_onekey_upgrade_star_rsp.delList: array expected"); message.delList = []; for (let i = 0; i < object.delList.length; ++i) message.delList[i] = String(object.delList[i]); } if (object.changeList) { if (!Array.isArray(object.changeList)) throw TypeError(".game.equip_onekey_upgrade_star_rsp.changeList: array expected"); message.changeList = []; for (let i = 0; i < object.changeList.length; ++i) { if (typeof object.changeList[i] !== "object") throw TypeError(".game.equip_onekey_upgrade_star_rsp.changeList: object expected"); message.changeList[i] = $root.game.equip.fromObject(object.changeList[i]); } } return message; }; /** * Creates a plain object from an equip_onekey_upgrade_star_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_onekey_upgrade_star_rsp * @static * @param {game.equip_onekey_upgrade_star_rsp} message equip_onekey_upgrade_star_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_onekey_upgrade_star_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.delList = []; object.changeList = []; } if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.delList && message.delList.length) { object.delList = []; for (let j = 0; j < message.delList.length; ++j) object.delList[j] = message.delList[j]; } if (message.changeList && message.changeList.length) { object.changeList = []; for (let j = 0; j < message.changeList.length; ++j) object.changeList[j] = $root.game.equip.toObject(message.changeList[j], options); } return object; }; /** * Converts this equip_onekey_upgrade_star_rsp to JSON. * @function toJSON * @memberof game.equip_onekey_upgrade_star_rsp * @instance * @returns {Object.} JSON object */ equip_onekey_upgrade_star_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_onekey_upgrade_star_rsp; })(); game.equip_reset = (function() { /** * Properties of an equip_reset. * @memberof game * @interface Iequip_reset * @property {boolean|null} [level] equip_reset level * @property {string|null} [sid] equip_reset sid */ /** * Constructs a new equip_reset. * @memberof game * @classdesc Represents an equip_reset. * @implements Iequip_reset * @constructor * @param {game.Iequip_reset=} [properties] Properties to set */ function equip_reset(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_reset level. * @member {boolean} level * @memberof game.equip_reset * @instance */ equip_reset.prototype.level = false; /** * equip_reset sid. * @member {string} sid * @memberof game.equip_reset * @instance */ equip_reset.prototype.sid = ""; /** * Creates a new equip_reset instance using the specified properties. * @function create * @memberof game.equip_reset * @static * @param {game.Iequip_reset=} [properties] Properties to set * @returns {game.equip_reset} equip_reset instance */ equip_reset.create = function create(properties) { return new equip_reset(properties); }; /** * Encodes the specified equip_reset message. Does not implicitly {@link game.equip_reset.verify|verify} messages. * @function encode * @memberof game.equip_reset * @static * @param {game.Iequip_reset} message equip_reset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_reset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.level); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); return writer; }; /** * Encodes the specified equip_reset message, length delimited. Does not implicitly {@link game.equip_reset.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_reset * @static * @param {game.Iequip_reset} message equip_reset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_reset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_reset message from the specified reader or buffer. * @function decode * @memberof game.equip_reset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_reset} equip_reset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_reset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_reset(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.level = reader.bool(); break; case 2: message.sid = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_reset message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_reset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_reset} equip_reset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_reset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_reset message. * @function verify * @memberof game.equip_reset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_reset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level !== "boolean") return "level: boolean expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; return null; }; /** * Creates an equip_reset message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_reset * @static * @param {Object.} object Plain object * @returns {game.equip_reset} equip_reset */ equip_reset.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_reset) return object; let message = new $root.game.equip_reset(); if (object.level != null) message.level = Boolean(object.level); if (object.sid != null) message.sid = String(object.sid); return message; }; /** * Creates a plain object from an equip_reset message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_reset * @static * @param {game.equip_reset} message equip_reset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_reset.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.level = false; object.sid = ""; } if (message.level != null && message.hasOwnProperty("level")) object.level = message.level; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; return object; }; /** * Converts this equip_reset to JSON. * @function toJSON * @memberof game.equip_reset * @instance * @returns {Object.} JSON object */ equip_reset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_reset; })(); game.equip_reset_rsp = (function() { /** * Properties of an equip_reset_rsp. * @memberof game * @interface Iequip_reset_rsp * @property {number|Long|null} [errno] equip_reset_rsp errno * @property {game.Iequip|null} [data] equip_reset_rsp data */ /** * Constructs a new equip_reset_rsp. * @memberof game * @classdesc Represents an equip_reset_rsp. * @implements Iequip_reset_rsp * @constructor * @param {game.Iequip_reset_rsp=} [properties] Properties to set */ function equip_reset_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_reset_rsp errno. * @member {number|Long} errno * @memberof game.equip_reset_rsp * @instance */ equip_reset_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip_reset_rsp data. * @member {game.Iequip|null|undefined} data * @memberof game.equip_reset_rsp * @instance */ equip_reset_rsp.prototype.data = null; /** * Creates a new equip_reset_rsp instance using the specified properties. * @function create * @memberof game.equip_reset_rsp * @static * @param {game.Iequip_reset_rsp=} [properties] Properties to set * @returns {game.equip_reset_rsp} equip_reset_rsp instance */ equip_reset_rsp.create = function create(properties) { return new equip_reset_rsp(properties); }; /** * Encodes the specified equip_reset_rsp message. Does not implicitly {@link game.equip_reset_rsp.verify|verify} messages. * @function encode * @memberof game.equip_reset_rsp * @static * @param {game.Iequip_reset_rsp} message equip_reset_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_reset_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.equip.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_reset_rsp message, length delimited. Does not implicitly {@link game.equip_reset_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_reset_rsp * @static * @param {game.Iequip_reset_rsp} message equip_reset_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_reset_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_reset_rsp message from the specified reader or buffer. * @function decode * @memberof game.equip_reset_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_reset_rsp} equip_reset_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_reset_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_reset_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.equip.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_reset_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_reset_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_reset_rsp} equip_reset_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_reset_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_reset_rsp message. * @function verify * @memberof game.equip_reset_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_reset_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.equip.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates an equip_reset_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_reset_rsp * @static * @param {Object.} object Plain object * @returns {game.equip_reset_rsp} equip_reset_rsp */ equip_reset_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_reset_rsp) return object; let message = new $root.game.equip_reset_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.equip_reset_rsp.data: object expected"); message.data = $root.game.equip.fromObject(object.data); } return message; }; /** * Creates a plain object from an equip_reset_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_reset_rsp * @static * @param {game.equip_reset_rsp} message equip_reset_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_reset_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.equip.toObject(message.data, options); return object; }; /** * Converts this equip_reset_rsp to JSON. * @function toJSON * @memberof game.equip_reset_rsp * @instance * @returns {Object.} JSON object */ equip_reset_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_reset_rsp; })(); game.equip_change_nty = (function() { /** * Properties of an equip_change_nty. * @memberof game * @interface Iequip_change_nty * @property {Array.|null} [list] equip_change_nty list */ /** * Constructs a new equip_change_nty. * @memberof game * @classdesc Represents an equip_change_nty. * @implements Iequip_change_nty * @constructor * @param {game.Iequip_change_nty=} [properties] Properties to set */ function equip_change_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip_change_nty list. * @member {Array.} list * @memberof game.equip_change_nty * @instance */ equip_change_nty.prototype.list = $util.emptyArray; /** * Creates a new equip_change_nty instance using the specified properties. * @function create * @memberof game.equip_change_nty * @static * @param {game.Iequip_change_nty=} [properties] Properties to set * @returns {game.equip_change_nty} equip_change_nty instance */ equip_change_nty.create = function create(properties) { return new equip_change_nty(properties); }; /** * Encodes the specified equip_change_nty message. Does not implicitly {@link game.equip_change_nty.verify|verify} messages. * @function encode * @memberof game.equip_change_nty * @static * @param {game.Iequip_change_nty} message equip_change_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_change_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.equip.encode(message.list[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified equip_change_nty message, length delimited. Does not implicitly {@link game.equip_change_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.equip_change_nty * @static * @param {game.Iequip_change_nty} message equip_change_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip_change_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip_change_nty message from the specified reader or buffer. * @function decode * @memberof game.equip_change_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip_change_nty} equip_change_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_change_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip_change_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.equip.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip_change_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip_change_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip_change_nty} equip_change_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip_change_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip_change_nty message. * @function verify * @memberof game.equip_change_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip_change_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.equip.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an equip_change_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip_change_nty * @static * @param {Object.} object Plain object * @returns {game.equip_change_nty} equip_change_nty */ equip_change_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.equip_change_nty) return object; let message = new $root.game.equip_change_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.equip_change_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.equip_change_nty.list: object expected"); message.list[i] = $root.game.equip.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an equip_change_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.equip_change_nty * @static * @param {game.equip_change_nty} message equip_change_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip_change_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.equip.toObject(message.list[j], options); } return object; }; /** * Converts this equip_change_nty to JSON. * @function toJSON * @memberof game.equip_change_nty * @instance * @returns {Object.} JSON object */ equip_change_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip_change_nty; })(); game.talent_get_data = (function() { /** * Properties of a talent_get_data. * @memberof game * @interface Italent_get_data */ /** * Constructs a new talent_get_data. * @memberof game * @classdesc Represents a talent_get_data. * @implements Italent_get_data * @constructor * @param {game.Italent_get_data=} [properties] Properties to set */ function talent_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new talent_get_data instance using the specified properties. * @function create * @memberof game.talent_get_data * @static * @param {game.Italent_get_data=} [properties] Properties to set * @returns {game.talent_get_data} talent_get_data instance */ talent_get_data.create = function create(properties) { return new talent_get_data(properties); }; /** * Encodes the specified talent_get_data message. Does not implicitly {@link game.talent_get_data.verify|verify} messages. * @function encode * @memberof game.talent_get_data * @static * @param {game.Italent_get_data} message talent_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified talent_get_data message, length delimited. Does not implicitly {@link game.talent_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.talent_get_data * @static * @param {game.Italent_get_data} message talent_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a talent_get_data message from the specified reader or buffer. * @function decode * @memberof game.talent_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.talent_get_data} talent_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.talent_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a talent_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.talent_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.talent_get_data} talent_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a talent_get_data message. * @function verify * @memberof game.talent_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ talent_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a talent_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.talent_get_data * @static * @param {Object.} object Plain object * @returns {game.talent_get_data} talent_get_data */ talent_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.talent_get_data) return object; return new $root.game.talent_get_data(); }; /** * Creates a plain object from a talent_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.talent_get_data * @static * @param {game.talent_get_data} message talent_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ talent_get_data.toObject = function toObject() { return {}; }; /** * Converts this talent_get_data to JSON. * @function toJSON * @memberof game.talent_get_data * @instance * @returns {Object.} JSON object */ talent_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return talent_get_data; })(); game.talent_get_data_rsp = (function() { /** * Properties of a talent_get_data_rsp. * @memberof game * @interface Italent_get_data_rsp * @property {number|Long|null} [errno] talent_get_data_rsp errno * @property {number|Long|null} [id1] talent_get_data_rsp id1 * @property {number|Long|null} [id2] talent_get_data_rsp id2 */ /** * Constructs a new talent_get_data_rsp. * @memberof game * @classdesc Represents a talent_get_data_rsp. * @implements Italent_get_data_rsp * @constructor * @param {game.Italent_get_data_rsp=} [properties] Properties to set */ function talent_get_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * talent_get_data_rsp errno. * @member {number|Long} errno * @memberof game.talent_get_data_rsp * @instance */ talent_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * talent_get_data_rsp id1. * @member {number|Long} id1 * @memberof game.talent_get_data_rsp * @instance */ talent_get_data_rsp.prototype.id1 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * talent_get_data_rsp id2. * @member {number|Long} id2 * @memberof game.talent_get_data_rsp * @instance */ talent_get_data_rsp.prototype.id2 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new talent_get_data_rsp instance using the specified properties. * @function create * @memberof game.talent_get_data_rsp * @static * @param {game.Italent_get_data_rsp=} [properties] Properties to set * @returns {game.talent_get_data_rsp} talent_get_data_rsp instance */ talent_get_data_rsp.create = function create(properties) { return new talent_get_data_rsp(properties); }; /** * Encodes the specified talent_get_data_rsp message. Does not implicitly {@link game.talent_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.talent_get_data_rsp * @static * @param {game.Italent_get_data_rsp} message talent_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id1); if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.id2); return writer; }; /** * Encodes the specified talent_get_data_rsp message, length delimited. Does not implicitly {@link game.talent_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.talent_get_data_rsp * @static * @param {game.Italent_get_data_rsp} message talent_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a talent_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.talent_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.talent_get_data_rsp} talent_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.talent_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id1 = reader.int64(); break; case 3: message.id2 = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a talent_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.talent_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.talent_get_data_rsp} talent_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a talent_get_data_rsp message. * @function verify * @memberof game.talent_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ talent_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.id1 != null && message.hasOwnProperty("id1")) if (!$util.isInteger(message.id1) && !(message.id1 && $util.isInteger(message.id1.low) && $util.isInteger(message.id1.high))) return "id1: integer|Long expected"; if (message.id2 != null && message.hasOwnProperty("id2")) if (!$util.isInteger(message.id2) && !(message.id2 && $util.isInteger(message.id2.low) && $util.isInteger(message.id2.high))) return "id2: integer|Long expected"; return null; }; /** * Creates a talent_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.talent_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.talent_get_data_rsp} talent_get_data_rsp */ talent_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.talent_get_data_rsp) return object; let message = new $root.game.talent_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.id1 != null) if ($util.Long) (message.id1 = $util.Long.fromValue(object.id1)).unsigned = false; else if (typeof object.id1 === "string") message.id1 = parseInt(object.id1, 10); else if (typeof object.id1 === "number") message.id1 = object.id1; else if (typeof object.id1 === "object") message.id1 = new $util.LongBits(object.id1.low >>> 0, object.id1.high >>> 0).toNumber(); if (object.id2 != null) if ($util.Long) (message.id2 = $util.Long.fromValue(object.id2)).unsigned = false; else if (typeof object.id2 === "string") message.id2 = parseInt(object.id2, 10); else if (typeof object.id2 === "number") message.id2 = object.id2; else if (typeof object.id2 === "object") message.id2 = new $util.LongBits(object.id2.low >>> 0, object.id2.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a talent_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.talent_get_data_rsp * @static * @param {game.talent_get_data_rsp} message talent_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ talent_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.id1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.id1 = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.id2 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.id2 = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.id1 != null && message.hasOwnProperty("id1")) if (typeof message.id1 === "number") object.id1 = options.longs === String ? String(message.id1) : message.id1; else object.id1 = options.longs === String ? $util.Long.prototype.toString.call(message.id1) : options.longs === Number ? new $util.LongBits(message.id1.low >>> 0, message.id1.high >>> 0).toNumber() : message.id1; if (message.id2 != null && message.hasOwnProperty("id2")) if (typeof message.id2 === "number") object.id2 = options.longs === String ? String(message.id2) : message.id2; else object.id2 = options.longs === String ? $util.Long.prototype.toString.call(message.id2) : options.longs === Number ? new $util.LongBits(message.id2.low >>> 0, message.id2.high >>> 0).toNumber() : message.id2; return object; }; /** * Converts this talent_get_data_rsp to JSON. * @function toJSON * @memberof game.talent_get_data_rsp * @instance * @returns {Object.} JSON object */ talent_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return talent_get_data_rsp; })(); game.talent_activate = (function() { /** * Properties of a talent_activate. * @memberof game * @interface Italent_activate * @property {number|Long|null} [id] talent_activate id */ /** * Constructs a new talent_activate. * @memberof game * @classdesc Represents a talent_activate. * @implements Italent_activate * @constructor * @param {game.Italent_activate=} [properties] Properties to set */ function talent_activate(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * talent_activate id. * @member {number|Long} id * @memberof game.talent_activate * @instance */ talent_activate.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new talent_activate instance using the specified properties. * @function create * @memberof game.talent_activate * @static * @param {game.Italent_activate=} [properties] Properties to set * @returns {game.talent_activate} talent_activate instance */ talent_activate.create = function create(properties) { return new talent_activate(properties); }; /** * Encodes the specified talent_activate message. Does not implicitly {@link game.talent_activate.verify|verify} messages. * @function encode * @memberof game.talent_activate * @static * @param {game.Italent_activate} message talent_activate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_activate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified talent_activate message, length delimited. Does not implicitly {@link game.talent_activate.verify|verify} messages. * @function encodeDelimited * @memberof game.talent_activate * @static * @param {game.Italent_activate} message talent_activate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_activate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a talent_activate message from the specified reader or buffer. * @function decode * @memberof game.talent_activate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.talent_activate} talent_activate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_activate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.talent_activate(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a talent_activate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.talent_activate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.talent_activate} talent_activate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_activate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a talent_activate message. * @function verify * @memberof game.talent_activate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ talent_activate.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"; return null; }; /** * Creates a talent_activate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.talent_activate * @static * @param {Object.} object Plain object * @returns {game.talent_activate} talent_activate */ talent_activate.fromObject = function fromObject(object) { if (object instanceof $root.game.talent_activate) return object; let message = new $root.game.talent_activate(); 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(); return message; }; /** * Creates a plain object from a talent_activate message. Also converts values to other types if specified. * @function toObject * @memberof game.talent_activate * @static * @param {game.talent_activate} message talent_activate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ talent_activate.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this talent_activate to JSON. * @function toJSON * @memberof game.talent_activate * @instance * @returns {Object.} JSON object */ talent_activate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return talent_activate; })(); game.talent_activate_rsp = (function() { /** * Properties of a talent_activate_rsp. * @memberof game * @interface Italent_activate_rsp * @property {number|Long|null} [errno] talent_activate_rsp errno * @property {number|Long|null} [id] talent_activate_rsp id */ /** * Constructs a new talent_activate_rsp. * @memberof game * @classdesc Represents a talent_activate_rsp. * @implements Italent_activate_rsp * @constructor * @param {game.Italent_activate_rsp=} [properties] Properties to set */ function talent_activate_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * talent_activate_rsp errno. * @member {number|Long} errno * @memberof game.talent_activate_rsp * @instance */ talent_activate_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * talent_activate_rsp id. * @member {number|Long} id * @memberof game.talent_activate_rsp * @instance */ talent_activate_rsp.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new talent_activate_rsp instance using the specified properties. * @function create * @memberof game.talent_activate_rsp * @static * @param {game.Italent_activate_rsp=} [properties] Properties to set * @returns {game.talent_activate_rsp} talent_activate_rsp instance */ talent_activate_rsp.create = function create(properties) { return new talent_activate_rsp(properties); }; /** * Encodes the specified talent_activate_rsp message. Does not implicitly {@link game.talent_activate_rsp.verify|verify} messages. * @function encode * @memberof game.talent_activate_rsp * @static * @param {game.Italent_activate_rsp} message talent_activate_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_activate_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); return writer; }; /** * Encodes the specified talent_activate_rsp message, length delimited. Does not implicitly {@link game.talent_activate_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.talent_activate_rsp * @static * @param {game.Italent_activate_rsp} message talent_activate_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ talent_activate_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a talent_activate_rsp message from the specified reader or buffer. * @function decode * @memberof game.talent_activate_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.talent_activate_rsp} talent_activate_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_activate_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.talent_activate_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a talent_activate_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.talent_activate_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.talent_activate_rsp} talent_activate_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ talent_activate_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a talent_activate_rsp message. * @function verify * @memberof game.talent_activate_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ talent_activate_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long 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"; return null; }; /** * Creates a talent_activate_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.talent_activate_rsp * @static * @param {Object.} object Plain object * @returns {game.talent_activate_rsp} talent_activate_rsp */ talent_activate_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.talent_activate_rsp) return object; let message = new $root.game.talent_activate_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); 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(); return message; }; /** * Creates a plain object from a talent_activate_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.talent_activate_rsp * @static * @param {game.talent_activate_rsp} message talent_activate_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ talent_activate_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let 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; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; 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; return object; }; /** * Converts this talent_activate_rsp to JSON. * @function toJSON * @memberof game.talent_activate_rsp * @instance * @returns {Object.} JSON object */ talent_activate_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return talent_activate_rsp; })(); game.sign_in_get_data = (function() { /** * Properties of a sign_in_get_data. * @memberof game * @interface Isign_in_get_data */ /** * Constructs a new sign_in_get_data. * @memberof game * @classdesc Represents a sign_in_get_data. * @implements Isign_in_get_data * @constructor * @param {game.Isign_in_get_data=} [properties] Properties to set */ function sign_in_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new sign_in_get_data instance using the specified properties. * @function create * @memberof game.sign_in_get_data * @static * @param {game.Isign_in_get_data=} [properties] Properties to set * @returns {game.sign_in_get_data} sign_in_get_data instance */ sign_in_get_data.create = function create(properties) { return new sign_in_get_data(properties); }; /** * Encodes the specified sign_in_get_data message. Does not implicitly {@link game.sign_in_get_data.verify|verify} messages. * @function encode * @memberof game.sign_in_get_data * @static * @param {game.Isign_in_get_data} message sign_in_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified sign_in_get_data message, length delimited. Does not implicitly {@link game.sign_in_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.sign_in_get_data * @static * @param {game.Isign_in_get_data} message sign_in_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a sign_in_get_data message from the specified reader or buffer. * @function decode * @memberof game.sign_in_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.sign_in_get_data} sign_in_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.sign_in_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a sign_in_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.sign_in_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.sign_in_get_data} sign_in_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a sign_in_get_data message. * @function verify * @memberof game.sign_in_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ sign_in_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a sign_in_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.sign_in_get_data * @static * @param {Object.} object Plain object * @returns {game.sign_in_get_data} sign_in_get_data */ sign_in_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.sign_in_get_data) return object; return new $root.game.sign_in_get_data(); }; /** * Creates a plain object from a sign_in_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.sign_in_get_data * @static * @param {game.sign_in_get_data} message sign_in_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ sign_in_get_data.toObject = function toObject() { return {}; }; /** * Converts this sign_in_get_data to JSON. * @function toJSON * @memberof game.sign_in_get_data * @instance * @returns {Object.} JSON object */ sign_in_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return sign_in_get_data; })(); game.sign_in_get_data_rsp = (function() { /** * Properties of a sign_in_get_data_rsp. * @memberof game * @interface Isign_in_get_data_rsp * @property {number|Long|null} [errno] sign_in_get_data_rsp errno */ /** * Constructs a new sign_in_get_data_rsp. * @memberof game * @classdesc Represents a sign_in_get_data_rsp. * @implements Isign_in_get_data_rsp * @constructor * @param {game.Isign_in_get_data_rsp=} [properties] Properties to set */ function sign_in_get_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * sign_in_get_data_rsp errno. * @member {number|Long} errno * @memberof game.sign_in_get_data_rsp * @instance */ sign_in_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new sign_in_get_data_rsp instance using the specified properties. * @function create * @memberof game.sign_in_get_data_rsp * @static * @param {game.Isign_in_get_data_rsp=} [properties] Properties to set * @returns {game.sign_in_get_data_rsp} sign_in_get_data_rsp instance */ sign_in_get_data_rsp.create = function create(properties) { return new sign_in_get_data_rsp(properties); }; /** * Encodes the specified sign_in_get_data_rsp message. Does not implicitly {@link game.sign_in_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.sign_in_get_data_rsp * @static * @param {game.Isign_in_get_data_rsp} message sign_in_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified sign_in_get_data_rsp message, length delimited. Does not implicitly {@link game.sign_in_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.sign_in_get_data_rsp * @static * @param {game.Isign_in_get_data_rsp} message sign_in_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a sign_in_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.sign_in_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.sign_in_get_data_rsp} sign_in_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.sign_in_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a sign_in_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.sign_in_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.sign_in_get_data_rsp} sign_in_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a sign_in_get_data_rsp message. * @function verify * @memberof game.sign_in_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ sign_in_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a sign_in_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.sign_in_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.sign_in_get_data_rsp} sign_in_get_data_rsp */ sign_in_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.sign_in_get_data_rsp) return object; let message = new $root.game.sign_in_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a sign_in_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.sign_in_get_data_rsp * @static * @param {game.sign_in_get_data_rsp} message sign_in_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ sign_in_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this sign_in_get_data_rsp to JSON. * @function toJSON * @memberof game.sign_in_get_data_rsp * @instance * @returns {Object.} JSON object */ sign_in_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return sign_in_get_data_rsp; })(); game.sign_in_award = (function() { /** * Properties of a sign_in_award. * @memberof game * @interface Isign_in_award * @property {number|Long|null} [day] sign_in_award day */ /** * Constructs a new sign_in_award. * @memberof game * @classdesc Represents a sign_in_award. * @implements Isign_in_award * @constructor * @param {game.Isign_in_award=} [properties] Properties to set */ function sign_in_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * sign_in_award day. * @member {number|Long} day * @memberof game.sign_in_award * @instance */ sign_in_award.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new sign_in_award instance using the specified properties. * @function create * @memberof game.sign_in_award * @static * @param {game.Isign_in_award=} [properties] Properties to set * @returns {game.sign_in_award} sign_in_award instance */ sign_in_award.create = function create(properties) { return new sign_in_award(properties); }; /** * Encodes the specified sign_in_award message. Does not implicitly {@link game.sign_in_award.verify|verify} messages. * @function encode * @memberof game.sign_in_award * @static * @param {game.Isign_in_award} message sign_in_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.day); return writer; }; /** * Encodes the specified sign_in_award message, length delimited. Does not implicitly {@link game.sign_in_award.verify|verify} messages. * @function encodeDelimited * @memberof game.sign_in_award * @static * @param {game.Isign_in_award} message sign_in_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a sign_in_award message from the specified reader or buffer. * @function decode * @memberof game.sign_in_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.sign_in_award} sign_in_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.sign_in_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.day = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a sign_in_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.sign_in_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.sign_in_award} sign_in_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a sign_in_award message. * @function verify * @memberof game.sign_in_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ sign_in_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; return null; }; /** * Creates a sign_in_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.sign_in_award * @static * @param {Object.} object Plain object * @returns {game.sign_in_award} sign_in_award */ sign_in_award.fromObject = function fromObject(object) { if (object instanceof $root.game.sign_in_award) return object; let message = new $root.game.sign_in_award(); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a sign_in_award message. Also converts values to other types if specified. * @function toObject * @memberof game.sign_in_award * @static * @param {game.sign_in_award} message sign_in_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ sign_in_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; return object; }; /** * Converts this sign_in_award to JSON. * @function toJSON * @memberof game.sign_in_award * @instance * @returns {Object.} JSON object */ sign_in_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return sign_in_award; })(); game.sign_in_award_rsp = (function() { /** * Properties of a sign_in_award_rsp. * @memberof game * @interface Isign_in_award_rsp * @property {number|Long|null} [errno] sign_in_award_rsp errno * @property {number|Long|null} [day] sign_in_award_rsp day * @property {number|Long|null} [award] sign_in_award_rsp award */ /** * Constructs a new sign_in_award_rsp. * @memberof game * @classdesc Represents a sign_in_award_rsp. * @implements Isign_in_award_rsp * @constructor * @param {game.Isign_in_award_rsp=} [properties] Properties to set */ function sign_in_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * sign_in_award_rsp errno. * @member {number|Long} errno * @memberof game.sign_in_award_rsp * @instance */ sign_in_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * sign_in_award_rsp day. * @member {number|Long} day * @memberof game.sign_in_award_rsp * @instance */ sign_in_award_rsp.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * sign_in_award_rsp award. * @member {number|Long} award * @memberof game.sign_in_award_rsp * @instance */ sign_in_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new sign_in_award_rsp instance using the specified properties. * @function create * @memberof game.sign_in_award_rsp * @static * @param {game.Isign_in_award_rsp=} [properties] Properties to set * @returns {game.sign_in_award_rsp} sign_in_award_rsp instance */ sign_in_award_rsp.create = function create(properties) { return new sign_in_award_rsp(properties); }; /** * Encodes the specified sign_in_award_rsp message. Does not implicitly {@link game.sign_in_award_rsp.verify|verify} messages. * @function encode * @memberof game.sign_in_award_rsp * @static * @param {game.Isign_in_award_rsp} message sign_in_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.day); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); return writer; }; /** * Encodes the specified sign_in_award_rsp message, length delimited. Does not implicitly {@link game.sign_in_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.sign_in_award_rsp * @static * @param {game.Isign_in_award_rsp} message sign_in_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a sign_in_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.sign_in_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.sign_in_award_rsp} sign_in_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.sign_in_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.day = reader.int64(); break; case 3: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a sign_in_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.sign_in_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.sign_in_award_rsp} sign_in_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a sign_in_award_rsp message. * @function verify * @memberof game.sign_in_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ sign_in_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a sign_in_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.sign_in_award_rsp * @static * @param {Object.} object Plain object * @returns {game.sign_in_award_rsp} sign_in_award_rsp */ sign_in_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.sign_in_award_rsp) return object; let message = new $root.game.sign_in_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a sign_in_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.sign_in_award_rsp * @static * @param {game.sign_in_award_rsp} message sign_in_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ sign_in_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this sign_in_award_rsp to JSON. * @function toJSON * @memberof game.sign_in_award_rsp * @instance * @returns {Object.} JSON object */ sign_in_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return sign_in_award_rsp; })(); game.sign_in_nty = (function() { /** * Properties of a sign_in_nty. * @memberof game * @interface Isign_in_nty * @property {boolean|null} [open] sign_in_nty open * @property {number|Long|null} [day] sign_in_nty day * @property {number|Long|null} [award] sign_in_nty award * @property {number|Long|null} [round] sign_in_nty round */ /** * Constructs a new sign_in_nty. * @memberof game * @classdesc Represents a sign_in_nty. * @implements Isign_in_nty * @constructor * @param {game.Isign_in_nty=} [properties] Properties to set */ function sign_in_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * sign_in_nty open. * @member {boolean} open * @memberof game.sign_in_nty * @instance */ sign_in_nty.prototype.open = false; /** * sign_in_nty day. * @member {number|Long} day * @memberof game.sign_in_nty * @instance */ sign_in_nty.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * sign_in_nty award. * @member {number|Long} award * @memberof game.sign_in_nty * @instance */ sign_in_nty.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * sign_in_nty round. * @member {number|Long} round * @memberof game.sign_in_nty * @instance */ sign_in_nty.prototype.round = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new sign_in_nty instance using the specified properties. * @function create * @memberof game.sign_in_nty * @static * @param {game.Isign_in_nty=} [properties] Properties to set * @returns {game.sign_in_nty} sign_in_nty instance */ sign_in_nty.create = function create(properties) { return new sign_in_nty(properties); }; /** * Encodes the specified sign_in_nty message. Does not implicitly {@link game.sign_in_nty.verify|verify} messages. * @function encode * @memberof game.sign_in_nty * @static * @param {game.Isign_in_nty} message sign_in_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.open != null && Object.hasOwnProperty.call(message, "open")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.open); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.day); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); if (message.round != null && Object.hasOwnProperty.call(message, "round")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.round); return writer; }; /** * Encodes the specified sign_in_nty message, length delimited. Does not implicitly {@link game.sign_in_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.sign_in_nty * @static * @param {game.Isign_in_nty} message sign_in_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sign_in_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a sign_in_nty message from the specified reader or buffer. * @function decode * @memberof game.sign_in_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.sign_in_nty} sign_in_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.sign_in_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.open = reader.bool(); break; case 2: message.day = reader.int64(); break; case 3: message.award = reader.int64(); break; case 4: message.round = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a sign_in_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.sign_in_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.sign_in_nty} sign_in_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sign_in_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a sign_in_nty message. * @function verify * @memberof game.sign_in_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ sign_in_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.open != null && message.hasOwnProperty("open")) if (typeof message.open !== "boolean") return "open: boolean expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; if (message.round != null && message.hasOwnProperty("round")) if (!$util.isInteger(message.round) && !(message.round && $util.isInteger(message.round.low) && $util.isInteger(message.round.high))) return "round: integer|Long expected"; return null; }; /** * Creates a sign_in_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.sign_in_nty * @static * @param {Object.} object Plain object * @returns {game.sign_in_nty} sign_in_nty */ sign_in_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.sign_in_nty) return object; let message = new $root.game.sign_in_nty(); if (object.open != null) message.open = Boolean(object.open); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); if (object.round != null) if ($util.Long) (message.round = $util.Long.fromValue(object.round)).unsigned = false; else if (typeof object.round === "string") message.round = parseInt(object.round, 10); else if (typeof object.round === "number") message.round = object.round; else if (typeof object.round === "object") message.round = new $util.LongBits(object.round.low >>> 0, object.round.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a sign_in_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.sign_in_nty * @static * @param {game.sign_in_nty} message sign_in_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ sign_in_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.open = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.round = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.round = options.longs === String ? "0" : 0; } if (message.open != null && message.hasOwnProperty("open")) object.open = message.open; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; if (message.round != null && message.hasOwnProperty("round")) if (typeof message.round === "number") object.round = options.longs === String ? String(message.round) : message.round; else object.round = options.longs === String ? $util.Long.prototype.toString.call(message.round) : options.longs === Number ? new $util.LongBits(message.round.low >>> 0, message.round.high >>> 0).toNumber() : message.round; return object; }; /** * Converts this sign_in_nty to JSON. * @function toJSON * @memberof game.sign_in_nty * @instance * @returns {Object.} JSON object */ sign_in_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return sign_in_nty; })(); game.quest_get_data = (function() { /** * Properties of a quest_get_data. * @memberof game * @interface Iquest_get_data */ /** * Constructs a new quest_get_data. * @memberof game * @classdesc Represents a quest_get_data. * @implements Iquest_get_data * @constructor * @param {game.Iquest_get_data=} [properties] Properties to set */ function quest_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new quest_get_data instance using the specified properties. * @function create * @memberof game.quest_get_data * @static * @param {game.Iquest_get_data=} [properties] Properties to set * @returns {game.quest_get_data} quest_get_data instance */ quest_get_data.create = function create(properties) { return new quest_get_data(properties); }; /** * Encodes the specified quest_get_data message. Does not implicitly {@link game.quest_get_data.verify|verify} messages. * @function encode * @memberof game.quest_get_data * @static * @param {game.Iquest_get_data} message quest_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified quest_get_data message, length delimited. Does not implicitly {@link game.quest_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_get_data * @static * @param {game.Iquest_get_data} message quest_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_get_data message from the specified reader or buffer. * @function decode * @memberof game.quest_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_get_data} quest_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_get_data} quest_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_get_data message. * @function verify * @memberof game.quest_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a quest_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_get_data * @static * @param {Object.} object Plain object * @returns {game.quest_get_data} quest_get_data */ quest_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_get_data) return object; return new $root.game.quest_get_data(); }; /** * Creates a plain object from a quest_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_get_data * @static * @param {game.quest_get_data} message quest_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_get_data.toObject = function toObject() { return {}; }; /** * Converts this quest_get_data to JSON. * @function toJSON * @memberof game.quest_get_data * @instance * @returns {Object.} JSON object */ quest_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_get_data; })(); game.quest_get_data_rsp = (function() { /** * Properties of a quest_get_data_rsp. * @memberof game * @interface Iquest_get_data_rsp * @property {number|Long|null} [errno] quest_get_data_rsp errno * @property {number|Long|null} [dlv] quest_get_data_rsp dlv * @property {number|Long|null} [wlv] quest_get_data_rsp wlv * @property {number|Long|null} [daward] quest_get_data_rsp daward * @property {number|Long|null} [waward] quest_get_data_rsp waward * @property {Array.|null} [daily] quest_get_data_rsp daily * @property {Array.|null} [weekly] quest_get_data_rsp weekly * @property {Array.|null} [achievement] quest_get_data_rsp achievement * @property {game.Iquest|null} [mainQuest] quest_get_data_rsp mainQuest */ /** * Constructs a new quest_get_data_rsp. * @memberof game * @classdesc Represents a quest_get_data_rsp. * @implements Iquest_get_data_rsp * @constructor * @param {game.Iquest_get_data_rsp=} [properties] Properties to set */ function quest_get_data_rsp(properties) { this.daily = []; this.weekly = []; this.achievement = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest_get_data_rsp errno. * @member {number|Long} errno * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_data_rsp dlv. * @member {number|Long} dlv * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.dlv = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_data_rsp wlv. * @member {number|Long} wlv * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.wlv = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_data_rsp daward. * @member {number|Long} daward * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.daward = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_data_rsp waward. * @member {number|Long} waward * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.waward = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_data_rsp daily. * @member {Array.} daily * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.daily = $util.emptyArray; /** * quest_get_data_rsp weekly. * @member {Array.} weekly * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.weekly = $util.emptyArray; /** * quest_get_data_rsp achievement. * @member {Array.} achievement * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.achievement = $util.emptyArray; /** * quest_get_data_rsp mainQuest. * @member {game.Iquest|null|undefined} mainQuest * @memberof game.quest_get_data_rsp * @instance */ quest_get_data_rsp.prototype.mainQuest = null; /** * Creates a new quest_get_data_rsp instance using the specified properties. * @function create * @memberof game.quest_get_data_rsp * @static * @param {game.Iquest_get_data_rsp=} [properties] Properties to set * @returns {game.quest_get_data_rsp} quest_get_data_rsp instance */ quest_get_data_rsp.create = function create(properties) { return new quest_get_data_rsp(properties); }; /** * Encodes the specified quest_get_data_rsp message. Does not implicitly {@link game.quest_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.quest_get_data_rsp * @static * @param {game.Iquest_get_data_rsp} message quest_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.dlv != null && Object.hasOwnProperty.call(message, "dlv")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dlv); if (message.wlv != null && Object.hasOwnProperty.call(message, "wlv")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.wlv); if (message.daward != null && Object.hasOwnProperty.call(message, "daward")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.daward); if (message.waward != null && Object.hasOwnProperty.call(message, "waward")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.waward); if (message.daily != null && message.daily.length) for (let i = 0; i < message.daily.length; ++i) $root.game.quest.encode(message.daily[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.weekly != null && message.weekly.length) for (let i = 0; i < message.weekly.length; ++i) $root.game.quest.encode(message.weekly[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.achievement != null && message.achievement.length) for (let i = 0; i < message.achievement.length; ++i) $root.game.quest.encode(message.achievement[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.mainQuest != null && Object.hasOwnProperty.call(message, "mainQuest")) $root.game.quest.encode(message.mainQuest, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** * Encodes the specified quest_get_data_rsp message, length delimited. Does not implicitly {@link game.quest_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_get_data_rsp * @static * @param {game.Iquest_get_data_rsp} message quest_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.quest_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_get_data_rsp} quest_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.dlv = reader.int64(); break; case 3: message.wlv = reader.int64(); break; case 4: message.daward = reader.int64(); break; case 6: message.waward = reader.int64(); break; case 7: if (!(message.daily && message.daily.length)) message.daily = []; message.daily.push($root.game.quest.decode(reader, reader.uint32())); break; case 8: if (!(message.weekly && message.weekly.length)) message.weekly = []; message.weekly.push($root.game.quest.decode(reader, reader.uint32())); break; case 9: if (!(message.achievement && message.achievement.length)) message.achievement = []; message.achievement.push($root.game.quest.decode(reader, reader.uint32())); break; case 10: message.mainQuest = $root.game.quest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_get_data_rsp} quest_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_get_data_rsp message. * @function verify * @memberof game.quest_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.dlv != null && message.hasOwnProperty("dlv")) if (!$util.isInteger(message.dlv) && !(message.dlv && $util.isInteger(message.dlv.low) && $util.isInteger(message.dlv.high))) return "dlv: integer|Long expected"; if (message.wlv != null && message.hasOwnProperty("wlv")) if (!$util.isInteger(message.wlv) && !(message.wlv && $util.isInteger(message.wlv.low) && $util.isInteger(message.wlv.high))) return "wlv: integer|Long expected"; if (message.daward != null && message.hasOwnProperty("daward")) if (!$util.isInteger(message.daward) && !(message.daward && $util.isInteger(message.daward.low) && $util.isInteger(message.daward.high))) return "daward: integer|Long expected"; if (message.waward != null && message.hasOwnProperty("waward")) if (!$util.isInteger(message.waward) && !(message.waward && $util.isInteger(message.waward.low) && $util.isInteger(message.waward.high))) return "waward: integer|Long expected"; if (message.daily != null && message.hasOwnProperty("daily")) { if (!Array.isArray(message.daily)) return "daily: array expected"; for (let i = 0; i < message.daily.length; ++i) { let error = $root.game.quest.verify(message.daily[i]); if (error) return "daily." + error; } } if (message.weekly != null && message.hasOwnProperty("weekly")) { if (!Array.isArray(message.weekly)) return "weekly: array expected"; for (let i = 0; i < message.weekly.length; ++i) { let error = $root.game.quest.verify(message.weekly[i]); if (error) return "weekly." + error; } } if (message.achievement != null && message.hasOwnProperty("achievement")) { if (!Array.isArray(message.achievement)) return "achievement: array expected"; for (let i = 0; i < message.achievement.length; ++i) { let error = $root.game.quest.verify(message.achievement[i]); if (error) return "achievement." + error; } } if (message.mainQuest != null && message.hasOwnProperty("mainQuest")) { let error = $root.game.quest.verify(message.mainQuest); if (error) return "mainQuest." + error; } return null; }; /** * Creates a quest_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.quest_get_data_rsp} quest_get_data_rsp */ quest_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_get_data_rsp) return object; let message = new $root.game.quest_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.dlv != null) if ($util.Long) (message.dlv = $util.Long.fromValue(object.dlv)).unsigned = false; else if (typeof object.dlv === "string") message.dlv = parseInt(object.dlv, 10); else if (typeof object.dlv === "number") message.dlv = object.dlv; else if (typeof object.dlv === "object") message.dlv = new $util.LongBits(object.dlv.low >>> 0, object.dlv.high >>> 0).toNumber(); if (object.wlv != null) if ($util.Long) (message.wlv = $util.Long.fromValue(object.wlv)).unsigned = false; else if (typeof object.wlv === "string") message.wlv = parseInt(object.wlv, 10); else if (typeof object.wlv === "number") message.wlv = object.wlv; else if (typeof object.wlv === "object") message.wlv = new $util.LongBits(object.wlv.low >>> 0, object.wlv.high >>> 0).toNumber(); if (object.daward != null) if ($util.Long) (message.daward = $util.Long.fromValue(object.daward)).unsigned = false; else if (typeof object.daward === "string") message.daward = parseInt(object.daward, 10); else if (typeof object.daward === "number") message.daward = object.daward; else if (typeof object.daward === "object") message.daward = new $util.LongBits(object.daward.low >>> 0, object.daward.high >>> 0).toNumber(); if (object.waward != null) if ($util.Long) (message.waward = $util.Long.fromValue(object.waward)).unsigned = false; else if (typeof object.waward === "string") message.waward = parseInt(object.waward, 10); else if (typeof object.waward === "number") message.waward = object.waward; else if (typeof object.waward === "object") message.waward = new $util.LongBits(object.waward.low >>> 0, object.waward.high >>> 0).toNumber(); if (object.daily) { if (!Array.isArray(object.daily)) throw TypeError(".game.quest_get_data_rsp.daily: array expected"); message.daily = []; for (let i = 0; i < object.daily.length; ++i) { if (typeof object.daily[i] !== "object") throw TypeError(".game.quest_get_data_rsp.daily: object expected"); message.daily[i] = $root.game.quest.fromObject(object.daily[i]); } } if (object.weekly) { if (!Array.isArray(object.weekly)) throw TypeError(".game.quest_get_data_rsp.weekly: array expected"); message.weekly = []; for (let i = 0; i < object.weekly.length; ++i) { if (typeof object.weekly[i] !== "object") throw TypeError(".game.quest_get_data_rsp.weekly: object expected"); message.weekly[i] = $root.game.quest.fromObject(object.weekly[i]); } } if (object.achievement) { if (!Array.isArray(object.achievement)) throw TypeError(".game.quest_get_data_rsp.achievement: array expected"); message.achievement = []; for (let i = 0; i < object.achievement.length; ++i) { if (typeof object.achievement[i] !== "object") throw TypeError(".game.quest_get_data_rsp.achievement: object expected"); message.achievement[i] = $root.game.quest.fromObject(object.achievement[i]); } } if (object.mainQuest != null) { if (typeof object.mainQuest !== "object") throw TypeError(".game.quest_get_data_rsp.mainQuest: object expected"); message.mainQuest = $root.game.quest.fromObject(object.mainQuest); } return message; }; /** * Creates a plain object from a quest_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_get_data_rsp * @static * @param {game.quest_get_data_rsp} message quest_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.daily = []; object.weekly = []; object.achievement = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.dlv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.dlv = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.wlv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.wlv = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.daward = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.daward = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.waward = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.waward = options.longs === String ? "0" : 0; object.mainQuest = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.dlv != null && message.hasOwnProperty("dlv")) if (typeof message.dlv === "number") object.dlv = options.longs === String ? String(message.dlv) : message.dlv; else object.dlv = options.longs === String ? $util.Long.prototype.toString.call(message.dlv) : options.longs === Number ? new $util.LongBits(message.dlv.low >>> 0, message.dlv.high >>> 0).toNumber() : message.dlv; if (message.wlv != null && message.hasOwnProperty("wlv")) if (typeof message.wlv === "number") object.wlv = options.longs === String ? String(message.wlv) : message.wlv; else object.wlv = options.longs === String ? $util.Long.prototype.toString.call(message.wlv) : options.longs === Number ? new $util.LongBits(message.wlv.low >>> 0, message.wlv.high >>> 0).toNumber() : message.wlv; if (message.daward != null && message.hasOwnProperty("daward")) if (typeof message.daward === "number") object.daward = options.longs === String ? String(message.daward) : message.daward; else object.daward = options.longs === String ? $util.Long.prototype.toString.call(message.daward) : options.longs === Number ? new $util.LongBits(message.daward.low >>> 0, message.daward.high >>> 0).toNumber() : message.daward; if (message.waward != null && message.hasOwnProperty("waward")) if (typeof message.waward === "number") object.waward = options.longs === String ? String(message.waward) : message.waward; else object.waward = options.longs === String ? $util.Long.prototype.toString.call(message.waward) : options.longs === Number ? new $util.LongBits(message.waward.low >>> 0, message.waward.high >>> 0).toNumber() : message.waward; if (message.daily && message.daily.length) { object.daily = []; for (let j = 0; j < message.daily.length; ++j) object.daily[j] = $root.game.quest.toObject(message.daily[j], options); } if (message.weekly && message.weekly.length) { object.weekly = []; for (let j = 0; j < message.weekly.length; ++j) object.weekly[j] = $root.game.quest.toObject(message.weekly[j], options); } if (message.achievement && message.achievement.length) { object.achievement = []; for (let j = 0; j < message.achievement.length; ++j) object.achievement[j] = $root.game.quest.toObject(message.achievement[j], options); } if (message.mainQuest != null && message.hasOwnProperty("mainQuest")) object.mainQuest = $root.game.quest.toObject(message.mainQuest, options); return object; }; /** * Converts this quest_get_data_rsp to JSON. * @function toJSON * @memberof game.quest_get_data_rsp * @instance * @returns {Object.} JSON object */ quest_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_get_data_rsp; })(); game.quest_get_award = (function() { /** * Properties of a quest_get_award. * @memberof game * @interface Iquest_get_award * @property {number|Long|null} [id] quest_get_award id */ /** * Constructs a new quest_get_award. * @memberof game * @classdesc Represents a quest_get_award. * @implements Iquest_get_award * @constructor * @param {game.Iquest_get_award=} [properties] Properties to set */ function quest_get_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest_get_award id. * @member {number|Long} id * @memberof game.quest_get_award * @instance */ quest_get_award.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new quest_get_award instance using the specified properties. * @function create * @memberof game.quest_get_award * @static * @param {game.Iquest_get_award=} [properties] Properties to set * @returns {game.quest_get_award} quest_get_award instance */ quest_get_award.create = function create(properties) { return new quest_get_award(properties); }; /** * Encodes the specified quest_get_award message. Does not implicitly {@link game.quest_get_award.verify|verify} messages. * @function encode * @memberof game.quest_get_award * @static * @param {game.Iquest_get_award} message quest_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified quest_get_award message, length delimited. Does not implicitly {@link game.quest_get_award.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_get_award * @static * @param {game.Iquest_get_award} message quest_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_get_award message from the specified reader or buffer. * @function decode * @memberof game.quest_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_get_award} quest_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_get_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_get_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_get_award} quest_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_get_award message. * @function verify * @memberof game.quest_get_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_get_award.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"; return null; }; /** * Creates a quest_get_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_get_award * @static * @param {Object.} object Plain object * @returns {game.quest_get_award} quest_get_award */ quest_get_award.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_get_award) return object; let message = new $root.game.quest_get_award(); 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(); return message; }; /** * Creates a plain object from a quest_get_award message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_get_award * @static * @param {game.quest_get_award} message quest_get_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_get_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this quest_get_award to JSON. * @function toJSON * @memberof game.quest_get_award * @instance * @returns {Object.} JSON object */ quest_get_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_get_award; })(); game.quest_get_award_rsp = (function() { /** * Properties of a quest_get_award_rsp. * @memberof game * @interface Iquest_get_award_rsp * @property {number|Long|null} [errno] quest_get_award_rsp errno * @property {number|Long|null} [id] quest_get_award_rsp id * @property {game.Iquest|null} [data] quest_get_award_rsp data */ /** * Constructs a new quest_get_award_rsp. * @memberof game * @classdesc Represents a quest_get_award_rsp. * @implements Iquest_get_award_rsp * @constructor * @param {game.Iquest_get_award_rsp=} [properties] Properties to set */ function quest_get_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest_get_award_rsp errno. * @member {number|Long} errno * @memberof game.quest_get_award_rsp * @instance */ quest_get_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_award_rsp id. * @member {number|Long} id * @memberof game.quest_get_award_rsp * @instance */ quest_get_award_rsp.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_get_award_rsp data. * @member {game.Iquest|null|undefined} data * @memberof game.quest_get_award_rsp * @instance */ quest_get_award_rsp.prototype.data = null; /** * Creates a new quest_get_award_rsp instance using the specified properties. * @function create * @memberof game.quest_get_award_rsp * @static * @param {game.Iquest_get_award_rsp=} [properties] Properties to set * @returns {game.quest_get_award_rsp} quest_get_award_rsp instance */ quest_get_award_rsp.create = function create(properties) { return new quest_get_award_rsp(properties); }; /** * Encodes the specified quest_get_award_rsp message. Does not implicitly {@link game.quest_get_award_rsp.verify|verify} messages. * @function encode * @memberof game.quest_get_award_rsp * @static * @param {game.Iquest_get_award_rsp} message quest_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.quest.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified quest_get_award_rsp message, length delimited. Does not implicitly {@link game.quest_get_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_get_award_rsp * @static * @param {game.Iquest_get_award_rsp} message quest_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_get_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_get_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.quest_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_get_award_rsp} quest_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_get_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id = reader.int64(); break; case 3: message.data = $root.game.quest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_get_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_get_award_rsp} quest_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_get_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_get_award_rsp message. * @function verify * @memberof game.quest_get_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_get_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long 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.data != null && message.hasOwnProperty("data")) { let error = $root.game.quest.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a quest_get_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_get_award_rsp * @static * @param {Object.} object Plain object * @returns {game.quest_get_award_rsp} quest_get_award_rsp */ quest_get_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_get_award_rsp) return object; let message = new $root.game.quest_get_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); 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.data != null) { if (typeof object.data !== "object") throw TypeError(".game.quest_get_award_rsp.data: object expected"); message.data = $root.game.quest.fromObject(object.data); } return message; }; /** * Creates a plain object from a quest_get_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_get_award_rsp * @static * @param {game.quest_get_award_rsp} message quest_get_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_get_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let 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.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; 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.data != null && message.hasOwnProperty("data")) object.data = $root.game.quest.toObject(message.data, options); return object; }; /** * Converts this quest_get_award_rsp to JSON. * @function toJSON * @memberof game.quest_get_award_rsp * @instance * @returns {Object.} JSON object */ quest_get_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_get_award_rsp; })(); game.quest_active_award = (function() { /** * Properties of a quest_active_award. * @memberof game * @interface Iquest_active_award * @property {number|Long|null} [type] quest_active_award type */ /** * Constructs a new quest_active_award. * @memberof game * @classdesc Represents a quest_active_award. * @implements Iquest_active_award * @constructor * @param {game.Iquest_active_award=} [properties] Properties to set */ function quest_active_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest_active_award type. * @member {number|Long} type * @memberof game.quest_active_award * @instance */ quest_active_award.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new quest_active_award instance using the specified properties. * @function create * @memberof game.quest_active_award * @static * @param {game.Iquest_active_award=} [properties] Properties to set * @returns {game.quest_active_award} quest_active_award instance */ quest_active_award.create = function create(properties) { return new quest_active_award(properties); }; /** * Encodes the specified quest_active_award message. Does not implicitly {@link game.quest_active_award.verify|verify} messages. * @function encode * @memberof game.quest_active_award * @static * @param {game.Iquest_active_award} message quest_active_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_active_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); return writer; }; /** * Encodes the specified quest_active_award message, length delimited. Does not implicitly {@link game.quest_active_award.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_active_award * @static * @param {game.Iquest_active_award} message quest_active_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_active_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_active_award message from the specified reader or buffer. * @function decode * @memberof game.quest_active_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_active_award} quest_active_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_active_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_active_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_active_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_active_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_active_award} quest_active_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_active_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_active_award message. * @function verify * @memberof game.quest_active_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_active_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates a quest_active_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_active_award * @static * @param {Object.} object Plain object * @returns {game.quest_active_award} quest_active_award */ quest_active_award.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_active_award) return object; let message = new $root.game.quest_active_award(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a quest_active_award message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_active_award * @static * @param {game.quest_active_award} message quest_active_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_active_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this quest_active_award to JSON. * @function toJSON * @memberof game.quest_active_award * @instance * @returns {Object.} JSON object */ quest_active_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_active_award; })(); game.quest_active_award_rsp = (function() { /** * Properties of a quest_active_award_rsp. * @memberof game * @interface Iquest_active_award_rsp * @property {number|Long|null} [errno] quest_active_award_rsp errno * @property {number|Long|null} [type] quest_active_award_rsp type * @property {number|Long|null} [award] quest_active_award_rsp award */ /** * Constructs a new quest_active_award_rsp. * @memberof game * @classdesc Represents a quest_active_award_rsp. * @implements Iquest_active_award_rsp * @constructor * @param {game.Iquest_active_award_rsp=} [properties] Properties to set */ function quest_active_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest_active_award_rsp errno. * @member {number|Long} errno * @memberof game.quest_active_award_rsp * @instance */ quest_active_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_active_award_rsp type. * @member {number|Long} type * @memberof game.quest_active_award_rsp * @instance */ quest_active_award_rsp.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest_active_award_rsp award. * @member {number|Long} award * @memberof game.quest_active_award_rsp * @instance */ quest_active_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new quest_active_award_rsp instance using the specified properties. * @function create * @memberof game.quest_active_award_rsp * @static * @param {game.Iquest_active_award_rsp=} [properties] Properties to set * @returns {game.quest_active_award_rsp} quest_active_award_rsp instance */ quest_active_award_rsp.create = function create(properties) { return new quest_active_award_rsp(properties); }; /** * Encodes the specified quest_active_award_rsp message. Does not implicitly {@link game.quest_active_award_rsp.verify|verify} messages. * @function encode * @memberof game.quest_active_award_rsp * @static * @param {game.Iquest_active_award_rsp} message quest_active_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_active_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); return writer; }; /** * Encodes the specified quest_active_award_rsp message, length delimited. Does not implicitly {@link game.quest_active_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_active_award_rsp * @static * @param {game.Iquest_active_award_rsp} message quest_active_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_active_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_active_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.quest_active_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_active_award_rsp} quest_active_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_active_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_active_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.type = reader.int64(); break; case 3: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_active_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_active_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_active_award_rsp} quest_active_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_active_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_active_award_rsp message. * @function verify * @memberof game.quest_active_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_active_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a quest_active_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_active_award_rsp * @static * @param {Object.} object Plain object * @returns {game.quest_active_award_rsp} quest_active_award_rsp */ quest_active_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_active_award_rsp) return object; let message = new $root.game.quest_active_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a quest_active_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_active_award_rsp * @static * @param {game.quest_active_award_rsp} message quest_active_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_active_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this quest_active_award_rsp to JSON. * @function toJSON * @memberof game.quest_active_award_rsp * @instance * @returns {Object.} JSON object */ quest_active_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_active_award_rsp; })(); game.quest_cmplate_notify = (function() { /** * Properties of a quest_cmplate_notify. * @memberof game * @interface Iquest_cmplate_notify * @property {game.Iquest|null} [data] quest_cmplate_notify data */ /** * Constructs a new quest_cmplate_notify. * @memberof game * @classdesc Represents a quest_cmplate_notify. * @implements Iquest_cmplate_notify * @constructor * @param {game.Iquest_cmplate_notify=} [properties] Properties to set */ function quest_cmplate_notify(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest_cmplate_notify data. * @member {game.Iquest|null|undefined} data * @memberof game.quest_cmplate_notify * @instance */ quest_cmplate_notify.prototype.data = null; /** * Creates a new quest_cmplate_notify instance using the specified properties. * @function create * @memberof game.quest_cmplate_notify * @static * @param {game.Iquest_cmplate_notify=} [properties] Properties to set * @returns {game.quest_cmplate_notify} quest_cmplate_notify instance */ quest_cmplate_notify.create = function create(properties) { return new quest_cmplate_notify(properties); }; /** * Encodes the specified quest_cmplate_notify message. Does not implicitly {@link game.quest_cmplate_notify.verify|verify} messages. * @function encode * @memberof game.quest_cmplate_notify * @static * @param {game.Iquest_cmplate_notify} message quest_cmplate_notify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_cmplate_notify.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.quest.encode(message.data, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified quest_cmplate_notify message, length delimited. Does not implicitly {@link game.quest_cmplate_notify.verify|verify} messages. * @function encodeDelimited * @memberof game.quest_cmplate_notify * @static * @param {game.Iquest_cmplate_notify} message quest_cmplate_notify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest_cmplate_notify.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest_cmplate_notify message from the specified reader or buffer. * @function decode * @memberof game.quest_cmplate_notify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest_cmplate_notify} quest_cmplate_notify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_cmplate_notify.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest_cmplate_notify(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data = $root.game.quest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest_cmplate_notify message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest_cmplate_notify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest_cmplate_notify} quest_cmplate_notify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest_cmplate_notify.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest_cmplate_notify message. * @function verify * @memberof game.quest_cmplate_notify * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest_cmplate_notify.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.quest.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a quest_cmplate_notify message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest_cmplate_notify * @static * @param {Object.} object Plain object * @returns {game.quest_cmplate_notify} quest_cmplate_notify */ quest_cmplate_notify.fromObject = function fromObject(object) { if (object instanceof $root.game.quest_cmplate_notify) return object; let message = new $root.game.quest_cmplate_notify(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.quest_cmplate_notify.data: object expected"); message.data = $root.game.quest.fromObject(object.data); } return message; }; /** * Creates a plain object from a quest_cmplate_notify message. Also converts values to other types if specified. * @function toObject * @memberof game.quest_cmplate_notify * @static * @param {game.quest_cmplate_notify} message quest_cmplate_notify * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest_cmplate_notify.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.data = null; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.quest.toObject(message.data, options); return object; }; /** * Converts this quest_cmplate_notify to JSON. * @function toJSON * @memberof game.quest_cmplate_notify * @instance * @returns {Object.} JSON object */ quest_cmplate_notify.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest_cmplate_notify; })(); game.manual_get_data = (function() { /** * Properties of a manual_get_data. * @memberof game * @interface Imanual_get_data * @property {number|Long|null} [moduleid] manual_get_data moduleid */ /** * Constructs a new manual_get_data. * @memberof game * @classdesc Represents a manual_get_data. * @implements Imanual_get_data * @constructor * @param {game.Imanual_get_data=} [properties] Properties to set */ function manual_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_get_data moduleid. * @member {number|Long} moduleid * @memberof game.manual_get_data * @instance */ manual_get_data.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_get_data instance using the specified properties. * @function create * @memberof game.manual_get_data * @static * @param {game.Imanual_get_data=} [properties] Properties to set * @returns {game.manual_get_data} manual_get_data instance */ manual_get_data.create = function create(properties) { return new manual_get_data(properties); }; /** * Encodes the specified manual_get_data message. Does not implicitly {@link game.manual_get_data.verify|verify} messages. * @function encode * @memberof game.manual_get_data * @static * @param {game.Imanual_get_data} message manual_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_get_data message, length delimited. Does not implicitly {@link game.manual_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_get_data * @static * @param {game.Imanual_get_data} message manual_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_get_data message from the specified reader or buffer. * @function decode * @memberof game.manual_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_get_data} manual_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_get_data} manual_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_get_data message. * @function verify * @memberof game.manual_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_get_data * @static * @param {Object.} object Plain object * @returns {game.manual_get_data} manual_get_data */ manual_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_get_data) return object; let message = new $root.game.manual_get_data(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_get_data * @static * @param {game.manual_get_data} message manual_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_get_data.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_get_data to JSON. * @function toJSON * @memberof game.manual_get_data * @instance * @returns {Object.} JSON object */ manual_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_get_data; })(); game.manual_get_data_rsp = (function() { /** * Properties of a manual_get_data_rsp. * @memberof game * @interface Imanual_get_data_rsp * @property {number|Long|null} [errno] manual_get_data_rsp errno * @property {boolean|null} [open] manual_get_data_rsp open * @property {number|Long|null} [openTime] manual_get_data_rsp openTime * @property {number|Long|null} [level] manual_get_data_rsp level * @property {number|Long|null} [exp] manual_get_data_rsp exp * @property {number|Long|null} [round] manual_get_data_rsp round * @property {Array.|null} [list] manual_get_data_rsp list * @property {number|Long|null} [moduleid] manual_get_data_rsp moduleid */ /** * Constructs a new manual_get_data_rsp. * @memberof game * @classdesc Represents a manual_get_data_rsp. * @implements Imanual_get_data_rsp * @constructor * @param {game.Imanual_get_data_rsp=} [properties] Properties to set */ function manual_get_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_get_data_rsp errno. * @member {number|Long} errno * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_data_rsp open. * @member {boolean} open * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.open = false; /** * manual_get_data_rsp openTime. * @member {number|Long} openTime * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.openTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_data_rsp level. * @member {number|Long} level * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_data_rsp exp. * @member {number|Long} exp * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.exp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_data_rsp round. * @member {number|Long} round * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.round = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_data_rsp list. * @member {Array.} list * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.list = $util.emptyArray; /** * manual_get_data_rsp moduleid. * @member {number|Long} moduleid * @memberof game.manual_get_data_rsp * @instance */ manual_get_data_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_get_data_rsp instance using the specified properties. * @function create * @memberof game.manual_get_data_rsp * @static * @param {game.Imanual_get_data_rsp=} [properties] Properties to set * @returns {game.manual_get_data_rsp} manual_get_data_rsp instance */ manual_get_data_rsp.create = function create(properties) { return new manual_get_data_rsp(properties); }; /** * Encodes the specified manual_get_data_rsp message. Does not implicitly {@link game.manual_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.manual_get_data_rsp * @static * @param {game.Imanual_get_data_rsp} message manual_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.open != null && Object.hasOwnProperty.call(message, "open")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.open); if (message.openTime != null && Object.hasOwnProperty.call(message, "openTime")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.openTime); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.level); if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.exp); if (message.round != null && Object.hasOwnProperty.call(message, "round")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.round); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.manual.encode(message.list[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_get_data_rsp message, length delimited. Does not implicitly {@link game.manual_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_get_data_rsp * @static * @param {game.Imanual_get_data_rsp} message manual_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.manual_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_get_data_rsp} manual_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.open = reader.bool(); break; case 3: message.openTime = reader.int64(); break; case 4: message.level = reader.int64(); break; case 5: message.exp = reader.int64(); break; case 6: message.round = reader.int64(); break; case 7: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.manual.decode(reader, reader.uint32())); break; case 8: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_get_data_rsp} manual_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_get_data_rsp message. * @function verify * @memberof game.manual_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.open != null && message.hasOwnProperty("open")) if (typeof message.open !== "boolean") return "open: boolean expected"; if (message.openTime != null && message.hasOwnProperty("openTime")) if (!$util.isInteger(message.openTime) && !(message.openTime && $util.isInteger(message.openTime.low) && $util.isInteger(message.openTime.high))) return "openTime: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp) && !(message.exp && $util.isInteger(message.exp.low) && $util.isInteger(message.exp.high))) return "exp: integer|Long expected"; if (message.round != null && message.hasOwnProperty("round")) if (!$util.isInteger(message.round) && !(message.round && $util.isInteger(message.round.low) && $util.isInteger(message.round.high))) return "round: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.manual.verify(message.list[i]); if (error) return "list." + error; } } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.manual_get_data_rsp} manual_get_data_rsp */ manual_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_get_data_rsp) return object; let message = new $root.game.manual_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.open != null) message.open = Boolean(object.open); if (object.openTime != null) if ($util.Long) (message.openTime = $util.Long.fromValue(object.openTime)).unsigned = false; else if (typeof object.openTime === "string") message.openTime = parseInt(object.openTime, 10); else if (typeof object.openTime === "number") message.openTime = object.openTime; else if (typeof object.openTime === "object") message.openTime = new $util.LongBits(object.openTime.low >>> 0, object.openTime.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.exp != null) if ($util.Long) (message.exp = $util.Long.fromValue(object.exp)).unsigned = false; else if (typeof object.exp === "string") message.exp = parseInt(object.exp, 10); else if (typeof object.exp === "number") message.exp = object.exp; else if (typeof object.exp === "object") message.exp = new $util.LongBits(object.exp.low >>> 0, object.exp.high >>> 0).toNumber(); if (object.round != null) if ($util.Long) (message.round = $util.Long.fromValue(object.round)).unsigned = false; else if (typeof object.round === "string") message.round = parseInt(object.round, 10); else if (typeof object.round === "number") message.round = object.round; else if (typeof object.round === "object") message.round = new $util.LongBits(object.round.low >>> 0, object.round.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.manual_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.manual_get_data_rsp.list: object expected"); message.list[i] = $root.game.manual.fromObject(object.list[i]); } } if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_get_data_rsp * @static * @param {game.manual_get_data_rsp} message manual_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.open = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.openTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.openTime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exp = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.round = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.round = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.open != null && message.hasOwnProperty("open")) object.open = message.open; if (message.openTime != null && message.hasOwnProperty("openTime")) if (typeof message.openTime === "number") object.openTime = options.longs === String ? String(message.openTime) : message.openTime; else object.openTime = options.longs === String ? $util.Long.prototype.toString.call(message.openTime) : options.longs === Number ? new $util.LongBits(message.openTime.low >>> 0, message.openTime.high >>> 0).toNumber() : message.openTime; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.exp != null && message.hasOwnProperty("exp")) if (typeof message.exp === "number") object.exp = options.longs === String ? String(message.exp) : message.exp; else object.exp = options.longs === String ? $util.Long.prototype.toString.call(message.exp) : options.longs === Number ? new $util.LongBits(message.exp.low >>> 0, message.exp.high >>> 0).toNumber() : message.exp; if (message.round != null && message.hasOwnProperty("round")) if (typeof message.round === "number") object.round = options.longs === String ? String(message.round) : message.round; else object.round = options.longs === String ? $util.Long.prototype.toString.call(message.round) : options.longs === Number ? new $util.LongBits(message.round.low >>> 0, message.round.high >>> 0).toNumber() : message.round; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.manual.toObject(message.list[j], options); } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_get_data_rsp to JSON. * @function toJSON * @memberof game.manual_get_data_rsp * @instance * @returns {Object.} JSON object */ manual_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_get_data_rsp; })(); game.manual_buy_exp = (function() { /** * Properties of a manual_buy_exp. * @memberof game * @interface Imanual_buy_exp * @property {number|Long|null} [moduleid] manual_buy_exp moduleid */ /** * Constructs a new manual_buy_exp. * @memberof game * @classdesc Represents a manual_buy_exp. * @implements Imanual_buy_exp * @constructor * @param {game.Imanual_buy_exp=} [properties] Properties to set */ function manual_buy_exp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_buy_exp moduleid. * @member {number|Long} moduleid * @memberof game.manual_buy_exp * @instance */ manual_buy_exp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_buy_exp instance using the specified properties. * @function create * @memberof game.manual_buy_exp * @static * @param {game.Imanual_buy_exp=} [properties] Properties to set * @returns {game.manual_buy_exp} manual_buy_exp instance */ manual_buy_exp.create = function create(properties) { return new manual_buy_exp(properties); }; /** * Encodes the specified manual_buy_exp message. Does not implicitly {@link game.manual_buy_exp.verify|verify} messages. * @function encode * @memberof game.manual_buy_exp * @static * @param {game.Imanual_buy_exp} message manual_buy_exp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy_exp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_buy_exp message, length delimited. Does not implicitly {@link game.manual_buy_exp.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_buy_exp * @static * @param {game.Imanual_buy_exp} message manual_buy_exp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy_exp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_buy_exp message from the specified reader or buffer. * @function decode * @memberof game.manual_buy_exp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_buy_exp} manual_buy_exp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy_exp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_buy_exp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_buy_exp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_buy_exp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_buy_exp} manual_buy_exp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy_exp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_buy_exp message. * @function verify * @memberof game.manual_buy_exp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_buy_exp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_buy_exp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_buy_exp * @static * @param {Object.} object Plain object * @returns {game.manual_buy_exp} manual_buy_exp */ manual_buy_exp.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_buy_exp) return object; let message = new $root.game.manual_buy_exp(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_buy_exp message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_buy_exp * @static * @param {game.manual_buy_exp} message manual_buy_exp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_buy_exp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_buy_exp to JSON. * @function toJSON * @memberof game.manual_buy_exp * @instance * @returns {Object.} JSON object */ manual_buy_exp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_buy_exp; })(); game.manual_buy_exp_rsp = (function() { /** * Properties of a manual_buy_exp_rsp. * @memberof game * @interface Imanual_buy_exp_rsp * @property {number|Long|null} [errno] manual_buy_exp_rsp errno * @property {number|Long|null} [level] manual_buy_exp_rsp level * @property {number|Long|null} [exp] manual_buy_exp_rsp exp * @property {number|Long|null} [moduleid] manual_buy_exp_rsp moduleid */ /** * Constructs a new manual_buy_exp_rsp. * @memberof game * @classdesc Represents a manual_buy_exp_rsp. * @implements Imanual_buy_exp_rsp * @constructor * @param {game.Imanual_buy_exp_rsp=} [properties] Properties to set */ function manual_buy_exp_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_buy_exp_rsp errno. * @member {number|Long} errno * @memberof game.manual_buy_exp_rsp * @instance */ manual_buy_exp_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_buy_exp_rsp level. * @member {number|Long} level * @memberof game.manual_buy_exp_rsp * @instance */ manual_buy_exp_rsp.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_buy_exp_rsp exp. * @member {number|Long} exp * @memberof game.manual_buy_exp_rsp * @instance */ manual_buy_exp_rsp.prototype.exp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_buy_exp_rsp moduleid. * @member {number|Long} moduleid * @memberof game.manual_buy_exp_rsp * @instance */ manual_buy_exp_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_buy_exp_rsp instance using the specified properties. * @function create * @memberof game.manual_buy_exp_rsp * @static * @param {game.Imanual_buy_exp_rsp=} [properties] Properties to set * @returns {game.manual_buy_exp_rsp} manual_buy_exp_rsp instance */ manual_buy_exp_rsp.create = function create(properties) { return new manual_buy_exp_rsp(properties); }; /** * Encodes the specified manual_buy_exp_rsp message. Does not implicitly {@link game.manual_buy_exp_rsp.verify|verify} messages. * @function encode * @memberof game.manual_buy_exp_rsp * @static * @param {game.Imanual_buy_exp_rsp} message manual_buy_exp_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy_exp_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.level); if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.exp); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_buy_exp_rsp message, length delimited. Does not implicitly {@link game.manual_buy_exp_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_buy_exp_rsp * @static * @param {game.Imanual_buy_exp_rsp} message manual_buy_exp_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy_exp_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_buy_exp_rsp message from the specified reader or buffer. * @function decode * @memberof game.manual_buy_exp_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_buy_exp_rsp} manual_buy_exp_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy_exp_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_buy_exp_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.level = reader.int64(); break; case 3: message.exp = reader.int64(); break; case 4: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_buy_exp_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_buy_exp_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_buy_exp_rsp} manual_buy_exp_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy_exp_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_buy_exp_rsp message. * @function verify * @memberof game.manual_buy_exp_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_buy_exp_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp) && !(message.exp && $util.isInteger(message.exp.low) && $util.isInteger(message.exp.high))) return "exp: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_buy_exp_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_buy_exp_rsp * @static * @param {Object.} object Plain object * @returns {game.manual_buy_exp_rsp} manual_buy_exp_rsp */ manual_buy_exp_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_buy_exp_rsp) return object; let message = new $root.game.manual_buy_exp_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.exp != null) if ($util.Long) (message.exp = $util.Long.fromValue(object.exp)).unsigned = false; else if (typeof object.exp === "string") message.exp = parseInt(object.exp, 10); else if (typeof object.exp === "number") message.exp = object.exp; else if (typeof object.exp === "object") message.exp = new $util.LongBits(object.exp.low >>> 0, object.exp.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_buy_exp_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_buy_exp_rsp * @static * @param {game.manual_buy_exp_rsp} message manual_buy_exp_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_buy_exp_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exp = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.exp != null && message.hasOwnProperty("exp")) if (typeof message.exp === "number") object.exp = options.longs === String ? String(message.exp) : message.exp; else object.exp = options.longs === String ? $util.Long.prototype.toString.call(message.exp) : options.longs === Number ? new $util.LongBits(message.exp.low >>> 0, message.exp.high >>> 0).toNumber() : message.exp; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_buy_exp_rsp to JSON. * @function toJSON * @memberof game.manual_buy_exp_rsp * @instance * @returns {Object.} JSON object */ manual_buy_exp_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_buy_exp_rsp; })(); game.manual_get_award = (function() { /** * Properties of a manual_get_award. * @memberof game * @interface Imanual_get_award * @property {number|Long|null} [moduleid] manual_get_award moduleid */ /** * Constructs a new manual_get_award. * @memberof game * @classdesc Represents a manual_get_award. * @implements Imanual_get_award * @constructor * @param {game.Imanual_get_award=} [properties] Properties to set */ function manual_get_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_get_award moduleid. * @member {number|Long} moduleid * @memberof game.manual_get_award * @instance */ manual_get_award.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_get_award instance using the specified properties. * @function create * @memberof game.manual_get_award * @static * @param {game.Imanual_get_award=} [properties] Properties to set * @returns {game.manual_get_award} manual_get_award instance */ manual_get_award.create = function create(properties) { return new manual_get_award(properties); }; /** * Encodes the specified manual_get_award message. Does not implicitly {@link game.manual_get_award.verify|verify} messages. * @function encode * @memberof game.manual_get_award * @static * @param {game.Imanual_get_award} message manual_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_get_award message, length delimited. Does not implicitly {@link game.manual_get_award.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_get_award * @static * @param {game.Imanual_get_award} message manual_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_get_award message from the specified reader or buffer. * @function decode * @memberof game.manual_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_get_award} manual_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_get_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_get_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_get_award} manual_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_get_award message. * @function verify * @memberof game.manual_get_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_get_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_get_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_get_award * @static * @param {Object.} object Plain object * @returns {game.manual_get_award} manual_get_award */ manual_get_award.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_get_award) return object; let message = new $root.game.manual_get_award(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_get_award message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_get_award * @static * @param {game.manual_get_award} message manual_get_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_get_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_get_award to JSON. * @function toJSON * @memberof game.manual_get_award * @instance * @returns {Object.} JSON object */ manual_get_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_get_award; })(); game.manual_get_award_rsp = (function() { /** * Properties of a manual_get_award_rsp. * @memberof game * @interface Imanual_get_award_rsp * @property {number|Long|null} [errno] manual_get_award_rsp errno * @property {number|Long|null} [award] manual_get_award_rsp award * @property {number|Long|null} [moduleid] manual_get_award_rsp moduleid */ /** * Constructs a new manual_get_award_rsp. * @memberof game * @classdesc Represents a manual_get_award_rsp. * @implements Imanual_get_award_rsp * @constructor * @param {game.Imanual_get_award_rsp=} [properties] Properties to set */ function manual_get_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_get_award_rsp errno. * @member {number|Long} errno * @memberof game.manual_get_award_rsp * @instance */ manual_get_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_award_rsp award. * @member {number|Long} award * @memberof game.manual_get_award_rsp * @instance */ manual_get_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_get_award_rsp moduleid. * @member {number|Long} moduleid * @memberof game.manual_get_award_rsp * @instance */ manual_get_award_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_get_award_rsp instance using the specified properties. * @function create * @memberof game.manual_get_award_rsp * @static * @param {game.Imanual_get_award_rsp=} [properties] Properties to set * @returns {game.manual_get_award_rsp} manual_get_award_rsp instance */ manual_get_award_rsp.create = function create(properties) { return new manual_get_award_rsp(properties); }; /** * Encodes the specified manual_get_award_rsp message. Does not implicitly {@link game.manual_get_award_rsp.verify|verify} messages. * @function encode * @memberof game.manual_get_award_rsp * @static * @param {game.Imanual_get_award_rsp} message manual_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.award); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_get_award_rsp message, length delimited. Does not implicitly {@link game.manual_get_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_get_award_rsp * @static * @param {game.Imanual_get_award_rsp} message manual_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_get_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_get_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.manual_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_get_award_rsp} manual_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_get_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.award = reader.int64(); break; case 3: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_get_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_get_award_rsp} manual_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_get_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_get_award_rsp message. * @function verify * @memberof game.manual_get_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_get_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_get_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_get_award_rsp * @static * @param {Object.} object Plain object * @returns {game.manual_get_award_rsp} manual_get_award_rsp */ manual_get_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_get_award_rsp) return object; let message = new $root.game.manual_get_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_get_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_get_award_rsp * @static * @param {game.manual_get_award_rsp} message manual_get_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_get_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_get_award_rsp to JSON. * @function toJSON * @memberof game.manual_get_award_rsp * @instance * @returns {Object.} JSON object */ manual_get_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_get_award_rsp; })(); game.manual_notify = (function() { /** * Properties of a manual_notify. * @memberof game * @interface Imanual_notify * @property {boolean|null} [open] manual_notify open * @property {number|Long|null} [openTime] manual_notify openTime * @property {number|Long|null} [level] manual_notify level * @property {number|Long|null} [exp] manual_notify exp * @property {number|Long|null} [round] manual_notify round * @property {Array.|null} [list] manual_notify list * @property {number|Long|null} [moduleid] manual_notify moduleid */ /** * Constructs a new manual_notify. * @memberof game * @classdesc Represents a manual_notify. * @implements Imanual_notify * @constructor * @param {game.Imanual_notify=} [properties] Properties to set */ function manual_notify(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_notify open. * @member {boolean} open * @memberof game.manual_notify * @instance */ manual_notify.prototype.open = false; /** * manual_notify openTime. * @member {number|Long} openTime * @memberof game.manual_notify * @instance */ manual_notify.prototype.openTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_notify level. * @member {number|Long} level * @memberof game.manual_notify * @instance */ manual_notify.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_notify exp. * @member {number|Long} exp * @memberof game.manual_notify * @instance */ manual_notify.prototype.exp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_notify round. * @member {number|Long} round * @memberof game.manual_notify * @instance */ manual_notify.prototype.round = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_notify list. * @member {Array.} list * @memberof game.manual_notify * @instance */ manual_notify.prototype.list = $util.emptyArray; /** * manual_notify moduleid. * @member {number|Long} moduleid * @memberof game.manual_notify * @instance */ manual_notify.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_notify instance using the specified properties. * @function create * @memberof game.manual_notify * @static * @param {game.Imanual_notify=} [properties] Properties to set * @returns {game.manual_notify} manual_notify instance */ manual_notify.create = function create(properties) { return new manual_notify(properties); }; /** * Encodes the specified manual_notify message. Does not implicitly {@link game.manual_notify.verify|verify} messages. * @function encode * @memberof game.manual_notify * @static * @param {game.Imanual_notify} message manual_notify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_notify.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.open != null && Object.hasOwnProperty.call(message, "open")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.open); if (message.openTime != null && Object.hasOwnProperty.call(message, "openTime")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.openTime); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.level); if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.exp); if (message.round != null && Object.hasOwnProperty.call(message, "round")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.round); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.manual.encode(message.list[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_notify message, length delimited. Does not implicitly {@link game.manual_notify.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_notify * @static * @param {game.Imanual_notify} message manual_notify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_notify.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_notify message from the specified reader or buffer. * @function decode * @memberof game.manual_notify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_notify} manual_notify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_notify.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_notify(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.open = reader.bool(); break; case 3: message.openTime = reader.int64(); break; case 4: message.level = reader.int64(); break; case 5: message.exp = reader.int64(); break; case 6: message.round = reader.int64(); break; case 7: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.manual.decode(reader, reader.uint32())); break; case 8: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_notify message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_notify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_notify} manual_notify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_notify.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_notify message. * @function verify * @memberof game.manual_notify * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_notify.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.open != null && message.hasOwnProperty("open")) if (typeof message.open !== "boolean") return "open: boolean expected"; if (message.openTime != null && message.hasOwnProperty("openTime")) if (!$util.isInteger(message.openTime) && !(message.openTime && $util.isInteger(message.openTime.low) && $util.isInteger(message.openTime.high))) return "openTime: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp) && !(message.exp && $util.isInteger(message.exp.low) && $util.isInteger(message.exp.high))) return "exp: integer|Long expected"; if (message.round != null && message.hasOwnProperty("round")) if (!$util.isInteger(message.round) && !(message.round && $util.isInteger(message.round.low) && $util.isInteger(message.round.high))) return "round: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.manual.verify(message.list[i]); if (error) return "list." + error; } } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_notify message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_notify * @static * @param {Object.} object Plain object * @returns {game.manual_notify} manual_notify */ manual_notify.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_notify) return object; let message = new $root.game.manual_notify(); if (object.open != null) message.open = Boolean(object.open); if (object.openTime != null) if ($util.Long) (message.openTime = $util.Long.fromValue(object.openTime)).unsigned = false; else if (typeof object.openTime === "string") message.openTime = parseInt(object.openTime, 10); else if (typeof object.openTime === "number") message.openTime = object.openTime; else if (typeof object.openTime === "object") message.openTime = new $util.LongBits(object.openTime.low >>> 0, object.openTime.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.exp != null) if ($util.Long) (message.exp = $util.Long.fromValue(object.exp)).unsigned = false; else if (typeof object.exp === "string") message.exp = parseInt(object.exp, 10); else if (typeof object.exp === "number") message.exp = object.exp; else if (typeof object.exp === "object") message.exp = new $util.LongBits(object.exp.low >>> 0, object.exp.high >>> 0).toNumber(); if (object.round != null) if ($util.Long) (message.round = $util.Long.fromValue(object.round)).unsigned = false; else if (typeof object.round === "string") message.round = parseInt(object.round, 10); else if (typeof object.round === "number") message.round = object.round; else if (typeof object.round === "object") message.round = new $util.LongBits(object.round.low >>> 0, object.round.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.manual_notify.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.manual_notify.list: object expected"); message.list[i] = $root.game.manual.fromObject(object.list[i]); } } if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_notify message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_notify * @static * @param {game.manual_notify} message manual_notify * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_notify.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { object.open = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.openTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.openTime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exp = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.round = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.round = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.open != null && message.hasOwnProperty("open")) object.open = message.open; if (message.openTime != null && message.hasOwnProperty("openTime")) if (typeof message.openTime === "number") object.openTime = options.longs === String ? String(message.openTime) : message.openTime; else object.openTime = options.longs === String ? $util.Long.prototype.toString.call(message.openTime) : options.longs === Number ? new $util.LongBits(message.openTime.low >>> 0, message.openTime.high >>> 0).toNumber() : message.openTime; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.exp != null && message.hasOwnProperty("exp")) if (typeof message.exp === "number") object.exp = options.longs === String ? String(message.exp) : message.exp; else object.exp = options.longs === String ? $util.Long.prototype.toString.call(message.exp) : options.longs === Number ? new $util.LongBits(message.exp.low >>> 0, message.exp.high >>> 0).toNumber() : message.exp; if (message.round != null && message.hasOwnProperty("round")) if (typeof message.round === "number") object.round = options.longs === String ? String(message.round) : message.round; else object.round = options.longs === String ? $util.Long.prototype.toString.call(message.round) : options.longs === Number ? new $util.LongBits(message.round.low >>> 0, message.round.high >>> 0).toNumber() : message.round; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.manual.toObject(message.list[j], options); } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_notify to JSON. * @function toJSON * @memberof game.manual_notify * @instance * @returns {Object.} JSON object */ manual_notify.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_notify; })(); game.manual_buy = (function() { /** * Properties of a manual_buy. * @memberof game * @interface Imanual_buy * @property {number|Long|null} [giftid] manual_buy giftid * @property {number|Long|null} [moduleid] manual_buy moduleid */ /** * Constructs a new manual_buy. * @memberof game * @classdesc Represents a manual_buy. * @implements Imanual_buy * @constructor * @param {game.Imanual_buy=} [properties] Properties to set */ function manual_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_buy giftid. * @member {number|Long} giftid * @memberof game.manual_buy * @instance */ manual_buy.prototype.giftid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_buy moduleid. * @member {number|Long} moduleid * @memberof game.manual_buy * @instance */ manual_buy.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_buy instance using the specified properties. * @function create * @memberof game.manual_buy * @static * @param {game.Imanual_buy=} [properties] Properties to set * @returns {game.manual_buy} manual_buy instance */ manual_buy.create = function create(properties) { return new manual_buy(properties); }; /** * Encodes the specified manual_buy message. Does not implicitly {@link game.manual_buy.verify|verify} messages. * @function encode * @memberof game.manual_buy * @static * @param {game.Imanual_buy} message manual_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.giftid != null && Object.hasOwnProperty.call(message, "giftid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.giftid); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_buy message, length delimited. Does not implicitly {@link game.manual_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_buy * @static * @param {game.Imanual_buy} message manual_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_buy message from the specified reader or buffer. * @function decode * @memberof game.manual_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_buy} manual_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.giftid = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_buy} manual_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_buy message. * @function verify * @memberof game.manual_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.giftid != null && message.hasOwnProperty("giftid")) if (!$util.isInteger(message.giftid) && !(message.giftid && $util.isInteger(message.giftid.low) && $util.isInteger(message.giftid.high))) return "giftid: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_buy * @static * @param {Object.} object Plain object * @returns {game.manual_buy} manual_buy */ manual_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_buy) return object; let message = new $root.game.manual_buy(); if (object.giftid != null) if ($util.Long) (message.giftid = $util.Long.fromValue(object.giftid)).unsigned = false; else if (typeof object.giftid === "string") message.giftid = parseInt(object.giftid, 10); else if (typeof object.giftid === "number") message.giftid = object.giftid; else if (typeof object.giftid === "object") message.giftid = new $util.LongBits(object.giftid.low >>> 0, object.giftid.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_buy * @static * @param {game.manual_buy} message manual_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.giftid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.giftid = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.giftid != null && message.hasOwnProperty("giftid")) if (typeof message.giftid === "number") object.giftid = options.longs === String ? String(message.giftid) : message.giftid; else object.giftid = options.longs === String ? $util.Long.prototype.toString.call(message.giftid) : options.longs === Number ? new $util.LongBits(message.giftid.low >>> 0, message.giftid.high >>> 0).toNumber() : message.giftid; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_buy to JSON. * @function toJSON * @memberof game.manual_buy * @instance * @returns {Object.} JSON object */ manual_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_buy; })(); game.manual_buy_rsp = (function() { /** * Properties of a manual_buy_rsp. * @memberof game * @interface Imanual_buy_rsp * @property {number|Long|null} [errno] manual_buy_rsp errno * @property {number|Long|null} [moduleid] manual_buy_rsp moduleid */ /** * Constructs a new manual_buy_rsp. * @memberof game * @classdesc Represents a manual_buy_rsp. * @implements Imanual_buy_rsp * @constructor * @param {game.Imanual_buy_rsp=} [properties] Properties to set */ function manual_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual_buy_rsp errno. * @member {number|Long} errno * @memberof game.manual_buy_rsp * @instance */ manual_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * manual_buy_rsp moduleid. * @member {number|Long} moduleid * @memberof game.manual_buy_rsp * @instance */ manual_buy_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual_buy_rsp instance using the specified properties. * @function create * @memberof game.manual_buy_rsp * @static * @param {game.Imanual_buy_rsp=} [properties] Properties to set * @returns {game.manual_buy_rsp} manual_buy_rsp instance */ manual_buy_rsp.create = function create(properties) { return new manual_buy_rsp(properties); }; /** * Encodes the specified manual_buy_rsp message. Does not implicitly {@link game.manual_buy_rsp.verify|verify} messages. * @function encode * @memberof game.manual_buy_rsp * @static * @param {game.Imanual_buy_rsp} message manual_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); return writer; }; /** * Encodes the specified manual_buy_rsp message, length delimited. Does not implicitly {@link game.manual_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.manual_buy_rsp * @static * @param {game.Imanual_buy_rsp} message manual_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.manual_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual_buy_rsp} manual_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual_buy_rsp} manual_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual_buy_rsp message. * @function verify * @memberof game.manual_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a manual_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.manual_buy_rsp} manual_buy_rsp */ manual_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.manual_buy_rsp) return object; let message = new $root.game.manual_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.manual_buy_rsp * @static * @param {game.manual_buy_rsp} message manual_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this manual_buy_rsp to JSON. * @function toJSON * @memberof game.manual_buy_rsp * @instance * @returns {Object.} JSON object */ manual_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual_buy_rsp; })(); game.draw = (function() { /** * Properties of a draw. * @memberof game * @interface Idraw * @property {number|Long|null} [drawType] draw drawType * @property {number|Long|null} [payType] draw payType * @property {number|Long|null} [num] draw num */ /** * Constructs a new draw. * @memberof game * @classdesc Represents a draw. * @implements Idraw * @constructor * @param {game.Idraw=} [properties] Properties to set */ function draw(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * draw drawType. * @member {number|Long} drawType * @memberof game.draw * @instance */ draw.prototype.drawType = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw payType. * @member {number|Long} payType * @memberof game.draw * @instance */ draw.prototype.payType = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw num. * @member {number|Long} num * @memberof game.draw * @instance */ draw.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new draw instance using the specified properties. * @function create * @memberof game.draw * @static * @param {game.Idraw=} [properties] Properties to set * @returns {game.draw} draw instance */ draw.create = function create(properties) { return new draw(properties); }; /** * Encodes the specified draw message. Does not implicitly {@link game.draw.verify|verify} messages. * @function encode * @memberof game.draw * @static * @param {game.Idraw} message draw message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.drawType != null && Object.hasOwnProperty.call(message, "drawType")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.drawType); if (message.payType != null && Object.hasOwnProperty.call(message, "payType")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.payType); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.num); return writer; }; /** * Encodes the specified draw message, length delimited. Does not implicitly {@link game.draw.verify|verify} messages. * @function encodeDelimited * @memberof game.draw * @static * @param {game.Idraw} message draw message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a draw message from the specified reader or buffer. * @function decode * @memberof game.draw * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.draw} draw * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.draw(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.drawType = reader.int64(); break; case 2: message.payType = reader.int64(); break; case 3: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a draw message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.draw * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.draw} draw * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a draw message. * @function verify * @memberof game.draw * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ draw.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.drawType != null && message.hasOwnProperty("drawType")) if (!$util.isInteger(message.drawType) && !(message.drawType && $util.isInteger(message.drawType.low) && $util.isInteger(message.drawType.high))) return "drawType: integer|Long expected"; if (message.payType != null && message.hasOwnProperty("payType")) if (!$util.isInteger(message.payType) && !(message.payType && $util.isInteger(message.payType.low) && $util.isInteger(message.payType.high))) return "payType: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a draw message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.draw * @static * @param {Object.} object Plain object * @returns {game.draw} draw */ draw.fromObject = function fromObject(object) { if (object instanceof $root.game.draw) return object; let message = new $root.game.draw(); if (object.drawType != null) if ($util.Long) (message.drawType = $util.Long.fromValue(object.drawType)).unsigned = false; else if (typeof object.drawType === "string") message.drawType = parseInt(object.drawType, 10); else if (typeof object.drawType === "number") message.drawType = object.drawType; else if (typeof object.drawType === "object") message.drawType = new $util.LongBits(object.drawType.low >>> 0, object.drawType.high >>> 0).toNumber(); if (object.payType != null) if ($util.Long) (message.payType = $util.Long.fromValue(object.payType)).unsigned = false; else if (typeof object.payType === "string") message.payType = parseInt(object.payType, 10); else if (typeof object.payType === "number") message.payType = object.payType; else if (typeof object.payType === "object") message.payType = new $util.LongBits(object.payType.low >>> 0, object.payType.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a draw message. Also converts values to other types if specified. * @function toObject * @memberof game.draw * @static * @param {game.draw} message draw * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ draw.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.drawType = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.drawType = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.payType = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.payType = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.drawType != null && message.hasOwnProperty("drawType")) if (typeof message.drawType === "number") object.drawType = options.longs === String ? String(message.drawType) : message.drawType; else object.drawType = options.longs === String ? $util.Long.prototype.toString.call(message.drawType) : options.longs === Number ? new $util.LongBits(message.drawType.low >>> 0, message.drawType.high >>> 0).toNumber() : message.drawType; if (message.payType != null && message.hasOwnProperty("payType")) if (typeof message.payType === "number") object.payType = options.longs === String ? String(message.payType) : message.payType; else object.payType = options.longs === String ? $util.Long.prototype.toString.call(message.payType) : options.longs === Number ? new $util.LongBits(message.payType.low >>> 0, message.payType.high >>> 0).toNumber() : message.payType; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this draw to JSON. * @function toJSON * @memberof game.draw * @instance * @returns {Object.} JSON object */ draw.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return draw; })(); game.draw_rsp = (function() { /** * Properties of a draw_rsp. * @memberof game * @interface Idraw_rsp * @property {number|Long|null} [errno] draw_rsp errno * @property {number|Long|null} [drawType] draw_rsp drawType * @property {number|Long|null} [daily] draw_rsp daily * @property {number|Long|null} [free] draw_rsp free * @property {Array.|null} [list] draw_rsp list * @property {Array.|null} [awardList] draw_rsp awardList */ /** * Constructs a new draw_rsp. * @memberof game * @classdesc Represents a draw_rsp. * @implements Idraw_rsp * @constructor * @param {game.Idraw_rsp=} [properties] Properties to set */ function draw_rsp(properties) { this.list = []; this.awardList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * draw_rsp errno. * @member {number|Long} errno * @memberof game.draw_rsp * @instance */ draw_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_rsp drawType. * @member {number|Long} drawType * @memberof game.draw_rsp * @instance */ draw_rsp.prototype.drawType = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_rsp daily. * @member {number|Long} daily * @memberof game.draw_rsp * @instance */ draw_rsp.prototype.daily = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_rsp free. * @member {number|Long} free * @memberof game.draw_rsp * @instance */ draw_rsp.prototype.free = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_rsp list. * @member {Array.} list * @memberof game.draw_rsp * @instance */ draw_rsp.prototype.list = $util.emptyArray; /** * draw_rsp awardList. * @member {Array.} awardList * @memberof game.draw_rsp * @instance */ draw_rsp.prototype.awardList = $util.emptyArray; /** * Creates a new draw_rsp instance using the specified properties. * @function create * @memberof game.draw_rsp * @static * @param {game.Idraw_rsp=} [properties] Properties to set * @returns {game.draw_rsp} draw_rsp instance */ draw_rsp.create = function create(properties) { return new draw_rsp(properties); }; /** * Encodes the specified draw_rsp message. Does not implicitly {@link game.draw_rsp.verify|verify} messages. * @function encode * @memberof game.draw_rsp * @static * @param {game.Idraw_rsp} message draw_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.drawType != null && Object.hasOwnProperty.call(message, "drawType")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.drawType); if (message.daily != null && Object.hasOwnProperty.call(message, "daily")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.daily); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.free); if (message.list != null && message.list.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (let i = 0; i < message.list.length; ++i) writer.int64(message.list[i]); writer.ldelim(); } if (message.awardList != null && message.awardList.length) for (let i = 0; i < message.awardList.length; ++i) $root.game.draw_award_info.encode(message.awardList[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** * Encodes the specified draw_rsp message, length delimited. Does not implicitly {@link game.draw_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.draw_rsp * @static * @param {game.Idraw_rsp} message draw_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a draw_rsp message from the specified reader or buffer. * @function decode * @memberof game.draw_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.draw_rsp} draw_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.draw_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.drawType = reader.int64(); break; case 3: message.daily = reader.int64(); break; case 4: message.free = reader.int64(); break; case 5: if (!(message.list && message.list.length)) message.list = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.list.push(reader.int64()); } else message.list.push(reader.int64()); break; case 6: if (!(message.awardList && message.awardList.length)) message.awardList = []; message.awardList.push($root.game.draw_award_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a draw_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.draw_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.draw_rsp} draw_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a draw_rsp message. * @function verify * @memberof game.draw_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ draw_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.drawType != null && message.hasOwnProperty("drawType")) if (!$util.isInteger(message.drawType) && !(message.drawType && $util.isInteger(message.drawType.low) && $util.isInteger(message.drawType.high))) return "drawType: integer|Long expected"; if (message.daily != null && message.hasOwnProperty("daily")) if (!$util.isInteger(message.daily) && !(message.daily && $util.isInteger(message.daily.low) && $util.isInteger(message.daily.high))) return "daily: integer|Long expected"; if (message.free != null && message.hasOwnProperty("free")) if (!$util.isInteger(message.free) && !(message.free && $util.isInteger(message.free.low) && $util.isInteger(message.free.high))) return "free: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isInteger(message.list[i]) && !(message.list[i] && $util.isInteger(message.list[i].low) && $util.isInteger(message.list[i].high))) return "list: integer|Long[] expected"; } if (message.awardList != null && message.hasOwnProperty("awardList")) { if (!Array.isArray(message.awardList)) return "awardList: array expected"; for (let i = 0; i < message.awardList.length; ++i) { let error = $root.game.draw_award_info.verify(message.awardList[i]); if (error) return "awardList." + error; } } return null; }; /** * Creates a draw_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.draw_rsp * @static * @param {Object.} object Plain object * @returns {game.draw_rsp} draw_rsp */ draw_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.draw_rsp) return object; let message = new $root.game.draw_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.drawType != null) if ($util.Long) (message.drawType = $util.Long.fromValue(object.drawType)).unsigned = false; else if (typeof object.drawType === "string") message.drawType = parseInt(object.drawType, 10); else if (typeof object.drawType === "number") message.drawType = object.drawType; else if (typeof object.drawType === "object") message.drawType = new $util.LongBits(object.drawType.low >>> 0, object.drawType.high >>> 0).toNumber(); if (object.daily != null) if ($util.Long) (message.daily = $util.Long.fromValue(object.daily)).unsigned = false; else if (typeof object.daily === "string") message.daily = parseInt(object.daily, 10); else if (typeof object.daily === "number") message.daily = object.daily; else if (typeof object.daily === "object") message.daily = new $util.LongBits(object.daily.low >>> 0, object.daily.high >>> 0).toNumber(); if (object.free != null) if ($util.Long) (message.free = $util.Long.fromValue(object.free)).unsigned = false; else if (typeof object.free === "string") message.free = parseInt(object.free, 10); else if (typeof object.free === "number") message.free = object.free; else if (typeof object.free === "object") message.free = new $util.LongBits(object.free.low >>> 0, object.free.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.draw_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) if ($util.Long) (message.list[i] = $util.Long.fromValue(object.list[i])).unsigned = false; else if (typeof object.list[i] === "string") message.list[i] = parseInt(object.list[i], 10); else if (typeof object.list[i] === "number") message.list[i] = object.list[i]; else if (typeof object.list[i] === "object") message.list[i] = new $util.LongBits(object.list[i].low >>> 0, object.list[i].high >>> 0).toNumber(); } if (object.awardList) { if (!Array.isArray(object.awardList)) throw TypeError(".game.draw_rsp.awardList: array expected"); message.awardList = []; for (let i = 0; i < object.awardList.length; ++i) { if (typeof object.awardList[i] !== "object") throw TypeError(".game.draw_rsp.awardList: object expected"); message.awardList[i] = $root.game.draw_award_info.fromObject(object.awardList[i]); } } return message; }; /** * Creates a plain object from a draw_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.draw_rsp * @static * @param {game.draw_rsp} message draw_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ draw_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.list = []; object.awardList = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.drawType = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.drawType = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.daily = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.daily = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.free = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.free = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.drawType != null && message.hasOwnProperty("drawType")) if (typeof message.drawType === "number") object.drawType = options.longs === String ? String(message.drawType) : message.drawType; else object.drawType = options.longs === String ? $util.Long.prototype.toString.call(message.drawType) : options.longs === Number ? new $util.LongBits(message.drawType.low >>> 0, message.drawType.high >>> 0).toNumber() : message.drawType; if (message.daily != null && message.hasOwnProperty("daily")) if (typeof message.daily === "number") object.daily = options.longs === String ? String(message.daily) : message.daily; else object.daily = options.longs === String ? $util.Long.prototype.toString.call(message.daily) : options.longs === Number ? new $util.LongBits(message.daily.low >>> 0, message.daily.high >>> 0).toNumber() : message.daily; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free === "number") object.free = options.longs === String ? String(message.free) : message.free; else object.free = options.longs === String ? $util.Long.prototype.toString.call(message.free) : options.longs === Number ? new $util.LongBits(message.free.low >>> 0, message.free.high >>> 0).toNumber() : message.free; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) if (typeof message.list[j] === "number") object.list[j] = options.longs === String ? String(message.list[j]) : message.list[j]; else object.list[j] = options.longs === String ? $util.Long.prototype.toString.call(message.list[j]) : options.longs === Number ? new $util.LongBits(message.list[j].low >>> 0, message.list[j].high >>> 0).toNumber() : message.list[j]; } if (message.awardList && message.awardList.length) { object.awardList = []; for (let j = 0; j < message.awardList.length; ++j) object.awardList[j] = $root.game.draw_award_info.toObject(message.awardList[j], options); } return object; }; /** * Converts this draw_rsp to JSON. * @function toJSON * @memberof game.draw_rsp * @instance * @returns {Object.} JSON object */ draw_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return draw_rsp; })(); game.draw_get_data = (function() { /** * Properties of a draw_get_data. * @memberof game * @interface Idraw_get_data */ /** * Constructs a new draw_get_data. * @memberof game * @classdesc Represents a draw_get_data. * @implements Idraw_get_data * @constructor * @param {game.Idraw_get_data=} [properties] Properties to set */ function draw_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new draw_get_data instance using the specified properties. * @function create * @memberof game.draw_get_data * @static * @param {game.Idraw_get_data=} [properties] Properties to set * @returns {game.draw_get_data} draw_get_data instance */ draw_get_data.create = function create(properties) { return new draw_get_data(properties); }; /** * Encodes the specified draw_get_data message. Does not implicitly {@link game.draw_get_data.verify|verify} messages. * @function encode * @memberof game.draw_get_data * @static * @param {game.Idraw_get_data} message draw_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified draw_get_data message, length delimited. Does not implicitly {@link game.draw_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.draw_get_data * @static * @param {game.Idraw_get_data} message draw_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a draw_get_data message from the specified reader or buffer. * @function decode * @memberof game.draw_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.draw_get_data} draw_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.draw_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a draw_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.draw_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.draw_get_data} draw_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a draw_get_data message. * @function verify * @memberof game.draw_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ draw_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a draw_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.draw_get_data * @static * @param {Object.} object Plain object * @returns {game.draw_get_data} draw_get_data */ draw_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.draw_get_data) return object; return new $root.game.draw_get_data(); }; /** * Creates a plain object from a draw_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.draw_get_data * @static * @param {game.draw_get_data} message draw_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ draw_get_data.toObject = function toObject() { return {}; }; /** * Converts this draw_get_data to JSON. * @function toJSON * @memberof game.draw_get_data * @instance * @returns {Object.} JSON object */ draw_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return draw_get_data; })(); game.draw_get_data_rsp = (function() { /** * Properties of a draw_get_data_rsp. * @memberof game * @interface Idraw_get_data_rsp * @property {number|Long|null} [errno] draw_get_data_rsp errno * @property {game.Idraw_info|null} [hero] draw_get_data_rsp hero * @property {game.Idraw_info|null} [hero2] draw_get_data_rsp hero2 * @property {game.Idraw_info|null} [equip] draw_get_data_rsp equip */ /** * Constructs a new draw_get_data_rsp. * @memberof game * @classdesc Represents a draw_get_data_rsp. * @implements Idraw_get_data_rsp * @constructor * @param {game.Idraw_get_data_rsp=} [properties] Properties to set */ function draw_get_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * draw_get_data_rsp errno. * @member {number|Long} errno * @memberof game.draw_get_data_rsp * @instance */ draw_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_get_data_rsp hero. * @member {game.Idraw_info|null|undefined} hero * @memberof game.draw_get_data_rsp * @instance */ draw_get_data_rsp.prototype.hero = null; /** * draw_get_data_rsp hero2. * @member {game.Idraw_info|null|undefined} hero2 * @memberof game.draw_get_data_rsp * @instance */ draw_get_data_rsp.prototype.hero2 = null; /** * draw_get_data_rsp equip. * @member {game.Idraw_info|null|undefined} equip * @memberof game.draw_get_data_rsp * @instance */ draw_get_data_rsp.prototype.equip = null; /** * Creates a new draw_get_data_rsp instance using the specified properties. * @function create * @memberof game.draw_get_data_rsp * @static * @param {game.Idraw_get_data_rsp=} [properties] Properties to set * @returns {game.draw_get_data_rsp} draw_get_data_rsp instance */ draw_get_data_rsp.create = function create(properties) { return new draw_get_data_rsp(properties); }; /** * Encodes the specified draw_get_data_rsp message. Does not implicitly {@link game.draw_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.draw_get_data_rsp * @static * @param {game.Idraw_get_data_rsp} message draw_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.hero != null && Object.hasOwnProperty.call(message, "hero")) $root.game.draw_info.encode(message.hero, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.hero2 != null && Object.hasOwnProperty.call(message, "hero2")) $root.game.draw_info.encode(message.hero2, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.equip != null && Object.hasOwnProperty.call(message, "equip")) $root.game.draw_info.encode(message.equip, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified draw_get_data_rsp message, length delimited. Does not implicitly {@link game.draw_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.draw_get_data_rsp * @static * @param {game.Idraw_get_data_rsp} message draw_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a draw_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.draw_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.draw_get_data_rsp} draw_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.draw_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.hero = $root.game.draw_info.decode(reader, reader.uint32()); break; case 3: message.hero2 = $root.game.draw_info.decode(reader, reader.uint32()); break; case 4: message.equip = $root.game.draw_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a draw_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.draw_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.draw_get_data_rsp} draw_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a draw_get_data_rsp message. * @function verify * @memberof game.draw_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ draw_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.hero != null && message.hasOwnProperty("hero")) { let error = $root.game.draw_info.verify(message.hero); if (error) return "hero." + error; } if (message.hero2 != null && message.hasOwnProperty("hero2")) { let error = $root.game.draw_info.verify(message.hero2); if (error) return "hero2." + error; } if (message.equip != null && message.hasOwnProperty("equip")) { let error = $root.game.draw_info.verify(message.equip); if (error) return "equip." + error; } return null; }; /** * Creates a draw_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.draw_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.draw_get_data_rsp} draw_get_data_rsp */ draw_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.draw_get_data_rsp) return object; let message = new $root.game.draw_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.hero != null) { if (typeof object.hero !== "object") throw TypeError(".game.draw_get_data_rsp.hero: object expected"); message.hero = $root.game.draw_info.fromObject(object.hero); } if (object.hero2 != null) { if (typeof object.hero2 !== "object") throw TypeError(".game.draw_get_data_rsp.hero2: object expected"); message.hero2 = $root.game.draw_info.fromObject(object.hero2); } if (object.equip != null) { if (typeof object.equip !== "object") throw TypeError(".game.draw_get_data_rsp.equip: object expected"); message.equip = $root.game.draw_info.fromObject(object.equip); } return message; }; /** * Creates a plain object from a draw_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.draw_get_data_rsp * @static * @param {game.draw_get_data_rsp} message draw_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ draw_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.hero = null; object.hero2 = null; object.equip = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.hero != null && message.hasOwnProperty("hero")) object.hero = $root.game.draw_info.toObject(message.hero, options); if (message.hero2 != null && message.hasOwnProperty("hero2")) object.hero2 = $root.game.draw_info.toObject(message.hero2, options); if (message.equip != null && message.hasOwnProperty("equip")) object.equip = $root.game.draw_info.toObject(message.equip, options); return object; }; /** * Converts this draw_get_data_rsp to JSON. * @function toJSON * @memberof game.draw_get_data_rsp * @instance * @returns {Object.} JSON object */ draw_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return draw_get_data_rsp; })(); game.shop_data = (function() { /** * Properties of a shop_data. * @memberof game * @interface Ishop_data */ /** * Constructs a new shop_data. * @memberof game * @classdesc Represents a shop_data. * @implements Ishop_data * @constructor * @param {game.Ishop_data=} [properties] Properties to set */ function shop_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new shop_data instance using the specified properties. * @function create * @memberof game.shop_data * @static * @param {game.Ishop_data=} [properties] Properties to set * @returns {game.shop_data} shop_data instance */ shop_data.create = function create(properties) { return new shop_data(properties); }; /** * Encodes the specified shop_data message. Does not implicitly {@link game.shop_data.verify|verify} messages. * @function encode * @memberof game.shop_data * @static * @param {game.Ishop_data} message shop_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified shop_data message, length delimited. Does not implicitly {@link game.shop_data.verify|verify} messages. * @function encodeDelimited * @memberof game.shop_data * @static * @param {game.Ishop_data} message shop_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a shop_data message from the specified reader or buffer. * @function decode * @memberof game.shop_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.shop_data} shop_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.shop_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a shop_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.shop_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.shop_data} shop_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a shop_data message. * @function verify * @memberof game.shop_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ shop_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a shop_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.shop_data * @static * @param {Object.} object Plain object * @returns {game.shop_data} shop_data */ shop_data.fromObject = function fromObject(object) { if (object instanceof $root.game.shop_data) return object; return new $root.game.shop_data(); }; /** * Creates a plain object from a shop_data message. Also converts values to other types if specified. * @function toObject * @memberof game.shop_data * @static * @param {game.shop_data} message shop_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ shop_data.toObject = function toObject() { return {}; }; /** * Converts this shop_data to JSON. * @function toJSON * @memberof game.shop_data * @instance * @returns {Object.} JSON object */ shop_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return shop_data; })(); game.shop_data_rsp = (function() { /** * Properties of a shop_data_rsp. * @memberof game * @interface Ishop_data_rsp * @property {number|Long|null} [errno] shop_data_rsp errno * @property {Array.|null} [list] shop_data_rsp list */ /** * Constructs a new shop_data_rsp. * @memberof game * @classdesc Represents a shop_data_rsp. * @implements Ishop_data_rsp * @constructor * @param {game.Ishop_data_rsp=} [properties] Properties to set */ function shop_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * shop_data_rsp errno. * @member {number|Long} errno * @memberof game.shop_data_rsp * @instance */ shop_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * shop_data_rsp list. * @member {Array.} list * @memberof game.shop_data_rsp * @instance */ shop_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new shop_data_rsp instance using the specified properties. * @function create * @memberof game.shop_data_rsp * @static * @param {game.Ishop_data_rsp=} [properties] Properties to set * @returns {game.shop_data_rsp} shop_data_rsp instance */ shop_data_rsp.create = function create(properties) { return new shop_data_rsp(properties); }; /** * Encodes the specified shop_data_rsp message. Does not implicitly {@link game.shop_data_rsp.verify|verify} messages. * @function encode * @memberof game.shop_data_rsp * @static * @param {game.Ishop_data_rsp} message shop_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.shop_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified shop_data_rsp message, length delimited. Does not implicitly {@link game.shop_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.shop_data_rsp * @static * @param {game.Ishop_data_rsp} message shop_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a shop_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.shop_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.shop_data_rsp} shop_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.shop_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.shop_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a shop_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.shop_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.shop_data_rsp} shop_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a shop_data_rsp message. * @function verify * @memberof game.shop_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ shop_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.shop_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a shop_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.shop_data_rsp * @static * @param {Object.} object Plain object * @returns {game.shop_data_rsp} shop_data_rsp */ shop_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.shop_data_rsp) return object; let message = new $root.game.shop_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.shop_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.shop_data_rsp.list: object expected"); message.list[i] = $root.game.shop_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a shop_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.shop_data_rsp * @static * @param {game.shop_data_rsp} message shop_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ shop_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.shop_info.toObject(message.list[j], options); } return object; }; /** * Converts this shop_data_rsp to JSON. * @function toJSON * @memberof game.shop_data_rsp * @instance * @returns {Object.} JSON object */ shop_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return shop_data_rsp; })(); game.shop_buy = (function() { /** * Properties of a shop_buy. * @memberof game * @interface Ishop_buy * @property {number|Long|null} [type] shop_buy type * @property {number|Long|null} [id] shop_buy id * @property {number|Long|null} [num] shop_buy num */ /** * Constructs a new shop_buy. * @memberof game * @classdesc Represents a shop_buy. * @implements Ishop_buy * @constructor * @param {game.Ishop_buy=} [properties] Properties to set */ function shop_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * shop_buy type. * @member {number|Long} type * @memberof game.shop_buy * @instance */ shop_buy.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * shop_buy id. * @member {number|Long} id * @memberof game.shop_buy * @instance */ shop_buy.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * shop_buy num. * @member {number|Long} num * @memberof game.shop_buy * @instance */ shop_buy.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new shop_buy instance using the specified properties. * @function create * @memberof game.shop_buy * @static * @param {game.Ishop_buy=} [properties] Properties to set * @returns {game.shop_buy} shop_buy instance */ shop_buy.create = function create(properties) { return new shop_buy(properties); }; /** * Encodes the specified shop_buy message. Does not implicitly {@link game.shop_buy.verify|verify} messages. * @function encode * @memberof game.shop_buy * @static * @param {game.Ishop_buy} message shop_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.num); return writer; }; /** * Encodes the specified shop_buy message, length delimited. Does not implicitly {@link game.shop_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.shop_buy * @static * @param {game.Ishop_buy} message shop_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a shop_buy message from the specified reader or buffer. * @function decode * @memberof game.shop_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.shop_buy} shop_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.shop_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.id = reader.int64(); break; case 3: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a shop_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.shop_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.shop_buy} shop_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a shop_buy message. * @function verify * @memberof game.shop_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ shop_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long 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.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a shop_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.shop_buy * @static * @param {Object.} object Plain object * @returns {game.shop_buy} shop_buy */ shop_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.shop_buy) return object; let message = new $root.game.shop_buy(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); 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.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a shop_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.shop_buy * @static * @param {game.shop_buy} message shop_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ shop_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; 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.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this shop_buy to JSON. * @function toJSON * @memberof game.shop_buy * @instance * @returns {Object.} JSON object */ shop_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return shop_buy; })(); game.shop_buy_rsp = (function() { /** * Properties of a shop_buy_rsp. * @memberof game * @interface Ishop_buy_rsp * @property {number|Long|null} [errno] shop_buy_rsp errno */ /** * Constructs a new shop_buy_rsp. * @memberof game * @classdesc Represents a shop_buy_rsp. * @implements Ishop_buy_rsp * @constructor * @param {game.Ishop_buy_rsp=} [properties] Properties to set */ function shop_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * shop_buy_rsp errno. * @member {number|Long} errno * @memberof game.shop_buy_rsp * @instance */ shop_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new shop_buy_rsp instance using the specified properties. * @function create * @memberof game.shop_buy_rsp * @static * @param {game.Ishop_buy_rsp=} [properties] Properties to set * @returns {game.shop_buy_rsp} shop_buy_rsp instance */ shop_buy_rsp.create = function create(properties) { return new shop_buy_rsp(properties); }; /** * Encodes the specified shop_buy_rsp message. Does not implicitly {@link game.shop_buy_rsp.verify|verify} messages. * @function encode * @memberof game.shop_buy_rsp * @static * @param {game.Ishop_buy_rsp} message shop_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified shop_buy_rsp message, length delimited. Does not implicitly {@link game.shop_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.shop_buy_rsp * @static * @param {game.Ishop_buy_rsp} message shop_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a shop_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.shop_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.shop_buy_rsp} shop_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.shop_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a shop_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.shop_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.shop_buy_rsp} shop_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a shop_buy_rsp message. * @function verify * @memberof game.shop_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ shop_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a shop_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.shop_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.shop_buy_rsp} shop_buy_rsp */ shop_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.shop_buy_rsp) return object; let message = new $root.game.shop_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a shop_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.shop_buy_rsp * @static * @param {game.shop_buy_rsp} message shop_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ shop_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this shop_buy_rsp to JSON. * @function toJSON * @memberof game.shop_buy_rsp * @instance * @returns {Object.} JSON object */ shop_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return shop_buy_rsp; })(); game.shop_notify = (function() { /** * Properties of a shop_notify. * @memberof game * @interface Ishop_notify * @property {number|Long|null} [type] shop_notify type * @property {number|Long|null} [id] shop_notify id * @property {number|Long|null} [num] shop_notify num */ /** * Constructs a new shop_notify. * @memberof game * @classdesc Represents a shop_notify. * @implements Ishop_notify * @constructor * @param {game.Ishop_notify=} [properties] Properties to set */ function shop_notify(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * shop_notify type. * @member {number|Long} type * @memberof game.shop_notify * @instance */ shop_notify.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * shop_notify id. * @member {number|Long} id * @memberof game.shop_notify * @instance */ shop_notify.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * shop_notify num. * @member {number|Long} num * @memberof game.shop_notify * @instance */ shop_notify.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new shop_notify instance using the specified properties. * @function create * @memberof game.shop_notify * @static * @param {game.Ishop_notify=} [properties] Properties to set * @returns {game.shop_notify} shop_notify instance */ shop_notify.create = function create(properties) { return new shop_notify(properties); }; /** * Encodes the specified shop_notify message. Does not implicitly {@link game.shop_notify.verify|verify} messages. * @function encode * @memberof game.shop_notify * @static * @param {game.Ishop_notify} message shop_notify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_notify.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.id); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.num); return writer; }; /** * Encodes the specified shop_notify message, length delimited. Does not implicitly {@link game.shop_notify.verify|verify} messages. * @function encodeDelimited * @memberof game.shop_notify * @static * @param {game.Ishop_notify} message shop_notify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_notify.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a shop_notify message from the specified reader or buffer. * @function decode * @memberof game.shop_notify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.shop_notify} shop_notify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_notify.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.shop_notify(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.type = reader.int64(); break; case 3: message.id = reader.int64(); break; case 4: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a shop_notify message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.shop_notify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.shop_notify} shop_notify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_notify.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a shop_notify message. * @function verify * @memberof game.shop_notify * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ shop_notify.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long 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.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a shop_notify message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.shop_notify * @static * @param {Object.} object Plain object * @returns {game.shop_notify} shop_notify */ shop_notify.fromObject = function fromObject(object) { if (object instanceof $root.game.shop_notify) return object; let message = new $root.game.shop_notify(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); 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.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a shop_notify message. Also converts values to other types if specified. * @function toObject * @memberof game.shop_notify * @static * @param {game.shop_notify} message shop_notify * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ shop_notify.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; 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.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this shop_notify to JSON. * @function toJSON * @memberof game.shop_notify * @instance * @returns {Object.} JSON object */ shop_notify.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return shop_notify; })(); game.ranking_data = (function() { /** * Properties of a ranking_data. * @memberof game * @interface Iranking_data * @property {number|Long|null} [type] ranking_data type */ /** * Constructs a new ranking_data. * @memberof game * @classdesc Represents a ranking_data. * @implements Iranking_data * @constructor * @param {game.Iranking_data=} [properties] Properties to set */ function ranking_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ranking_data type. * @member {number|Long} type * @memberof game.ranking_data * @instance */ ranking_data.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new ranking_data instance using the specified properties. * @function create * @memberof game.ranking_data * @static * @param {game.Iranking_data=} [properties] Properties to set * @returns {game.ranking_data} ranking_data instance */ ranking_data.create = function create(properties) { return new ranking_data(properties); }; /** * Encodes the specified ranking_data message. Does not implicitly {@link game.ranking_data.verify|verify} messages. * @function encode * @memberof game.ranking_data * @static * @param {game.Iranking_data} message ranking_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ranking_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); return writer; }; /** * Encodes the specified ranking_data message, length delimited. Does not implicitly {@link game.ranking_data.verify|verify} messages. * @function encodeDelimited * @memberof game.ranking_data * @static * @param {game.Iranking_data} message ranking_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ranking_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ranking_data message from the specified reader or buffer. * @function decode * @memberof game.ranking_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.ranking_data} ranking_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ranking_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.ranking_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ranking_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.ranking_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.ranking_data} ranking_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ranking_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ranking_data message. * @function verify * @memberof game.ranking_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ranking_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates a ranking_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.ranking_data * @static * @param {Object.} object Plain object * @returns {game.ranking_data} ranking_data */ ranking_data.fromObject = function fromObject(object) { if (object instanceof $root.game.ranking_data) return object; let message = new $root.game.ranking_data(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a ranking_data message. Also converts values to other types if specified. * @function toObject * @memberof game.ranking_data * @static * @param {game.ranking_data} message ranking_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ranking_data.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this ranking_data to JSON. * @function toJSON * @memberof game.ranking_data * @instance * @returns {Object.} JSON object */ ranking_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return ranking_data; })(); game.ranking_data_rsp = (function() { /** * Properties of a ranking_data_rsp. * @memberof game * @interface Iranking_data_rsp * @property {number|Long|null} [errno] ranking_data_rsp errno * @property {number|Long|null} [type] ranking_data_rsp type * @property {Array.|null} [list] ranking_data_rsp list * @property {game.Iranking_info|null} [myslef] ranking_data_rsp myslef */ /** * Constructs a new ranking_data_rsp. * @memberof game * @classdesc Represents a ranking_data_rsp. * @implements Iranking_data_rsp * @constructor * @param {game.Iranking_data_rsp=} [properties] Properties to set */ function ranking_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ranking_data_rsp errno. * @member {number|Long} errno * @memberof game.ranking_data_rsp * @instance */ ranking_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * ranking_data_rsp type. * @member {number|Long} type * @memberof game.ranking_data_rsp * @instance */ ranking_data_rsp.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * ranking_data_rsp list. * @member {Array.} list * @memberof game.ranking_data_rsp * @instance */ ranking_data_rsp.prototype.list = $util.emptyArray; /** * ranking_data_rsp myslef. * @member {game.Iranking_info|null|undefined} myslef * @memberof game.ranking_data_rsp * @instance */ ranking_data_rsp.prototype.myslef = null; /** * Creates a new ranking_data_rsp instance using the specified properties. * @function create * @memberof game.ranking_data_rsp * @static * @param {game.Iranking_data_rsp=} [properties] Properties to set * @returns {game.ranking_data_rsp} ranking_data_rsp instance */ ranking_data_rsp.create = function create(properties) { return new ranking_data_rsp(properties); }; /** * Encodes the specified ranking_data_rsp message. Does not implicitly {@link game.ranking_data_rsp.verify|verify} messages. * @function encode * @memberof game.ranking_data_rsp * @static * @param {game.Iranking_data_rsp} message ranking_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ranking_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.ranking_info.encode(message.list[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.myslef != null && Object.hasOwnProperty.call(message, "myslef")) $root.game.ranking_info.encode(message.myslef, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified ranking_data_rsp message, length delimited. Does not implicitly {@link game.ranking_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.ranking_data_rsp * @static * @param {game.Iranking_data_rsp} message ranking_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ranking_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ranking_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.ranking_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.ranking_data_rsp} ranking_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ranking_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.ranking_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.type = reader.int64(); break; case 3: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.ranking_info.decode(reader, reader.uint32())); break; case 4: message.myslef = $root.game.ranking_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ranking_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.ranking_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.ranking_data_rsp} ranking_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ranking_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ranking_data_rsp message. * @function verify * @memberof game.ranking_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ranking_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.ranking_info.verify(message.list[i]); if (error) return "list." + error; } } if (message.myslef != null && message.hasOwnProperty("myslef")) { let error = $root.game.ranking_info.verify(message.myslef); if (error) return "myslef." + error; } return null; }; /** * Creates a ranking_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.ranking_data_rsp * @static * @param {Object.} object Plain object * @returns {game.ranking_data_rsp} ranking_data_rsp */ ranking_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.ranking_data_rsp) return object; let message = new $root.game.ranking_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.ranking_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.ranking_data_rsp.list: object expected"); message.list[i] = $root.game.ranking_info.fromObject(object.list[i]); } } if (object.myslef != null) { if (typeof object.myslef !== "object") throw TypeError(".game.ranking_data_rsp.myslef: object expected"); message.myslef = $root.game.ranking_info.fromObject(object.myslef); } return message; }; /** * Creates a plain object from a ranking_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.ranking_data_rsp * @static * @param {game.ranking_data_rsp} message ranking_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ranking_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; object.myslef = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.ranking_info.toObject(message.list[j], options); } if (message.myslef != null && message.hasOwnProperty("myslef")) object.myslef = $root.game.ranking_info.toObject(message.myslef, options); return object; }; /** * Converts this ranking_data_rsp to JSON. * @function toJSON * @memberof game.ranking_data_rsp * @instance * @returns {Object.} JSON object */ ranking_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return ranking_data_rsp; })(); game.grocery_data = (function() { /** * Properties of a grocery_data. * @memberof game * @interface Igrocery_data * @property {number|Long|null} [type] grocery_data type */ /** * Constructs a new grocery_data. * @memberof game * @classdesc Represents a grocery_data. * @implements Igrocery_data * @constructor * @param {game.Igrocery_data=} [properties] Properties to set */ function grocery_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * grocery_data type. * @member {number|Long} type * @memberof game.grocery_data * @instance */ grocery_data.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new grocery_data instance using the specified properties. * @function create * @memberof game.grocery_data * @static * @param {game.Igrocery_data=} [properties] Properties to set * @returns {game.grocery_data} grocery_data instance */ grocery_data.create = function create(properties) { return new grocery_data(properties); }; /** * Encodes the specified grocery_data message. Does not implicitly {@link game.grocery_data.verify|verify} messages. * @function encode * @memberof game.grocery_data * @static * @param {game.Igrocery_data} message grocery_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); return writer; }; /** * Encodes the specified grocery_data message, length delimited. Does not implicitly {@link game.grocery_data.verify|verify} messages. * @function encodeDelimited * @memberof game.grocery_data * @static * @param {game.Igrocery_data} message grocery_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a grocery_data message from the specified reader or buffer. * @function decode * @memberof game.grocery_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.grocery_data} grocery_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.grocery_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a grocery_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.grocery_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.grocery_data} grocery_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a grocery_data message. * @function verify * @memberof game.grocery_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ grocery_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates a grocery_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.grocery_data * @static * @param {Object.} object Plain object * @returns {game.grocery_data} grocery_data */ grocery_data.fromObject = function fromObject(object) { if (object instanceof $root.game.grocery_data) return object; let message = new $root.game.grocery_data(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a grocery_data message. Also converts values to other types if specified. * @function toObject * @memberof game.grocery_data * @static * @param {game.grocery_data} message grocery_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ grocery_data.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this grocery_data to JSON. * @function toJSON * @memberof game.grocery_data * @instance * @returns {Object.} JSON object */ grocery_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return grocery_data; })(); game.grocery_data_rsp = (function() { /** * Properties of a grocery_data_rsp. * @memberof game * @interface Igrocery_data_rsp * @property {number|Long|null} [errno] grocery_data_rsp errno * @property {game.Igrocery_info|null} [data] grocery_data_rsp data */ /** * Constructs a new grocery_data_rsp. * @memberof game * @classdesc Represents a grocery_data_rsp. * @implements Igrocery_data_rsp * @constructor * @param {game.Igrocery_data_rsp=} [properties] Properties to set */ function grocery_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * grocery_data_rsp errno. * @member {number|Long} errno * @memberof game.grocery_data_rsp * @instance */ grocery_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * grocery_data_rsp data. * @member {game.Igrocery_info|null|undefined} data * @memberof game.grocery_data_rsp * @instance */ grocery_data_rsp.prototype.data = null; /** * Creates a new grocery_data_rsp instance using the specified properties. * @function create * @memberof game.grocery_data_rsp * @static * @param {game.Igrocery_data_rsp=} [properties] Properties to set * @returns {game.grocery_data_rsp} grocery_data_rsp instance */ grocery_data_rsp.create = function create(properties) { return new grocery_data_rsp(properties); }; /** * Encodes the specified grocery_data_rsp message. Does not implicitly {@link game.grocery_data_rsp.verify|verify} messages. * @function encode * @memberof game.grocery_data_rsp * @static * @param {game.Igrocery_data_rsp} message grocery_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.grocery_info.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified grocery_data_rsp message, length delimited. Does not implicitly {@link game.grocery_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.grocery_data_rsp * @static * @param {game.Igrocery_data_rsp} message grocery_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a grocery_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.grocery_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.grocery_data_rsp} grocery_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.grocery_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.grocery_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a grocery_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.grocery_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.grocery_data_rsp} grocery_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a grocery_data_rsp message. * @function verify * @memberof game.grocery_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ grocery_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.grocery_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a grocery_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.grocery_data_rsp * @static * @param {Object.} object Plain object * @returns {game.grocery_data_rsp} grocery_data_rsp */ grocery_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.grocery_data_rsp) return object; let message = new $root.game.grocery_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.grocery_data_rsp.data: object expected"); message.data = $root.game.grocery_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a grocery_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.grocery_data_rsp * @static * @param {game.grocery_data_rsp} message grocery_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ grocery_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.grocery_info.toObject(message.data, options); return object; }; /** * Converts this grocery_data_rsp to JSON. * @function toJSON * @memberof game.grocery_data_rsp * @instance * @returns {Object.} JSON object */ grocery_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return grocery_data_rsp; })(); game.grocery_buy = (function() { /** * Properties of a grocery_buy. * @memberof game * @interface Igrocery_buy * @property {number|Long|null} [type] grocery_buy type * @property {boolean|null} [free] grocery_buy free */ /** * Constructs a new grocery_buy. * @memberof game * @classdesc Represents a grocery_buy. * @implements Igrocery_buy * @constructor * @param {game.Igrocery_buy=} [properties] Properties to set */ function grocery_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * grocery_buy type. * @member {number|Long} type * @memberof game.grocery_buy * @instance */ grocery_buy.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * grocery_buy free. * @member {boolean} free * @memberof game.grocery_buy * @instance */ grocery_buy.prototype.free = false; /** * Creates a new grocery_buy instance using the specified properties. * @function create * @memberof game.grocery_buy * @static * @param {game.Igrocery_buy=} [properties] Properties to set * @returns {game.grocery_buy} grocery_buy instance */ grocery_buy.create = function create(properties) { return new grocery_buy(properties); }; /** * Encodes the specified grocery_buy message. Does not implicitly {@link game.grocery_buy.verify|verify} messages. * @function encode * @memberof game.grocery_buy * @static * @param {game.Igrocery_buy} message grocery_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.free); return writer; }; /** * Encodes the specified grocery_buy message, length delimited. Does not implicitly {@link game.grocery_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.grocery_buy * @static * @param {game.Igrocery_buy} message grocery_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a grocery_buy message from the specified reader or buffer. * @function decode * @memberof game.grocery_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.grocery_buy} grocery_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.grocery_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.free = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a grocery_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.grocery_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.grocery_buy} grocery_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a grocery_buy message. * @function verify * @memberof game.grocery_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ grocery_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free !== "boolean") return "free: boolean expected"; return null; }; /** * Creates a grocery_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.grocery_buy * @static * @param {Object.} object Plain object * @returns {game.grocery_buy} grocery_buy */ grocery_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.grocery_buy) return object; let message = new $root.game.grocery_buy(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.free != null) message.free = Boolean(object.free); return message; }; /** * Creates a plain object from a grocery_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.grocery_buy * @static * @param {game.grocery_buy} message grocery_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ grocery_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; object.free = false; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.free != null && message.hasOwnProperty("free")) object.free = message.free; return object; }; /** * Converts this grocery_buy to JSON. * @function toJSON * @memberof game.grocery_buy * @instance * @returns {Object.} JSON object */ grocery_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return grocery_buy; })(); game.grocery_buy_rsp = (function() { /** * Properties of a grocery_buy_rsp. * @memberof game * @interface Igrocery_buy_rsp * @property {number|Long|null} [errno] grocery_buy_rsp errno * @property {game.Igrocery_info|null} [data] grocery_buy_rsp data */ /** * Constructs a new grocery_buy_rsp. * @memberof game * @classdesc Represents a grocery_buy_rsp. * @implements Igrocery_buy_rsp * @constructor * @param {game.Igrocery_buy_rsp=} [properties] Properties to set */ function grocery_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * grocery_buy_rsp errno. * @member {number|Long} errno * @memberof game.grocery_buy_rsp * @instance */ grocery_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * grocery_buy_rsp data. * @member {game.Igrocery_info|null|undefined} data * @memberof game.grocery_buy_rsp * @instance */ grocery_buy_rsp.prototype.data = null; /** * Creates a new grocery_buy_rsp instance using the specified properties. * @function create * @memberof game.grocery_buy_rsp * @static * @param {game.Igrocery_buy_rsp=} [properties] Properties to set * @returns {game.grocery_buy_rsp} grocery_buy_rsp instance */ grocery_buy_rsp.create = function create(properties) { return new grocery_buy_rsp(properties); }; /** * Encodes the specified grocery_buy_rsp message. Does not implicitly {@link game.grocery_buy_rsp.verify|verify} messages. * @function encode * @memberof game.grocery_buy_rsp * @static * @param {game.Igrocery_buy_rsp} message grocery_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.grocery_info.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified grocery_buy_rsp message, length delimited. Does not implicitly {@link game.grocery_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.grocery_buy_rsp * @static * @param {game.Igrocery_buy_rsp} message grocery_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a grocery_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.grocery_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.grocery_buy_rsp} grocery_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.grocery_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.grocery_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a grocery_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.grocery_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.grocery_buy_rsp} grocery_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a grocery_buy_rsp message. * @function verify * @memberof game.grocery_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ grocery_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.grocery_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a grocery_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.grocery_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.grocery_buy_rsp} grocery_buy_rsp */ grocery_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.grocery_buy_rsp) return object; let message = new $root.game.grocery_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.grocery_buy_rsp.data: object expected"); message.data = $root.game.grocery_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a grocery_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.grocery_buy_rsp * @static * @param {game.grocery_buy_rsp} message grocery_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ grocery_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.grocery_info.toObject(message.data, options); return object; }; /** * Converts this grocery_buy_rsp to JSON. * @function toJSON * @memberof game.grocery_buy_rsp * @instance * @returns {Object.} JSON object */ grocery_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return grocery_buy_rsp; })(); game.altar_data = (function() { /** * Properties of an altar_data. * @memberof game * @interface Ialtar_data */ /** * Constructs a new altar_data. * @memberof game * @classdesc Represents an altar_data. * @implements Ialtar_data * @constructor * @param {game.Ialtar_data=} [properties] Properties to set */ function altar_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new altar_data instance using the specified properties. * @function create * @memberof game.altar_data * @static * @param {game.Ialtar_data=} [properties] Properties to set * @returns {game.altar_data} altar_data instance */ altar_data.create = function create(properties) { return new altar_data(properties); }; /** * Encodes the specified altar_data message. Does not implicitly {@link game.altar_data.verify|verify} messages. * @function encode * @memberof game.altar_data * @static * @param {game.Ialtar_data} message altar_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified altar_data message, length delimited. Does not implicitly {@link game.altar_data.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_data * @static * @param {game.Ialtar_data} message altar_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_data message from the specified reader or buffer. * @function decode * @memberof game.altar_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_data} altar_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_data} altar_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_data message. * @function verify * @memberof game.altar_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an altar_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_data * @static * @param {Object.} object Plain object * @returns {game.altar_data} altar_data */ altar_data.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_data) return object; return new $root.game.altar_data(); }; /** * Creates a plain object from an altar_data message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_data * @static * @param {game.altar_data} message altar_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_data.toObject = function toObject() { return {}; }; /** * Converts this altar_data to JSON. * @function toJSON * @memberof game.altar_data * @instance * @returns {Object.} JSON object */ altar_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_data; })(); game.altar_data_rsp = (function() { /** * Properties of an altar_data_rsp. * @memberof game * @interface Ialtar_data_rsp * @property {number|Long|null} [errno] altar_data_rsp errno * @property {Array.|null} [baseList] altar_data_rsp baseList * @property {Array.|null} [list] altar_data_rsp list * @property {number|Long|null} [buyNum] altar_data_rsp buyNum * @property {number|Long|null} [equipFree] altar_data_rsp equipFree * @property {number|Long|null} [heroFree] altar_data_rsp heroFree */ /** * Constructs a new altar_data_rsp. * @memberof game * @classdesc Represents an altar_data_rsp. * @implements Ialtar_data_rsp * @constructor * @param {game.Ialtar_data_rsp=} [properties] Properties to set */ function altar_data_rsp(properties) { this.baseList = []; this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_data_rsp errno. * @member {number|Long} errno * @memberof game.altar_data_rsp * @instance */ altar_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_data_rsp baseList. * @member {Array.} baseList * @memberof game.altar_data_rsp * @instance */ altar_data_rsp.prototype.baseList = $util.emptyArray; /** * altar_data_rsp list. * @member {Array.} list * @memberof game.altar_data_rsp * @instance */ altar_data_rsp.prototype.list = $util.emptyArray; /** * altar_data_rsp buyNum. * @member {number|Long} buyNum * @memberof game.altar_data_rsp * @instance */ altar_data_rsp.prototype.buyNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_data_rsp equipFree. * @member {number|Long} equipFree * @memberof game.altar_data_rsp * @instance */ altar_data_rsp.prototype.equipFree = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_data_rsp heroFree. * @member {number|Long} heroFree * @memberof game.altar_data_rsp * @instance */ altar_data_rsp.prototype.heroFree = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new altar_data_rsp instance using the specified properties. * @function create * @memberof game.altar_data_rsp * @static * @param {game.Ialtar_data_rsp=} [properties] Properties to set * @returns {game.altar_data_rsp} altar_data_rsp instance */ altar_data_rsp.create = function create(properties) { return new altar_data_rsp(properties); }; /** * Encodes the specified altar_data_rsp message. Does not implicitly {@link game.altar_data_rsp.verify|verify} messages. * @function encode * @memberof game.altar_data_rsp * @static * @param {game.Ialtar_data_rsp} message altar_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.baseList != null && message.baseList.length) for (let i = 0; i < message.baseList.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseList[i]); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.altar_info.encode(message.list[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.buyNum != null && Object.hasOwnProperty.call(message, "buyNum")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.buyNum); if (message.equipFree != null && Object.hasOwnProperty.call(message, "equipFree")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.equipFree); if (message.heroFree != null && Object.hasOwnProperty.call(message, "heroFree")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.heroFree); return writer; }; /** * Encodes the specified altar_data_rsp message, length delimited. Does not implicitly {@link game.altar_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_data_rsp * @static * @param {game.Ialtar_data_rsp} message altar_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.altar_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_data_rsp} altar_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.baseList && message.baseList.length)) message.baseList = []; message.baseList.push(reader.string()); break; case 3: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.altar_info.decode(reader, reader.uint32())); break; case 4: message.buyNum = reader.int64(); break; case 5: message.equipFree = reader.int64(); break; case 6: message.heroFree = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_data_rsp} altar_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_data_rsp message. * @function verify * @memberof game.altar_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.baseList != null && message.hasOwnProperty("baseList")) { if (!Array.isArray(message.baseList)) return "baseList: array expected"; for (let i = 0; i < message.baseList.length; ++i) if (!$util.isString(message.baseList[i])) return "baseList: string[] expected"; } if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.altar_info.verify(message.list[i]); if (error) return "list." + error; } } if (message.buyNum != null && message.hasOwnProperty("buyNum")) if (!$util.isInteger(message.buyNum) && !(message.buyNum && $util.isInteger(message.buyNum.low) && $util.isInteger(message.buyNum.high))) return "buyNum: integer|Long expected"; if (message.equipFree != null && message.hasOwnProperty("equipFree")) if (!$util.isInteger(message.equipFree) && !(message.equipFree && $util.isInteger(message.equipFree.low) && $util.isInteger(message.equipFree.high))) return "equipFree: integer|Long expected"; if (message.heroFree != null && message.hasOwnProperty("heroFree")) if (!$util.isInteger(message.heroFree) && !(message.heroFree && $util.isInteger(message.heroFree.low) && $util.isInteger(message.heroFree.high))) return "heroFree: integer|Long expected"; return null; }; /** * Creates an altar_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_data_rsp * @static * @param {Object.} object Plain object * @returns {game.altar_data_rsp} altar_data_rsp */ altar_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_data_rsp) return object; let message = new $root.game.altar_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.baseList) { if (!Array.isArray(object.baseList)) throw TypeError(".game.altar_data_rsp.baseList: array expected"); message.baseList = []; for (let i = 0; i < object.baseList.length; ++i) message.baseList[i] = String(object.baseList[i]); } if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.altar_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.altar_data_rsp.list: object expected"); message.list[i] = $root.game.altar_info.fromObject(object.list[i]); } } if (object.buyNum != null) if ($util.Long) (message.buyNum = $util.Long.fromValue(object.buyNum)).unsigned = false; else if (typeof object.buyNum === "string") message.buyNum = parseInt(object.buyNum, 10); else if (typeof object.buyNum === "number") message.buyNum = object.buyNum; else if (typeof object.buyNum === "object") message.buyNum = new $util.LongBits(object.buyNum.low >>> 0, object.buyNum.high >>> 0).toNumber(); if (object.equipFree != null) if ($util.Long) (message.equipFree = $util.Long.fromValue(object.equipFree)).unsigned = false; else if (typeof object.equipFree === "string") message.equipFree = parseInt(object.equipFree, 10); else if (typeof object.equipFree === "number") message.equipFree = object.equipFree; else if (typeof object.equipFree === "object") message.equipFree = new $util.LongBits(object.equipFree.low >>> 0, object.equipFree.high >>> 0).toNumber(); if (object.heroFree != null) if ($util.Long) (message.heroFree = $util.Long.fromValue(object.heroFree)).unsigned = false; else if (typeof object.heroFree === "string") message.heroFree = parseInt(object.heroFree, 10); else if (typeof object.heroFree === "number") message.heroFree = object.heroFree; else if (typeof object.heroFree === "object") message.heroFree = new $util.LongBits(object.heroFree.low >>> 0, object.heroFree.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an altar_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_data_rsp * @static * @param {game.altar_data_rsp} message altar_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.baseList = []; object.list = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.buyNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.buyNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.equipFree = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.equipFree = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.heroFree = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.heroFree = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.baseList && message.baseList.length) { object.baseList = []; for (let j = 0; j < message.baseList.length; ++j) object.baseList[j] = message.baseList[j]; } if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.altar_info.toObject(message.list[j], options); } if (message.buyNum != null && message.hasOwnProperty("buyNum")) if (typeof message.buyNum === "number") object.buyNum = options.longs === String ? String(message.buyNum) : message.buyNum; else object.buyNum = options.longs === String ? $util.Long.prototype.toString.call(message.buyNum) : options.longs === Number ? new $util.LongBits(message.buyNum.low >>> 0, message.buyNum.high >>> 0).toNumber() : message.buyNum; if (message.equipFree != null && message.hasOwnProperty("equipFree")) if (typeof message.equipFree === "number") object.equipFree = options.longs === String ? String(message.equipFree) : message.equipFree; else object.equipFree = options.longs === String ? $util.Long.prototype.toString.call(message.equipFree) : options.longs === Number ? new $util.LongBits(message.equipFree.low >>> 0, message.equipFree.high >>> 0).toNumber() : message.equipFree; if (message.heroFree != null && message.hasOwnProperty("heroFree")) if (typeof message.heroFree === "number") object.heroFree = options.longs === String ? String(message.heroFree) : message.heroFree; else object.heroFree = options.longs === String ? $util.Long.prototype.toString.call(message.heroFree) : options.longs === Number ? new $util.LongBits(message.heroFree.low >>> 0, message.heroFree.high >>> 0).toNumber() : message.heroFree; return object; }; /** * Converts this altar_data_rsp to JSON. * @function toJSON * @memberof game.altar_data_rsp * @instance * @returns {Object.} JSON object */ altar_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_data_rsp; })(); game.altar_battle = (function() { /** * Properties of an altar_battle. * @memberof game * @interface Ialtar_battle * @property {number|Long|null} [pos] altar_battle pos * @property {string|null} [sid] altar_battle sid */ /** * Constructs a new altar_battle. * @memberof game * @classdesc Represents an altar_battle. * @implements Ialtar_battle * @constructor * @param {game.Ialtar_battle=} [properties] Properties to set */ function altar_battle(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_battle pos. * @member {number|Long} pos * @memberof game.altar_battle * @instance */ altar_battle.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_battle sid. * @member {string} sid * @memberof game.altar_battle * @instance */ altar_battle.prototype.sid = ""; /** * Creates a new altar_battle instance using the specified properties. * @function create * @memberof game.altar_battle * @static * @param {game.Ialtar_battle=} [properties] Properties to set * @returns {game.altar_battle} altar_battle instance */ altar_battle.create = function create(properties) { return new altar_battle(properties); }; /** * Encodes the specified altar_battle message. Does not implicitly {@link game.altar_battle.verify|verify} messages. * @function encode * @memberof game.altar_battle * @static * @param {game.Ialtar_battle} message altar_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_battle.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pos); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); return writer; }; /** * Encodes the specified altar_battle message, length delimited. Does not implicitly {@link game.altar_battle.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_battle * @static * @param {game.Ialtar_battle} message altar_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_battle.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_battle message from the specified reader or buffer. * @function decode * @memberof game.altar_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_battle} altar_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_battle.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_battle(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pos = reader.int64(); break; case 2: message.sid = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_battle message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_battle} altar_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_battle.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_battle message. * @function verify * @memberof game.altar_battle * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_battle.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; return null; }; /** * Creates an altar_battle message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_battle * @static * @param {Object.} object Plain object * @returns {game.altar_battle} altar_battle */ altar_battle.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_battle) return object; let message = new $root.game.altar_battle(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); if (object.sid != null) message.sid = String(object.sid); return message; }; /** * Creates a plain object from an altar_battle message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_battle * @static * @param {game.altar_battle} message altar_battle * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_battle.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; object.sid = ""; } if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; return object; }; /** * Converts this altar_battle to JSON. * @function toJSON * @memberof game.altar_battle * @instance * @returns {Object.} JSON object */ altar_battle.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_battle; })(); game.altar_battle_rsp = (function() { /** * Properties of an altar_battle_rsp. * @memberof game * @interface Ialtar_battle_rsp * @property {number|Long|null} [errno] altar_battle_rsp errno * @property {number|Long|null} [pos] altar_battle_rsp pos * @property {game.Ialtar_info|null} [data] altar_battle_rsp data */ /** * Constructs a new altar_battle_rsp. * @memberof game * @classdesc Represents an altar_battle_rsp. * @implements Ialtar_battle_rsp * @constructor * @param {game.Ialtar_battle_rsp=} [properties] Properties to set */ function altar_battle_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_battle_rsp errno. * @member {number|Long} errno * @memberof game.altar_battle_rsp * @instance */ altar_battle_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_battle_rsp pos. * @member {number|Long} pos * @memberof game.altar_battle_rsp * @instance */ altar_battle_rsp.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_battle_rsp data. * @member {game.Ialtar_info|null|undefined} data * @memberof game.altar_battle_rsp * @instance */ altar_battle_rsp.prototype.data = null; /** * Creates a new altar_battle_rsp instance using the specified properties. * @function create * @memberof game.altar_battle_rsp * @static * @param {game.Ialtar_battle_rsp=} [properties] Properties to set * @returns {game.altar_battle_rsp} altar_battle_rsp instance */ altar_battle_rsp.create = function create(properties) { return new altar_battle_rsp(properties); }; /** * Encodes the specified altar_battle_rsp message. Does not implicitly {@link game.altar_battle_rsp.verify|verify} messages. * @function encode * @memberof game.altar_battle_rsp * @static * @param {game.Ialtar_battle_rsp} message altar_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_battle_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pos); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.altar_info.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified altar_battle_rsp message, length delimited. Does not implicitly {@link game.altar_battle_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_battle_rsp * @static * @param {game.Ialtar_battle_rsp} message altar_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_battle_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_battle_rsp message from the specified reader or buffer. * @function decode * @memberof game.altar_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_battle_rsp} altar_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_battle_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_battle_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.pos = reader.int64(); break; case 3: message.data = $root.game.altar_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_battle_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_battle_rsp} altar_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_battle_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_battle_rsp message. * @function verify * @memberof game.altar_battle_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_battle_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.altar_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates an altar_battle_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_battle_rsp * @static * @param {Object.} object Plain object * @returns {game.altar_battle_rsp} altar_battle_rsp */ altar_battle_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_battle_rsp) return object; let message = new $root.game.altar_battle_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.altar_battle_rsp.data: object expected"); message.data = $root.game.altar_info.fromObject(object.data); } return message; }; /** * Creates a plain object from an altar_battle_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_battle_rsp * @static * @param {game.altar_battle_rsp} message altar_battle_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_battle_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.altar_info.toObject(message.data, options); return object; }; /** * Converts this altar_battle_rsp to JSON. * @function toJSON * @memberof game.altar_battle_rsp * @instance * @returns {Object.} JSON object */ altar_battle_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_battle_rsp; })(); game.altar_exchange = (function() { /** * Properties of an altar_exchange. * @memberof game * @interface Ialtar_exchange * @property {number|Long|null} [type] altar_exchange type * @property {string|null} [sid] altar_exchange sid */ /** * Constructs a new altar_exchange. * @memberof game * @classdesc Represents an altar_exchange. * @implements Ialtar_exchange * @constructor * @param {game.Ialtar_exchange=} [properties] Properties to set */ function altar_exchange(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_exchange type. * @member {number|Long} type * @memberof game.altar_exchange * @instance */ altar_exchange.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_exchange sid. * @member {string} sid * @memberof game.altar_exchange * @instance */ altar_exchange.prototype.sid = ""; /** * Creates a new altar_exchange instance using the specified properties. * @function create * @memberof game.altar_exchange * @static * @param {game.Ialtar_exchange=} [properties] Properties to set * @returns {game.altar_exchange} altar_exchange instance */ altar_exchange.create = function create(properties) { return new altar_exchange(properties); }; /** * Encodes the specified altar_exchange message. Does not implicitly {@link game.altar_exchange.verify|verify} messages. * @function encode * @memberof game.altar_exchange * @static * @param {game.Ialtar_exchange} message altar_exchange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); return writer; }; /** * Encodes the specified altar_exchange message, length delimited. Does not implicitly {@link game.altar_exchange.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_exchange * @static * @param {game.Ialtar_exchange} message altar_exchange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_exchange message from the specified reader or buffer. * @function decode * @memberof game.altar_exchange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_exchange} altar_exchange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_exchange(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.sid = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_exchange message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_exchange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_exchange} altar_exchange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_exchange message. * @function verify * @memberof game.altar_exchange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_exchange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; return null; }; /** * Creates an altar_exchange message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_exchange * @static * @param {Object.} object Plain object * @returns {game.altar_exchange} altar_exchange */ altar_exchange.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_exchange) return object; let message = new $root.game.altar_exchange(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.sid != null) message.sid = String(object.sid); return message; }; /** * Creates a plain object from an altar_exchange message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_exchange * @static * @param {game.altar_exchange} message altar_exchange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_exchange.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; object.sid = ""; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; return object; }; /** * Converts this altar_exchange to JSON. * @function toJSON * @memberof game.altar_exchange * @instance * @returns {Object.} JSON object */ altar_exchange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_exchange; })(); game.altar_exchange_rsp = (function() { /** * Properties of an altar_exchange_rsp. * @memberof game * @interface Ialtar_exchange_rsp * @property {number|Long|null} [errno] altar_exchange_rsp errno * @property {number|Long|null} [type] altar_exchange_rsp type * @property {string|null} [sid] altar_exchange_rsp sid * @property {number|Long|null} [id] altar_exchange_rsp id */ /** * Constructs a new altar_exchange_rsp. * @memberof game * @classdesc Represents an altar_exchange_rsp. * @implements Ialtar_exchange_rsp * @constructor * @param {game.Ialtar_exchange_rsp=} [properties] Properties to set */ function altar_exchange_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_exchange_rsp errno. * @member {number|Long} errno * @memberof game.altar_exchange_rsp * @instance */ altar_exchange_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_exchange_rsp type. * @member {number|Long} type * @memberof game.altar_exchange_rsp * @instance */ altar_exchange_rsp.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_exchange_rsp sid. * @member {string} sid * @memberof game.altar_exchange_rsp * @instance */ altar_exchange_rsp.prototype.sid = ""; /** * altar_exchange_rsp id. * @member {number|Long} id * @memberof game.altar_exchange_rsp * @instance */ altar_exchange_rsp.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new altar_exchange_rsp instance using the specified properties. * @function create * @memberof game.altar_exchange_rsp * @static * @param {game.Ialtar_exchange_rsp=} [properties] Properties to set * @returns {game.altar_exchange_rsp} altar_exchange_rsp instance */ altar_exchange_rsp.create = function create(properties) { return new altar_exchange_rsp(properties); }; /** * Encodes the specified altar_exchange_rsp message. Does not implicitly {@link game.altar_exchange_rsp.verify|verify} messages. * @function encode * @memberof game.altar_exchange_rsp * @static * @param {game.Ialtar_exchange_rsp} message altar_exchange_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.sid); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.id); return writer; }; /** * Encodes the specified altar_exchange_rsp message, length delimited. Does not implicitly {@link game.altar_exchange_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_exchange_rsp * @static * @param {game.Ialtar_exchange_rsp} message altar_exchange_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_exchange_rsp message from the specified reader or buffer. * @function decode * @memberof game.altar_exchange_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_exchange_rsp} altar_exchange_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_exchange_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.type = reader.int64(); break; case 3: message.sid = reader.string(); break; case 4: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_exchange_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_exchange_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_exchange_rsp} altar_exchange_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_exchange_rsp message. * @function verify * @memberof game.altar_exchange_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_exchange_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string 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"; return null; }; /** * Creates an altar_exchange_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_exchange_rsp * @static * @param {Object.} object Plain object * @returns {game.altar_exchange_rsp} altar_exchange_rsp */ altar_exchange_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_exchange_rsp) return object; let message = new $root.game.altar_exchange_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.sid != null) message.sid = String(object.sid); 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(); return message; }; /** * Creates a plain object from an altar_exchange_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_exchange_rsp * @static * @param {game.altar_exchange_rsp} message altar_exchange_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_exchange_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; object.sid = ""; if ($util.Long) { let 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; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; 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; return object; }; /** * Converts this altar_exchange_rsp to JSON. * @function toJSON * @memberof game.altar_exchange_rsp * @instance * @returns {Object.} JSON object */ altar_exchange_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_exchange_rsp; })(); game.altar_exchange_confirm = (function() { /** * Properties of an altar_exchange_confirm. * @memberof game * @interface Ialtar_exchange_confirm * @property {number|Long|null} [type] altar_exchange_confirm type * @property {string|null} [sid] altar_exchange_confirm sid * @property {boolean|null} [change] altar_exchange_confirm change */ /** * Constructs a new altar_exchange_confirm. * @memberof game * @classdesc Represents an altar_exchange_confirm. * @implements Ialtar_exchange_confirm * @constructor * @param {game.Ialtar_exchange_confirm=} [properties] Properties to set */ function altar_exchange_confirm(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_exchange_confirm type. * @member {number|Long} type * @memberof game.altar_exchange_confirm * @instance */ altar_exchange_confirm.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_exchange_confirm sid. * @member {string} sid * @memberof game.altar_exchange_confirm * @instance */ altar_exchange_confirm.prototype.sid = ""; /** * altar_exchange_confirm change. * @member {boolean} change * @memberof game.altar_exchange_confirm * @instance */ altar_exchange_confirm.prototype.change = false; /** * Creates a new altar_exchange_confirm instance using the specified properties. * @function create * @memberof game.altar_exchange_confirm * @static * @param {game.Ialtar_exchange_confirm=} [properties] Properties to set * @returns {game.altar_exchange_confirm} altar_exchange_confirm instance */ altar_exchange_confirm.create = function create(properties) { return new altar_exchange_confirm(properties); }; /** * Encodes the specified altar_exchange_confirm message. Does not implicitly {@link game.altar_exchange_confirm.verify|verify} messages. * @function encode * @memberof game.altar_exchange_confirm * @static * @param {game.Ialtar_exchange_confirm} message altar_exchange_confirm message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange_confirm.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); if (message.change != null && Object.hasOwnProperty.call(message, "change")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.change); return writer; }; /** * Encodes the specified altar_exchange_confirm message, length delimited. Does not implicitly {@link game.altar_exchange_confirm.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_exchange_confirm * @static * @param {game.Ialtar_exchange_confirm} message altar_exchange_confirm message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange_confirm.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_exchange_confirm message from the specified reader or buffer. * @function decode * @memberof game.altar_exchange_confirm * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_exchange_confirm} altar_exchange_confirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange_confirm.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_exchange_confirm(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.sid = reader.string(); break; case 3: message.change = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_exchange_confirm message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_exchange_confirm * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_exchange_confirm} altar_exchange_confirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange_confirm.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_exchange_confirm message. * @function verify * @memberof game.altar_exchange_confirm * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_exchange_confirm.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.change != null && message.hasOwnProperty("change")) if (typeof message.change !== "boolean") return "change: boolean expected"; return null; }; /** * Creates an altar_exchange_confirm message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_exchange_confirm * @static * @param {Object.} object Plain object * @returns {game.altar_exchange_confirm} altar_exchange_confirm */ altar_exchange_confirm.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_exchange_confirm) return object; let message = new $root.game.altar_exchange_confirm(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.sid != null) message.sid = String(object.sid); if (object.change != null) message.change = Boolean(object.change); return message; }; /** * Creates a plain object from an altar_exchange_confirm message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_exchange_confirm * @static * @param {game.altar_exchange_confirm} message altar_exchange_confirm * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_exchange_confirm.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; object.sid = ""; object.change = false; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.change != null && message.hasOwnProperty("change")) object.change = message.change; return object; }; /** * Converts this altar_exchange_confirm to JSON. * @function toJSON * @memberof game.altar_exchange_confirm * @instance * @returns {Object.} JSON object */ altar_exchange_confirm.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_exchange_confirm; })(); game.altar_exchange_confirm_rsp = (function() { /** * Properties of an altar_exchange_confirm_rsp. * @memberof game * @interface Ialtar_exchange_confirm_rsp * @property {number|Long|null} [errno] altar_exchange_confirm_rsp errno */ /** * Constructs a new altar_exchange_confirm_rsp. * @memberof game * @classdesc Represents an altar_exchange_confirm_rsp. * @implements Ialtar_exchange_confirm_rsp * @constructor * @param {game.Ialtar_exchange_confirm_rsp=} [properties] Properties to set */ function altar_exchange_confirm_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_exchange_confirm_rsp errno. * @member {number|Long} errno * @memberof game.altar_exchange_confirm_rsp * @instance */ altar_exchange_confirm_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new altar_exchange_confirm_rsp instance using the specified properties. * @function create * @memberof game.altar_exchange_confirm_rsp * @static * @param {game.Ialtar_exchange_confirm_rsp=} [properties] Properties to set * @returns {game.altar_exchange_confirm_rsp} altar_exchange_confirm_rsp instance */ altar_exchange_confirm_rsp.create = function create(properties) { return new altar_exchange_confirm_rsp(properties); }; /** * Encodes the specified altar_exchange_confirm_rsp message. Does not implicitly {@link game.altar_exchange_confirm_rsp.verify|verify} messages. * @function encode * @memberof game.altar_exchange_confirm_rsp * @static * @param {game.Ialtar_exchange_confirm_rsp} message altar_exchange_confirm_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange_confirm_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified altar_exchange_confirm_rsp message, length delimited. Does not implicitly {@link game.altar_exchange_confirm_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_exchange_confirm_rsp * @static * @param {game.Ialtar_exchange_confirm_rsp} message altar_exchange_confirm_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_exchange_confirm_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_exchange_confirm_rsp message from the specified reader or buffer. * @function decode * @memberof game.altar_exchange_confirm_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_exchange_confirm_rsp} altar_exchange_confirm_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange_confirm_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_exchange_confirm_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_exchange_confirm_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_exchange_confirm_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_exchange_confirm_rsp} altar_exchange_confirm_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_exchange_confirm_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_exchange_confirm_rsp message. * @function verify * @memberof game.altar_exchange_confirm_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_exchange_confirm_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an altar_exchange_confirm_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_exchange_confirm_rsp * @static * @param {Object.} object Plain object * @returns {game.altar_exchange_confirm_rsp} altar_exchange_confirm_rsp */ altar_exchange_confirm_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_exchange_confirm_rsp) return object; let message = new $root.game.altar_exchange_confirm_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an altar_exchange_confirm_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_exchange_confirm_rsp * @static * @param {game.altar_exchange_confirm_rsp} message altar_exchange_confirm_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_exchange_confirm_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this altar_exchange_confirm_rsp to JSON. * @function toJSON * @memberof game.altar_exchange_confirm_rsp * @instance * @returns {Object.} JSON object */ altar_exchange_confirm_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_exchange_confirm_rsp; })(); game.altar_buy_battle_space = (function() { /** * Properties of an altar_buy_battle_space. * @memberof game * @interface Ialtar_buy_battle_space */ /** * Constructs a new altar_buy_battle_space. * @memberof game * @classdesc Represents an altar_buy_battle_space. * @implements Ialtar_buy_battle_space * @constructor * @param {game.Ialtar_buy_battle_space=} [properties] Properties to set */ function altar_buy_battle_space(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new altar_buy_battle_space instance using the specified properties. * @function create * @memberof game.altar_buy_battle_space * @static * @param {game.Ialtar_buy_battle_space=} [properties] Properties to set * @returns {game.altar_buy_battle_space} altar_buy_battle_space instance */ altar_buy_battle_space.create = function create(properties) { return new altar_buy_battle_space(properties); }; /** * Encodes the specified altar_buy_battle_space message. Does not implicitly {@link game.altar_buy_battle_space.verify|verify} messages. * @function encode * @memberof game.altar_buy_battle_space * @static * @param {game.Ialtar_buy_battle_space} message altar_buy_battle_space message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_buy_battle_space.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified altar_buy_battle_space message, length delimited. Does not implicitly {@link game.altar_buy_battle_space.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_buy_battle_space * @static * @param {game.Ialtar_buy_battle_space} message altar_buy_battle_space message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_buy_battle_space.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_buy_battle_space message from the specified reader or buffer. * @function decode * @memberof game.altar_buy_battle_space * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_buy_battle_space} altar_buy_battle_space * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_buy_battle_space.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_buy_battle_space(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_buy_battle_space message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_buy_battle_space * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_buy_battle_space} altar_buy_battle_space * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_buy_battle_space.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_buy_battle_space message. * @function verify * @memberof game.altar_buy_battle_space * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_buy_battle_space.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an altar_buy_battle_space message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_buy_battle_space * @static * @param {Object.} object Plain object * @returns {game.altar_buy_battle_space} altar_buy_battle_space */ altar_buy_battle_space.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_buy_battle_space) return object; return new $root.game.altar_buy_battle_space(); }; /** * Creates a plain object from an altar_buy_battle_space message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_buy_battle_space * @static * @param {game.altar_buy_battle_space} message altar_buy_battle_space * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_buy_battle_space.toObject = function toObject() { return {}; }; /** * Converts this altar_buy_battle_space to JSON. * @function toJSON * @memberof game.altar_buy_battle_space * @instance * @returns {Object.} JSON object */ altar_buy_battle_space.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_buy_battle_space; })(); game.altar_buy_battle_space_rsp = (function() { /** * Properties of an altar_buy_battle_space_rsp. * @memberof game * @interface Ialtar_buy_battle_space_rsp * @property {number|Long|null} [errno] altar_buy_battle_space_rsp errno * @property {number|Long|null} [pos] altar_buy_battle_space_rsp pos * @property {game.Ialtar_info|null} [data] altar_buy_battle_space_rsp data */ /** * Constructs a new altar_buy_battle_space_rsp. * @memberof game * @classdesc Represents an altar_buy_battle_space_rsp. * @implements Ialtar_buy_battle_space_rsp * @constructor * @param {game.Ialtar_buy_battle_space_rsp=} [properties] Properties to set */ function altar_buy_battle_space_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_buy_battle_space_rsp errno. * @member {number|Long} errno * @memberof game.altar_buy_battle_space_rsp * @instance */ altar_buy_battle_space_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_buy_battle_space_rsp pos. * @member {number|Long} pos * @memberof game.altar_buy_battle_space_rsp * @instance */ altar_buy_battle_space_rsp.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_buy_battle_space_rsp data. * @member {game.Ialtar_info|null|undefined} data * @memberof game.altar_buy_battle_space_rsp * @instance */ altar_buy_battle_space_rsp.prototype.data = null; /** * Creates a new altar_buy_battle_space_rsp instance using the specified properties. * @function create * @memberof game.altar_buy_battle_space_rsp * @static * @param {game.Ialtar_buy_battle_space_rsp=} [properties] Properties to set * @returns {game.altar_buy_battle_space_rsp} altar_buy_battle_space_rsp instance */ altar_buy_battle_space_rsp.create = function create(properties) { return new altar_buy_battle_space_rsp(properties); }; /** * Encodes the specified altar_buy_battle_space_rsp message. Does not implicitly {@link game.altar_buy_battle_space_rsp.verify|verify} messages. * @function encode * @memberof game.altar_buy_battle_space_rsp * @static * @param {game.Ialtar_buy_battle_space_rsp} message altar_buy_battle_space_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_buy_battle_space_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pos); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.altar_info.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified altar_buy_battle_space_rsp message, length delimited. Does not implicitly {@link game.altar_buy_battle_space_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_buy_battle_space_rsp * @static * @param {game.Ialtar_buy_battle_space_rsp} message altar_buy_battle_space_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_buy_battle_space_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_buy_battle_space_rsp message from the specified reader or buffer. * @function decode * @memberof game.altar_buy_battle_space_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_buy_battle_space_rsp} altar_buy_battle_space_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_buy_battle_space_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_buy_battle_space_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.pos = reader.int64(); break; case 3: message.data = $root.game.altar_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_buy_battle_space_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_buy_battle_space_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_buy_battle_space_rsp} altar_buy_battle_space_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_buy_battle_space_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_buy_battle_space_rsp message. * @function verify * @memberof game.altar_buy_battle_space_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_buy_battle_space_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.altar_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates an altar_buy_battle_space_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_buy_battle_space_rsp * @static * @param {Object.} object Plain object * @returns {game.altar_buy_battle_space_rsp} altar_buy_battle_space_rsp */ altar_buy_battle_space_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_buy_battle_space_rsp) return object; let message = new $root.game.altar_buy_battle_space_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.altar_buy_battle_space_rsp.data: object expected"); message.data = $root.game.altar_info.fromObject(object.data); } return message; }; /** * Creates a plain object from an altar_buy_battle_space_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_buy_battle_space_rsp * @static * @param {game.altar_buy_battle_space_rsp} message altar_buy_battle_space_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_buy_battle_space_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.altar_info.toObject(message.data, options); return object; }; /** * Converts this altar_buy_battle_space_rsp to JSON. * @function toJSON * @memberof game.altar_buy_battle_space_rsp * @instance * @returns {Object.} JSON object */ altar_buy_battle_space_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_buy_battle_space_rsp; })(); game.altar_reset_cd = (function() { /** * Properties of an altar_reset_cd. * @memberof game * @interface Ialtar_reset_cd * @property {number|Long|null} [pos] altar_reset_cd pos */ /** * Constructs a new altar_reset_cd. * @memberof game * @classdesc Represents an altar_reset_cd. * @implements Ialtar_reset_cd * @constructor * @param {game.Ialtar_reset_cd=} [properties] Properties to set */ function altar_reset_cd(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_reset_cd pos. * @member {number|Long} pos * @memberof game.altar_reset_cd * @instance */ altar_reset_cd.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new altar_reset_cd instance using the specified properties. * @function create * @memberof game.altar_reset_cd * @static * @param {game.Ialtar_reset_cd=} [properties] Properties to set * @returns {game.altar_reset_cd} altar_reset_cd instance */ altar_reset_cd.create = function create(properties) { return new altar_reset_cd(properties); }; /** * Encodes the specified altar_reset_cd message. Does not implicitly {@link game.altar_reset_cd.verify|verify} messages. * @function encode * @memberof game.altar_reset_cd * @static * @param {game.Ialtar_reset_cd} message altar_reset_cd message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_reset_cd.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pos); return writer; }; /** * Encodes the specified altar_reset_cd message, length delimited. Does not implicitly {@link game.altar_reset_cd.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_reset_cd * @static * @param {game.Ialtar_reset_cd} message altar_reset_cd message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_reset_cd.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_reset_cd message from the specified reader or buffer. * @function decode * @memberof game.altar_reset_cd * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_reset_cd} altar_reset_cd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_reset_cd.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_reset_cd(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pos = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_reset_cd message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_reset_cd * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_reset_cd} altar_reset_cd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_reset_cd.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_reset_cd message. * @function verify * @memberof game.altar_reset_cd * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_reset_cd.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; return null; }; /** * Creates an altar_reset_cd message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_reset_cd * @static * @param {Object.} object Plain object * @returns {game.altar_reset_cd} altar_reset_cd */ altar_reset_cd.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_reset_cd) return object; let message = new $root.game.altar_reset_cd(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an altar_reset_cd message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_reset_cd * @static * @param {game.altar_reset_cd} message altar_reset_cd * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_reset_cd.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; return object; }; /** * Converts this altar_reset_cd to JSON. * @function toJSON * @memberof game.altar_reset_cd * @instance * @returns {Object.} JSON object */ altar_reset_cd.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_reset_cd; })(); game.altar_reset_cd_rsp = (function() { /** * Properties of an altar_reset_cd_rsp. * @memberof game * @interface Ialtar_reset_cd_rsp * @property {number|Long|null} [errno] altar_reset_cd_rsp errno * @property {number|Long|null} [pos] altar_reset_cd_rsp pos * @property {game.Ialtar_info|null} [data] altar_reset_cd_rsp data */ /** * Constructs a new altar_reset_cd_rsp. * @memberof game * @classdesc Represents an altar_reset_cd_rsp. * @implements Ialtar_reset_cd_rsp * @constructor * @param {game.Ialtar_reset_cd_rsp=} [properties] Properties to set */ function altar_reset_cd_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_reset_cd_rsp errno. * @member {number|Long} errno * @memberof game.altar_reset_cd_rsp * @instance */ altar_reset_cd_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_reset_cd_rsp pos. * @member {number|Long} pos * @memberof game.altar_reset_cd_rsp * @instance */ altar_reset_cd_rsp.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_reset_cd_rsp data. * @member {game.Ialtar_info|null|undefined} data * @memberof game.altar_reset_cd_rsp * @instance */ altar_reset_cd_rsp.prototype.data = null; /** * Creates a new altar_reset_cd_rsp instance using the specified properties. * @function create * @memberof game.altar_reset_cd_rsp * @static * @param {game.Ialtar_reset_cd_rsp=} [properties] Properties to set * @returns {game.altar_reset_cd_rsp} altar_reset_cd_rsp instance */ altar_reset_cd_rsp.create = function create(properties) { return new altar_reset_cd_rsp(properties); }; /** * Encodes the specified altar_reset_cd_rsp message. Does not implicitly {@link game.altar_reset_cd_rsp.verify|verify} messages. * @function encode * @memberof game.altar_reset_cd_rsp * @static * @param {game.Ialtar_reset_cd_rsp} message altar_reset_cd_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_reset_cd_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pos); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.altar_info.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified altar_reset_cd_rsp message, length delimited. Does not implicitly {@link game.altar_reset_cd_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_reset_cd_rsp * @static * @param {game.Ialtar_reset_cd_rsp} message altar_reset_cd_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_reset_cd_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_reset_cd_rsp message from the specified reader or buffer. * @function decode * @memberof game.altar_reset_cd_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_reset_cd_rsp} altar_reset_cd_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_reset_cd_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_reset_cd_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.pos = reader.int64(); break; case 3: message.data = $root.game.altar_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_reset_cd_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_reset_cd_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_reset_cd_rsp} altar_reset_cd_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_reset_cd_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_reset_cd_rsp message. * @function verify * @memberof game.altar_reset_cd_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_reset_cd_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.altar_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates an altar_reset_cd_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_reset_cd_rsp * @static * @param {Object.} object Plain object * @returns {game.altar_reset_cd_rsp} altar_reset_cd_rsp */ altar_reset_cd_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_reset_cd_rsp) return object; let message = new $root.game.altar_reset_cd_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.altar_reset_cd_rsp.data: object expected"); message.data = $root.game.altar_info.fromObject(object.data); } return message; }; /** * Creates a plain object from an altar_reset_cd_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_reset_cd_rsp * @static * @param {game.altar_reset_cd_rsp} message altar_reset_cd_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_reset_cd_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.altar_info.toObject(message.data, options); return object; }; /** * Converts this altar_reset_cd_rsp to JSON. * @function toJSON * @memberof game.altar_reset_cd_rsp * @instance * @returns {Object.} JSON object */ altar_reset_cd_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_reset_cd_rsp; })(); game.relic_data = (function() { /** * Properties of a relic_data. * @memberof game * @interface Irelic_data */ /** * Constructs a new relic_data. * @memberof game * @classdesc Represents a relic_data. * @implements Irelic_data * @constructor * @param {game.Irelic_data=} [properties] Properties to set */ function relic_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new relic_data instance using the specified properties. * @function create * @memberof game.relic_data * @static * @param {game.Irelic_data=} [properties] Properties to set * @returns {game.relic_data} relic_data instance */ relic_data.create = function create(properties) { return new relic_data(properties); }; /** * Encodes the specified relic_data message. Does not implicitly {@link game.relic_data.verify|verify} messages. * @function encode * @memberof game.relic_data * @static * @param {game.Irelic_data} message relic_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified relic_data message, length delimited. Does not implicitly {@link game.relic_data.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_data * @static * @param {game.Irelic_data} message relic_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_data message from the specified reader or buffer. * @function decode * @memberof game.relic_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_data} relic_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_data} relic_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_data message. * @function verify * @memberof game.relic_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a relic_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_data * @static * @param {Object.} object Plain object * @returns {game.relic_data} relic_data */ relic_data.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_data) return object; return new $root.game.relic_data(); }; /** * Creates a plain object from a relic_data message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_data * @static * @param {game.relic_data} message relic_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_data.toObject = function toObject() { return {}; }; /** * Converts this relic_data to JSON. * @function toJSON * @memberof game.relic_data * @instance * @returns {Object.} JSON object */ relic_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_data; })(); game.relic_data_rsp = (function() { /** * Properties of a relic_data_rsp. * @memberof game * @interface Irelic_data_rsp * @property {number|Long|null} [errno] relic_data_rsp errno */ /** * Constructs a new relic_data_rsp. * @memberof game * @classdesc Represents a relic_data_rsp. * @implements Irelic_data_rsp * @constructor * @param {game.Irelic_data_rsp=} [properties] Properties to set */ function relic_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_data_rsp errno. * @member {number|Long} errno * @memberof game.relic_data_rsp * @instance */ relic_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_data_rsp instance using the specified properties. * @function create * @memberof game.relic_data_rsp * @static * @param {game.Irelic_data_rsp=} [properties] Properties to set * @returns {game.relic_data_rsp} relic_data_rsp instance */ relic_data_rsp.create = function create(properties) { return new relic_data_rsp(properties); }; /** * Encodes the specified relic_data_rsp message. Does not implicitly {@link game.relic_data_rsp.verify|verify} messages. * @function encode * @memberof game.relic_data_rsp * @static * @param {game.Irelic_data_rsp} message relic_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified relic_data_rsp message, length delimited. Does not implicitly {@link game.relic_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_data_rsp * @static * @param {game.Irelic_data_rsp} message relic_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.relic_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_data_rsp} relic_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_data_rsp} relic_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_data_rsp message. * @function verify * @memberof game.relic_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a relic_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_data_rsp * @static * @param {Object.} object Plain object * @returns {game.relic_data_rsp} relic_data_rsp */ relic_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_data_rsp) return object; let message = new $root.game.relic_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_data_rsp * @static * @param {game.relic_data_rsp} message relic_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this relic_data_rsp to JSON. * @function toJSON * @memberof game.relic_data_rsp * @instance * @returns {Object.} JSON object */ relic_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_data_rsp; })(); game.relic_next_pos = (function() { /** * Properties of a relic_next_pos. * @memberof game * @interface Irelic_next_pos * @property {number|Long|null} [pos] relic_next_pos pos */ /** * Constructs a new relic_next_pos. * @memberof game * @classdesc Represents a relic_next_pos. * @implements Irelic_next_pos * @constructor * @param {game.Irelic_next_pos=} [properties] Properties to set */ function relic_next_pos(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_next_pos pos. * @member {number|Long} pos * @memberof game.relic_next_pos * @instance */ relic_next_pos.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_next_pos instance using the specified properties. * @function create * @memberof game.relic_next_pos * @static * @param {game.Irelic_next_pos=} [properties] Properties to set * @returns {game.relic_next_pos} relic_next_pos instance */ relic_next_pos.create = function create(properties) { return new relic_next_pos(properties); }; /** * Encodes the specified relic_next_pos message. Does not implicitly {@link game.relic_next_pos.verify|verify} messages. * @function encode * @memberof game.relic_next_pos * @static * @param {game.Irelic_next_pos} message relic_next_pos message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_pos.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pos); return writer; }; /** * Encodes the specified relic_next_pos message, length delimited. Does not implicitly {@link game.relic_next_pos.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_next_pos * @static * @param {game.Irelic_next_pos} message relic_next_pos message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_pos.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_next_pos message from the specified reader or buffer. * @function decode * @memberof game.relic_next_pos * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_next_pos} relic_next_pos * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_pos.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_next_pos(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pos = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_next_pos message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_next_pos * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_next_pos} relic_next_pos * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_pos.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_next_pos message. * @function verify * @memberof game.relic_next_pos * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_next_pos.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; return null; }; /** * Creates a relic_next_pos message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_next_pos * @static * @param {Object.} object Plain object * @returns {game.relic_next_pos} relic_next_pos */ relic_next_pos.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_next_pos) return object; let message = new $root.game.relic_next_pos(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_next_pos message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_next_pos * @static * @param {game.relic_next_pos} message relic_next_pos * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_next_pos.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; return object; }; /** * Converts this relic_next_pos to JSON. * @function toJSON * @memberof game.relic_next_pos * @instance * @returns {Object.} JSON object */ relic_next_pos.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_next_pos; })(); game.relic_next_pos_rsp = (function() { /** * Properties of a relic_next_pos_rsp. * @memberof game * @interface Irelic_next_pos_rsp * @property {number|Long|null} [errno] relic_next_pos_rsp errno */ /** * Constructs a new relic_next_pos_rsp. * @memberof game * @classdesc Represents a relic_next_pos_rsp. * @implements Irelic_next_pos_rsp * @constructor * @param {game.Irelic_next_pos_rsp=} [properties] Properties to set */ function relic_next_pos_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_next_pos_rsp errno. * @member {number|Long} errno * @memberof game.relic_next_pos_rsp * @instance */ relic_next_pos_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_next_pos_rsp instance using the specified properties. * @function create * @memberof game.relic_next_pos_rsp * @static * @param {game.Irelic_next_pos_rsp=} [properties] Properties to set * @returns {game.relic_next_pos_rsp} relic_next_pos_rsp instance */ relic_next_pos_rsp.create = function create(properties) { return new relic_next_pos_rsp(properties); }; /** * Encodes the specified relic_next_pos_rsp message. Does not implicitly {@link game.relic_next_pos_rsp.verify|verify} messages. * @function encode * @memberof game.relic_next_pos_rsp * @static * @param {game.Irelic_next_pos_rsp} message relic_next_pos_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_pos_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified relic_next_pos_rsp message, length delimited. Does not implicitly {@link game.relic_next_pos_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_next_pos_rsp * @static * @param {game.Irelic_next_pos_rsp} message relic_next_pos_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_pos_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_next_pos_rsp message from the specified reader or buffer. * @function decode * @memberof game.relic_next_pos_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_next_pos_rsp} relic_next_pos_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_pos_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_next_pos_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_next_pos_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_next_pos_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_next_pos_rsp} relic_next_pos_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_pos_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_next_pos_rsp message. * @function verify * @memberof game.relic_next_pos_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_next_pos_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a relic_next_pos_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_next_pos_rsp * @static * @param {Object.} object Plain object * @returns {game.relic_next_pos_rsp} relic_next_pos_rsp */ relic_next_pos_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_next_pos_rsp) return object; let message = new $root.game.relic_next_pos_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_next_pos_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_next_pos_rsp * @static * @param {game.relic_next_pos_rsp} message relic_next_pos_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_next_pos_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this relic_next_pos_rsp to JSON. * @function toJSON * @memberof game.relic_next_pos_rsp * @instance * @returns {Object.} JSON object */ relic_next_pos_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_next_pos_rsp; })(); game.relic_next_layer = (function() { /** * Properties of a relic_next_layer. * @memberof game * @interface Irelic_next_layer */ /** * Constructs a new relic_next_layer. * @memberof game * @classdesc Represents a relic_next_layer. * @implements Irelic_next_layer * @constructor * @param {game.Irelic_next_layer=} [properties] Properties to set */ function relic_next_layer(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new relic_next_layer instance using the specified properties. * @function create * @memberof game.relic_next_layer * @static * @param {game.Irelic_next_layer=} [properties] Properties to set * @returns {game.relic_next_layer} relic_next_layer instance */ relic_next_layer.create = function create(properties) { return new relic_next_layer(properties); }; /** * Encodes the specified relic_next_layer message. Does not implicitly {@link game.relic_next_layer.verify|verify} messages. * @function encode * @memberof game.relic_next_layer * @static * @param {game.Irelic_next_layer} message relic_next_layer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_layer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified relic_next_layer message, length delimited. Does not implicitly {@link game.relic_next_layer.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_next_layer * @static * @param {game.Irelic_next_layer} message relic_next_layer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_layer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_next_layer message from the specified reader or buffer. * @function decode * @memberof game.relic_next_layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_next_layer} relic_next_layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_layer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_next_layer(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_next_layer message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_next_layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_next_layer} relic_next_layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_layer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_next_layer message. * @function verify * @memberof game.relic_next_layer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_next_layer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a relic_next_layer message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_next_layer * @static * @param {Object.} object Plain object * @returns {game.relic_next_layer} relic_next_layer */ relic_next_layer.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_next_layer) return object; return new $root.game.relic_next_layer(); }; /** * Creates a plain object from a relic_next_layer message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_next_layer * @static * @param {game.relic_next_layer} message relic_next_layer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_next_layer.toObject = function toObject() { return {}; }; /** * Converts this relic_next_layer to JSON. * @function toJSON * @memberof game.relic_next_layer * @instance * @returns {Object.} JSON object */ relic_next_layer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_next_layer; })(); game.relic_next_layer_rsp = (function() { /** * Properties of a relic_next_layer_rsp. * @memberof game * @interface Irelic_next_layer_rsp * @property {number|Long|null} [errno] relic_next_layer_rsp errno */ /** * Constructs a new relic_next_layer_rsp. * @memberof game * @classdesc Represents a relic_next_layer_rsp. * @implements Irelic_next_layer_rsp * @constructor * @param {game.Irelic_next_layer_rsp=} [properties] Properties to set */ function relic_next_layer_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_next_layer_rsp errno. * @member {number|Long} errno * @memberof game.relic_next_layer_rsp * @instance */ relic_next_layer_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_next_layer_rsp instance using the specified properties. * @function create * @memberof game.relic_next_layer_rsp * @static * @param {game.Irelic_next_layer_rsp=} [properties] Properties to set * @returns {game.relic_next_layer_rsp} relic_next_layer_rsp instance */ relic_next_layer_rsp.create = function create(properties) { return new relic_next_layer_rsp(properties); }; /** * Encodes the specified relic_next_layer_rsp message. Does not implicitly {@link game.relic_next_layer_rsp.verify|verify} messages. * @function encode * @memberof game.relic_next_layer_rsp * @static * @param {game.Irelic_next_layer_rsp} message relic_next_layer_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_layer_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified relic_next_layer_rsp message, length delimited. Does not implicitly {@link game.relic_next_layer_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_next_layer_rsp * @static * @param {game.Irelic_next_layer_rsp} message relic_next_layer_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_next_layer_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_next_layer_rsp message from the specified reader or buffer. * @function decode * @memberof game.relic_next_layer_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_next_layer_rsp} relic_next_layer_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_layer_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_next_layer_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_next_layer_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_next_layer_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_next_layer_rsp} relic_next_layer_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_next_layer_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_next_layer_rsp message. * @function verify * @memberof game.relic_next_layer_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_next_layer_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a relic_next_layer_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_next_layer_rsp * @static * @param {Object.} object Plain object * @returns {game.relic_next_layer_rsp} relic_next_layer_rsp */ relic_next_layer_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_next_layer_rsp) return object; let message = new $root.game.relic_next_layer_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_next_layer_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_next_layer_rsp * @static * @param {game.relic_next_layer_rsp} message relic_next_layer_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_next_layer_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this relic_next_layer_rsp to JSON. * @function toJSON * @memberof game.relic_next_layer_rsp * @instance * @returns {Object.} JSON object */ relic_next_layer_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_next_layer_rsp; })(); game.relic_select_buff = (function() { /** * Properties of a relic_select_buff. * @memberof game * @interface Irelic_select_buff */ /** * Constructs a new relic_select_buff. * @memberof game * @classdesc Represents a relic_select_buff. * @implements Irelic_select_buff * @constructor * @param {game.Irelic_select_buff=} [properties] Properties to set */ function relic_select_buff(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new relic_select_buff instance using the specified properties. * @function create * @memberof game.relic_select_buff * @static * @param {game.Irelic_select_buff=} [properties] Properties to set * @returns {game.relic_select_buff} relic_select_buff instance */ relic_select_buff.create = function create(properties) { return new relic_select_buff(properties); }; /** * Encodes the specified relic_select_buff message. Does not implicitly {@link game.relic_select_buff.verify|verify} messages. * @function encode * @memberof game.relic_select_buff * @static * @param {game.Irelic_select_buff} message relic_select_buff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_select_buff.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified relic_select_buff message, length delimited. Does not implicitly {@link game.relic_select_buff.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_select_buff * @static * @param {game.Irelic_select_buff} message relic_select_buff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_select_buff.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_select_buff message from the specified reader or buffer. * @function decode * @memberof game.relic_select_buff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_select_buff} relic_select_buff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_select_buff.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_select_buff(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_select_buff message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_select_buff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_select_buff} relic_select_buff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_select_buff.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_select_buff message. * @function verify * @memberof game.relic_select_buff * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_select_buff.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a relic_select_buff message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_select_buff * @static * @param {Object.} object Plain object * @returns {game.relic_select_buff} relic_select_buff */ relic_select_buff.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_select_buff) return object; return new $root.game.relic_select_buff(); }; /** * Creates a plain object from a relic_select_buff message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_select_buff * @static * @param {game.relic_select_buff} message relic_select_buff * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_select_buff.toObject = function toObject() { return {}; }; /** * Converts this relic_select_buff to JSON. * @function toJSON * @memberof game.relic_select_buff * @instance * @returns {Object.} JSON object */ relic_select_buff.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_select_buff; })(); game.relic_select_buff_rsp = (function() { /** * Properties of a relic_select_buff_rsp. * @memberof game * @interface Irelic_select_buff_rsp * @property {number|Long|null} [errno] relic_select_buff_rsp errno */ /** * Constructs a new relic_select_buff_rsp. * @memberof game * @classdesc Represents a relic_select_buff_rsp. * @implements Irelic_select_buff_rsp * @constructor * @param {game.Irelic_select_buff_rsp=} [properties] Properties to set */ function relic_select_buff_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_select_buff_rsp errno. * @member {number|Long} errno * @memberof game.relic_select_buff_rsp * @instance */ relic_select_buff_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_select_buff_rsp instance using the specified properties. * @function create * @memberof game.relic_select_buff_rsp * @static * @param {game.Irelic_select_buff_rsp=} [properties] Properties to set * @returns {game.relic_select_buff_rsp} relic_select_buff_rsp instance */ relic_select_buff_rsp.create = function create(properties) { return new relic_select_buff_rsp(properties); }; /** * Encodes the specified relic_select_buff_rsp message. Does not implicitly {@link game.relic_select_buff_rsp.verify|verify} messages. * @function encode * @memberof game.relic_select_buff_rsp * @static * @param {game.Irelic_select_buff_rsp} message relic_select_buff_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_select_buff_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified relic_select_buff_rsp message, length delimited. Does not implicitly {@link game.relic_select_buff_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_select_buff_rsp * @static * @param {game.Irelic_select_buff_rsp} message relic_select_buff_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_select_buff_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_select_buff_rsp message from the specified reader or buffer. * @function decode * @memberof game.relic_select_buff_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_select_buff_rsp} relic_select_buff_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_select_buff_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_select_buff_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_select_buff_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_select_buff_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_select_buff_rsp} relic_select_buff_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_select_buff_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_select_buff_rsp message. * @function verify * @memberof game.relic_select_buff_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_select_buff_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a relic_select_buff_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_select_buff_rsp * @static * @param {Object.} object Plain object * @returns {game.relic_select_buff_rsp} relic_select_buff_rsp */ relic_select_buff_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_select_buff_rsp) return object; let message = new $root.game.relic_select_buff_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_select_buff_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_select_buff_rsp * @static * @param {game.relic_select_buff_rsp} message relic_select_buff_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_select_buff_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this relic_select_buff_rsp to JSON. * @function toJSON * @memberof game.relic_select_buff_rsp * @instance * @returns {Object.} JSON object */ relic_select_buff_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_select_buff_rsp; })(); game.relic_reset = (function() { /** * Properties of a relic_reset. * @memberof game * @interface Irelic_reset * @property {number|Long|null} [difficulty] relic_reset difficulty */ /** * Constructs a new relic_reset. * @memberof game * @classdesc Represents a relic_reset. * @implements Irelic_reset * @constructor * @param {game.Irelic_reset=} [properties] Properties to set */ function relic_reset(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_reset difficulty. * @member {number|Long} difficulty * @memberof game.relic_reset * @instance */ relic_reset.prototype.difficulty = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_reset instance using the specified properties. * @function create * @memberof game.relic_reset * @static * @param {game.Irelic_reset=} [properties] Properties to set * @returns {game.relic_reset} relic_reset instance */ relic_reset.create = function create(properties) { return new relic_reset(properties); }; /** * Encodes the specified relic_reset message. Does not implicitly {@link game.relic_reset.verify|verify} messages. * @function encode * @memberof game.relic_reset * @static * @param {game.Irelic_reset} message relic_reset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_reset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.difficulty != null && Object.hasOwnProperty.call(message, "difficulty")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.difficulty); return writer; }; /** * Encodes the specified relic_reset message, length delimited. Does not implicitly {@link game.relic_reset.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_reset * @static * @param {game.Irelic_reset} message relic_reset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_reset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_reset message from the specified reader or buffer. * @function decode * @memberof game.relic_reset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_reset} relic_reset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_reset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_reset(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.difficulty = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_reset message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_reset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_reset} relic_reset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_reset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_reset message. * @function verify * @memberof game.relic_reset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_reset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.difficulty != null && message.hasOwnProperty("difficulty")) if (!$util.isInteger(message.difficulty) && !(message.difficulty && $util.isInteger(message.difficulty.low) && $util.isInteger(message.difficulty.high))) return "difficulty: integer|Long expected"; return null; }; /** * Creates a relic_reset message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_reset * @static * @param {Object.} object Plain object * @returns {game.relic_reset} relic_reset */ relic_reset.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_reset) return object; let message = new $root.game.relic_reset(); if (object.difficulty != null) if ($util.Long) (message.difficulty = $util.Long.fromValue(object.difficulty)).unsigned = false; else if (typeof object.difficulty === "string") message.difficulty = parseInt(object.difficulty, 10); else if (typeof object.difficulty === "number") message.difficulty = object.difficulty; else if (typeof object.difficulty === "object") message.difficulty = new $util.LongBits(object.difficulty.low >>> 0, object.difficulty.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_reset message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_reset * @static * @param {game.relic_reset} message relic_reset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_reset.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.difficulty = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.difficulty = options.longs === String ? "0" : 0; if (message.difficulty != null && message.hasOwnProperty("difficulty")) if (typeof message.difficulty === "number") object.difficulty = options.longs === String ? String(message.difficulty) : message.difficulty; else object.difficulty = options.longs === String ? $util.Long.prototype.toString.call(message.difficulty) : options.longs === Number ? new $util.LongBits(message.difficulty.low >>> 0, message.difficulty.high >>> 0).toNumber() : message.difficulty; return object; }; /** * Converts this relic_reset to JSON. * @function toJSON * @memberof game.relic_reset * @instance * @returns {Object.} JSON object */ relic_reset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_reset; })(); game.relic_reset_rsp = (function() { /** * Properties of a relic_reset_rsp. * @memberof game * @interface Irelic_reset_rsp * @property {number|Long|null} [errno] relic_reset_rsp errno */ /** * Constructs a new relic_reset_rsp. * @memberof game * @classdesc Represents a relic_reset_rsp. * @implements Irelic_reset_rsp * @constructor * @param {game.Irelic_reset_rsp=} [properties] Properties to set */ function relic_reset_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_reset_rsp errno. * @member {number|Long} errno * @memberof game.relic_reset_rsp * @instance */ relic_reset_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_reset_rsp instance using the specified properties. * @function create * @memberof game.relic_reset_rsp * @static * @param {game.Irelic_reset_rsp=} [properties] Properties to set * @returns {game.relic_reset_rsp} relic_reset_rsp instance */ relic_reset_rsp.create = function create(properties) { return new relic_reset_rsp(properties); }; /** * Encodes the specified relic_reset_rsp message. Does not implicitly {@link game.relic_reset_rsp.verify|verify} messages. * @function encode * @memberof game.relic_reset_rsp * @static * @param {game.Irelic_reset_rsp} message relic_reset_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_reset_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified relic_reset_rsp message, length delimited. Does not implicitly {@link game.relic_reset_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_reset_rsp * @static * @param {game.Irelic_reset_rsp} message relic_reset_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_reset_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_reset_rsp message from the specified reader or buffer. * @function decode * @memberof game.relic_reset_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_reset_rsp} relic_reset_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_reset_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_reset_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_reset_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_reset_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_reset_rsp} relic_reset_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_reset_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_reset_rsp message. * @function verify * @memberof game.relic_reset_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_reset_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a relic_reset_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_reset_rsp * @static * @param {Object.} object Plain object * @returns {game.relic_reset_rsp} relic_reset_rsp */ relic_reset_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_reset_rsp) return object; let message = new $root.game.relic_reset_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_reset_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_reset_rsp * @static * @param {game.relic_reset_rsp} message relic_reset_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_reset_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this relic_reset_rsp to JSON. * @function toJSON * @memberof game.relic_reset_rsp * @instance * @returns {Object.} JSON object */ relic_reset_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_reset_rsp; })(); game.relic_event_select = (function() { /** * Properties of a relic_event_select. * @memberof game * @interface Irelic_event_select * @property {number|Long|null} [type] relic_event_select type * @property {boolean|null} [win] relic_event_select win * @property {number|Long|null} [cost] relic_event_select cost * @property {number|Long|null} [select] relic_event_select select */ /** * Constructs a new relic_event_select. * @memberof game * @classdesc Represents a relic_event_select. * @implements Irelic_event_select * @constructor * @param {game.Irelic_event_select=} [properties] Properties to set */ function relic_event_select(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_event_select type. * @member {number|Long} type * @memberof game.relic_event_select * @instance */ relic_event_select.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_event_select win. * @member {boolean} win * @memberof game.relic_event_select * @instance */ relic_event_select.prototype.win = false; /** * relic_event_select cost. * @member {number|Long} cost * @memberof game.relic_event_select * @instance */ relic_event_select.prototype.cost = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_event_select select. * @member {number|Long} select * @memberof game.relic_event_select * @instance */ relic_event_select.prototype.select = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_event_select instance using the specified properties. * @function create * @memberof game.relic_event_select * @static * @param {game.Irelic_event_select=} [properties] Properties to set * @returns {game.relic_event_select} relic_event_select instance */ relic_event_select.create = function create(properties) { return new relic_event_select(properties); }; /** * Encodes the specified relic_event_select message. Does not implicitly {@link game.relic_event_select.verify|verify} messages. * @function encode * @memberof game.relic_event_select * @static * @param {game.Irelic_event_select} message relic_event_select message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_event_select.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.win != null && Object.hasOwnProperty.call(message, "win")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.win); if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.cost); if (message.select != null && Object.hasOwnProperty.call(message, "select")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.select); return writer; }; /** * Encodes the specified relic_event_select message, length delimited. Does not implicitly {@link game.relic_event_select.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_event_select * @static * @param {game.Irelic_event_select} message relic_event_select message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_event_select.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_event_select message from the specified reader or buffer. * @function decode * @memberof game.relic_event_select * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_event_select} relic_event_select * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_event_select.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_event_select(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.win = reader.bool(); break; case 3: message.cost = reader.int64(); break; case 4: message.select = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_event_select message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_event_select * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_event_select} relic_event_select * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_event_select.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_event_select message. * @function verify * @memberof game.relic_event_select * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_event_select.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.win != null && message.hasOwnProperty("win")) if (typeof message.win !== "boolean") return "win: boolean expected"; if (message.cost != null && message.hasOwnProperty("cost")) if (!$util.isInteger(message.cost) && !(message.cost && $util.isInteger(message.cost.low) && $util.isInteger(message.cost.high))) return "cost: integer|Long expected"; if (message.select != null && message.hasOwnProperty("select")) if (!$util.isInteger(message.select) && !(message.select && $util.isInteger(message.select.low) && $util.isInteger(message.select.high))) return "select: integer|Long expected"; return null; }; /** * Creates a relic_event_select message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_event_select * @static * @param {Object.} object Plain object * @returns {game.relic_event_select} relic_event_select */ relic_event_select.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_event_select) return object; let message = new $root.game.relic_event_select(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.win != null) message.win = Boolean(object.win); if (object.cost != null) if ($util.Long) (message.cost = $util.Long.fromValue(object.cost)).unsigned = false; else if (typeof object.cost === "string") message.cost = parseInt(object.cost, 10); else if (typeof object.cost === "number") message.cost = object.cost; else if (typeof object.cost === "object") message.cost = new $util.LongBits(object.cost.low >>> 0, object.cost.high >>> 0).toNumber(); if (object.select != null) if ($util.Long) (message.select = $util.Long.fromValue(object.select)).unsigned = false; else if (typeof object.select === "string") message.select = parseInt(object.select, 10); else if (typeof object.select === "number") message.select = object.select; else if (typeof object.select === "object") message.select = new $util.LongBits(object.select.low >>> 0, object.select.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_event_select message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_event_select * @static * @param {game.relic_event_select} message relic_event_select * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_event_select.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; object.win = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.cost = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.cost = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.select = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.select = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.win != null && message.hasOwnProperty("win")) object.win = message.win; if (message.cost != null && message.hasOwnProperty("cost")) if (typeof message.cost === "number") object.cost = options.longs === String ? String(message.cost) : message.cost; else object.cost = options.longs === String ? $util.Long.prototype.toString.call(message.cost) : options.longs === Number ? new $util.LongBits(message.cost.low >>> 0, message.cost.high >>> 0).toNumber() : message.cost; if (message.select != null && message.hasOwnProperty("select")) if (typeof message.select === "number") object.select = options.longs === String ? String(message.select) : message.select; else object.select = options.longs === String ? $util.Long.prototype.toString.call(message.select) : options.longs === Number ? new $util.LongBits(message.select.low >>> 0, message.select.high >>> 0).toNumber() : message.select; return object; }; /** * Converts this relic_event_select to JSON. * @function toJSON * @memberof game.relic_event_select * @instance * @returns {Object.} JSON object */ relic_event_select.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_event_select; })(); game.relic_event_select_rsp = (function() { /** * Properties of a relic_event_select_rsp. * @memberof game * @interface Irelic_event_select_rsp * @property {number|Long|null} [errno] relic_event_select_rsp errno */ /** * Constructs a new relic_event_select_rsp. * @memberof game * @classdesc Represents a relic_event_select_rsp. * @implements Irelic_event_select_rsp * @constructor * @param {game.Irelic_event_select_rsp=} [properties] Properties to set */ function relic_event_select_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_event_select_rsp errno. * @member {number|Long} errno * @memberof game.relic_event_select_rsp * @instance */ relic_event_select_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new relic_event_select_rsp instance using the specified properties. * @function create * @memberof game.relic_event_select_rsp * @static * @param {game.Irelic_event_select_rsp=} [properties] Properties to set * @returns {game.relic_event_select_rsp} relic_event_select_rsp instance */ relic_event_select_rsp.create = function create(properties) { return new relic_event_select_rsp(properties); }; /** * Encodes the specified relic_event_select_rsp message. Does not implicitly {@link game.relic_event_select_rsp.verify|verify} messages. * @function encode * @memberof game.relic_event_select_rsp * @static * @param {game.Irelic_event_select_rsp} message relic_event_select_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_event_select_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified relic_event_select_rsp message, length delimited. Does not implicitly {@link game.relic_event_select_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_event_select_rsp * @static * @param {game.Irelic_event_select_rsp} message relic_event_select_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_event_select_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_event_select_rsp message from the specified reader or buffer. * @function decode * @memberof game.relic_event_select_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_event_select_rsp} relic_event_select_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_event_select_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_event_select_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_event_select_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_event_select_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_event_select_rsp} relic_event_select_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_event_select_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_event_select_rsp message. * @function verify * @memberof game.relic_event_select_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_event_select_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a relic_event_select_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_event_select_rsp * @static * @param {Object.} object Plain object * @returns {game.relic_event_select_rsp} relic_event_select_rsp */ relic_event_select_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_event_select_rsp) return object; let message = new $root.game.relic_event_select_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a relic_event_select_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_event_select_rsp * @static * @param {game.relic_event_select_rsp} message relic_event_select_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_event_select_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this relic_event_select_rsp to JSON. * @function toJSON * @memberof game.relic_event_select_rsp * @instance * @returns {Object.} JSON object */ relic_event_select_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_event_select_rsp; })(); game.relic_data_nty = (function() { /** * Properties of a relic_data_nty. * @memberof game * @interface Irelic_data_nty * @property {number|Long|null} [maxDiff] relic_data_nty maxDiff * @property {number|Long|null} [curDiff] relic_data_nty curDiff * @property {Array.|null} [buffList] relic_data_nty buffList * @property {number|Long|null} [layer] relic_data_nty layer * @property {number|Long|null} [pos] relic_data_nty pos * @property {number|Long|null} [cost] relic_data_nty cost * @property {number|Long|null} [state] relic_data_nty state * @property {number|Long|null} [resetTime] relic_data_nty resetTime * @property {Array.|null} [posList] relic_data_nty posList * @property {Array.|null} [battleInfo] relic_data_nty battleInfo */ /** * Constructs a new relic_data_nty. * @memberof game * @classdesc Represents a relic_data_nty. * @implements Irelic_data_nty * @constructor * @param {game.Irelic_data_nty=} [properties] Properties to set */ function relic_data_nty(properties) { this.buffList = []; this.posList = []; this.battleInfo = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_data_nty maxDiff. * @member {number|Long} maxDiff * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.maxDiff = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty curDiff. * @member {number|Long} curDiff * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.curDiff = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty buffList. * @member {Array.} buffList * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.buffList = $util.emptyArray; /** * relic_data_nty layer. * @member {number|Long} layer * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.layer = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty pos. * @member {number|Long} pos * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty cost. * @member {number|Long} cost * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.cost = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty state. * @member {number|Long} state * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.state = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty resetTime. * @member {number|Long} resetTime * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.resetTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_data_nty posList. * @member {Array.} posList * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.posList = $util.emptyArray; /** * relic_data_nty battleInfo. * @member {Array.} battleInfo * @memberof game.relic_data_nty * @instance */ relic_data_nty.prototype.battleInfo = $util.emptyArray; /** * Creates a new relic_data_nty instance using the specified properties. * @function create * @memberof game.relic_data_nty * @static * @param {game.Irelic_data_nty=} [properties] Properties to set * @returns {game.relic_data_nty} relic_data_nty instance */ relic_data_nty.create = function create(properties) { return new relic_data_nty(properties); }; /** * Encodes the specified relic_data_nty message. Does not implicitly {@link game.relic_data_nty.verify|verify} messages. * @function encode * @memberof game.relic_data_nty * @static * @param {game.Irelic_data_nty} message relic_data_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_data_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.maxDiff != null && Object.hasOwnProperty.call(message, "maxDiff")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxDiff); if (message.curDiff != null && Object.hasOwnProperty.call(message, "curDiff")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.curDiff); if (message.buffList != null && message.buffList.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (let i = 0; i < message.buffList.length; ++i) writer.int64(message.buffList[i]); writer.ldelim(); } if (message.layer != null && Object.hasOwnProperty.call(message, "layer")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.layer); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.pos); if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.cost); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.state); if (message.resetTime != null && Object.hasOwnProperty.call(message, "resetTime")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.resetTime); if (message.posList != null && message.posList.length) { writer.uint32(/* id 10, wireType 2 =*/82).fork(); for (let i = 0; i < message.posList.length; ++i) writer.int64(message.posList[i]); writer.ldelim(); } if (message.battleInfo != null && message.battleInfo.length) { writer.uint32(/* id 11, wireType 2 =*/90).fork(); for (let i = 0; i < message.battleInfo.length; ++i) writer.int64(message.battleInfo[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified relic_data_nty message, length delimited. Does not implicitly {@link game.relic_data_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_data_nty * @static * @param {game.Irelic_data_nty} message relic_data_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_data_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_data_nty message from the specified reader or buffer. * @function decode * @memberof game.relic_data_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_data_nty} relic_data_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_data_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_data_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.maxDiff = reader.int64(); break; case 3: message.curDiff = reader.int64(); break; case 4: if (!(message.buffList && message.buffList.length)) message.buffList = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.buffList.push(reader.int64()); } else message.buffList.push(reader.int64()); break; case 5: message.layer = reader.int64(); break; case 6: message.pos = reader.int64(); break; case 7: message.cost = reader.int64(); break; case 8: message.state = reader.int64(); break; case 9: message.resetTime = reader.int64(); break; case 10: if (!(message.posList && message.posList.length)) message.posList = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.posList.push(reader.int64()); } else message.posList.push(reader.int64()); break; case 11: if (!(message.battleInfo && message.battleInfo.length)) message.battleInfo = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.battleInfo.push(reader.int64()); } else message.battleInfo.push(reader.int64()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_data_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_data_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_data_nty} relic_data_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_data_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_data_nty message. * @function verify * @memberof game.relic_data_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_data_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.maxDiff != null && message.hasOwnProperty("maxDiff")) if (!$util.isInteger(message.maxDiff) && !(message.maxDiff && $util.isInteger(message.maxDiff.low) && $util.isInteger(message.maxDiff.high))) return "maxDiff: integer|Long expected"; if (message.curDiff != null && message.hasOwnProperty("curDiff")) if (!$util.isInteger(message.curDiff) && !(message.curDiff && $util.isInteger(message.curDiff.low) && $util.isInteger(message.curDiff.high))) return "curDiff: integer|Long expected"; if (message.buffList != null && message.hasOwnProperty("buffList")) { if (!Array.isArray(message.buffList)) return "buffList: array expected"; for (let i = 0; i < message.buffList.length; ++i) if (!$util.isInteger(message.buffList[i]) && !(message.buffList[i] && $util.isInteger(message.buffList[i].low) && $util.isInteger(message.buffList[i].high))) return "buffList: integer|Long[] expected"; } if (message.layer != null && message.hasOwnProperty("layer")) if (!$util.isInteger(message.layer) && !(message.layer && $util.isInteger(message.layer.low) && $util.isInteger(message.layer.high))) return "layer: integer|Long expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; if (message.cost != null && message.hasOwnProperty("cost")) if (!$util.isInteger(message.cost) && !(message.cost && $util.isInteger(message.cost.low) && $util.isInteger(message.cost.high))) return "cost: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state) && !(message.state && $util.isInteger(message.state.low) && $util.isInteger(message.state.high))) return "state: integer|Long expected"; if (message.resetTime != null && message.hasOwnProperty("resetTime")) if (!$util.isInteger(message.resetTime) && !(message.resetTime && $util.isInteger(message.resetTime.low) && $util.isInteger(message.resetTime.high))) return "resetTime: integer|Long expected"; if (message.posList != null && message.hasOwnProperty("posList")) { if (!Array.isArray(message.posList)) return "posList: array expected"; for (let i = 0; i < message.posList.length; ++i) if (!$util.isInteger(message.posList[i]) && !(message.posList[i] && $util.isInteger(message.posList[i].low) && $util.isInteger(message.posList[i].high))) return "posList: integer|Long[] expected"; } if (message.battleInfo != null && message.hasOwnProperty("battleInfo")) { if (!Array.isArray(message.battleInfo)) return "battleInfo: array expected"; for (let i = 0; i < message.battleInfo.length; ++i) if (!$util.isInteger(message.battleInfo[i]) && !(message.battleInfo[i] && $util.isInteger(message.battleInfo[i].low) && $util.isInteger(message.battleInfo[i].high))) return "battleInfo: integer|Long[] expected"; } return null; }; /** * Creates a relic_data_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_data_nty * @static * @param {Object.} object Plain object * @returns {game.relic_data_nty} relic_data_nty */ relic_data_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_data_nty) return object; let message = new $root.game.relic_data_nty(); if (object.maxDiff != null) if ($util.Long) (message.maxDiff = $util.Long.fromValue(object.maxDiff)).unsigned = false; else if (typeof object.maxDiff === "string") message.maxDiff = parseInt(object.maxDiff, 10); else if (typeof object.maxDiff === "number") message.maxDiff = object.maxDiff; else if (typeof object.maxDiff === "object") message.maxDiff = new $util.LongBits(object.maxDiff.low >>> 0, object.maxDiff.high >>> 0).toNumber(); if (object.curDiff != null) if ($util.Long) (message.curDiff = $util.Long.fromValue(object.curDiff)).unsigned = false; else if (typeof object.curDiff === "string") message.curDiff = parseInt(object.curDiff, 10); else if (typeof object.curDiff === "number") message.curDiff = object.curDiff; else if (typeof object.curDiff === "object") message.curDiff = new $util.LongBits(object.curDiff.low >>> 0, object.curDiff.high >>> 0).toNumber(); if (object.buffList) { if (!Array.isArray(object.buffList)) throw TypeError(".game.relic_data_nty.buffList: array expected"); message.buffList = []; for (let i = 0; i < object.buffList.length; ++i) if ($util.Long) (message.buffList[i] = $util.Long.fromValue(object.buffList[i])).unsigned = false; else if (typeof object.buffList[i] === "string") message.buffList[i] = parseInt(object.buffList[i], 10); else if (typeof object.buffList[i] === "number") message.buffList[i] = object.buffList[i]; else if (typeof object.buffList[i] === "object") message.buffList[i] = new $util.LongBits(object.buffList[i].low >>> 0, object.buffList[i].high >>> 0).toNumber(); } if (object.layer != null) if ($util.Long) (message.layer = $util.Long.fromValue(object.layer)).unsigned = false; else if (typeof object.layer === "string") message.layer = parseInt(object.layer, 10); else if (typeof object.layer === "number") message.layer = object.layer; else if (typeof object.layer === "object") message.layer = new $util.LongBits(object.layer.low >>> 0, object.layer.high >>> 0).toNumber(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); if (object.cost != null) if ($util.Long) (message.cost = $util.Long.fromValue(object.cost)).unsigned = false; else if (typeof object.cost === "string") message.cost = parseInt(object.cost, 10); else if (typeof object.cost === "number") message.cost = object.cost; else if (typeof object.cost === "object") message.cost = new $util.LongBits(object.cost.low >>> 0, object.cost.high >>> 0).toNumber(); if (object.state != null) if ($util.Long) (message.state = $util.Long.fromValue(object.state)).unsigned = false; else if (typeof object.state === "string") message.state = parseInt(object.state, 10); else if (typeof object.state === "number") message.state = object.state; else if (typeof object.state === "object") message.state = new $util.LongBits(object.state.low >>> 0, object.state.high >>> 0).toNumber(); if (object.resetTime != null) if ($util.Long) (message.resetTime = $util.Long.fromValue(object.resetTime)).unsigned = false; else if (typeof object.resetTime === "string") message.resetTime = parseInt(object.resetTime, 10); else if (typeof object.resetTime === "number") message.resetTime = object.resetTime; else if (typeof object.resetTime === "object") message.resetTime = new $util.LongBits(object.resetTime.low >>> 0, object.resetTime.high >>> 0).toNumber(); if (object.posList) { if (!Array.isArray(object.posList)) throw TypeError(".game.relic_data_nty.posList: array expected"); message.posList = []; for (let i = 0; i < object.posList.length; ++i) if ($util.Long) (message.posList[i] = $util.Long.fromValue(object.posList[i])).unsigned = false; else if (typeof object.posList[i] === "string") message.posList[i] = parseInt(object.posList[i], 10); else if (typeof object.posList[i] === "number") message.posList[i] = object.posList[i]; else if (typeof object.posList[i] === "object") message.posList[i] = new $util.LongBits(object.posList[i].low >>> 0, object.posList[i].high >>> 0).toNumber(); } if (object.battleInfo) { if (!Array.isArray(object.battleInfo)) throw TypeError(".game.relic_data_nty.battleInfo: array expected"); message.battleInfo = []; for (let i = 0; i < object.battleInfo.length; ++i) if ($util.Long) (message.battleInfo[i] = $util.Long.fromValue(object.battleInfo[i])).unsigned = false; else if (typeof object.battleInfo[i] === "string") message.battleInfo[i] = parseInt(object.battleInfo[i], 10); else if (typeof object.battleInfo[i] === "number") message.battleInfo[i] = object.battleInfo[i]; else if (typeof object.battleInfo[i] === "object") message.battleInfo[i] = new $util.LongBits(object.battleInfo[i].low >>> 0, object.battleInfo[i].high >>> 0).toNumber(); } return message; }; /** * Creates a plain object from a relic_data_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_data_nty * @static * @param {game.relic_data_nty} message relic_data_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_data_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.buffList = []; object.posList = []; object.battleInfo = []; } if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.maxDiff = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.maxDiff = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.curDiff = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.curDiff = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.layer = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.layer = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.cost = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.cost = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.state = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.state = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.resetTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.resetTime = options.longs === String ? "0" : 0; } if (message.maxDiff != null && message.hasOwnProperty("maxDiff")) if (typeof message.maxDiff === "number") object.maxDiff = options.longs === String ? String(message.maxDiff) : message.maxDiff; else object.maxDiff = options.longs === String ? $util.Long.prototype.toString.call(message.maxDiff) : options.longs === Number ? new $util.LongBits(message.maxDiff.low >>> 0, message.maxDiff.high >>> 0).toNumber() : message.maxDiff; if (message.curDiff != null && message.hasOwnProperty("curDiff")) if (typeof message.curDiff === "number") object.curDiff = options.longs === String ? String(message.curDiff) : message.curDiff; else object.curDiff = options.longs === String ? $util.Long.prototype.toString.call(message.curDiff) : options.longs === Number ? new $util.LongBits(message.curDiff.low >>> 0, message.curDiff.high >>> 0).toNumber() : message.curDiff; if (message.buffList && message.buffList.length) { object.buffList = []; for (let j = 0; j < message.buffList.length; ++j) if (typeof message.buffList[j] === "number") object.buffList[j] = options.longs === String ? String(message.buffList[j]) : message.buffList[j]; else object.buffList[j] = options.longs === String ? $util.Long.prototype.toString.call(message.buffList[j]) : options.longs === Number ? new $util.LongBits(message.buffList[j].low >>> 0, message.buffList[j].high >>> 0).toNumber() : message.buffList[j]; } if (message.layer != null && message.hasOwnProperty("layer")) if (typeof message.layer === "number") object.layer = options.longs === String ? String(message.layer) : message.layer; else object.layer = options.longs === String ? $util.Long.prototype.toString.call(message.layer) : options.longs === Number ? new $util.LongBits(message.layer.low >>> 0, message.layer.high >>> 0).toNumber() : message.layer; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; if (message.cost != null && message.hasOwnProperty("cost")) if (typeof message.cost === "number") object.cost = options.longs === String ? String(message.cost) : message.cost; else object.cost = options.longs === String ? $util.Long.prototype.toString.call(message.cost) : options.longs === Number ? new $util.LongBits(message.cost.low >>> 0, message.cost.high >>> 0).toNumber() : message.cost; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state === "number") object.state = options.longs === String ? String(message.state) : message.state; else object.state = options.longs === String ? $util.Long.prototype.toString.call(message.state) : options.longs === Number ? new $util.LongBits(message.state.low >>> 0, message.state.high >>> 0).toNumber() : message.state; if (message.resetTime != null && message.hasOwnProperty("resetTime")) if (typeof message.resetTime === "number") object.resetTime = options.longs === String ? String(message.resetTime) : message.resetTime; else object.resetTime = options.longs === String ? $util.Long.prototype.toString.call(message.resetTime) : options.longs === Number ? new $util.LongBits(message.resetTime.low >>> 0, message.resetTime.high >>> 0).toNumber() : message.resetTime; if (message.posList && message.posList.length) { object.posList = []; for (let j = 0; j < message.posList.length; ++j) if (typeof message.posList[j] === "number") object.posList[j] = options.longs === String ? String(message.posList[j]) : message.posList[j]; else object.posList[j] = options.longs === String ? $util.Long.prototype.toString.call(message.posList[j]) : options.longs === Number ? new $util.LongBits(message.posList[j].low >>> 0, message.posList[j].high >>> 0).toNumber() : message.posList[j]; } if (message.battleInfo && message.battleInfo.length) { object.battleInfo = []; for (let j = 0; j < message.battleInfo.length; ++j) if (typeof message.battleInfo[j] === "number") object.battleInfo[j] = options.longs === String ? String(message.battleInfo[j]) : message.battleInfo[j]; else object.battleInfo[j] = options.longs === String ? $util.Long.prototype.toString.call(message.battleInfo[j]) : options.longs === Number ? new $util.LongBits(message.battleInfo[j].low >>> 0, message.battleInfo[j].high >>> 0).toNumber() : message.battleInfo[j]; } return object; }; /** * Converts this relic_data_nty to JSON. * @function toJSON * @memberof game.relic_data_nty * @instance * @returns {Object.} JSON object */ relic_data_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_data_nty; })(); game.relic_event_nty = (function() { /** * Properties of a relic_event_nty. * @memberof game * @interface Irelic_event_nty * @property {number|Long|null} [type] relic_event_nty type * @property {number|Long|null} [battleId] relic_event_nty battleId * @property {number|Long|null} [battleType] relic_event_nty battleType * @property {Array.|null} [selectBuff] relic_event_nty selectBuff */ /** * Constructs a new relic_event_nty. * @memberof game * @classdesc Represents a relic_event_nty. * @implements Irelic_event_nty * @constructor * @param {game.Irelic_event_nty=} [properties] Properties to set */ function relic_event_nty(properties) { this.selectBuff = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * relic_event_nty type. * @member {number|Long} type * @memberof game.relic_event_nty * @instance */ relic_event_nty.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_event_nty battleId. * @member {number|Long} battleId * @memberof game.relic_event_nty * @instance */ relic_event_nty.prototype.battleId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_event_nty battleType. * @member {number|Long} battleType * @memberof game.relic_event_nty * @instance */ relic_event_nty.prototype.battleType = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * relic_event_nty selectBuff. * @member {Array.} selectBuff * @memberof game.relic_event_nty * @instance */ relic_event_nty.prototype.selectBuff = $util.emptyArray; /** * Creates a new relic_event_nty instance using the specified properties. * @function create * @memberof game.relic_event_nty * @static * @param {game.Irelic_event_nty=} [properties] Properties to set * @returns {game.relic_event_nty} relic_event_nty instance */ relic_event_nty.create = function create(properties) { return new relic_event_nty(properties); }; /** * Encodes the specified relic_event_nty message. Does not implicitly {@link game.relic_event_nty.verify|verify} messages. * @function encode * @memberof game.relic_event_nty * @static * @param {game.Irelic_event_nty} message relic_event_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_event_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.battleId != null && Object.hasOwnProperty.call(message, "battleId")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.battleId); if (message.battleType != null && Object.hasOwnProperty.call(message, "battleType")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.battleType); if (message.selectBuff != null && message.selectBuff.length) { writer.uint32(/* id 6, wireType 2 =*/50).fork(); for (let i = 0; i < message.selectBuff.length; ++i) writer.int64(message.selectBuff[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified relic_event_nty message, length delimited. Does not implicitly {@link game.relic_event_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.relic_event_nty * @static * @param {game.Irelic_event_nty} message relic_event_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ relic_event_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a relic_event_nty message from the specified reader or buffer. * @function decode * @memberof game.relic_event_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.relic_event_nty} relic_event_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_event_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.relic_event_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 4: message.battleId = reader.int64(); break; case 5: message.battleType = reader.int64(); break; case 6: if (!(message.selectBuff && message.selectBuff.length)) message.selectBuff = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.selectBuff.push(reader.int64()); } else message.selectBuff.push(reader.int64()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a relic_event_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.relic_event_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.relic_event_nty} relic_event_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ relic_event_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a relic_event_nty message. * @function verify * @memberof game.relic_event_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ relic_event_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.battleId != null && message.hasOwnProperty("battleId")) if (!$util.isInteger(message.battleId) && !(message.battleId && $util.isInteger(message.battleId.low) && $util.isInteger(message.battleId.high))) return "battleId: integer|Long expected"; if (message.battleType != null && message.hasOwnProperty("battleType")) if (!$util.isInteger(message.battleType) && !(message.battleType && $util.isInteger(message.battleType.low) && $util.isInteger(message.battleType.high))) return "battleType: integer|Long expected"; if (message.selectBuff != null && message.hasOwnProperty("selectBuff")) { if (!Array.isArray(message.selectBuff)) return "selectBuff: array expected"; for (let i = 0; i < message.selectBuff.length; ++i) if (!$util.isInteger(message.selectBuff[i]) && !(message.selectBuff[i] && $util.isInteger(message.selectBuff[i].low) && $util.isInteger(message.selectBuff[i].high))) return "selectBuff: integer|Long[] expected"; } return null; }; /** * Creates a relic_event_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.relic_event_nty * @static * @param {Object.} object Plain object * @returns {game.relic_event_nty} relic_event_nty */ relic_event_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.relic_event_nty) return object; let message = new $root.game.relic_event_nty(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.battleId != null) if ($util.Long) (message.battleId = $util.Long.fromValue(object.battleId)).unsigned = false; else if (typeof object.battleId === "string") message.battleId = parseInt(object.battleId, 10); else if (typeof object.battleId === "number") message.battleId = object.battleId; else if (typeof object.battleId === "object") message.battleId = new $util.LongBits(object.battleId.low >>> 0, object.battleId.high >>> 0).toNumber(); if (object.battleType != null) if ($util.Long) (message.battleType = $util.Long.fromValue(object.battleType)).unsigned = false; else if (typeof object.battleType === "string") message.battleType = parseInt(object.battleType, 10); else if (typeof object.battleType === "number") message.battleType = object.battleType; else if (typeof object.battleType === "object") message.battleType = new $util.LongBits(object.battleType.low >>> 0, object.battleType.high >>> 0).toNumber(); if (object.selectBuff) { if (!Array.isArray(object.selectBuff)) throw TypeError(".game.relic_event_nty.selectBuff: array expected"); message.selectBuff = []; for (let i = 0; i < object.selectBuff.length; ++i) if ($util.Long) (message.selectBuff[i] = $util.Long.fromValue(object.selectBuff[i])).unsigned = false; else if (typeof object.selectBuff[i] === "string") message.selectBuff[i] = parseInt(object.selectBuff[i], 10); else if (typeof object.selectBuff[i] === "number") message.selectBuff[i] = object.selectBuff[i]; else if (typeof object.selectBuff[i] === "object") message.selectBuff[i] = new $util.LongBits(object.selectBuff[i].low >>> 0, object.selectBuff[i].high >>> 0).toNumber(); } return message; }; /** * Creates a plain object from a relic_event_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.relic_event_nty * @static * @param {game.relic_event_nty} message relic_event_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ relic_event_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.selectBuff = []; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.battleId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.battleId = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.battleType = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.battleType = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.battleId != null && message.hasOwnProperty("battleId")) if (typeof message.battleId === "number") object.battleId = options.longs === String ? String(message.battleId) : message.battleId; else object.battleId = options.longs === String ? $util.Long.prototype.toString.call(message.battleId) : options.longs === Number ? new $util.LongBits(message.battleId.low >>> 0, message.battleId.high >>> 0).toNumber() : message.battleId; if (message.battleType != null && message.hasOwnProperty("battleType")) if (typeof message.battleType === "number") object.battleType = options.longs === String ? String(message.battleType) : message.battleType; else object.battleType = options.longs === String ? $util.Long.prototype.toString.call(message.battleType) : options.longs === Number ? new $util.LongBits(message.battleType.low >>> 0, message.battleType.high >>> 0).toNumber() : message.battleType; if (message.selectBuff && message.selectBuff.length) { object.selectBuff = []; for (let j = 0; j < message.selectBuff.length; ++j) if (typeof message.selectBuff[j] === "number") object.selectBuff[j] = options.longs === String ? String(message.selectBuff[j]) : message.selectBuff[j]; else object.selectBuff[j] = options.longs === String ? $util.Long.prototype.toString.call(message.selectBuff[j]) : options.longs === Number ? new $util.LongBits(message.selectBuff[j].low >>> 0, message.selectBuff[j].high >>> 0).toNumber() : message.selectBuff[j]; } return object; }; /** * Converts this relic_event_nty to JSON. * @function toJSON * @memberof game.relic_event_nty * @instance * @returns {Object.} JSON object */ relic_event_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return relic_event_nty; })(); game.activity_time_list_nty = (function() { /** * Properties of an activity_time_list_nty. * @memberof game * @interface Iactivity_time_list_nty * @property {Array.|null} [list] activity_time_list_nty list */ /** * Constructs a new activity_time_list_nty. * @memberof game * @classdesc Represents an activity_time_list_nty. * @implements Iactivity_time_list_nty * @constructor * @param {game.Iactivity_time_list_nty=} [properties] Properties to set */ function activity_time_list_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * activity_time_list_nty list. * @member {Array.} list * @memberof game.activity_time_list_nty * @instance */ activity_time_list_nty.prototype.list = $util.emptyArray; /** * Creates a new activity_time_list_nty instance using the specified properties. * @function create * @memberof game.activity_time_list_nty * @static * @param {game.Iactivity_time_list_nty=} [properties] Properties to set * @returns {game.activity_time_list_nty} activity_time_list_nty instance */ activity_time_list_nty.create = function create(properties) { return new activity_time_list_nty(properties); }; /** * Encodes the specified activity_time_list_nty message. Does not implicitly {@link game.activity_time_list_nty.verify|verify} messages. * @function encode * @memberof game.activity_time_list_nty * @static * @param {game.Iactivity_time_list_nty} message activity_time_list_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_time_list_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.activity_time_info.encode(message.list[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified activity_time_list_nty message, length delimited. Does not implicitly {@link game.activity_time_list_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.activity_time_list_nty * @static * @param {game.Iactivity_time_list_nty} message activity_time_list_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_time_list_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an activity_time_list_nty message from the specified reader or buffer. * @function decode * @memberof game.activity_time_list_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.activity_time_list_nty} activity_time_list_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_time_list_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.activity_time_list_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.activity_time_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an activity_time_list_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.activity_time_list_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.activity_time_list_nty} activity_time_list_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_time_list_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an activity_time_list_nty message. * @function verify * @memberof game.activity_time_list_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ activity_time_list_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.activity_time_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an activity_time_list_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.activity_time_list_nty * @static * @param {Object.} object Plain object * @returns {game.activity_time_list_nty} activity_time_list_nty */ activity_time_list_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.activity_time_list_nty) return object; let message = new $root.game.activity_time_list_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.activity_time_list_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.activity_time_list_nty.list: object expected"); message.list[i] = $root.game.activity_time_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an activity_time_list_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.activity_time_list_nty * @static * @param {game.activity_time_list_nty} message activity_time_list_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ activity_time_list_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.activity_time_info.toObject(message.list[j], options); } return object; }; /** * Converts this activity_time_list_nty to JSON. * @function toJSON * @memberof game.activity_time_list_nty * @instance * @returns {Object.} JSON object */ activity_time_list_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return activity_time_list_nty; })(); game.activity_get_conf_list = (function() { /** * Properties of an activity_get_conf_list. * @memberof game * @interface Iactivity_get_conf_list * @property {Array.|null} [list] activity_get_conf_list list */ /** * Constructs a new activity_get_conf_list. * @memberof game * @classdesc Represents an activity_get_conf_list. * @implements Iactivity_get_conf_list * @constructor * @param {game.Iactivity_get_conf_list=} [properties] Properties to set */ function activity_get_conf_list(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * activity_get_conf_list list. * @member {Array.} list * @memberof game.activity_get_conf_list * @instance */ activity_get_conf_list.prototype.list = $util.emptyArray; /** * Creates a new activity_get_conf_list instance using the specified properties. * @function create * @memberof game.activity_get_conf_list * @static * @param {game.Iactivity_get_conf_list=} [properties] Properties to set * @returns {game.activity_get_conf_list} activity_get_conf_list instance */ activity_get_conf_list.create = function create(properties) { return new activity_get_conf_list(properties); }; /** * Encodes the specified activity_get_conf_list message. Does not implicitly {@link game.activity_get_conf_list.verify|verify} messages. * @function encode * @memberof game.activity_get_conf_list * @static * @param {game.Iactivity_get_conf_list} message activity_get_conf_list message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_get_conf_list.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.list[i]); return writer; }; /** * Encodes the specified activity_get_conf_list message, length delimited. Does not implicitly {@link game.activity_get_conf_list.verify|verify} messages. * @function encodeDelimited * @memberof game.activity_get_conf_list * @static * @param {game.Iactivity_get_conf_list} message activity_get_conf_list message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_get_conf_list.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an activity_get_conf_list message from the specified reader or buffer. * @function decode * @memberof game.activity_get_conf_list * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.activity_get_conf_list} activity_get_conf_list * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_get_conf_list.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.activity_get_conf_list(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an activity_get_conf_list message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.activity_get_conf_list * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.activity_get_conf_list} activity_get_conf_list * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_get_conf_list.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an activity_get_conf_list message. * @function verify * @memberof game.activity_get_conf_list * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ activity_get_conf_list.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates an activity_get_conf_list message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.activity_get_conf_list * @static * @param {Object.} object Plain object * @returns {game.activity_get_conf_list} activity_get_conf_list */ activity_get_conf_list.fromObject = function fromObject(object) { if (object instanceof $root.game.activity_get_conf_list) return object; let message = new $root.game.activity_get_conf_list(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.activity_get_conf_list.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from an activity_get_conf_list message. Also converts values to other types if specified. * @function toObject * @memberof game.activity_get_conf_list * @static * @param {game.activity_get_conf_list} message activity_get_conf_list * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ activity_get_conf_list.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this activity_get_conf_list to JSON. * @function toJSON * @memberof game.activity_get_conf_list * @instance * @returns {Object.} JSON object */ activity_get_conf_list.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return activity_get_conf_list; })(); game.activity_get_conf_list_rsp = (function() { /** * Properties of an activity_get_conf_list_rsp. * @memberof game * @interface Iactivity_get_conf_list_rsp * @property {number|Long|null} [errno] activity_get_conf_list_rsp errno * @property {Array.|null} [list] activity_get_conf_list_rsp list */ /** * Constructs a new activity_get_conf_list_rsp. * @memberof game * @classdesc Represents an activity_get_conf_list_rsp. * @implements Iactivity_get_conf_list_rsp * @constructor * @param {game.Iactivity_get_conf_list_rsp=} [properties] Properties to set */ function activity_get_conf_list_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * activity_get_conf_list_rsp errno. * @member {number|Long} errno * @memberof game.activity_get_conf_list_rsp * @instance */ activity_get_conf_list_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_get_conf_list_rsp list. * @member {Array.} list * @memberof game.activity_get_conf_list_rsp * @instance */ activity_get_conf_list_rsp.prototype.list = $util.emptyArray; /** * Creates a new activity_get_conf_list_rsp instance using the specified properties. * @function create * @memberof game.activity_get_conf_list_rsp * @static * @param {game.Iactivity_get_conf_list_rsp=} [properties] Properties to set * @returns {game.activity_get_conf_list_rsp} activity_get_conf_list_rsp instance */ activity_get_conf_list_rsp.create = function create(properties) { return new activity_get_conf_list_rsp(properties); }; /** * Encodes the specified activity_get_conf_list_rsp message. Does not implicitly {@link game.activity_get_conf_list_rsp.verify|verify} messages. * @function encode * @memberof game.activity_get_conf_list_rsp * @static * @param {game.Iactivity_get_conf_list_rsp} message activity_get_conf_list_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_get_conf_list_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.activity_conf_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified activity_get_conf_list_rsp message, length delimited. Does not implicitly {@link game.activity_get_conf_list_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.activity_get_conf_list_rsp * @static * @param {game.Iactivity_get_conf_list_rsp} message activity_get_conf_list_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_get_conf_list_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an activity_get_conf_list_rsp message from the specified reader or buffer. * @function decode * @memberof game.activity_get_conf_list_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.activity_get_conf_list_rsp} activity_get_conf_list_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_get_conf_list_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.activity_get_conf_list_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.activity_conf_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an activity_get_conf_list_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.activity_get_conf_list_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.activity_get_conf_list_rsp} activity_get_conf_list_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_get_conf_list_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an activity_get_conf_list_rsp message. * @function verify * @memberof game.activity_get_conf_list_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ activity_get_conf_list_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.activity_conf_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an activity_get_conf_list_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.activity_get_conf_list_rsp * @static * @param {Object.} object Plain object * @returns {game.activity_get_conf_list_rsp} activity_get_conf_list_rsp */ activity_get_conf_list_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.activity_get_conf_list_rsp) return object; let message = new $root.game.activity_get_conf_list_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.activity_get_conf_list_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.activity_get_conf_list_rsp.list: object expected"); message.list[i] = $root.game.activity_conf_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an activity_get_conf_list_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.activity_get_conf_list_rsp * @static * @param {game.activity_get_conf_list_rsp} message activity_get_conf_list_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ activity_get_conf_list_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.activity_conf_info.toObject(message.list[j], options); } return object; }; /** * Converts this activity_get_conf_list_rsp to JSON. * @function toJSON * @memberof game.activity_get_conf_list_rsp * @instance * @returns {Object.} JSON object */ activity_get_conf_list_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return activity_get_conf_list_rsp; })(); game.activity_get_conf_nty = (function() { /** * Properties of an activity_get_conf_nty. * @memberof game * @interface Iactivity_get_conf_nty * @property {Array.|null} [list] activity_get_conf_nty list */ /** * Constructs a new activity_get_conf_nty. * @memberof game * @classdesc Represents an activity_get_conf_nty. * @implements Iactivity_get_conf_nty * @constructor * @param {game.Iactivity_get_conf_nty=} [properties] Properties to set */ function activity_get_conf_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * activity_get_conf_nty list. * @member {Array.} list * @memberof game.activity_get_conf_nty * @instance */ activity_get_conf_nty.prototype.list = $util.emptyArray; /** * Creates a new activity_get_conf_nty instance using the specified properties. * @function create * @memberof game.activity_get_conf_nty * @static * @param {game.Iactivity_get_conf_nty=} [properties] Properties to set * @returns {game.activity_get_conf_nty} activity_get_conf_nty instance */ activity_get_conf_nty.create = function create(properties) { return new activity_get_conf_nty(properties); }; /** * Encodes the specified activity_get_conf_nty message. Does not implicitly {@link game.activity_get_conf_nty.verify|verify} messages. * @function encode * @memberof game.activity_get_conf_nty * @static * @param {game.Iactivity_get_conf_nty} message activity_get_conf_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_get_conf_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (let i = 0; i < message.list.length; ++i) writer.int64(message.list[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified activity_get_conf_nty message, length delimited. Does not implicitly {@link game.activity_get_conf_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.activity_get_conf_nty * @static * @param {game.Iactivity_get_conf_nty} message activity_get_conf_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_get_conf_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an activity_get_conf_nty message from the specified reader or buffer. * @function decode * @memberof game.activity_get_conf_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.activity_get_conf_nty} activity_get_conf_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_get_conf_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.activity_get_conf_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.list.push(reader.int64()); } else message.list.push(reader.int64()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an activity_get_conf_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.activity_get_conf_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.activity_get_conf_nty} activity_get_conf_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_get_conf_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an activity_get_conf_nty message. * @function verify * @memberof game.activity_get_conf_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ activity_get_conf_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isInteger(message.list[i]) && !(message.list[i] && $util.isInteger(message.list[i].low) && $util.isInteger(message.list[i].high))) return "list: integer|Long[] expected"; } return null; }; /** * Creates an activity_get_conf_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.activity_get_conf_nty * @static * @param {Object.} object Plain object * @returns {game.activity_get_conf_nty} activity_get_conf_nty */ activity_get_conf_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.activity_get_conf_nty) return object; let message = new $root.game.activity_get_conf_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.activity_get_conf_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) if ($util.Long) (message.list[i] = $util.Long.fromValue(object.list[i])).unsigned = false; else if (typeof object.list[i] === "string") message.list[i] = parseInt(object.list[i], 10); else if (typeof object.list[i] === "number") message.list[i] = object.list[i]; else if (typeof object.list[i] === "object") message.list[i] = new $util.LongBits(object.list[i].low >>> 0, object.list[i].high >>> 0).toNumber(); } return message; }; /** * Creates a plain object from an activity_get_conf_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.activity_get_conf_nty * @static * @param {game.activity_get_conf_nty} message activity_get_conf_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ activity_get_conf_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) if (typeof message.list[j] === "number") object.list[j] = options.longs === String ? String(message.list[j]) : message.list[j]; else object.list[j] = options.longs === String ? $util.Long.prototype.toString.call(message.list[j]) : options.longs === Number ? new $util.LongBits(message.list[j].low >>> 0, message.list[j].high >>> 0).toNumber() : message.list[j]; } return object; }; /** * Converts this activity_get_conf_nty to JSON. * @function toJSON * @memberof game.activity_get_conf_nty * @instance * @returns {Object.} JSON object */ activity_get_conf_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return activity_get_conf_nty; })(); game.privilege_card_data = (function() { /** * Properties of a privilege_card_data. * @memberof game * @interface Iprivilege_card_data */ /** * Constructs a new privilege_card_data. * @memberof game * @classdesc Represents a privilege_card_data. * @implements Iprivilege_card_data * @constructor * @param {game.Iprivilege_card_data=} [properties] Properties to set */ function privilege_card_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new privilege_card_data instance using the specified properties. * @function create * @memberof game.privilege_card_data * @static * @param {game.Iprivilege_card_data=} [properties] Properties to set * @returns {game.privilege_card_data} privilege_card_data instance */ privilege_card_data.create = function create(properties) { return new privilege_card_data(properties); }; /** * Encodes the specified privilege_card_data message. Does not implicitly {@link game.privilege_card_data.verify|verify} messages. * @function encode * @memberof game.privilege_card_data * @static * @param {game.Iprivilege_card_data} message privilege_card_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified privilege_card_data message, length delimited. Does not implicitly {@link game.privilege_card_data.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_data * @static * @param {game.Iprivilege_card_data} message privilege_card_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_data message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_data} privilege_card_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_data} privilege_card_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_data message. * @function verify * @memberof game.privilege_card_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a privilege_card_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_data * @static * @param {Object.} object Plain object * @returns {game.privilege_card_data} privilege_card_data */ privilege_card_data.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_data) return object; return new $root.game.privilege_card_data(); }; /** * Creates a plain object from a privilege_card_data message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_data * @static * @param {game.privilege_card_data} message privilege_card_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_data.toObject = function toObject() { return {}; }; /** * Converts this privilege_card_data to JSON. * @function toJSON * @memberof game.privilege_card_data * @instance * @returns {Object.} JSON object */ privilege_card_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_data; })(); game.privilege_card_data_rsp = (function() { /** * Properties of a privilege_card_data_rsp. * @memberof game * @interface Iprivilege_card_data_rsp * @property {number|Long|null} [errno] privilege_card_data_rsp errno * @property {Array.|null} [list] privilege_card_data_rsp list */ /** * Constructs a new privilege_card_data_rsp. * @memberof game * @classdesc Represents a privilege_card_data_rsp. * @implements Iprivilege_card_data_rsp * @constructor * @param {game.Iprivilege_card_data_rsp=} [properties] Properties to set */ function privilege_card_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_data_rsp errno. * @member {number|Long} errno * @memberof game.privilege_card_data_rsp * @instance */ privilege_card_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * privilege_card_data_rsp list. * @member {Array.} list * @memberof game.privilege_card_data_rsp * @instance */ privilege_card_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new privilege_card_data_rsp instance using the specified properties. * @function create * @memberof game.privilege_card_data_rsp * @static * @param {game.Iprivilege_card_data_rsp=} [properties] Properties to set * @returns {game.privilege_card_data_rsp} privilege_card_data_rsp instance */ privilege_card_data_rsp.create = function create(properties) { return new privilege_card_data_rsp(properties); }; /** * Encodes the specified privilege_card_data_rsp message. Does not implicitly {@link game.privilege_card_data_rsp.verify|verify} messages. * @function encode * @memberof game.privilege_card_data_rsp * @static * @param {game.Iprivilege_card_data_rsp} message privilege_card_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.privilege_card_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified privilege_card_data_rsp message, length delimited. Does not implicitly {@link game.privilege_card_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_data_rsp * @static * @param {game.Iprivilege_card_data_rsp} message privilege_card_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_data_rsp} privilege_card_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.privilege_card_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_data_rsp} privilege_card_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_data_rsp message. * @function verify * @memberof game.privilege_card_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.privilege_card_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a privilege_card_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_data_rsp * @static * @param {Object.} object Plain object * @returns {game.privilege_card_data_rsp} privilege_card_data_rsp */ privilege_card_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_data_rsp) return object; let message = new $root.game.privilege_card_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.privilege_card_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.privilege_card_data_rsp.list: object expected"); message.list[i] = $root.game.privilege_card_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a privilege_card_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_data_rsp * @static * @param {game.privilege_card_data_rsp} message privilege_card_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.privilege_card_info.toObject(message.list[j], options); } return object; }; /** * Converts this privilege_card_data_rsp to JSON. * @function toJSON * @memberof game.privilege_card_data_rsp * @instance * @returns {Object.} JSON object */ privilege_card_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_data_rsp; })(); game.privilege_card_buy = (function() { /** * Properties of a privilege_card_buy. * @memberof game * @interface Iprivilege_card_buy * @property {number|Long|null} [moduleid] privilege_card_buy moduleid */ /** * Constructs a new privilege_card_buy. * @memberof game * @classdesc Represents a privilege_card_buy. * @implements Iprivilege_card_buy * @constructor * @param {game.Iprivilege_card_buy=} [properties] Properties to set */ function privilege_card_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_buy moduleid. * @member {number|Long} moduleid * @memberof game.privilege_card_buy * @instance */ privilege_card_buy.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new privilege_card_buy instance using the specified properties. * @function create * @memberof game.privilege_card_buy * @static * @param {game.Iprivilege_card_buy=} [properties] Properties to set * @returns {game.privilege_card_buy} privilege_card_buy instance */ privilege_card_buy.create = function create(properties) { return new privilege_card_buy(properties); }; /** * Encodes the specified privilege_card_buy message. Does not implicitly {@link game.privilege_card_buy.verify|verify} messages. * @function encode * @memberof game.privilege_card_buy * @static * @param {game.Iprivilege_card_buy} message privilege_card_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified privilege_card_buy message, length delimited. Does not implicitly {@link game.privilege_card_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_buy * @static * @param {game.Iprivilege_card_buy} message privilege_card_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_buy message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_buy} privilege_card_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_buy} privilege_card_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_buy message. * @function verify * @memberof game.privilege_card_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a privilege_card_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_buy * @static * @param {Object.} object Plain object * @returns {game.privilege_card_buy} privilege_card_buy */ privilege_card_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_buy) return object; let message = new $root.game.privilege_card_buy(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a privilege_card_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_buy * @static * @param {game.privilege_card_buy} message privilege_card_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this privilege_card_buy to JSON. * @function toJSON * @memberof game.privilege_card_buy * @instance * @returns {Object.} JSON object */ privilege_card_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_buy; })(); game.privilege_card_buy_rsp = (function() { /** * Properties of a privilege_card_buy_rsp. * @memberof game * @interface Iprivilege_card_buy_rsp * @property {number|Long|null} [errno] privilege_card_buy_rsp errno */ /** * Constructs a new privilege_card_buy_rsp. * @memberof game * @classdesc Represents a privilege_card_buy_rsp. * @implements Iprivilege_card_buy_rsp * @constructor * @param {game.Iprivilege_card_buy_rsp=} [properties] Properties to set */ function privilege_card_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_buy_rsp errno. * @member {number|Long} errno * @memberof game.privilege_card_buy_rsp * @instance */ privilege_card_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new privilege_card_buy_rsp instance using the specified properties. * @function create * @memberof game.privilege_card_buy_rsp * @static * @param {game.Iprivilege_card_buy_rsp=} [properties] Properties to set * @returns {game.privilege_card_buy_rsp} privilege_card_buy_rsp instance */ privilege_card_buy_rsp.create = function create(properties) { return new privilege_card_buy_rsp(properties); }; /** * Encodes the specified privilege_card_buy_rsp message. Does not implicitly {@link game.privilege_card_buy_rsp.verify|verify} messages. * @function encode * @memberof game.privilege_card_buy_rsp * @static * @param {game.Iprivilege_card_buy_rsp} message privilege_card_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified privilege_card_buy_rsp message, length delimited. Does not implicitly {@link game.privilege_card_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_buy_rsp * @static * @param {game.Iprivilege_card_buy_rsp} message privilege_card_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_buy_rsp} privilege_card_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_buy_rsp} privilege_card_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_buy_rsp message. * @function verify * @memberof game.privilege_card_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a privilege_card_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.privilege_card_buy_rsp} privilege_card_buy_rsp */ privilege_card_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_buy_rsp) return object; let message = new $root.game.privilege_card_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a privilege_card_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_buy_rsp * @static * @param {game.privilege_card_buy_rsp} message privilege_card_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this privilege_card_buy_rsp to JSON. * @function toJSON * @memberof game.privilege_card_buy_rsp * @instance * @returns {Object.} JSON object */ privilege_card_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_buy_rsp; })(); game.privilege_card_unlock_nty = (function() { /** * Properties of a privilege_card_unlock_nty. * @memberof game * @interface Iprivilege_card_unlock_nty * @property {game.Iprivilege_card_info|null} [data] privilege_card_unlock_nty data */ /** * Constructs a new privilege_card_unlock_nty. * @memberof game * @classdesc Represents a privilege_card_unlock_nty. * @implements Iprivilege_card_unlock_nty * @constructor * @param {game.Iprivilege_card_unlock_nty=} [properties] Properties to set */ function privilege_card_unlock_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_unlock_nty data. * @member {game.Iprivilege_card_info|null|undefined} data * @memberof game.privilege_card_unlock_nty * @instance */ privilege_card_unlock_nty.prototype.data = null; /** * Creates a new privilege_card_unlock_nty instance using the specified properties. * @function create * @memberof game.privilege_card_unlock_nty * @static * @param {game.Iprivilege_card_unlock_nty=} [properties] Properties to set * @returns {game.privilege_card_unlock_nty} privilege_card_unlock_nty instance */ privilege_card_unlock_nty.create = function create(properties) { return new privilege_card_unlock_nty(properties); }; /** * Encodes the specified privilege_card_unlock_nty message. Does not implicitly {@link game.privilege_card_unlock_nty.verify|verify} messages. * @function encode * @memberof game.privilege_card_unlock_nty * @static * @param {game.Iprivilege_card_unlock_nty} message privilege_card_unlock_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_unlock_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.privilege_card_info.encode(message.data, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified privilege_card_unlock_nty message, length delimited. Does not implicitly {@link game.privilege_card_unlock_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_unlock_nty * @static * @param {game.Iprivilege_card_unlock_nty} message privilege_card_unlock_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_unlock_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_unlock_nty message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_unlock_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_unlock_nty} privilege_card_unlock_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_unlock_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_unlock_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data = $root.game.privilege_card_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_unlock_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_unlock_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_unlock_nty} privilege_card_unlock_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_unlock_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_unlock_nty message. * @function verify * @memberof game.privilege_card_unlock_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_unlock_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.privilege_card_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a privilege_card_unlock_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_unlock_nty * @static * @param {Object.} object Plain object * @returns {game.privilege_card_unlock_nty} privilege_card_unlock_nty */ privilege_card_unlock_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_unlock_nty) return object; let message = new $root.game.privilege_card_unlock_nty(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.privilege_card_unlock_nty.data: object expected"); message.data = $root.game.privilege_card_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a privilege_card_unlock_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_unlock_nty * @static * @param {game.privilege_card_unlock_nty} message privilege_card_unlock_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_unlock_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.data = null; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.privilege_card_info.toObject(message.data, options); return object; }; /** * Converts this privilege_card_unlock_nty to JSON. * @function toJSON * @memberof game.privilege_card_unlock_nty * @instance * @returns {Object.} JSON object */ privilege_card_unlock_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_unlock_nty; })(); game.privilege_card_award = (function() { /** * Properties of a privilege_card_award. * @memberof game * @interface Iprivilege_card_award * @property {number|Long|null} [moduleid] privilege_card_award moduleid */ /** * Constructs a new privilege_card_award. * @memberof game * @classdesc Represents a privilege_card_award. * @implements Iprivilege_card_award * @constructor * @param {game.Iprivilege_card_award=} [properties] Properties to set */ function privilege_card_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_award moduleid. * @member {number|Long} moduleid * @memberof game.privilege_card_award * @instance */ privilege_card_award.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new privilege_card_award instance using the specified properties. * @function create * @memberof game.privilege_card_award * @static * @param {game.Iprivilege_card_award=} [properties] Properties to set * @returns {game.privilege_card_award} privilege_card_award instance */ privilege_card_award.create = function create(properties) { return new privilege_card_award(properties); }; /** * Encodes the specified privilege_card_award message. Does not implicitly {@link game.privilege_card_award.verify|verify} messages. * @function encode * @memberof game.privilege_card_award * @static * @param {game.Iprivilege_card_award} message privilege_card_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified privilege_card_award message, length delimited. Does not implicitly {@link game.privilege_card_award.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_award * @static * @param {game.Iprivilege_card_award} message privilege_card_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_award message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_award} privilege_card_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_award} privilege_card_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_award message. * @function verify * @memberof game.privilege_card_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a privilege_card_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_award * @static * @param {Object.} object Plain object * @returns {game.privilege_card_award} privilege_card_award */ privilege_card_award.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_award) return object; let message = new $root.game.privilege_card_award(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a privilege_card_award message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_award * @static * @param {game.privilege_card_award} message privilege_card_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this privilege_card_award to JSON. * @function toJSON * @memberof game.privilege_card_award * @instance * @returns {Object.} JSON object */ privilege_card_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_award; })(); game.privilege_card_award_rsp = (function() { /** * Properties of a privilege_card_award_rsp. * @memberof game * @interface Iprivilege_card_award_rsp * @property {number|Long|null} [errno] privilege_card_award_rsp errno * @property {number|Long|null} [moduleid] privilege_card_award_rsp moduleid * @property {boolean|null} [award] privilege_card_award_rsp award */ /** * Constructs a new privilege_card_award_rsp. * @memberof game * @classdesc Represents a privilege_card_award_rsp. * @implements Iprivilege_card_award_rsp * @constructor * @param {game.Iprivilege_card_award_rsp=} [properties] Properties to set */ function privilege_card_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_award_rsp errno. * @member {number|Long} errno * @memberof game.privilege_card_award_rsp * @instance */ privilege_card_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * privilege_card_award_rsp moduleid. * @member {number|Long} moduleid * @memberof game.privilege_card_award_rsp * @instance */ privilege_card_award_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * privilege_card_award_rsp award. * @member {boolean} award * @memberof game.privilege_card_award_rsp * @instance */ privilege_card_award_rsp.prototype.award = false; /** * Creates a new privilege_card_award_rsp instance using the specified properties. * @function create * @memberof game.privilege_card_award_rsp * @static * @param {game.Iprivilege_card_award_rsp=} [properties] Properties to set * @returns {game.privilege_card_award_rsp} privilege_card_award_rsp instance */ privilege_card_award_rsp.create = function create(properties) { return new privilege_card_award_rsp(properties); }; /** * Encodes the specified privilege_card_award_rsp message. Does not implicitly {@link game.privilege_card_award_rsp.verify|verify} messages. * @function encode * @memberof game.privilege_card_award_rsp * @static * @param {game.Iprivilege_card_award_rsp} message privilege_card_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.award); return writer; }; /** * Encodes the specified privilege_card_award_rsp message, length delimited. Does not implicitly {@link game.privilege_card_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_award_rsp * @static * @param {game.Iprivilege_card_award_rsp} message privilege_card_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_award_rsp} privilege_card_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; case 3: message.award = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_award_rsp} privilege_card_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_award_rsp message. * @function verify * @memberof game.privilege_card_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award !== "boolean") return "award: boolean expected"; return null; }; /** * Creates a privilege_card_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_award_rsp * @static * @param {Object.} object Plain object * @returns {game.privilege_card_award_rsp} privilege_card_award_rsp */ privilege_card_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_award_rsp) return object; let message = new $root.game.privilege_card_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.award != null) message.award = Boolean(object.award); return message; }; /** * Creates a plain object from a privilege_card_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_award_rsp * @static * @param {game.privilege_card_award_rsp} message privilege_card_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; object.award = false; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.award != null && message.hasOwnProperty("award")) object.award = message.award; return object; }; /** * Converts this privilege_card_award_rsp to JSON. * @function toJSON * @memberof game.privilege_card_award_rsp * @instance * @returns {Object.} JSON object */ privilege_card_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_award_rsp; })(); game.box_get_award = (function() { /** * Properties of a box_get_award. * @memberof game * @interface Ibox_get_award * @property {number|Long|null} [id] box_get_award id * @property {number|Long|null} [select] box_get_award select * @property {number|Long|null} [type] box_get_award type * @property {number|Long|null} [num] box_get_award num */ /** * Constructs a new box_get_award. * @memberof game * @classdesc Represents a box_get_award. * @implements Ibox_get_award * @constructor * @param {game.Ibox_get_award=} [properties] Properties to set */ function box_get_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * box_get_award id. * @member {number|Long} id * @memberof game.box_get_award * @instance */ box_get_award.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * box_get_award select. * @member {number|Long} select * @memberof game.box_get_award * @instance */ box_get_award.prototype.select = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * box_get_award type. * @member {number|Long} type * @memberof game.box_get_award * @instance */ box_get_award.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * box_get_award num. * @member {number|Long} num * @memberof game.box_get_award * @instance */ box_get_award.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new box_get_award instance using the specified properties. * @function create * @memberof game.box_get_award * @static * @param {game.Ibox_get_award=} [properties] Properties to set * @returns {game.box_get_award} box_get_award instance */ box_get_award.create = function create(properties) { return new box_get_award(properties); }; /** * Encodes the specified box_get_award message. Does not implicitly {@link game.box_get_award.verify|verify} messages. * @function encode * @memberof game.box_get_award * @static * @param {game.Ibox_get_award} message box_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ box_get_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.select != null && Object.hasOwnProperty.call(message, "select")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.select); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.type); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.num); return writer; }; /** * Encodes the specified box_get_award message, length delimited. Does not implicitly {@link game.box_get_award.verify|verify} messages. * @function encodeDelimited * @memberof game.box_get_award * @static * @param {game.Ibox_get_award} message box_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ box_get_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a box_get_award message from the specified reader or buffer. * @function decode * @memberof game.box_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.box_get_award} box_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ box_get_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.box_get_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.select = reader.int64(); break; case 3: message.type = reader.int64(); break; case 4: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a box_get_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.box_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.box_get_award} box_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ box_get_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a box_get_award message. * @function verify * @memberof game.box_get_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ box_get_award.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.select != null && message.hasOwnProperty("select")) if (!$util.isInteger(message.select) && !(message.select && $util.isInteger(message.select.low) && $util.isInteger(message.select.high))) return "select: integer|Long expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a box_get_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.box_get_award * @static * @param {Object.} object Plain object * @returns {game.box_get_award} box_get_award */ box_get_award.fromObject = function fromObject(object) { if (object instanceof $root.game.box_get_award) return object; let message = new $root.game.box_get_award(); 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.select != null) if ($util.Long) (message.select = $util.Long.fromValue(object.select)).unsigned = false; else if (typeof object.select === "string") message.select = parseInt(object.select, 10); else if (typeof object.select === "number") message.select = object.select; else if (typeof object.select === "object") message.select = new $util.LongBits(object.select.low >>> 0, object.select.high >>> 0).toNumber(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a box_get_award message. Also converts values to other types if specified. * @function toObject * @memberof game.box_get_award * @static * @param {game.box_get_award} message box_get_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ box_get_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.select = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.select = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 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.select != null && message.hasOwnProperty("select")) if (typeof message.select === "number") object.select = options.longs === String ? String(message.select) : message.select; else object.select = options.longs === String ? $util.Long.prototype.toString.call(message.select) : options.longs === Number ? new $util.LongBits(message.select.low >>> 0, message.select.high >>> 0).toNumber() : message.select; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this box_get_award to JSON. * @function toJSON * @memberof game.box_get_award * @instance * @returns {Object.} JSON object */ box_get_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return box_get_award; })(); game.box_get_award_rsp = (function() { /** * Properties of a box_get_award_rsp. * @memberof game * @interface Ibox_get_award_rsp * @property {number|Long|null} [errno] box_get_award_rsp errno * @property {number|Long|null} [type] box_get_award_rsp type */ /** * Constructs a new box_get_award_rsp. * @memberof game * @classdesc Represents a box_get_award_rsp. * @implements Ibox_get_award_rsp * @constructor * @param {game.Ibox_get_award_rsp=} [properties] Properties to set */ function box_get_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * box_get_award_rsp errno. * @member {number|Long} errno * @memberof game.box_get_award_rsp * @instance */ box_get_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * box_get_award_rsp type. * @member {number|Long} type * @memberof game.box_get_award_rsp * @instance */ box_get_award_rsp.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new box_get_award_rsp instance using the specified properties. * @function create * @memberof game.box_get_award_rsp * @static * @param {game.Ibox_get_award_rsp=} [properties] Properties to set * @returns {game.box_get_award_rsp} box_get_award_rsp instance */ box_get_award_rsp.create = function create(properties) { return new box_get_award_rsp(properties); }; /** * Encodes the specified box_get_award_rsp message. Does not implicitly {@link game.box_get_award_rsp.verify|verify} messages. * @function encode * @memberof game.box_get_award_rsp * @static * @param {game.Ibox_get_award_rsp} message box_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ box_get_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.type); return writer; }; /** * Encodes the specified box_get_award_rsp message, length delimited. Does not implicitly {@link game.box_get_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.box_get_award_rsp * @static * @param {game.Ibox_get_award_rsp} message box_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ box_get_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a box_get_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.box_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.box_get_award_rsp} box_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ box_get_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.box_get_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.type = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a box_get_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.box_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.box_get_award_rsp} box_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ box_get_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a box_get_award_rsp message. * @function verify * @memberof game.box_get_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ box_get_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; return null; }; /** * Creates a box_get_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.box_get_award_rsp * @static * @param {Object.} object Plain object * @returns {game.box_get_award_rsp} box_get_award_rsp */ box_get_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.box_get_award_rsp) return object; let message = new $root.game.box_get_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a box_get_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.box_get_award_rsp * @static * @param {game.box_get_award_rsp} message box_get_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ box_get_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; return object; }; /** * Converts this box_get_award_rsp to JSON. * @function toJSON * @memberof game.box_get_award_rsp * @instance * @returns {Object.} JSON object */ box_get_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return box_get_award_rsp; })(); game.first_recharge_data = (function() { /** * Properties of a first_recharge_data. * @memberof game * @interface Ifirst_recharge_data * @property {number|Long|null} [moduleid] first_recharge_data moduleid */ /** * Constructs a new first_recharge_data. * @memberof game * @classdesc Represents a first_recharge_data. * @implements Ifirst_recharge_data * @constructor * @param {game.Ifirst_recharge_data=} [properties] Properties to set */ function first_recharge_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_data moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_data * @instance */ first_recharge_data.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_data instance using the specified properties. * @function create * @memberof game.first_recharge_data * @static * @param {game.Ifirst_recharge_data=} [properties] Properties to set * @returns {game.first_recharge_data} first_recharge_data instance */ first_recharge_data.create = function create(properties) { return new first_recharge_data(properties); }; /** * Encodes the specified first_recharge_data message. Does not implicitly {@link game.first_recharge_data.verify|verify} messages. * @function encode * @memberof game.first_recharge_data * @static * @param {game.Ifirst_recharge_data} message first_recharge_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified first_recharge_data message, length delimited. Does not implicitly {@link game.first_recharge_data.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_data * @static * @param {game.Ifirst_recharge_data} message first_recharge_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_data message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_data} first_recharge_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_data} first_recharge_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_data message. * @function verify * @memberof game.first_recharge_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a first_recharge_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_data * @static * @param {Object.} object Plain object * @returns {game.first_recharge_data} first_recharge_data */ first_recharge_data.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_data) return object; let message = new $root.game.first_recharge_data(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_data message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_data * @static * @param {game.first_recharge_data} message first_recharge_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_data.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this first_recharge_data to JSON. * @function toJSON * @memberof game.first_recharge_data * @instance * @returns {Object.} JSON object */ first_recharge_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_data; })(); game.first_recharge_data_rsp = (function() { /** * Properties of a first_recharge_data_rsp. * @memberof game * @interface Ifirst_recharge_data_rsp * @property {number|Long|null} [errno] first_recharge_data_rsp errno * @property {number|Long|null} [moduleid] first_recharge_data_rsp moduleid * @property {boolean|null} [state] first_recharge_data_rsp state * @property {number|Long|null} [day] first_recharge_data_rsp day * @property {number|Long|null} [award] first_recharge_data_rsp award */ /** * Constructs a new first_recharge_data_rsp. * @memberof game * @classdesc Represents a first_recharge_data_rsp. * @implements Ifirst_recharge_data_rsp * @constructor * @param {game.Ifirst_recharge_data_rsp=} [properties] Properties to set */ function first_recharge_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_data_rsp errno. * @member {number|Long} errno * @memberof game.first_recharge_data_rsp * @instance */ first_recharge_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_data_rsp moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_data_rsp * @instance */ first_recharge_data_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_data_rsp state. * @member {boolean} state * @memberof game.first_recharge_data_rsp * @instance */ first_recharge_data_rsp.prototype.state = false; /** * first_recharge_data_rsp day. * @member {number|Long} day * @memberof game.first_recharge_data_rsp * @instance */ first_recharge_data_rsp.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_data_rsp award. * @member {number|Long} award * @memberof game.first_recharge_data_rsp * @instance */ first_recharge_data_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_data_rsp instance using the specified properties. * @function create * @memberof game.first_recharge_data_rsp * @static * @param {game.Ifirst_recharge_data_rsp=} [properties] Properties to set * @returns {game.first_recharge_data_rsp} first_recharge_data_rsp instance */ first_recharge_data_rsp.create = function create(properties) { return new first_recharge_data_rsp(properties); }; /** * Encodes the specified first_recharge_data_rsp message. Does not implicitly {@link game.first_recharge_data_rsp.verify|verify} messages. * @function encode * @memberof game.first_recharge_data_rsp * @static * @param {game.Ifirst_recharge_data_rsp} message first_recharge_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.state); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.day); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.award); return writer; }; /** * Encodes the specified first_recharge_data_rsp message, length delimited. Does not implicitly {@link game.first_recharge_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_data_rsp * @static * @param {game.Ifirst_recharge_data_rsp} message first_recharge_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_data_rsp} first_recharge_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; case 3: message.state = reader.bool(); break; case 4: message.day = reader.int64(); break; case 5: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_data_rsp} first_recharge_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_data_rsp message. * @function verify * @memberof game.first_recharge_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state !== "boolean") return "state: boolean expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a first_recharge_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_data_rsp * @static * @param {Object.} object Plain object * @returns {game.first_recharge_data_rsp} first_recharge_data_rsp */ first_recharge_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_data_rsp) return object; let message = new $root.game.first_recharge_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.state != null) message.state = Boolean(object.state); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_data_rsp * @static * @param {game.first_recharge_data_rsp} message first_recharge_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; object.state = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.state != null && message.hasOwnProperty("state")) object.state = message.state; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this first_recharge_data_rsp to JSON. * @function toJSON * @memberof game.first_recharge_data_rsp * @instance * @returns {Object.} JSON object */ first_recharge_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_data_rsp; })(); game.first_recharge_buy = (function() { /** * Properties of a first_recharge_buy. * @memberof game * @interface Ifirst_recharge_buy * @property {number|Long|null} [moduleid] first_recharge_buy moduleid */ /** * Constructs a new first_recharge_buy. * @memberof game * @classdesc Represents a first_recharge_buy. * @implements Ifirst_recharge_buy * @constructor * @param {game.Ifirst_recharge_buy=} [properties] Properties to set */ function first_recharge_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_buy moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_buy * @instance */ first_recharge_buy.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_buy instance using the specified properties. * @function create * @memberof game.first_recharge_buy * @static * @param {game.Ifirst_recharge_buy=} [properties] Properties to set * @returns {game.first_recharge_buy} first_recharge_buy instance */ first_recharge_buy.create = function create(properties) { return new first_recharge_buy(properties); }; /** * Encodes the specified first_recharge_buy message. Does not implicitly {@link game.first_recharge_buy.verify|verify} messages. * @function encode * @memberof game.first_recharge_buy * @static * @param {game.Ifirst_recharge_buy} message first_recharge_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified first_recharge_buy message, length delimited. Does not implicitly {@link game.first_recharge_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_buy * @static * @param {game.Ifirst_recharge_buy} message first_recharge_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_buy message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_buy} first_recharge_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_buy} first_recharge_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_buy message. * @function verify * @memberof game.first_recharge_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a first_recharge_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_buy * @static * @param {Object.} object Plain object * @returns {game.first_recharge_buy} first_recharge_buy */ first_recharge_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_buy) return object; let message = new $root.game.first_recharge_buy(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_buy * @static * @param {game.first_recharge_buy} message first_recharge_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this first_recharge_buy to JSON. * @function toJSON * @memberof game.first_recharge_buy * @instance * @returns {Object.} JSON object */ first_recharge_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_buy; })(); game.first_recharge_buy_rsp = (function() { /** * Properties of a first_recharge_buy_rsp. * @memberof game * @interface Ifirst_recharge_buy_rsp * @property {number|Long|null} [errno] first_recharge_buy_rsp errno * @property {number|Long|null} [moduleid] first_recharge_buy_rsp moduleid */ /** * Constructs a new first_recharge_buy_rsp. * @memberof game * @classdesc Represents a first_recharge_buy_rsp. * @implements Ifirst_recharge_buy_rsp * @constructor * @param {game.Ifirst_recharge_buy_rsp=} [properties] Properties to set */ function first_recharge_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_buy_rsp errno. * @member {number|Long} errno * @memberof game.first_recharge_buy_rsp * @instance */ first_recharge_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_buy_rsp moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_buy_rsp * @instance */ first_recharge_buy_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_buy_rsp instance using the specified properties. * @function create * @memberof game.first_recharge_buy_rsp * @static * @param {game.Ifirst_recharge_buy_rsp=} [properties] Properties to set * @returns {game.first_recharge_buy_rsp} first_recharge_buy_rsp instance */ first_recharge_buy_rsp.create = function create(properties) { return new first_recharge_buy_rsp(properties); }; /** * Encodes the specified first_recharge_buy_rsp message. Does not implicitly {@link game.first_recharge_buy_rsp.verify|verify} messages. * @function encode * @memberof game.first_recharge_buy_rsp * @static * @param {game.Ifirst_recharge_buy_rsp} message first_recharge_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); return writer; }; /** * Encodes the specified first_recharge_buy_rsp message, length delimited. Does not implicitly {@link game.first_recharge_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_buy_rsp * @static * @param {game.Ifirst_recharge_buy_rsp} message first_recharge_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_buy_rsp} first_recharge_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_buy_rsp} first_recharge_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_buy_rsp message. * @function verify * @memberof game.first_recharge_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a first_recharge_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.first_recharge_buy_rsp} first_recharge_buy_rsp */ first_recharge_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_buy_rsp) return object; let message = new $root.game.first_recharge_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_buy_rsp * @static * @param {game.first_recharge_buy_rsp} message first_recharge_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this first_recharge_buy_rsp to JSON. * @function toJSON * @memberof game.first_recharge_buy_rsp * @instance * @returns {Object.} JSON object */ first_recharge_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_buy_rsp; })(); game.first_recharge_award = (function() { /** * Properties of a first_recharge_award. * @memberof game * @interface Ifirst_recharge_award * @property {number|Long|null} [moduleid] first_recharge_award moduleid * @property {number|Long|null} [day] first_recharge_award day */ /** * Constructs a new first_recharge_award. * @memberof game * @classdesc Represents a first_recharge_award. * @implements Ifirst_recharge_award * @constructor * @param {game.Ifirst_recharge_award=} [properties] Properties to set */ function first_recharge_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_award moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_award * @instance */ first_recharge_award.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_award day. * @member {number|Long} day * @memberof game.first_recharge_award * @instance */ first_recharge_award.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_award instance using the specified properties. * @function create * @memberof game.first_recharge_award * @static * @param {game.Ifirst_recharge_award=} [properties] Properties to set * @returns {game.first_recharge_award} first_recharge_award instance */ first_recharge_award.create = function create(properties) { return new first_recharge_award(properties); }; /** * Encodes the specified first_recharge_award message. Does not implicitly {@link game.first_recharge_award.verify|verify} messages. * @function encode * @memberof game.first_recharge_award * @static * @param {game.Ifirst_recharge_award} message first_recharge_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.day); return writer; }; /** * Encodes the specified first_recharge_award message, length delimited. Does not implicitly {@link game.first_recharge_award.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_award * @static * @param {game.Ifirst_recharge_award} message first_recharge_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_award message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_award} first_recharge_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; case 2: message.day = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_award} first_recharge_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_award message. * @function verify * @memberof game.first_recharge_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; return null; }; /** * Creates a first_recharge_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_award * @static * @param {Object.} object Plain object * @returns {game.first_recharge_award} first_recharge_award */ first_recharge_award.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_award) return object; let message = new $root.game.first_recharge_award(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_award message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_award * @static * @param {game.first_recharge_award} message first_recharge_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; return object; }; /** * Converts this first_recharge_award to JSON. * @function toJSON * @memberof game.first_recharge_award * @instance * @returns {Object.} JSON object */ first_recharge_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_award; })(); game.first_recharge_award_rsp = (function() { /** * Properties of a first_recharge_award_rsp. * @memberof game * @interface Ifirst_recharge_award_rsp * @property {number|Long|null} [errno] first_recharge_award_rsp errno * @property {number|Long|null} [moduleid] first_recharge_award_rsp moduleid * @property {number|Long|null} [award] first_recharge_award_rsp award */ /** * Constructs a new first_recharge_award_rsp. * @memberof game * @classdesc Represents a first_recharge_award_rsp. * @implements Ifirst_recharge_award_rsp * @constructor * @param {game.Ifirst_recharge_award_rsp=} [properties] Properties to set */ function first_recharge_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_award_rsp errno. * @member {number|Long} errno * @memberof game.first_recharge_award_rsp * @instance */ first_recharge_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_award_rsp moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_award_rsp * @instance */ first_recharge_award_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_award_rsp award. * @member {number|Long} award * @memberof game.first_recharge_award_rsp * @instance */ first_recharge_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_award_rsp instance using the specified properties. * @function create * @memberof game.first_recharge_award_rsp * @static * @param {game.Ifirst_recharge_award_rsp=} [properties] Properties to set * @returns {game.first_recharge_award_rsp} first_recharge_award_rsp instance */ first_recharge_award_rsp.create = function create(properties) { return new first_recharge_award_rsp(properties); }; /** * Encodes the specified first_recharge_award_rsp message. Does not implicitly {@link game.first_recharge_award_rsp.verify|verify} messages. * @function encode * @memberof game.first_recharge_award_rsp * @static * @param {game.Ifirst_recharge_award_rsp} message first_recharge_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); return writer; }; /** * Encodes the specified first_recharge_award_rsp message, length delimited. Does not implicitly {@link game.first_recharge_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_award_rsp * @static * @param {game.Ifirst_recharge_award_rsp} message first_recharge_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_award_rsp} first_recharge_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; case 3: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_award_rsp} first_recharge_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_award_rsp message. * @function verify * @memberof game.first_recharge_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a first_recharge_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_award_rsp * @static * @param {Object.} object Plain object * @returns {game.first_recharge_award_rsp} first_recharge_award_rsp */ first_recharge_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_award_rsp) return object; let message = new $root.game.first_recharge_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_award_rsp * @static * @param {game.first_recharge_award_rsp} message first_recharge_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this first_recharge_award_rsp to JSON. * @function toJSON * @memberof game.first_recharge_award_rsp * @instance * @returns {Object.} JSON object */ first_recharge_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_award_rsp; })(); game.first_recharge_nty = (function() { /** * Properties of a first_recharge_nty. * @memberof game * @interface Ifirst_recharge_nty * @property {number|Long|null} [moduleid] first_recharge_nty moduleid * @property {boolean|null} [state] first_recharge_nty state * @property {number|Long|null} [day] first_recharge_nty day * @property {number|Long|null} [award] first_recharge_nty award */ /** * Constructs a new first_recharge_nty. * @memberof game * @classdesc Represents a first_recharge_nty. * @implements Ifirst_recharge_nty * @constructor * @param {game.Ifirst_recharge_nty=} [properties] Properties to set */ function first_recharge_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * first_recharge_nty moduleid. * @member {number|Long} moduleid * @memberof game.first_recharge_nty * @instance */ first_recharge_nty.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_nty state. * @member {boolean} state * @memberof game.first_recharge_nty * @instance */ first_recharge_nty.prototype.state = false; /** * first_recharge_nty day. * @member {number|Long} day * @memberof game.first_recharge_nty * @instance */ first_recharge_nty.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * first_recharge_nty award. * @member {number|Long} award * @memberof game.first_recharge_nty * @instance */ first_recharge_nty.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new first_recharge_nty instance using the specified properties. * @function create * @memberof game.first_recharge_nty * @static * @param {game.Ifirst_recharge_nty=} [properties] Properties to set * @returns {game.first_recharge_nty} first_recharge_nty instance */ first_recharge_nty.create = function create(properties) { return new first_recharge_nty(properties); }; /** * Encodes the specified first_recharge_nty message. Does not implicitly {@link game.first_recharge_nty.verify|verify} messages. * @function encode * @memberof game.first_recharge_nty * @static * @param {game.Ifirst_recharge_nty} message first_recharge_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.state); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.day); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.award); return writer; }; /** * Encodes the specified first_recharge_nty message, length delimited. Does not implicitly {@link game.first_recharge_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.first_recharge_nty * @static * @param {game.Ifirst_recharge_nty} message first_recharge_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ first_recharge_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a first_recharge_nty message from the specified reader or buffer. * @function decode * @memberof game.first_recharge_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.first_recharge_nty} first_recharge_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.first_recharge_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.moduleid = reader.int64(); break; case 3: message.state = reader.bool(); break; case 4: message.day = reader.int64(); break; case 5: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a first_recharge_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.first_recharge_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.first_recharge_nty} first_recharge_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ first_recharge_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a first_recharge_nty message. * @function verify * @memberof game.first_recharge_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ first_recharge_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state !== "boolean") return "state: boolean expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a first_recharge_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.first_recharge_nty * @static * @param {Object.} object Plain object * @returns {game.first_recharge_nty} first_recharge_nty */ first_recharge_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.first_recharge_nty) return object; let message = new $root.game.first_recharge_nty(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.state != null) message.state = Boolean(object.state); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a first_recharge_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.first_recharge_nty * @static * @param {game.first_recharge_nty} message first_recharge_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ first_recharge_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; object.state = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.state != null && message.hasOwnProperty("state")) object.state = message.state; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this first_recharge_nty to JSON. * @function toJSON * @memberof game.first_recharge_nty * @instance * @returns {Object.} JSON object */ first_recharge_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return first_recharge_nty; })(); game.daily_dungeons_data = (function() { /** * Properties of a daily_dungeons_data. * @memberof game * @interface Idaily_dungeons_data */ /** * Constructs a new daily_dungeons_data. * @memberof game * @classdesc Represents a daily_dungeons_data. * @implements Idaily_dungeons_data * @constructor * @param {game.Idaily_dungeons_data=} [properties] Properties to set */ function daily_dungeons_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new daily_dungeons_data instance using the specified properties. * @function create * @memberof game.daily_dungeons_data * @static * @param {game.Idaily_dungeons_data=} [properties] Properties to set * @returns {game.daily_dungeons_data} daily_dungeons_data instance */ daily_dungeons_data.create = function create(properties) { return new daily_dungeons_data(properties); }; /** * Encodes the specified daily_dungeons_data message. Does not implicitly {@link game.daily_dungeons_data.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_data * @static * @param {game.Idaily_dungeons_data} message daily_dungeons_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified daily_dungeons_data message, length delimited. Does not implicitly {@link game.daily_dungeons_data.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_data * @static * @param {game.Idaily_dungeons_data} message daily_dungeons_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_data message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_data} daily_dungeons_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_data} daily_dungeons_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_data message. * @function verify * @memberof game.daily_dungeons_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a daily_dungeons_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_data * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_data} daily_dungeons_data */ daily_dungeons_data.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_data) return object; return new $root.game.daily_dungeons_data(); }; /** * Creates a plain object from a daily_dungeons_data message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_data * @static * @param {game.daily_dungeons_data} message daily_dungeons_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_data.toObject = function toObject() { return {}; }; /** * Converts this daily_dungeons_data to JSON. * @function toJSON * @memberof game.daily_dungeons_data * @instance * @returns {Object.} JSON object */ daily_dungeons_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_data; })(); game.daily_dungeons_data_rsp = (function() { /** * Properties of a daily_dungeons_data_rsp. * @memberof game * @interface Idaily_dungeons_data_rsp * @property {number|Long|null} [errno] daily_dungeons_data_rsp errno * @property {Array.|null} [list] daily_dungeons_data_rsp list */ /** * Constructs a new daily_dungeons_data_rsp. * @memberof game * @classdesc Represents a daily_dungeons_data_rsp. * @implements Idaily_dungeons_data_rsp * @constructor * @param {game.Idaily_dungeons_data_rsp=} [properties] Properties to set */ function daily_dungeons_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_data_rsp errno. * @member {number|Long} errno * @memberof game.daily_dungeons_data_rsp * @instance */ daily_dungeons_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_data_rsp list. * @member {Array.} list * @memberof game.daily_dungeons_data_rsp * @instance */ daily_dungeons_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new daily_dungeons_data_rsp instance using the specified properties. * @function create * @memberof game.daily_dungeons_data_rsp * @static * @param {game.Idaily_dungeons_data_rsp=} [properties] Properties to set * @returns {game.daily_dungeons_data_rsp} daily_dungeons_data_rsp instance */ daily_dungeons_data_rsp.create = function create(properties) { return new daily_dungeons_data_rsp(properties); }; /** * Encodes the specified daily_dungeons_data_rsp message. Does not implicitly {@link game.daily_dungeons_data_rsp.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_data_rsp * @static * @param {game.Idaily_dungeons_data_rsp} message daily_dungeons_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.daily_dungeons_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified daily_dungeons_data_rsp message, length delimited. Does not implicitly {@link game.daily_dungeons_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_data_rsp * @static * @param {game.Idaily_dungeons_data_rsp} message daily_dungeons_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_data_rsp} daily_dungeons_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.daily_dungeons_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_data_rsp} daily_dungeons_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_data_rsp message. * @function verify * @memberof game.daily_dungeons_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.daily_dungeons_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a daily_dungeons_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_data_rsp * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_data_rsp} daily_dungeons_data_rsp */ daily_dungeons_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_data_rsp) return object; let message = new $root.game.daily_dungeons_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.daily_dungeons_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.daily_dungeons_data_rsp.list: object expected"); message.list[i] = $root.game.daily_dungeons_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a daily_dungeons_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_data_rsp * @static * @param {game.daily_dungeons_data_rsp} message daily_dungeons_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.daily_dungeons_info.toObject(message.list[j], options); } return object; }; /** * Converts this daily_dungeons_data_rsp to JSON. * @function toJSON * @memberof game.daily_dungeons_data_rsp * @instance * @returns {Object.} JSON object */ daily_dungeons_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_data_rsp; })(); game.daily_dungeons_start = (function() { /** * Properties of a daily_dungeons_start. * @memberof game * @interface Idaily_dungeons_start * @property {number|Long|null} [type] daily_dungeons_start type * @property {number|Long|null} [diff] daily_dungeons_start diff */ /** * Constructs a new daily_dungeons_start. * @memberof game * @classdesc Represents a daily_dungeons_start. * @implements Idaily_dungeons_start * @constructor * @param {game.Idaily_dungeons_start=} [properties] Properties to set */ function daily_dungeons_start(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_start type. * @member {number|Long} type * @memberof game.daily_dungeons_start * @instance */ daily_dungeons_start.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_start diff. * @member {number|Long} diff * @memberof game.daily_dungeons_start * @instance */ daily_dungeons_start.prototype.diff = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new daily_dungeons_start instance using the specified properties. * @function create * @memberof game.daily_dungeons_start * @static * @param {game.Idaily_dungeons_start=} [properties] Properties to set * @returns {game.daily_dungeons_start} daily_dungeons_start instance */ daily_dungeons_start.create = function create(properties) { return new daily_dungeons_start(properties); }; /** * Encodes the specified daily_dungeons_start message. Does not implicitly {@link game.daily_dungeons_start.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_start * @static * @param {game.Idaily_dungeons_start} message daily_dungeons_start message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_start.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.diff != null && Object.hasOwnProperty.call(message, "diff")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diff); return writer; }; /** * Encodes the specified daily_dungeons_start message, length delimited. Does not implicitly {@link game.daily_dungeons_start.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_start * @static * @param {game.Idaily_dungeons_start} message daily_dungeons_start message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_start.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_start message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_start * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_start} daily_dungeons_start * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_start.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_start(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.diff = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_start message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_start * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_start} daily_dungeons_start * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_start.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_start message. * @function verify * @memberof game.daily_dungeons_start * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_start.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.diff != null && message.hasOwnProperty("diff")) if (!$util.isInteger(message.diff) && !(message.diff && $util.isInteger(message.diff.low) && $util.isInteger(message.diff.high))) return "diff: integer|Long expected"; return null; }; /** * Creates a daily_dungeons_start message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_start * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_start} daily_dungeons_start */ daily_dungeons_start.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_start) return object; let message = new $root.game.daily_dungeons_start(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.diff != null) if ($util.Long) (message.diff = $util.Long.fromValue(object.diff)).unsigned = false; else if (typeof object.diff === "string") message.diff = parseInt(object.diff, 10); else if (typeof object.diff === "number") message.diff = object.diff; else if (typeof object.diff === "object") message.diff = new $util.LongBits(object.diff.low >>> 0, object.diff.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a daily_dungeons_start message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_start * @static * @param {game.daily_dungeons_start} message daily_dungeons_start * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_start.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.diff = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.diff = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.diff != null && message.hasOwnProperty("diff")) if (typeof message.diff === "number") object.diff = options.longs === String ? String(message.diff) : message.diff; else object.diff = options.longs === String ? $util.Long.prototype.toString.call(message.diff) : options.longs === Number ? new $util.LongBits(message.diff.low >>> 0, message.diff.high >>> 0).toNumber() : message.diff; return object; }; /** * Converts this daily_dungeons_start to JSON. * @function toJSON * @memberof game.daily_dungeons_start * @instance * @returns {Object.} JSON object */ daily_dungeons_start.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_start; })(); game.daily_dungeons_start_rsp = (function() { /** * Properties of a daily_dungeons_start_rsp. * @memberof game * @interface Idaily_dungeons_start_rsp * @property {number|Long|null} [errno] daily_dungeons_start_rsp errno * @property {Array.|null} [awardList] daily_dungeons_start_rsp awardList */ /** * Constructs a new daily_dungeons_start_rsp. * @memberof game * @classdesc Represents a daily_dungeons_start_rsp. * @implements Idaily_dungeons_start_rsp * @constructor * @param {game.Idaily_dungeons_start_rsp=} [properties] Properties to set */ function daily_dungeons_start_rsp(properties) { this.awardList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_start_rsp errno. * @member {number|Long} errno * @memberof game.daily_dungeons_start_rsp * @instance */ daily_dungeons_start_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_start_rsp awardList. * @member {Array.} awardList * @memberof game.daily_dungeons_start_rsp * @instance */ daily_dungeons_start_rsp.prototype.awardList = $util.emptyArray; /** * Creates a new daily_dungeons_start_rsp instance using the specified properties. * @function create * @memberof game.daily_dungeons_start_rsp * @static * @param {game.Idaily_dungeons_start_rsp=} [properties] Properties to set * @returns {game.daily_dungeons_start_rsp} daily_dungeons_start_rsp instance */ daily_dungeons_start_rsp.create = function create(properties) { return new daily_dungeons_start_rsp(properties); }; /** * Encodes the specified daily_dungeons_start_rsp message. Does not implicitly {@link game.daily_dungeons_start_rsp.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_start_rsp * @static * @param {game.Idaily_dungeons_start_rsp} message daily_dungeons_start_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_start_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.awardList != null && message.awardList.length) for (let i = 0; i < message.awardList.length; ++i) $root.game.id_num.encode(message.awardList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified daily_dungeons_start_rsp message, length delimited. Does not implicitly {@link game.daily_dungeons_start_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_start_rsp * @static * @param {game.Idaily_dungeons_start_rsp} message daily_dungeons_start_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_start_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_start_rsp message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_start_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_start_rsp} daily_dungeons_start_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_start_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_start_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.awardList && message.awardList.length)) message.awardList = []; message.awardList.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_start_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_start_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_start_rsp} daily_dungeons_start_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_start_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_start_rsp message. * @function verify * @memberof game.daily_dungeons_start_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_start_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.awardList != null && message.hasOwnProperty("awardList")) { if (!Array.isArray(message.awardList)) return "awardList: array expected"; for (let i = 0; i < message.awardList.length; ++i) { let error = $root.game.id_num.verify(message.awardList[i]); if (error) return "awardList." + error; } } return null; }; /** * Creates a daily_dungeons_start_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_start_rsp * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_start_rsp} daily_dungeons_start_rsp */ daily_dungeons_start_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_start_rsp) return object; let message = new $root.game.daily_dungeons_start_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.awardList) { if (!Array.isArray(object.awardList)) throw TypeError(".game.daily_dungeons_start_rsp.awardList: array expected"); message.awardList = []; for (let i = 0; i < object.awardList.length; ++i) { if (typeof object.awardList[i] !== "object") throw TypeError(".game.daily_dungeons_start_rsp.awardList: object expected"); message.awardList[i] = $root.game.id_num.fromObject(object.awardList[i]); } } return message; }; /** * Creates a plain object from a daily_dungeons_start_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_start_rsp * @static * @param {game.daily_dungeons_start_rsp} message daily_dungeons_start_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_start_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.awardList = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.awardList && message.awardList.length) { object.awardList = []; for (let j = 0; j < message.awardList.length; ++j) object.awardList[j] = $root.game.id_num.toObject(message.awardList[j], options); } return object; }; /** * Converts this daily_dungeons_start_rsp to JSON. * @function toJSON * @memberof game.daily_dungeons_start_rsp * @instance * @returns {Object.} JSON object */ daily_dungeons_start_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_start_rsp; })(); game.daily_dungeons_end = (function() { /** * Properties of a daily_dungeons_end. * @memberof game * @interface Idaily_dungeons_end * @property {boolean|null} [win] daily_dungeons_end win * @property {number|Long|null} [monsterNum] daily_dungeons_end monsterNum * @property {number|Long|null} [bossNum] daily_dungeons_end bossNum * @property {number|Long|null} [eliteNum] daily_dungeons_end eliteNum */ /** * Constructs a new daily_dungeons_end. * @memberof game * @classdesc Represents a daily_dungeons_end. * @implements Idaily_dungeons_end * @constructor * @param {game.Idaily_dungeons_end=} [properties] Properties to set */ function daily_dungeons_end(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_end win. * @member {boolean} win * @memberof game.daily_dungeons_end * @instance */ daily_dungeons_end.prototype.win = false; /** * daily_dungeons_end monsterNum. * @member {number|Long} monsterNum * @memberof game.daily_dungeons_end * @instance */ daily_dungeons_end.prototype.monsterNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_end bossNum. * @member {number|Long} bossNum * @memberof game.daily_dungeons_end * @instance */ daily_dungeons_end.prototype.bossNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_end eliteNum. * @member {number|Long} eliteNum * @memberof game.daily_dungeons_end * @instance */ daily_dungeons_end.prototype.eliteNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new daily_dungeons_end instance using the specified properties. * @function create * @memberof game.daily_dungeons_end * @static * @param {game.Idaily_dungeons_end=} [properties] Properties to set * @returns {game.daily_dungeons_end} daily_dungeons_end instance */ daily_dungeons_end.create = function create(properties) { return new daily_dungeons_end(properties); }; /** * Encodes the specified daily_dungeons_end message. Does not implicitly {@link game.daily_dungeons_end.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_end * @static * @param {game.Idaily_dungeons_end} message daily_dungeons_end message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_end.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.win != null && Object.hasOwnProperty.call(message, "win")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.win); if (message.monsterNum != null && Object.hasOwnProperty.call(message, "monsterNum")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.monsterNum); if (message.bossNum != null && Object.hasOwnProperty.call(message, "bossNum")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.bossNum); if (message.eliteNum != null && Object.hasOwnProperty.call(message, "eliteNum")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.eliteNum); return writer; }; /** * Encodes the specified daily_dungeons_end message, length delimited. Does not implicitly {@link game.daily_dungeons_end.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_end * @static * @param {game.Idaily_dungeons_end} message daily_dungeons_end message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_end.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_end message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_end * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_end} daily_dungeons_end * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_end.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_end(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.win = reader.bool(); break; case 2: message.monsterNum = reader.int64(); break; case 3: message.bossNum = reader.int64(); break; case 4: message.eliteNum = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_end message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_end * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_end} daily_dungeons_end * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_end.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_end message. * @function verify * @memberof game.daily_dungeons_end * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_end.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.win != null && message.hasOwnProperty("win")) if (typeof message.win !== "boolean") return "win: boolean expected"; if (message.monsterNum != null && message.hasOwnProperty("monsterNum")) if (!$util.isInteger(message.monsterNum) && !(message.monsterNum && $util.isInteger(message.monsterNum.low) && $util.isInteger(message.monsterNum.high))) return "monsterNum: integer|Long expected"; if (message.bossNum != null && message.hasOwnProperty("bossNum")) if (!$util.isInteger(message.bossNum) && !(message.bossNum && $util.isInteger(message.bossNum.low) && $util.isInteger(message.bossNum.high))) return "bossNum: integer|Long expected"; if (message.eliteNum != null && message.hasOwnProperty("eliteNum")) if (!$util.isInteger(message.eliteNum) && !(message.eliteNum && $util.isInteger(message.eliteNum.low) && $util.isInteger(message.eliteNum.high))) return "eliteNum: integer|Long expected"; return null; }; /** * Creates a daily_dungeons_end message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_end * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_end} daily_dungeons_end */ daily_dungeons_end.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_end) return object; let message = new $root.game.daily_dungeons_end(); if (object.win != null) message.win = Boolean(object.win); if (object.monsterNum != null) if ($util.Long) (message.monsterNum = $util.Long.fromValue(object.monsterNum)).unsigned = false; else if (typeof object.monsterNum === "string") message.monsterNum = parseInt(object.monsterNum, 10); else if (typeof object.monsterNum === "number") message.monsterNum = object.monsterNum; else if (typeof object.monsterNum === "object") message.monsterNum = new $util.LongBits(object.monsterNum.low >>> 0, object.monsterNum.high >>> 0).toNumber(); if (object.bossNum != null) if ($util.Long) (message.bossNum = $util.Long.fromValue(object.bossNum)).unsigned = false; else if (typeof object.bossNum === "string") message.bossNum = parseInt(object.bossNum, 10); else if (typeof object.bossNum === "number") message.bossNum = object.bossNum; else if (typeof object.bossNum === "object") message.bossNum = new $util.LongBits(object.bossNum.low >>> 0, object.bossNum.high >>> 0).toNumber(); if (object.eliteNum != null) if ($util.Long) (message.eliteNum = $util.Long.fromValue(object.eliteNum)).unsigned = false; else if (typeof object.eliteNum === "string") message.eliteNum = parseInt(object.eliteNum, 10); else if (typeof object.eliteNum === "number") message.eliteNum = object.eliteNum; else if (typeof object.eliteNum === "object") message.eliteNum = new $util.LongBits(object.eliteNum.low >>> 0, object.eliteNum.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a daily_dungeons_end message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_end * @static * @param {game.daily_dungeons_end} message daily_dungeons_end * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_end.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.win = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.monsterNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.monsterNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.bossNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.bossNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.eliteNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.eliteNum = options.longs === String ? "0" : 0; } if (message.win != null && message.hasOwnProperty("win")) object.win = message.win; if (message.monsterNum != null && message.hasOwnProperty("monsterNum")) if (typeof message.monsterNum === "number") object.monsterNum = options.longs === String ? String(message.monsterNum) : message.monsterNum; else object.monsterNum = options.longs === String ? $util.Long.prototype.toString.call(message.monsterNum) : options.longs === Number ? new $util.LongBits(message.monsterNum.low >>> 0, message.monsterNum.high >>> 0).toNumber() : message.monsterNum; if (message.bossNum != null && message.hasOwnProperty("bossNum")) if (typeof message.bossNum === "number") object.bossNum = options.longs === String ? String(message.bossNum) : message.bossNum; else object.bossNum = options.longs === String ? $util.Long.prototype.toString.call(message.bossNum) : options.longs === Number ? new $util.LongBits(message.bossNum.low >>> 0, message.bossNum.high >>> 0).toNumber() : message.bossNum; if (message.eliteNum != null && message.hasOwnProperty("eliteNum")) if (typeof message.eliteNum === "number") object.eliteNum = options.longs === String ? String(message.eliteNum) : message.eliteNum; else object.eliteNum = options.longs === String ? $util.Long.prototype.toString.call(message.eliteNum) : options.longs === Number ? new $util.LongBits(message.eliteNum.low >>> 0, message.eliteNum.high >>> 0).toNumber() : message.eliteNum; return object; }; /** * Converts this daily_dungeons_end to JSON. * @function toJSON * @memberof game.daily_dungeons_end * @instance * @returns {Object.} JSON object */ daily_dungeons_end.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_end; })(); game.daily_dungeons_end_rsp = (function() { /** * Properties of a daily_dungeons_end_rsp. * @memberof game * @interface Idaily_dungeons_end_rsp * @property {number|Long|null} [errno] daily_dungeons_end_rsp errno * @property {game.Idaily_dungeons_info|null} [data] daily_dungeons_end_rsp data */ /** * Constructs a new daily_dungeons_end_rsp. * @memberof game * @classdesc Represents a daily_dungeons_end_rsp. * @implements Idaily_dungeons_end_rsp * @constructor * @param {game.Idaily_dungeons_end_rsp=} [properties] Properties to set */ function daily_dungeons_end_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_end_rsp errno. * @member {number|Long} errno * @memberof game.daily_dungeons_end_rsp * @instance */ daily_dungeons_end_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_end_rsp data. * @member {game.Idaily_dungeons_info|null|undefined} data * @memberof game.daily_dungeons_end_rsp * @instance */ daily_dungeons_end_rsp.prototype.data = null; /** * Creates a new daily_dungeons_end_rsp instance using the specified properties. * @function create * @memberof game.daily_dungeons_end_rsp * @static * @param {game.Idaily_dungeons_end_rsp=} [properties] Properties to set * @returns {game.daily_dungeons_end_rsp} daily_dungeons_end_rsp instance */ daily_dungeons_end_rsp.create = function create(properties) { return new daily_dungeons_end_rsp(properties); }; /** * Encodes the specified daily_dungeons_end_rsp message. Does not implicitly {@link game.daily_dungeons_end_rsp.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_end_rsp * @static * @param {game.Idaily_dungeons_end_rsp} message daily_dungeons_end_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_end_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.daily_dungeons_info.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified daily_dungeons_end_rsp message, length delimited. Does not implicitly {@link game.daily_dungeons_end_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_end_rsp * @static * @param {game.Idaily_dungeons_end_rsp} message daily_dungeons_end_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_end_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_end_rsp message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_end_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_end_rsp} daily_dungeons_end_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_end_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_end_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.daily_dungeons_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_end_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_end_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_end_rsp} daily_dungeons_end_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_end_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_end_rsp message. * @function verify * @memberof game.daily_dungeons_end_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_end_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.daily_dungeons_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a daily_dungeons_end_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_end_rsp * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_end_rsp} daily_dungeons_end_rsp */ daily_dungeons_end_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_end_rsp) return object; let message = new $root.game.daily_dungeons_end_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.daily_dungeons_end_rsp.data: object expected"); message.data = $root.game.daily_dungeons_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a daily_dungeons_end_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_end_rsp * @static * @param {game.daily_dungeons_end_rsp} message daily_dungeons_end_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_end_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.daily_dungeons_info.toObject(message.data, options); return object; }; /** * Converts this daily_dungeons_end_rsp to JSON. * @function toJSON * @memberof game.daily_dungeons_end_rsp * @instance * @returns {Object.} JSON object */ daily_dungeons_end_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_end_rsp; })(); game.daily_dungeons_sweep = (function() { /** * Properties of a daily_dungeons_sweep. * @memberof game * @interface Idaily_dungeons_sweep * @property {number|Long|null} [type] daily_dungeons_sweep type * @property {number|Long|null} [diff] daily_dungeons_sweep diff */ /** * Constructs a new daily_dungeons_sweep. * @memberof game * @classdesc Represents a daily_dungeons_sweep. * @implements Idaily_dungeons_sweep * @constructor * @param {game.Idaily_dungeons_sweep=} [properties] Properties to set */ function daily_dungeons_sweep(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_sweep type. * @member {number|Long} type * @memberof game.daily_dungeons_sweep * @instance */ daily_dungeons_sweep.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_sweep diff. * @member {number|Long} diff * @memberof game.daily_dungeons_sweep * @instance */ daily_dungeons_sweep.prototype.diff = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new daily_dungeons_sweep instance using the specified properties. * @function create * @memberof game.daily_dungeons_sweep * @static * @param {game.Idaily_dungeons_sweep=} [properties] Properties to set * @returns {game.daily_dungeons_sweep} daily_dungeons_sweep instance */ daily_dungeons_sweep.create = function create(properties) { return new daily_dungeons_sweep(properties); }; /** * Encodes the specified daily_dungeons_sweep message. Does not implicitly {@link game.daily_dungeons_sweep.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_sweep * @static * @param {game.Idaily_dungeons_sweep} message daily_dungeons_sweep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_sweep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.diff != null && Object.hasOwnProperty.call(message, "diff")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diff); return writer; }; /** * Encodes the specified daily_dungeons_sweep message, length delimited. Does not implicitly {@link game.daily_dungeons_sweep.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_sweep * @static * @param {game.Idaily_dungeons_sweep} message daily_dungeons_sweep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_sweep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_sweep message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_sweep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_sweep} daily_dungeons_sweep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_sweep.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_sweep(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.diff = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_sweep message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_sweep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_sweep} daily_dungeons_sweep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_sweep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_sweep message. * @function verify * @memberof game.daily_dungeons_sweep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_sweep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.diff != null && message.hasOwnProperty("diff")) if (!$util.isInteger(message.diff) && !(message.diff && $util.isInteger(message.diff.low) && $util.isInteger(message.diff.high))) return "diff: integer|Long expected"; return null; }; /** * Creates a daily_dungeons_sweep message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_sweep * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_sweep} daily_dungeons_sweep */ daily_dungeons_sweep.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_sweep) return object; let message = new $root.game.daily_dungeons_sweep(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.diff != null) if ($util.Long) (message.diff = $util.Long.fromValue(object.diff)).unsigned = false; else if (typeof object.diff === "string") message.diff = parseInt(object.diff, 10); else if (typeof object.diff === "number") message.diff = object.diff; else if (typeof object.diff === "object") message.diff = new $util.LongBits(object.diff.low >>> 0, object.diff.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a daily_dungeons_sweep message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_sweep * @static * @param {game.daily_dungeons_sweep} message daily_dungeons_sweep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_sweep.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.diff = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.diff = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.diff != null && message.hasOwnProperty("diff")) if (typeof message.diff === "number") object.diff = options.longs === String ? String(message.diff) : message.diff; else object.diff = options.longs === String ? $util.Long.prototype.toString.call(message.diff) : options.longs === Number ? new $util.LongBits(message.diff.low >>> 0, message.diff.high >>> 0).toNumber() : message.diff; return object; }; /** * Converts this daily_dungeons_sweep to JSON. * @function toJSON * @memberof game.daily_dungeons_sweep * @instance * @returns {Object.} JSON object */ daily_dungeons_sweep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_sweep; })(); game.daily_dungeons_sweep_rsp = (function() { /** * Properties of a daily_dungeons_sweep_rsp. * @memberof game * @interface Idaily_dungeons_sweep_rsp * @property {number|Long|null} [errno] daily_dungeons_sweep_rsp errno * @property {game.Idaily_dungeons_info|null} [data] daily_dungeons_sweep_rsp data */ /** * Constructs a new daily_dungeons_sweep_rsp. * @memberof game * @classdesc Represents a daily_dungeons_sweep_rsp. * @implements Idaily_dungeons_sweep_rsp * @constructor * @param {game.Idaily_dungeons_sweep_rsp=} [properties] Properties to set */ function daily_dungeons_sweep_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_sweep_rsp errno. * @member {number|Long} errno * @memberof game.daily_dungeons_sweep_rsp * @instance */ daily_dungeons_sweep_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_sweep_rsp data. * @member {game.Idaily_dungeons_info|null|undefined} data * @memberof game.daily_dungeons_sweep_rsp * @instance */ daily_dungeons_sweep_rsp.prototype.data = null; /** * Creates a new daily_dungeons_sweep_rsp instance using the specified properties. * @function create * @memberof game.daily_dungeons_sweep_rsp * @static * @param {game.Idaily_dungeons_sweep_rsp=} [properties] Properties to set * @returns {game.daily_dungeons_sweep_rsp} daily_dungeons_sweep_rsp instance */ daily_dungeons_sweep_rsp.create = function create(properties) { return new daily_dungeons_sweep_rsp(properties); }; /** * Encodes the specified daily_dungeons_sweep_rsp message. Does not implicitly {@link game.daily_dungeons_sweep_rsp.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_sweep_rsp * @static * @param {game.Idaily_dungeons_sweep_rsp} message daily_dungeons_sweep_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_sweep_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.daily_dungeons_info.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified daily_dungeons_sweep_rsp message, length delimited. Does not implicitly {@link game.daily_dungeons_sweep_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_sweep_rsp * @static * @param {game.Idaily_dungeons_sweep_rsp} message daily_dungeons_sweep_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_sweep_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_sweep_rsp message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_sweep_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_sweep_rsp} daily_dungeons_sweep_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_sweep_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_sweep_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.daily_dungeons_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_sweep_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_sweep_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_sweep_rsp} daily_dungeons_sweep_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_sweep_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_sweep_rsp message. * @function verify * @memberof game.daily_dungeons_sweep_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_sweep_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.daily_dungeons_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a daily_dungeons_sweep_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_sweep_rsp * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_sweep_rsp} daily_dungeons_sweep_rsp */ daily_dungeons_sweep_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_sweep_rsp) return object; let message = new $root.game.daily_dungeons_sweep_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.daily_dungeons_sweep_rsp.data: object expected"); message.data = $root.game.daily_dungeons_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a daily_dungeons_sweep_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_sweep_rsp * @static * @param {game.daily_dungeons_sweep_rsp} message daily_dungeons_sweep_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_sweep_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.daily_dungeons_info.toObject(message.data, options); return object; }; /** * Converts this daily_dungeons_sweep_rsp to JSON. * @function toJSON * @memberof game.daily_dungeons_sweep_rsp * @instance * @returns {Object.} JSON object */ daily_dungeons_sweep_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_sweep_rsp; })(); game.adv_gift_data = (function() { /** * Properties of an adv_gift_data. * @memberof game * @interface Iadv_gift_data */ /** * Constructs a new adv_gift_data. * @memberof game * @classdesc Represents an adv_gift_data. * @implements Iadv_gift_data * @constructor * @param {game.Iadv_gift_data=} [properties] Properties to set */ function adv_gift_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new adv_gift_data instance using the specified properties. * @function create * @memberof game.adv_gift_data * @static * @param {game.Iadv_gift_data=} [properties] Properties to set * @returns {game.adv_gift_data} adv_gift_data instance */ adv_gift_data.create = function create(properties) { return new adv_gift_data(properties); }; /** * Encodes the specified adv_gift_data message. Does not implicitly {@link game.adv_gift_data.verify|verify} messages. * @function encode * @memberof game.adv_gift_data * @static * @param {game.Iadv_gift_data} message adv_gift_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified adv_gift_data message, length delimited. Does not implicitly {@link game.adv_gift_data.verify|verify} messages. * @function encodeDelimited * @memberof game.adv_gift_data * @static * @param {game.Iadv_gift_data} message adv_gift_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adv_gift_data message from the specified reader or buffer. * @function decode * @memberof game.adv_gift_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adv_gift_data} adv_gift_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adv_gift_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adv_gift_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adv_gift_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adv_gift_data} adv_gift_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adv_gift_data message. * @function verify * @memberof game.adv_gift_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adv_gift_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an adv_gift_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adv_gift_data * @static * @param {Object.} object Plain object * @returns {game.adv_gift_data} adv_gift_data */ adv_gift_data.fromObject = function fromObject(object) { if (object instanceof $root.game.adv_gift_data) return object; return new $root.game.adv_gift_data(); }; /** * Creates a plain object from an adv_gift_data message. Also converts values to other types if specified. * @function toObject * @memberof game.adv_gift_data * @static * @param {game.adv_gift_data} message adv_gift_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adv_gift_data.toObject = function toObject() { return {}; }; /** * Converts this adv_gift_data to JSON. * @function toJSON * @memberof game.adv_gift_data * @instance * @returns {Object.} JSON object */ adv_gift_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adv_gift_data; })(); game.adv_gift_data_rsp = (function() { /** * Properties of an adv_gift_data_rsp. * @memberof game * @interface Iadv_gift_data_rsp * @property {number|Long|null} [errno] adv_gift_data_rsp errno */ /** * Constructs a new adv_gift_data_rsp. * @memberof game * @classdesc Represents an adv_gift_data_rsp. * @implements Iadv_gift_data_rsp * @constructor * @param {game.Iadv_gift_data_rsp=} [properties] Properties to set */ function adv_gift_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adv_gift_data_rsp errno. * @member {number|Long} errno * @memberof game.adv_gift_data_rsp * @instance */ adv_gift_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adv_gift_data_rsp instance using the specified properties. * @function create * @memberof game.adv_gift_data_rsp * @static * @param {game.Iadv_gift_data_rsp=} [properties] Properties to set * @returns {game.adv_gift_data_rsp} adv_gift_data_rsp instance */ adv_gift_data_rsp.create = function create(properties) { return new adv_gift_data_rsp(properties); }; /** * Encodes the specified adv_gift_data_rsp message. Does not implicitly {@link game.adv_gift_data_rsp.verify|verify} messages. * @function encode * @memberof game.adv_gift_data_rsp * @static * @param {game.Iadv_gift_data_rsp} message adv_gift_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adv_gift_data_rsp message, length delimited. Does not implicitly {@link game.adv_gift_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adv_gift_data_rsp * @static * @param {game.Iadv_gift_data_rsp} message adv_gift_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adv_gift_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.adv_gift_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adv_gift_data_rsp} adv_gift_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adv_gift_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adv_gift_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adv_gift_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adv_gift_data_rsp} adv_gift_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adv_gift_data_rsp message. * @function verify * @memberof game.adv_gift_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adv_gift_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adv_gift_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adv_gift_data_rsp * @static * @param {Object.} object Plain object * @returns {game.adv_gift_data_rsp} adv_gift_data_rsp */ adv_gift_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adv_gift_data_rsp) return object; let message = new $root.game.adv_gift_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adv_gift_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adv_gift_data_rsp * @static * @param {game.adv_gift_data_rsp} message adv_gift_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adv_gift_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adv_gift_data_rsp to JSON. * @function toJSON * @memberof game.adv_gift_data_rsp * @instance * @returns {Object.} JSON object */ adv_gift_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adv_gift_data_rsp; })(); game.adv_gift_buy = (function() { /** * Properties of an adv_gift_buy. * @memberof game * @interface Iadv_gift_buy * @property {number|Long|null} [id] adv_gift_buy id */ /** * Constructs a new adv_gift_buy. * @memberof game * @classdesc Represents an adv_gift_buy. * @implements Iadv_gift_buy * @constructor * @param {game.Iadv_gift_buy=} [properties] Properties to set */ function adv_gift_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adv_gift_buy id. * @member {number|Long} id * @memberof game.adv_gift_buy * @instance */ adv_gift_buy.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adv_gift_buy instance using the specified properties. * @function create * @memberof game.adv_gift_buy * @static * @param {game.Iadv_gift_buy=} [properties] Properties to set * @returns {game.adv_gift_buy} adv_gift_buy instance */ adv_gift_buy.create = function create(properties) { return new adv_gift_buy(properties); }; /** * Encodes the specified adv_gift_buy message. Does not implicitly {@link game.adv_gift_buy.verify|verify} messages. * @function encode * @memberof game.adv_gift_buy * @static * @param {game.Iadv_gift_buy} message adv_gift_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); return writer; }; /** * Encodes the specified adv_gift_buy message, length delimited. Does not implicitly {@link game.adv_gift_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.adv_gift_buy * @static * @param {game.Iadv_gift_buy} message adv_gift_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adv_gift_buy message from the specified reader or buffer. * @function decode * @memberof game.adv_gift_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adv_gift_buy} adv_gift_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adv_gift_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adv_gift_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adv_gift_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adv_gift_buy} adv_gift_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adv_gift_buy message. * @function verify * @memberof game.adv_gift_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adv_gift_buy.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"; return null; }; /** * Creates an adv_gift_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adv_gift_buy * @static * @param {Object.} object Plain object * @returns {game.adv_gift_buy} adv_gift_buy */ adv_gift_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.adv_gift_buy) return object; let message = new $root.game.adv_gift_buy(); 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(); return message; }; /** * Creates a plain object from an adv_gift_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.adv_gift_buy * @static * @param {game.adv_gift_buy} message adv_gift_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adv_gift_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this adv_gift_buy to JSON. * @function toJSON * @memberof game.adv_gift_buy * @instance * @returns {Object.} JSON object */ adv_gift_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adv_gift_buy; })(); game.adv_gift_buy_rsp = (function() { /** * Properties of an adv_gift_buy_rsp. * @memberof game * @interface Iadv_gift_buy_rsp * @property {number|Long|null} [errno] adv_gift_buy_rsp errno */ /** * Constructs a new adv_gift_buy_rsp. * @memberof game * @classdesc Represents an adv_gift_buy_rsp. * @implements Iadv_gift_buy_rsp * @constructor * @param {game.Iadv_gift_buy_rsp=} [properties] Properties to set */ function adv_gift_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adv_gift_buy_rsp errno. * @member {number|Long} errno * @memberof game.adv_gift_buy_rsp * @instance */ adv_gift_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new adv_gift_buy_rsp instance using the specified properties. * @function create * @memberof game.adv_gift_buy_rsp * @static * @param {game.Iadv_gift_buy_rsp=} [properties] Properties to set * @returns {game.adv_gift_buy_rsp} adv_gift_buy_rsp instance */ adv_gift_buy_rsp.create = function create(properties) { return new adv_gift_buy_rsp(properties); }; /** * Encodes the specified adv_gift_buy_rsp message. Does not implicitly {@link game.adv_gift_buy_rsp.verify|verify} messages. * @function encode * @memberof game.adv_gift_buy_rsp * @static * @param {game.Iadv_gift_buy_rsp} message adv_gift_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified adv_gift_buy_rsp message, length delimited. Does not implicitly {@link game.adv_gift_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.adv_gift_buy_rsp * @static * @param {game.Iadv_gift_buy_rsp} message adv_gift_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adv_gift_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.adv_gift_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adv_gift_buy_rsp} adv_gift_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adv_gift_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adv_gift_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adv_gift_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adv_gift_buy_rsp} adv_gift_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adv_gift_buy_rsp message. * @function verify * @memberof game.adv_gift_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adv_gift_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an adv_gift_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adv_gift_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.adv_gift_buy_rsp} adv_gift_buy_rsp */ adv_gift_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.adv_gift_buy_rsp) return object; let message = new $root.game.adv_gift_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an adv_gift_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.adv_gift_buy_rsp * @static * @param {game.adv_gift_buy_rsp} message adv_gift_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adv_gift_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this adv_gift_buy_rsp to JSON. * @function toJSON * @memberof game.adv_gift_buy_rsp * @instance * @returns {Object.} JSON object */ adv_gift_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adv_gift_buy_rsp; })(); game.adv_gift_nty = (function() { /** * Properties of an adv_gift_nty. * @memberof game * @interface Iadv_gift_nty * @property {Array.|null} [list] adv_gift_nty list */ /** * Constructs a new adv_gift_nty. * @memberof game * @classdesc Represents an adv_gift_nty. * @implements Iadv_gift_nty * @constructor * @param {game.Iadv_gift_nty=} [properties] Properties to set */ function adv_gift_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * adv_gift_nty list. * @member {Array.} list * @memberof game.adv_gift_nty * @instance */ adv_gift_nty.prototype.list = $util.emptyArray; /** * Creates a new adv_gift_nty instance using the specified properties. * @function create * @memberof game.adv_gift_nty * @static * @param {game.Iadv_gift_nty=} [properties] Properties to set * @returns {game.adv_gift_nty} adv_gift_nty instance */ adv_gift_nty.create = function create(properties) { return new adv_gift_nty(properties); }; /** * Encodes the specified adv_gift_nty message. Does not implicitly {@link game.adv_gift_nty.verify|verify} messages. * @function encode * @memberof game.adv_gift_nty * @static * @param {game.Iadv_gift_nty} message adv_gift_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.id_num.encode(message.list[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified adv_gift_nty message, length delimited. Does not implicitly {@link game.adv_gift_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.adv_gift_nty * @static * @param {game.Iadv_gift_nty} message adv_gift_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ adv_gift_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an adv_gift_nty message from the specified reader or buffer. * @function decode * @memberof game.adv_gift_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.adv_gift_nty} adv_gift_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.adv_gift_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an adv_gift_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.adv_gift_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.adv_gift_nty} adv_gift_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ adv_gift_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an adv_gift_nty message. * @function verify * @memberof game.adv_gift_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ adv_gift_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.id_num.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an adv_gift_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.adv_gift_nty * @static * @param {Object.} object Plain object * @returns {game.adv_gift_nty} adv_gift_nty */ adv_gift_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.adv_gift_nty) return object; let message = new $root.game.adv_gift_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.adv_gift_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.adv_gift_nty.list: object expected"); message.list[i] = $root.game.id_num.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an adv_gift_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.adv_gift_nty * @static * @param {game.adv_gift_nty} message adv_gift_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ adv_gift_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.id_num.toObject(message.list[j], options); } return object; }; /** * Converts this adv_gift_nty to JSON. * @function toJSON * @memberof game.adv_gift_nty * @instance * @returns {Object.} JSON object */ adv_gift_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return adv_gift_nty; })(); game.pop_gift_data = (function() { /** * Properties of a pop_gift_data. * @memberof game * @interface Ipop_gift_data */ /** * Constructs a new pop_gift_data. * @memberof game * @classdesc Represents a pop_gift_data. * @implements Ipop_gift_data * @constructor * @param {game.Ipop_gift_data=} [properties] Properties to set */ function pop_gift_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new pop_gift_data instance using the specified properties. * @function create * @memberof game.pop_gift_data * @static * @param {game.Ipop_gift_data=} [properties] Properties to set * @returns {game.pop_gift_data} pop_gift_data instance */ pop_gift_data.create = function create(properties) { return new pop_gift_data(properties); }; /** * Encodes the specified pop_gift_data message. Does not implicitly {@link game.pop_gift_data.verify|verify} messages. * @function encode * @memberof game.pop_gift_data * @static * @param {game.Ipop_gift_data} message pop_gift_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified pop_gift_data message, length delimited. Does not implicitly {@link game.pop_gift_data.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_data * @static * @param {game.Ipop_gift_data} message pop_gift_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_data message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_data} pop_gift_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_data} pop_gift_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_data message. * @function verify * @memberof game.pop_gift_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a pop_gift_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_data * @static * @param {Object.} object Plain object * @returns {game.pop_gift_data} pop_gift_data */ pop_gift_data.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_data) return object; return new $root.game.pop_gift_data(); }; /** * Creates a plain object from a pop_gift_data message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_data * @static * @param {game.pop_gift_data} message pop_gift_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_data.toObject = function toObject() { return {}; }; /** * Converts this pop_gift_data to JSON. * @function toJSON * @memberof game.pop_gift_data * @instance * @returns {Object.} JSON object */ pop_gift_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_data; })(); game.pop_gift_data_rsp = (function() { /** * Properties of a pop_gift_data_rsp. * @memberof game * @interface Ipop_gift_data_rsp * @property {number|Long|null} [errno] pop_gift_data_rsp errno * @property {Array.|null} [list] pop_gift_data_rsp list */ /** * Constructs a new pop_gift_data_rsp. * @memberof game * @classdesc Represents a pop_gift_data_rsp. * @implements Ipop_gift_data_rsp * @constructor * @param {game.Ipop_gift_data_rsp=} [properties] Properties to set */ function pop_gift_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_data_rsp errno. * @member {number|Long} errno * @memberof game.pop_gift_data_rsp * @instance */ pop_gift_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_data_rsp list. * @member {Array.} list * @memberof game.pop_gift_data_rsp * @instance */ pop_gift_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new pop_gift_data_rsp instance using the specified properties. * @function create * @memberof game.pop_gift_data_rsp * @static * @param {game.Ipop_gift_data_rsp=} [properties] Properties to set * @returns {game.pop_gift_data_rsp} pop_gift_data_rsp instance */ pop_gift_data_rsp.create = function create(properties) { return new pop_gift_data_rsp(properties); }; /** * Encodes the specified pop_gift_data_rsp message. Does not implicitly {@link game.pop_gift_data_rsp.verify|verify} messages. * @function encode * @memberof game.pop_gift_data_rsp * @static * @param {game.Ipop_gift_data_rsp} message pop_gift_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.pop_gift_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified pop_gift_data_rsp message, length delimited. Does not implicitly {@link game.pop_gift_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_data_rsp * @static * @param {game.Ipop_gift_data_rsp} message pop_gift_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_data_rsp} pop_gift_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.pop_gift_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_data_rsp} pop_gift_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_data_rsp message. * @function verify * @memberof game.pop_gift_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.pop_gift_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a pop_gift_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_data_rsp * @static * @param {Object.} object Plain object * @returns {game.pop_gift_data_rsp} pop_gift_data_rsp */ pop_gift_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_data_rsp) return object; let message = new $root.game.pop_gift_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.pop_gift_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.pop_gift_data_rsp.list: object expected"); message.list[i] = $root.game.pop_gift_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a pop_gift_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_data_rsp * @static * @param {game.pop_gift_data_rsp} message pop_gift_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.pop_gift_info.toObject(message.list[j], options); } return object; }; /** * Converts this pop_gift_data_rsp to JSON. * @function toJSON * @memberof game.pop_gift_data_rsp * @instance * @returns {Object.} JSON object */ pop_gift_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_data_rsp; })(); game.pop_gift_buy = (function() { /** * Properties of a pop_gift_buy. * @memberof game * @interface Ipop_gift_buy * @property {number|Long|null} [id] pop_gift_buy id */ /** * Constructs a new pop_gift_buy. * @memberof game * @classdesc Represents a pop_gift_buy. * @implements Ipop_gift_buy * @constructor * @param {game.Ipop_gift_buy=} [properties] Properties to set */ function pop_gift_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_buy id. * @member {number|Long} id * @memberof game.pop_gift_buy * @instance */ pop_gift_buy.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new pop_gift_buy instance using the specified properties. * @function create * @memberof game.pop_gift_buy * @static * @param {game.Ipop_gift_buy=} [properties] Properties to set * @returns {game.pop_gift_buy} pop_gift_buy instance */ pop_gift_buy.create = function create(properties) { return new pop_gift_buy(properties); }; /** * Encodes the specified pop_gift_buy message. Does not implicitly {@link game.pop_gift_buy.verify|verify} messages. * @function encode * @memberof game.pop_gift_buy * @static * @param {game.Ipop_gift_buy} message pop_gift_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified pop_gift_buy message, length delimited. Does not implicitly {@link game.pop_gift_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_buy * @static * @param {game.Ipop_gift_buy} message pop_gift_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_buy message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_buy} pop_gift_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_buy} pop_gift_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_buy message. * @function verify * @memberof game.pop_gift_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_buy.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"; return null; }; /** * Creates a pop_gift_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_buy * @static * @param {Object.} object Plain object * @returns {game.pop_gift_buy} pop_gift_buy */ pop_gift_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_buy) return object; let message = new $root.game.pop_gift_buy(); 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(); return message; }; /** * Creates a plain object from a pop_gift_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_buy * @static * @param {game.pop_gift_buy} message pop_gift_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this pop_gift_buy to JSON. * @function toJSON * @memberof game.pop_gift_buy * @instance * @returns {Object.} JSON object */ pop_gift_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_buy; })(); game.pop_gift_buy_rsp = (function() { /** * Properties of a pop_gift_buy_rsp. * @memberof game * @interface Ipop_gift_buy_rsp * @property {number|Long|null} [errno] pop_gift_buy_rsp errno */ /** * Constructs a new pop_gift_buy_rsp. * @memberof game * @classdesc Represents a pop_gift_buy_rsp. * @implements Ipop_gift_buy_rsp * @constructor * @param {game.Ipop_gift_buy_rsp=} [properties] Properties to set */ function pop_gift_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_buy_rsp errno. * @member {number|Long} errno * @memberof game.pop_gift_buy_rsp * @instance */ pop_gift_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new pop_gift_buy_rsp instance using the specified properties. * @function create * @memberof game.pop_gift_buy_rsp * @static * @param {game.Ipop_gift_buy_rsp=} [properties] Properties to set * @returns {game.pop_gift_buy_rsp} pop_gift_buy_rsp instance */ pop_gift_buy_rsp.create = function create(properties) { return new pop_gift_buy_rsp(properties); }; /** * Encodes the specified pop_gift_buy_rsp message. Does not implicitly {@link game.pop_gift_buy_rsp.verify|verify} messages. * @function encode * @memberof game.pop_gift_buy_rsp * @static * @param {game.Ipop_gift_buy_rsp} message pop_gift_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified pop_gift_buy_rsp message, length delimited. Does not implicitly {@link game.pop_gift_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_buy_rsp * @static * @param {game.Ipop_gift_buy_rsp} message pop_gift_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_buy_rsp} pop_gift_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_buy_rsp} pop_gift_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_buy_rsp message. * @function verify * @memberof game.pop_gift_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a pop_gift_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.pop_gift_buy_rsp} pop_gift_buy_rsp */ pop_gift_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_buy_rsp) return object; let message = new $root.game.pop_gift_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a pop_gift_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_buy_rsp * @static * @param {game.pop_gift_buy_rsp} message pop_gift_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this pop_gift_buy_rsp to JSON. * @function toJSON * @memberof game.pop_gift_buy_rsp * @instance * @returns {Object.} JSON object */ pop_gift_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_buy_rsp; })(); game.pop_gift_nty = (function() { /** * Properties of a pop_gift_nty. * @memberof game * @interface Ipop_gift_nty * @property {game.Ipop_gift_info|null} [data] pop_gift_nty data */ /** * Constructs a new pop_gift_nty. * @memberof game * @classdesc Represents a pop_gift_nty. * @implements Ipop_gift_nty * @constructor * @param {game.Ipop_gift_nty=} [properties] Properties to set */ function pop_gift_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_nty data. * @member {game.Ipop_gift_info|null|undefined} data * @memberof game.pop_gift_nty * @instance */ pop_gift_nty.prototype.data = null; /** * Creates a new pop_gift_nty instance using the specified properties. * @function create * @memberof game.pop_gift_nty * @static * @param {game.Ipop_gift_nty=} [properties] Properties to set * @returns {game.pop_gift_nty} pop_gift_nty instance */ pop_gift_nty.create = function create(properties) { return new pop_gift_nty(properties); }; /** * Encodes the specified pop_gift_nty message. Does not implicitly {@link game.pop_gift_nty.verify|verify} messages. * @function encode * @memberof game.pop_gift_nty * @static * @param {game.Ipop_gift_nty} message pop_gift_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.pop_gift_info.encode(message.data, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified pop_gift_nty message, length delimited. Does not implicitly {@link game.pop_gift_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_nty * @static * @param {game.Ipop_gift_nty} message pop_gift_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_nty message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_nty} pop_gift_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data = $root.game.pop_gift_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_nty} pop_gift_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_nty message. * @function verify * @memberof game.pop_gift_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.pop_gift_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a pop_gift_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_nty * @static * @param {Object.} object Plain object * @returns {game.pop_gift_nty} pop_gift_nty */ pop_gift_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_nty) return object; let message = new $root.game.pop_gift_nty(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.pop_gift_nty.data: object expected"); message.data = $root.game.pop_gift_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a pop_gift_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_nty * @static * @param {game.pop_gift_nty} message pop_gift_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.data = null; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.pop_gift_info.toObject(message.data, options); return object; }; /** * Converts this pop_gift_nty to JSON. * @function toJSON * @memberof game.pop_gift_nty * @instance * @returns {Object.} JSON object */ pop_gift_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_nty; })(); game.pop_gift_change_nty = (function() { /** * Properties of a pop_gift_change_nty. * @memberof game * @interface Ipop_gift_change_nty * @property {game.Ipop_gift_info|null} [data] pop_gift_change_nty data */ /** * Constructs a new pop_gift_change_nty. * @memberof game * @classdesc Represents a pop_gift_change_nty. * @implements Ipop_gift_change_nty * @constructor * @param {game.Ipop_gift_change_nty=} [properties] Properties to set */ function pop_gift_change_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_change_nty data. * @member {game.Ipop_gift_info|null|undefined} data * @memberof game.pop_gift_change_nty * @instance */ pop_gift_change_nty.prototype.data = null; /** * Creates a new pop_gift_change_nty instance using the specified properties. * @function create * @memberof game.pop_gift_change_nty * @static * @param {game.Ipop_gift_change_nty=} [properties] Properties to set * @returns {game.pop_gift_change_nty} pop_gift_change_nty instance */ pop_gift_change_nty.create = function create(properties) { return new pop_gift_change_nty(properties); }; /** * Encodes the specified pop_gift_change_nty message. Does not implicitly {@link game.pop_gift_change_nty.verify|verify} messages. * @function encode * @memberof game.pop_gift_change_nty * @static * @param {game.Ipop_gift_change_nty} message pop_gift_change_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_change_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.pop_gift_info.encode(message.data, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified pop_gift_change_nty message, length delimited. Does not implicitly {@link game.pop_gift_change_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_change_nty * @static * @param {game.Ipop_gift_change_nty} message pop_gift_change_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_change_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_change_nty message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_change_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_change_nty} pop_gift_change_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_change_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_change_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data = $root.game.pop_gift_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_change_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_change_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_change_nty} pop_gift_change_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_change_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_change_nty message. * @function verify * @memberof game.pop_gift_change_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_change_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.pop_gift_info.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a pop_gift_change_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_change_nty * @static * @param {Object.} object Plain object * @returns {game.pop_gift_change_nty} pop_gift_change_nty */ pop_gift_change_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_change_nty) return object; let message = new $root.game.pop_gift_change_nty(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.pop_gift_change_nty.data: object expected"); message.data = $root.game.pop_gift_info.fromObject(object.data); } return message; }; /** * Creates a plain object from a pop_gift_change_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_change_nty * @static * @param {game.pop_gift_change_nty} message pop_gift_change_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_change_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.data = null; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.pop_gift_info.toObject(message.data, options); return object; }; /** * Converts this pop_gift_change_nty to JSON. * @function toJSON * @memberof game.pop_gift_change_nty * @instance * @returns {Object.} JSON object */ pop_gift_change_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_change_nty; })(); game.fund_data = (function() { /** * Properties of a fund_data. * @memberof game * @interface Ifund_data * @property {number|Long|null} [moduleid] fund_data moduleid */ /** * Constructs a new fund_data. * @memberof game * @classdesc Represents a fund_data. * @implements Ifund_data * @constructor * @param {game.Ifund_data=} [properties] Properties to set */ function fund_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_data moduleid. * @member {number|Long} moduleid * @memberof game.fund_data * @instance */ fund_data.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_data instance using the specified properties. * @function create * @memberof game.fund_data * @static * @param {game.Ifund_data=} [properties] Properties to set * @returns {game.fund_data} fund_data instance */ fund_data.create = function create(properties) { return new fund_data(properties); }; /** * Encodes the specified fund_data message. Does not implicitly {@link game.fund_data.verify|verify} messages. * @function encode * @memberof game.fund_data * @static * @param {game.Ifund_data} message fund_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified fund_data message, length delimited. Does not implicitly {@link game.fund_data.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_data * @static * @param {game.Ifund_data} message fund_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_data message from the specified reader or buffer. * @function decode * @memberof game.fund_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_data} fund_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_data} fund_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_data message. * @function verify * @memberof game.fund_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a fund_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_data * @static * @param {Object.} object Plain object * @returns {game.fund_data} fund_data */ fund_data.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_data) return object; let message = new $root.game.fund_data(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_data message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_data * @static * @param {game.fund_data} message fund_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_data.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this fund_data to JSON. * @function toJSON * @memberof game.fund_data * @instance * @returns {Object.} JSON object */ fund_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_data; })(); game.fund_data_rsp = (function() { /** * Properties of a fund_data_rsp. * @memberof game * @interface Ifund_data_rsp * @property {number|Long|null} [errno] fund_data_rsp errno * @property {number|Long|null} [moduleid] fund_data_rsp moduleid * @property {boolean|null} [state] fund_data_rsp state * @property {number|Long|null} [award] fund_data_rsp award * @property {number|Long|null} [freeAward] fund_data_rsp freeAward * @property {number|Long|null} [progress] fund_data_rsp progress */ /** * Constructs a new fund_data_rsp. * @memberof game * @classdesc Represents a fund_data_rsp. * @implements Ifund_data_rsp * @constructor * @param {game.Ifund_data_rsp=} [properties] Properties to set */ function fund_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_data_rsp errno. * @member {number|Long} errno * @memberof game.fund_data_rsp * @instance */ fund_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_data_rsp moduleid. * @member {number|Long} moduleid * @memberof game.fund_data_rsp * @instance */ fund_data_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_data_rsp state. * @member {boolean} state * @memberof game.fund_data_rsp * @instance */ fund_data_rsp.prototype.state = false; /** * fund_data_rsp award. * @member {number|Long} award * @memberof game.fund_data_rsp * @instance */ fund_data_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_data_rsp freeAward. * @member {number|Long} freeAward * @memberof game.fund_data_rsp * @instance */ fund_data_rsp.prototype.freeAward = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_data_rsp progress. * @member {number|Long} progress * @memberof game.fund_data_rsp * @instance */ fund_data_rsp.prototype.progress = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_data_rsp instance using the specified properties. * @function create * @memberof game.fund_data_rsp * @static * @param {game.Ifund_data_rsp=} [properties] Properties to set * @returns {game.fund_data_rsp} fund_data_rsp instance */ fund_data_rsp.create = function create(properties) { return new fund_data_rsp(properties); }; /** * Encodes the specified fund_data_rsp message. Does not implicitly {@link game.fund_data_rsp.verify|verify} messages. * @function encode * @memberof game.fund_data_rsp * @static * @param {game.Ifund_data_rsp} message fund_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.state); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.award); if (message.freeAward != null && Object.hasOwnProperty.call(message, "freeAward")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.freeAward); if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.progress); return writer; }; /** * Encodes the specified fund_data_rsp message, length delimited. Does not implicitly {@link game.fund_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_data_rsp * @static * @param {game.Ifund_data_rsp} message fund_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.fund_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_data_rsp} fund_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; case 3: message.state = reader.bool(); break; case 4: message.award = reader.int64(); break; case 5: message.freeAward = reader.int64(); break; case 6: message.progress = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_data_rsp} fund_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_data_rsp message. * @function verify * @memberof game.fund_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state !== "boolean") return "state: boolean expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; if (message.freeAward != null && message.hasOwnProperty("freeAward")) if (!$util.isInteger(message.freeAward) && !(message.freeAward && $util.isInteger(message.freeAward.low) && $util.isInteger(message.freeAward.high))) return "freeAward: integer|Long expected"; if (message.progress != null && message.hasOwnProperty("progress")) if (!$util.isInteger(message.progress) && !(message.progress && $util.isInteger(message.progress.low) && $util.isInteger(message.progress.high))) return "progress: integer|Long expected"; return null; }; /** * Creates a fund_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_data_rsp * @static * @param {Object.} object Plain object * @returns {game.fund_data_rsp} fund_data_rsp */ fund_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_data_rsp) return object; let message = new $root.game.fund_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.state != null) message.state = Boolean(object.state); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); if (object.freeAward != null) if ($util.Long) (message.freeAward = $util.Long.fromValue(object.freeAward)).unsigned = false; else if (typeof object.freeAward === "string") message.freeAward = parseInt(object.freeAward, 10); else if (typeof object.freeAward === "number") message.freeAward = object.freeAward; else if (typeof object.freeAward === "object") message.freeAward = new $util.LongBits(object.freeAward.low >>> 0, object.freeAward.high >>> 0).toNumber(); if (object.progress != null) if ($util.Long) (message.progress = $util.Long.fromValue(object.progress)).unsigned = false; else if (typeof object.progress === "string") message.progress = parseInt(object.progress, 10); else if (typeof object.progress === "number") message.progress = object.progress; else if (typeof object.progress === "object") message.progress = new $util.LongBits(object.progress.low >>> 0, object.progress.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_data_rsp * @static * @param {game.fund_data_rsp} message fund_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; object.state = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.freeAward = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.freeAward = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.progress = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.progress = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.state != null && message.hasOwnProperty("state")) object.state = message.state; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; if (message.freeAward != null && message.hasOwnProperty("freeAward")) if (typeof message.freeAward === "number") object.freeAward = options.longs === String ? String(message.freeAward) : message.freeAward; else object.freeAward = options.longs === String ? $util.Long.prototype.toString.call(message.freeAward) : options.longs === Number ? new $util.LongBits(message.freeAward.low >>> 0, message.freeAward.high >>> 0).toNumber() : message.freeAward; if (message.progress != null && message.hasOwnProperty("progress")) if (typeof message.progress === "number") object.progress = options.longs === String ? String(message.progress) : message.progress; else object.progress = options.longs === String ? $util.Long.prototype.toString.call(message.progress) : options.longs === Number ? new $util.LongBits(message.progress.low >>> 0, message.progress.high >>> 0).toNumber() : message.progress; return object; }; /** * Converts this fund_data_rsp to JSON. * @function toJSON * @memberof game.fund_data_rsp * @instance * @returns {Object.} JSON object */ fund_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_data_rsp; })(); game.fund_buy = (function() { /** * Properties of a fund_buy. * @memberof game * @interface Ifund_buy * @property {number|Long|null} [moduleid] fund_buy moduleid */ /** * Constructs a new fund_buy. * @memberof game * @classdesc Represents a fund_buy. * @implements Ifund_buy * @constructor * @param {game.Ifund_buy=} [properties] Properties to set */ function fund_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_buy moduleid. * @member {number|Long} moduleid * @memberof game.fund_buy * @instance */ fund_buy.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_buy instance using the specified properties. * @function create * @memberof game.fund_buy * @static * @param {game.Ifund_buy=} [properties] Properties to set * @returns {game.fund_buy} fund_buy instance */ fund_buy.create = function create(properties) { return new fund_buy(properties); }; /** * Encodes the specified fund_buy message. Does not implicitly {@link game.fund_buy.verify|verify} messages. * @function encode * @memberof game.fund_buy * @static * @param {game.Ifund_buy} message fund_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified fund_buy message, length delimited. Does not implicitly {@link game.fund_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_buy * @static * @param {game.Ifund_buy} message fund_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_buy message from the specified reader or buffer. * @function decode * @memberof game.fund_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_buy} fund_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_buy} fund_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_buy message. * @function verify * @memberof game.fund_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a fund_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_buy * @static * @param {Object.} object Plain object * @returns {game.fund_buy} fund_buy */ fund_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_buy) return object; let message = new $root.game.fund_buy(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_buy * @static * @param {game.fund_buy} message fund_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this fund_buy to JSON. * @function toJSON * @memberof game.fund_buy * @instance * @returns {Object.} JSON object */ fund_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_buy; })(); game.fund_buy_rsp = (function() { /** * Properties of a fund_buy_rsp. * @memberof game * @interface Ifund_buy_rsp * @property {number|Long|null} [errno] fund_buy_rsp errno * @property {number|Long|null} [moduleid] fund_buy_rsp moduleid */ /** * Constructs a new fund_buy_rsp. * @memberof game * @classdesc Represents a fund_buy_rsp. * @implements Ifund_buy_rsp * @constructor * @param {game.Ifund_buy_rsp=} [properties] Properties to set */ function fund_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_buy_rsp errno. * @member {number|Long} errno * @memberof game.fund_buy_rsp * @instance */ fund_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_buy_rsp moduleid. * @member {number|Long} moduleid * @memberof game.fund_buy_rsp * @instance */ fund_buy_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_buy_rsp instance using the specified properties. * @function create * @memberof game.fund_buy_rsp * @static * @param {game.Ifund_buy_rsp=} [properties] Properties to set * @returns {game.fund_buy_rsp} fund_buy_rsp instance */ fund_buy_rsp.create = function create(properties) { return new fund_buy_rsp(properties); }; /** * Encodes the specified fund_buy_rsp message. Does not implicitly {@link game.fund_buy_rsp.verify|verify} messages. * @function encode * @memberof game.fund_buy_rsp * @static * @param {game.Ifund_buy_rsp} message fund_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); return writer; }; /** * Encodes the specified fund_buy_rsp message, length delimited. Does not implicitly {@link game.fund_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_buy_rsp * @static * @param {game.Ifund_buy_rsp} message fund_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.fund_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_buy_rsp} fund_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_buy_rsp} fund_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_buy_rsp message. * @function verify * @memberof game.fund_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a fund_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.fund_buy_rsp} fund_buy_rsp */ fund_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_buy_rsp) return object; let message = new $root.game.fund_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_buy_rsp * @static * @param {game.fund_buy_rsp} message fund_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this fund_buy_rsp to JSON. * @function toJSON * @memberof game.fund_buy_rsp * @instance * @returns {Object.} JSON object */ fund_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_buy_rsp; })(); game.fund_award = (function() { /** * Properties of a fund_award. * @memberof game * @interface Ifund_award * @property {number|Long|null} [moduleid] fund_award moduleid */ /** * Constructs a new fund_award. * @memberof game * @classdesc Represents a fund_award. * @implements Ifund_award * @constructor * @param {game.Ifund_award=} [properties] Properties to set */ function fund_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_award moduleid. * @member {number|Long} moduleid * @memberof game.fund_award * @instance */ fund_award.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_award instance using the specified properties. * @function create * @memberof game.fund_award * @static * @param {game.Ifund_award=} [properties] Properties to set * @returns {game.fund_award} fund_award instance */ fund_award.create = function create(properties) { return new fund_award(properties); }; /** * Encodes the specified fund_award message. Does not implicitly {@link game.fund_award.verify|verify} messages. * @function encode * @memberof game.fund_award * @static * @param {game.Ifund_award} message fund_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); return writer; }; /** * Encodes the specified fund_award message, length delimited. Does not implicitly {@link game.fund_award.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_award * @static * @param {game.Ifund_award} message fund_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_award message from the specified reader or buffer. * @function decode * @memberof game.fund_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_award} fund_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_award} fund_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_award message. * @function verify * @memberof game.fund_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; return null; }; /** * Creates a fund_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_award * @static * @param {Object.} object Plain object * @returns {game.fund_award} fund_award */ fund_award.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_award) return object; let message = new $root.game.fund_award(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_award message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_award * @static * @param {game.fund_award} message fund_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; return object; }; /** * Converts this fund_award to JSON. * @function toJSON * @memberof game.fund_award * @instance * @returns {Object.} JSON object */ fund_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_award; })(); game.fund_award_rsp = (function() { /** * Properties of a fund_award_rsp. * @memberof game * @interface Ifund_award_rsp * @property {number|Long|null} [errno] fund_award_rsp errno * @property {number|Long|null} [moduleid] fund_award_rsp moduleid * @property {number|Long|null} [award] fund_award_rsp award * @property {number|Long|null} [freeAward] fund_award_rsp freeAward */ /** * Constructs a new fund_award_rsp. * @memberof game * @classdesc Represents a fund_award_rsp. * @implements Ifund_award_rsp * @constructor * @param {game.Ifund_award_rsp=} [properties] Properties to set */ function fund_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_award_rsp errno. * @member {number|Long} errno * @memberof game.fund_award_rsp * @instance */ fund_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_award_rsp moduleid. * @member {number|Long} moduleid * @memberof game.fund_award_rsp * @instance */ fund_award_rsp.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_award_rsp award. * @member {number|Long} award * @memberof game.fund_award_rsp * @instance */ fund_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_award_rsp freeAward. * @member {number|Long} freeAward * @memberof game.fund_award_rsp * @instance */ fund_award_rsp.prototype.freeAward = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_award_rsp instance using the specified properties. * @function create * @memberof game.fund_award_rsp * @static * @param {game.Ifund_award_rsp=} [properties] Properties to set * @returns {game.fund_award_rsp} fund_award_rsp instance */ fund_award_rsp.create = function create(properties) { return new fund_award_rsp(properties); }; /** * Encodes the specified fund_award_rsp message. Does not implicitly {@link game.fund_award_rsp.verify|verify} messages. * @function encode * @memberof game.fund_award_rsp * @static * @param {game.Ifund_award_rsp} message fund_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); if (message.freeAward != null && Object.hasOwnProperty.call(message, "freeAward")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.freeAward); return writer; }; /** * Encodes the specified fund_award_rsp message, length delimited. Does not implicitly {@link game.fund_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_award_rsp * @static * @param {game.Ifund_award_rsp} message fund_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.fund_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_award_rsp} fund_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.moduleid = reader.int64(); break; case 3: message.award = reader.int64(); break; case 4: message.freeAward = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_award_rsp} fund_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_award_rsp message. * @function verify * @memberof game.fund_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; if (message.freeAward != null && message.hasOwnProperty("freeAward")) if (!$util.isInteger(message.freeAward) && !(message.freeAward && $util.isInteger(message.freeAward.low) && $util.isInteger(message.freeAward.high))) return "freeAward: integer|Long expected"; return null; }; /** * Creates a fund_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_award_rsp * @static * @param {Object.} object Plain object * @returns {game.fund_award_rsp} fund_award_rsp */ fund_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_award_rsp) return object; let message = new $root.game.fund_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); if (object.freeAward != null) if ($util.Long) (message.freeAward = $util.Long.fromValue(object.freeAward)).unsigned = false; else if (typeof object.freeAward === "string") message.freeAward = parseInt(object.freeAward, 10); else if (typeof object.freeAward === "number") message.freeAward = object.freeAward; else if (typeof object.freeAward === "object") message.freeAward = new $util.LongBits(object.freeAward.low >>> 0, object.freeAward.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_award_rsp * @static * @param {game.fund_award_rsp} message fund_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.freeAward = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.freeAward = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; if (message.freeAward != null && message.hasOwnProperty("freeAward")) if (typeof message.freeAward === "number") object.freeAward = options.longs === String ? String(message.freeAward) : message.freeAward; else object.freeAward = options.longs === String ? $util.Long.prototype.toString.call(message.freeAward) : options.longs === Number ? new $util.LongBits(message.freeAward.low >>> 0, message.freeAward.high >>> 0).toNumber() : message.freeAward; return object; }; /** * Converts this fund_award_rsp to JSON. * @function toJSON * @memberof game.fund_award_rsp * @instance * @returns {Object.} JSON object */ fund_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_award_rsp; })(); game.fund_nty = (function() { /** * Properties of a fund_nty. * @memberof game * @interface Ifund_nty * @property {number|Long|null} [moduleid] fund_nty moduleid * @property {boolean|null} [state] fund_nty state * @property {number|Long|null} [award] fund_nty award * @property {number|Long|null} [freeAward] fund_nty freeAward * @property {number|Long|null} [progress] fund_nty progress */ /** * Constructs a new fund_nty. * @memberof game * @classdesc Represents a fund_nty. * @implements Ifund_nty * @constructor * @param {game.Ifund_nty=} [properties] Properties to set */ function fund_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * fund_nty moduleid. * @member {number|Long} moduleid * @memberof game.fund_nty * @instance */ fund_nty.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_nty state. * @member {boolean} state * @memberof game.fund_nty * @instance */ fund_nty.prototype.state = false; /** * fund_nty award. * @member {number|Long} award * @memberof game.fund_nty * @instance */ fund_nty.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_nty freeAward. * @member {number|Long} freeAward * @memberof game.fund_nty * @instance */ fund_nty.prototype.freeAward = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * fund_nty progress. * @member {number|Long} progress * @memberof game.fund_nty * @instance */ fund_nty.prototype.progress = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new fund_nty instance using the specified properties. * @function create * @memberof game.fund_nty * @static * @param {game.Ifund_nty=} [properties] Properties to set * @returns {game.fund_nty} fund_nty instance */ fund_nty.create = function create(properties) { return new fund_nty(properties); }; /** * Encodes the specified fund_nty message. Does not implicitly {@link game.fund_nty.verify|verify} messages. * @function encode * @memberof game.fund_nty * @static * @param {game.Ifund_nty} message fund_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.moduleid); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.state); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.award); if (message.freeAward != null && Object.hasOwnProperty.call(message, "freeAward")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.freeAward); if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.progress); return writer; }; /** * Encodes the specified fund_nty message, length delimited. Does not implicitly {@link game.fund_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.fund_nty * @static * @param {game.Ifund_nty} message fund_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ fund_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a fund_nty message from the specified reader or buffer. * @function decode * @memberof game.fund_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.fund_nty} fund_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.fund_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.moduleid = reader.int64(); break; case 3: message.state = reader.bool(); break; case 4: message.award = reader.int64(); break; case 5: message.freeAward = reader.int64(); break; case 6: message.progress = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a fund_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.fund_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.fund_nty} fund_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ fund_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a fund_nty message. * @function verify * @memberof game.fund_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ fund_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state !== "boolean") return "state: boolean expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; if (message.freeAward != null && message.hasOwnProperty("freeAward")) if (!$util.isInteger(message.freeAward) && !(message.freeAward && $util.isInteger(message.freeAward.low) && $util.isInteger(message.freeAward.high))) return "freeAward: integer|Long expected"; if (message.progress != null && message.hasOwnProperty("progress")) if (!$util.isInteger(message.progress) && !(message.progress && $util.isInteger(message.progress.low) && $util.isInteger(message.progress.high))) return "progress: integer|Long expected"; return null; }; /** * Creates a fund_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.fund_nty * @static * @param {Object.} object Plain object * @returns {game.fund_nty} fund_nty */ fund_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.fund_nty) return object; let message = new $root.game.fund_nty(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.state != null) message.state = Boolean(object.state); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); if (object.freeAward != null) if ($util.Long) (message.freeAward = $util.Long.fromValue(object.freeAward)).unsigned = false; else if (typeof object.freeAward === "string") message.freeAward = parseInt(object.freeAward, 10); else if (typeof object.freeAward === "number") message.freeAward = object.freeAward; else if (typeof object.freeAward === "object") message.freeAward = new $util.LongBits(object.freeAward.low >>> 0, object.freeAward.high >>> 0).toNumber(); if (object.progress != null) if ($util.Long) (message.progress = $util.Long.fromValue(object.progress)).unsigned = false; else if (typeof object.progress === "string") message.progress = parseInt(object.progress, 10); else if (typeof object.progress === "number") message.progress = object.progress; else if (typeof object.progress === "object") message.progress = new $util.LongBits(object.progress.low >>> 0, object.progress.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a fund_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.fund_nty * @static * @param {game.fund_nty} message fund_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ fund_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; object.state = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.freeAward = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.freeAward = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.progress = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.progress = options.longs === String ? "0" : 0; } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.state != null && message.hasOwnProperty("state")) object.state = message.state; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; if (message.freeAward != null && message.hasOwnProperty("freeAward")) if (typeof message.freeAward === "number") object.freeAward = options.longs === String ? String(message.freeAward) : message.freeAward; else object.freeAward = options.longs === String ? $util.Long.prototype.toString.call(message.freeAward) : options.longs === Number ? new $util.LongBits(message.freeAward.low >>> 0, message.freeAward.high >>> 0).toNumber() : message.freeAward; if (message.progress != null && message.hasOwnProperty("progress")) if (typeof message.progress === "number") object.progress = options.longs === String ? String(message.progress) : message.progress; else object.progress = options.longs === String ? $util.Long.prototype.toString.call(message.progress) : options.longs === Number ? new $util.LongBits(message.progress.low >>> 0, message.progress.high >>> 0).toNumber() : message.progress; return object; }; /** * Converts this fund_nty to JSON. * @function toJSON * @memberof game.fund_nty * @instance * @returns {Object.} JSON object */ fund_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return fund_nty; })(); game.keep_recharge_data = (function() { /** * Properties of a keep_recharge_data. * @memberof game * @interface Ikeep_recharge_data */ /** * Constructs a new keep_recharge_data. * @memberof game * @classdesc Represents a keep_recharge_data. * @implements Ikeep_recharge_data * @constructor * @param {game.Ikeep_recharge_data=} [properties] Properties to set */ function keep_recharge_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new keep_recharge_data instance using the specified properties. * @function create * @memberof game.keep_recharge_data * @static * @param {game.Ikeep_recharge_data=} [properties] Properties to set * @returns {game.keep_recharge_data} keep_recharge_data instance */ keep_recharge_data.create = function create(properties) { return new keep_recharge_data(properties); }; /** * Encodes the specified keep_recharge_data message. Does not implicitly {@link game.keep_recharge_data.verify|verify} messages. * @function encode * @memberof game.keep_recharge_data * @static * @param {game.Ikeep_recharge_data} message keep_recharge_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified keep_recharge_data message, length delimited. Does not implicitly {@link game.keep_recharge_data.verify|verify} messages. * @function encodeDelimited * @memberof game.keep_recharge_data * @static * @param {game.Ikeep_recharge_data} message keep_recharge_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a keep_recharge_data message from the specified reader or buffer. * @function decode * @memberof game.keep_recharge_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.keep_recharge_data} keep_recharge_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.keep_recharge_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a keep_recharge_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.keep_recharge_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.keep_recharge_data} keep_recharge_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a keep_recharge_data message. * @function verify * @memberof game.keep_recharge_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ keep_recharge_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a keep_recharge_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.keep_recharge_data * @static * @param {Object.} object Plain object * @returns {game.keep_recharge_data} keep_recharge_data */ keep_recharge_data.fromObject = function fromObject(object) { if (object instanceof $root.game.keep_recharge_data) return object; return new $root.game.keep_recharge_data(); }; /** * Creates a plain object from a keep_recharge_data message. Also converts values to other types if specified. * @function toObject * @memberof game.keep_recharge_data * @static * @param {game.keep_recharge_data} message keep_recharge_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ keep_recharge_data.toObject = function toObject() { return {}; }; /** * Converts this keep_recharge_data to JSON. * @function toJSON * @memberof game.keep_recharge_data * @instance * @returns {Object.} JSON object */ keep_recharge_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return keep_recharge_data; })(); game.keep_recharge_data_rsp = (function() { /** * Properties of a keep_recharge_data_rsp. * @memberof game * @interface Ikeep_recharge_data_rsp * @property {number|Long|null} [errno] keep_recharge_data_rsp errno * @property {number|Long|null} [day] keep_recharge_data_rsp day * @property {number|Long|null} [num] keep_recharge_data_rsp num * @property {number|Long|null} [award] keep_recharge_data_rsp award */ /** * Constructs a new keep_recharge_data_rsp. * @memberof game * @classdesc Represents a keep_recharge_data_rsp. * @implements Ikeep_recharge_data_rsp * @constructor * @param {game.Ikeep_recharge_data_rsp=} [properties] Properties to set */ function keep_recharge_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * keep_recharge_data_rsp errno. * @member {number|Long} errno * @memberof game.keep_recharge_data_rsp * @instance */ keep_recharge_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * keep_recharge_data_rsp day. * @member {number|Long} day * @memberof game.keep_recharge_data_rsp * @instance */ keep_recharge_data_rsp.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * keep_recharge_data_rsp num. * @member {number|Long} num * @memberof game.keep_recharge_data_rsp * @instance */ keep_recharge_data_rsp.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * keep_recharge_data_rsp award. * @member {number|Long} award * @memberof game.keep_recharge_data_rsp * @instance */ keep_recharge_data_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new keep_recharge_data_rsp instance using the specified properties. * @function create * @memberof game.keep_recharge_data_rsp * @static * @param {game.Ikeep_recharge_data_rsp=} [properties] Properties to set * @returns {game.keep_recharge_data_rsp} keep_recharge_data_rsp instance */ keep_recharge_data_rsp.create = function create(properties) { return new keep_recharge_data_rsp(properties); }; /** * Encodes the specified keep_recharge_data_rsp message. Does not implicitly {@link game.keep_recharge_data_rsp.verify|verify} messages. * @function encode * @memberof game.keep_recharge_data_rsp * @static * @param {game.Ikeep_recharge_data_rsp} message keep_recharge_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.day); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.num); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.award); return writer; }; /** * Encodes the specified keep_recharge_data_rsp message, length delimited. Does not implicitly {@link game.keep_recharge_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.keep_recharge_data_rsp * @static * @param {game.Ikeep_recharge_data_rsp} message keep_recharge_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a keep_recharge_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.keep_recharge_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.keep_recharge_data_rsp} keep_recharge_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.keep_recharge_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.day = reader.int64(); break; case 3: message.num = reader.int64(); break; case 4: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a keep_recharge_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.keep_recharge_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.keep_recharge_data_rsp} keep_recharge_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a keep_recharge_data_rsp message. * @function verify * @memberof game.keep_recharge_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ keep_recharge_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a keep_recharge_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.keep_recharge_data_rsp * @static * @param {Object.} object Plain object * @returns {game.keep_recharge_data_rsp} keep_recharge_data_rsp */ keep_recharge_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.keep_recharge_data_rsp) return object; let message = new $root.game.keep_recharge_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a keep_recharge_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.keep_recharge_data_rsp * @static * @param {game.keep_recharge_data_rsp} message keep_recharge_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ keep_recharge_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this keep_recharge_data_rsp to JSON. * @function toJSON * @memberof game.keep_recharge_data_rsp * @instance * @returns {Object.} JSON object */ keep_recharge_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return keep_recharge_data_rsp; })(); game.keep_recharge_award = (function() { /** * Properties of a keep_recharge_award. * @memberof game * @interface Ikeep_recharge_award * @property {number|Long|null} [day] keep_recharge_award day */ /** * Constructs a new keep_recharge_award. * @memberof game * @classdesc Represents a keep_recharge_award. * @implements Ikeep_recharge_award * @constructor * @param {game.Ikeep_recharge_award=} [properties] Properties to set */ function keep_recharge_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * keep_recharge_award day. * @member {number|Long} day * @memberof game.keep_recharge_award * @instance */ keep_recharge_award.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new keep_recharge_award instance using the specified properties. * @function create * @memberof game.keep_recharge_award * @static * @param {game.Ikeep_recharge_award=} [properties] Properties to set * @returns {game.keep_recharge_award} keep_recharge_award instance */ keep_recharge_award.create = function create(properties) { return new keep_recharge_award(properties); }; /** * Encodes the specified keep_recharge_award message. Does not implicitly {@link game.keep_recharge_award.verify|verify} messages. * @function encode * @memberof game.keep_recharge_award * @static * @param {game.Ikeep_recharge_award} message keep_recharge_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.day); return writer; }; /** * Encodes the specified keep_recharge_award message, length delimited. Does not implicitly {@link game.keep_recharge_award.verify|verify} messages. * @function encodeDelimited * @memberof game.keep_recharge_award * @static * @param {game.Ikeep_recharge_award} message keep_recharge_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a keep_recharge_award message from the specified reader or buffer. * @function decode * @memberof game.keep_recharge_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.keep_recharge_award} keep_recharge_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.keep_recharge_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.day = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a keep_recharge_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.keep_recharge_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.keep_recharge_award} keep_recharge_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a keep_recharge_award message. * @function verify * @memberof game.keep_recharge_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ keep_recharge_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; return null; }; /** * Creates a keep_recharge_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.keep_recharge_award * @static * @param {Object.} object Plain object * @returns {game.keep_recharge_award} keep_recharge_award */ keep_recharge_award.fromObject = function fromObject(object) { if (object instanceof $root.game.keep_recharge_award) return object; let message = new $root.game.keep_recharge_award(); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a keep_recharge_award message. Also converts values to other types if specified. * @function toObject * @memberof game.keep_recharge_award * @static * @param {game.keep_recharge_award} message keep_recharge_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ keep_recharge_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; return object; }; /** * Converts this keep_recharge_award to JSON. * @function toJSON * @memberof game.keep_recharge_award * @instance * @returns {Object.} JSON object */ keep_recharge_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return keep_recharge_award; })(); game.keep_recharge_award_rsp = (function() { /** * Properties of a keep_recharge_award_rsp. * @memberof game * @interface Ikeep_recharge_award_rsp * @property {number|Long|null} [errno] keep_recharge_award_rsp errno * @property {number|Long|null} [award] keep_recharge_award_rsp award */ /** * Constructs a new keep_recharge_award_rsp. * @memberof game * @classdesc Represents a keep_recharge_award_rsp. * @implements Ikeep_recharge_award_rsp * @constructor * @param {game.Ikeep_recharge_award_rsp=} [properties] Properties to set */ function keep_recharge_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * keep_recharge_award_rsp errno. * @member {number|Long} errno * @memberof game.keep_recharge_award_rsp * @instance */ keep_recharge_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * keep_recharge_award_rsp award. * @member {number|Long} award * @memberof game.keep_recharge_award_rsp * @instance */ keep_recharge_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new keep_recharge_award_rsp instance using the specified properties. * @function create * @memberof game.keep_recharge_award_rsp * @static * @param {game.Ikeep_recharge_award_rsp=} [properties] Properties to set * @returns {game.keep_recharge_award_rsp} keep_recharge_award_rsp instance */ keep_recharge_award_rsp.create = function create(properties) { return new keep_recharge_award_rsp(properties); }; /** * Encodes the specified keep_recharge_award_rsp message. Does not implicitly {@link game.keep_recharge_award_rsp.verify|verify} messages. * @function encode * @memberof game.keep_recharge_award_rsp * @static * @param {game.Ikeep_recharge_award_rsp} message keep_recharge_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.award); return writer; }; /** * Encodes the specified keep_recharge_award_rsp message, length delimited. Does not implicitly {@link game.keep_recharge_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.keep_recharge_award_rsp * @static * @param {game.Ikeep_recharge_award_rsp} message keep_recharge_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ keep_recharge_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a keep_recharge_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.keep_recharge_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.keep_recharge_award_rsp} keep_recharge_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.keep_recharge_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a keep_recharge_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.keep_recharge_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.keep_recharge_award_rsp} keep_recharge_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ keep_recharge_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a keep_recharge_award_rsp message. * @function verify * @memberof game.keep_recharge_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ keep_recharge_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a keep_recharge_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.keep_recharge_award_rsp * @static * @param {Object.} object Plain object * @returns {game.keep_recharge_award_rsp} keep_recharge_award_rsp */ keep_recharge_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.keep_recharge_award_rsp) return object; let message = new $root.game.keep_recharge_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a keep_recharge_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.keep_recharge_award_rsp * @static * @param {game.keep_recharge_award_rsp} message keep_recharge_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ keep_recharge_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this keep_recharge_award_rsp to JSON. * @function toJSON * @memberof game.keep_recharge_award_rsp * @instance * @returns {Object.} JSON object */ keep_recharge_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return keep_recharge_award_rsp; })(); game.get_red_point_list = (function() { /** * Properties of a get_red_point_list. * @memberof game * @interface Iget_red_point_list */ /** * Constructs a new get_red_point_list. * @memberof game * @classdesc Represents a get_red_point_list. * @implements Iget_red_point_list * @constructor * @param {game.Iget_red_point_list=} [properties] Properties to set */ function get_red_point_list(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new get_red_point_list instance using the specified properties. * @function create * @memberof game.get_red_point_list * @static * @param {game.Iget_red_point_list=} [properties] Properties to set * @returns {game.get_red_point_list} get_red_point_list instance */ get_red_point_list.create = function create(properties) { return new get_red_point_list(properties); }; /** * Encodes the specified get_red_point_list message. Does not implicitly {@link game.get_red_point_list.verify|verify} messages. * @function encode * @memberof game.get_red_point_list * @static * @param {game.Iget_red_point_list} message get_red_point_list message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_red_point_list.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified get_red_point_list message, length delimited. Does not implicitly {@link game.get_red_point_list.verify|verify} messages. * @function encodeDelimited * @memberof game.get_red_point_list * @static * @param {game.Iget_red_point_list} message get_red_point_list message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_red_point_list.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a get_red_point_list message from the specified reader or buffer. * @function decode * @memberof game.get_red_point_list * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.get_red_point_list} get_red_point_list * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_red_point_list.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.get_red_point_list(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a get_red_point_list message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.get_red_point_list * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.get_red_point_list} get_red_point_list * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_red_point_list.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a get_red_point_list message. * @function verify * @memberof game.get_red_point_list * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ get_red_point_list.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a get_red_point_list message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.get_red_point_list * @static * @param {Object.} object Plain object * @returns {game.get_red_point_list} get_red_point_list */ get_red_point_list.fromObject = function fromObject(object) { if (object instanceof $root.game.get_red_point_list) return object; return new $root.game.get_red_point_list(); }; /** * Creates a plain object from a get_red_point_list message. Also converts values to other types if specified. * @function toObject * @memberof game.get_red_point_list * @static * @param {game.get_red_point_list} message get_red_point_list * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ get_red_point_list.toObject = function toObject() { return {}; }; /** * Converts this get_red_point_list to JSON. * @function toJSON * @memberof game.get_red_point_list * @instance * @returns {Object.} JSON object */ get_red_point_list.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return get_red_point_list; })(); game.get_red_point_list_rsp = (function() { /** * Properties of a get_red_point_list_rsp. * @memberof game * @interface Iget_red_point_list_rsp * @property {number|Long|null} [errno] get_red_point_list_rsp errno * @property {Array.|null} [list] get_red_point_list_rsp list */ /** * Constructs a new get_red_point_list_rsp. * @memberof game * @classdesc Represents a get_red_point_list_rsp. * @implements Iget_red_point_list_rsp * @constructor * @param {game.Iget_red_point_list_rsp=} [properties] Properties to set */ function get_red_point_list_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * get_red_point_list_rsp errno. * @member {number|Long} errno * @memberof game.get_red_point_list_rsp * @instance */ get_red_point_list_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * get_red_point_list_rsp list. * @member {Array.} list * @memberof game.get_red_point_list_rsp * @instance */ get_red_point_list_rsp.prototype.list = $util.emptyArray; /** * Creates a new get_red_point_list_rsp instance using the specified properties. * @function create * @memberof game.get_red_point_list_rsp * @static * @param {game.Iget_red_point_list_rsp=} [properties] Properties to set * @returns {game.get_red_point_list_rsp} get_red_point_list_rsp instance */ get_red_point_list_rsp.create = function create(properties) { return new get_red_point_list_rsp(properties); }; /** * Encodes the specified get_red_point_list_rsp message. Does not implicitly {@link game.get_red_point_list_rsp.verify|verify} messages. * @function encode * @memberof game.get_red_point_list_rsp * @static * @param {game.Iget_red_point_list_rsp} message get_red_point_list_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_red_point_list_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.red_point_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified get_red_point_list_rsp message, length delimited. Does not implicitly {@link game.get_red_point_list_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.get_red_point_list_rsp * @static * @param {game.Iget_red_point_list_rsp} message get_red_point_list_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ get_red_point_list_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a get_red_point_list_rsp message from the specified reader or buffer. * @function decode * @memberof game.get_red_point_list_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.get_red_point_list_rsp} get_red_point_list_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_red_point_list_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.get_red_point_list_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.red_point_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a get_red_point_list_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.get_red_point_list_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.get_red_point_list_rsp} get_red_point_list_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ get_red_point_list_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a get_red_point_list_rsp message. * @function verify * @memberof game.get_red_point_list_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ get_red_point_list_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.red_point_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a get_red_point_list_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.get_red_point_list_rsp * @static * @param {Object.} object Plain object * @returns {game.get_red_point_list_rsp} get_red_point_list_rsp */ get_red_point_list_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.get_red_point_list_rsp) return object; let message = new $root.game.get_red_point_list_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.get_red_point_list_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.get_red_point_list_rsp.list: object expected"); message.list[i] = $root.game.red_point_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a get_red_point_list_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.get_red_point_list_rsp * @static * @param {game.get_red_point_list_rsp} message get_red_point_list_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ get_red_point_list_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.red_point_info.toObject(message.list[j], options); } return object; }; /** * Converts this get_red_point_list_rsp to JSON. * @function toJSON * @memberof game.get_red_point_list_rsp * @instance * @returns {Object.} JSON object */ get_red_point_list_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return get_red_point_list_rsp; })(); game.recharge_result = (function() { /** * Properties of a recharge_result. * @memberof game * @interface Irecharge_result * @property {string|null} [orderId] recharge_result orderId * @property {string|null} [payOrderId] recharge_result payOrderId * @property {string|null} [purchaseToken] recharge_result purchaseToken * @property {string|null} [payType] recharge_result payType * @property {number|Long|null} [cfgId] recharge_result cfgId */ /** * Constructs a new recharge_result. * @memberof game * @classdesc Represents a recharge_result. * @implements Irecharge_result * @constructor * @param {game.Irecharge_result=} [properties] Properties to set */ function recharge_result(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * recharge_result orderId. * @member {string} orderId * @memberof game.recharge_result * @instance */ recharge_result.prototype.orderId = ""; /** * recharge_result payOrderId. * @member {string} payOrderId * @memberof game.recharge_result * @instance */ recharge_result.prototype.payOrderId = ""; /** * recharge_result purchaseToken. * @member {string} purchaseToken * @memberof game.recharge_result * @instance */ recharge_result.prototype.purchaseToken = ""; /** * recharge_result payType. * @member {string} payType * @memberof game.recharge_result * @instance */ recharge_result.prototype.payType = ""; /** * recharge_result cfgId. * @member {number|Long} cfgId * @memberof game.recharge_result * @instance */ recharge_result.prototype.cfgId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new recharge_result instance using the specified properties. * @function create * @memberof game.recharge_result * @static * @param {game.Irecharge_result=} [properties] Properties to set * @returns {game.recharge_result} recharge_result instance */ recharge_result.create = function create(properties) { return new recharge_result(properties); }; /** * Encodes the specified recharge_result message. Does not implicitly {@link game.recharge_result.verify|verify} messages. * @function encode * @memberof game.recharge_result * @static * @param {game.Irecharge_result} message recharge_result message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ recharge_result.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.orderId); if (message.payOrderId != null && Object.hasOwnProperty.call(message, "payOrderId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.payOrderId); if (message.purchaseToken != null && Object.hasOwnProperty.call(message, "purchaseToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.purchaseToken); if (message.payType != null && Object.hasOwnProperty.call(message, "payType")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.payType); if (message.cfgId != null && Object.hasOwnProperty.call(message, "cfgId")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.cfgId); return writer; }; /** * Encodes the specified recharge_result message, length delimited. Does not implicitly {@link game.recharge_result.verify|verify} messages. * @function encodeDelimited * @memberof game.recharge_result * @static * @param {game.Irecharge_result} message recharge_result message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ recharge_result.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a recharge_result message from the specified reader or buffer. * @function decode * @memberof game.recharge_result * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.recharge_result} recharge_result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ recharge_result.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.recharge_result(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.orderId = reader.string(); break; case 2: message.payOrderId = reader.string(); break; case 3: message.purchaseToken = reader.string(); break; case 4: message.payType = reader.string(); break; case 5: message.cfgId = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a recharge_result message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.recharge_result * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.recharge_result} recharge_result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ recharge_result.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a recharge_result message. * @function verify * @memberof game.recharge_result * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ recharge_result.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.orderId != null && message.hasOwnProperty("orderId")) if (!$util.isString(message.orderId)) return "orderId: string expected"; if (message.payOrderId != null && message.hasOwnProperty("payOrderId")) if (!$util.isString(message.payOrderId)) return "payOrderId: string expected"; if (message.purchaseToken != null && message.hasOwnProperty("purchaseToken")) if (!$util.isString(message.purchaseToken)) return "purchaseToken: string expected"; if (message.payType != null && message.hasOwnProperty("payType")) if (!$util.isString(message.payType)) return "payType: string expected"; if (message.cfgId != null && message.hasOwnProperty("cfgId")) if (!$util.isInteger(message.cfgId) && !(message.cfgId && $util.isInteger(message.cfgId.low) && $util.isInteger(message.cfgId.high))) return "cfgId: integer|Long expected"; return null; }; /** * Creates a recharge_result message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.recharge_result * @static * @param {Object.} object Plain object * @returns {game.recharge_result} recharge_result */ recharge_result.fromObject = function fromObject(object) { if (object instanceof $root.game.recharge_result) return object; let message = new $root.game.recharge_result(); if (object.orderId != null) message.orderId = String(object.orderId); if (object.payOrderId != null) message.payOrderId = String(object.payOrderId); if (object.purchaseToken != null) message.purchaseToken = String(object.purchaseToken); if (object.payType != null) message.payType = String(object.payType); if (object.cfgId != null) if ($util.Long) (message.cfgId = $util.Long.fromValue(object.cfgId)).unsigned = false; else if (typeof object.cfgId === "string") message.cfgId = parseInt(object.cfgId, 10); else if (typeof object.cfgId === "number") message.cfgId = object.cfgId; else if (typeof object.cfgId === "object") message.cfgId = new $util.LongBits(object.cfgId.low >>> 0, object.cfgId.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a recharge_result message. Also converts values to other types if specified. * @function toObject * @memberof game.recharge_result * @static * @param {game.recharge_result} message recharge_result * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ recharge_result.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.orderId = ""; object.payOrderId = ""; object.purchaseToken = ""; object.payType = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.cfgId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.cfgId = options.longs === String ? "0" : 0; } if (message.orderId != null && message.hasOwnProperty("orderId")) object.orderId = message.orderId; if (message.payOrderId != null && message.hasOwnProperty("payOrderId")) object.payOrderId = message.payOrderId; if (message.purchaseToken != null && message.hasOwnProperty("purchaseToken")) object.purchaseToken = message.purchaseToken; if (message.payType != null && message.hasOwnProperty("payType")) object.payType = message.payType; if (message.cfgId != null && message.hasOwnProperty("cfgId")) if (typeof message.cfgId === "number") object.cfgId = options.longs === String ? String(message.cfgId) : message.cfgId; else object.cfgId = options.longs === String ? $util.Long.prototype.toString.call(message.cfgId) : options.longs === Number ? new $util.LongBits(message.cfgId.low >>> 0, message.cfgId.high >>> 0).toNumber() : message.cfgId; return object; }; /** * Converts this recharge_result to JSON. * @function toJSON * @memberof game.recharge_result * @instance * @returns {Object.} JSON object */ recharge_result.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return recharge_result; })(); game.recharge_result_rsp = (function() { /** * Properties of a recharge_result_rsp. * @memberof game * @interface Irecharge_result_rsp * @property {number|Long|null} [errno] recharge_result_rsp errno */ /** * Constructs a new recharge_result_rsp. * @memberof game * @classdesc Represents a recharge_result_rsp. * @implements Irecharge_result_rsp * @constructor * @param {game.Irecharge_result_rsp=} [properties] Properties to set */ function recharge_result_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * recharge_result_rsp errno. * @member {number|Long} errno * @memberof game.recharge_result_rsp * @instance */ recharge_result_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new recharge_result_rsp instance using the specified properties. * @function create * @memberof game.recharge_result_rsp * @static * @param {game.Irecharge_result_rsp=} [properties] Properties to set * @returns {game.recharge_result_rsp} recharge_result_rsp instance */ recharge_result_rsp.create = function create(properties) { return new recharge_result_rsp(properties); }; /** * Encodes the specified recharge_result_rsp message. Does not implicitly {@link game.recharge_result_rsp.verify|verify} messages. * @function encode * @memberof game.recharge_result_rsp * @static * @param {game.Irecharge_result_rsp} message recharge_result_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ recharge_result_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified recharge_result_rsp message, length delimited. Does not implicitly {@link game.recharge_result_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.recharge_result_rsp * @static * @param {game.Irecharge_result_rsp} message recharge_result_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ recharge_result_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a recharge_result_rsp message from the specified reader or buffer. * @function decode * @memberof game.recharge_result_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.recharge_result_rsp} recharge_result_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ recharge_result_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.recharge_result_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a recharge_result_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.recharge_result_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.recharge_result_rsp} recharge_result_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ recharge_result_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a recharge_result_rsp message. * @function verify * @memberof game.recharge_result_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ recharge_result_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a recharge_result_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.recharge_result_rsp * @static * @param {Object.} object Plain object * @returns {game.recharge_result_rsp} recharge_result_rsp */ recharge_result_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.recharge_result_rsp) return object; let message = new $root.game.recharge_result_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a recharge_result_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.recharge_result_rsp * @static * @param {game.recharge_result_rsp} message recharge_result_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ recharge_result_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this recharge_result_rsp to JSON. * @function toJSON * @memberof game.recharge_result_rsp * @instance * @returns {Object.} JSON object */ recharge_result_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return recharge_result_rsp; })(); game.online_award_get_award = (function() { /** * Properties of an online_award_get_award. * @memberof game * @interface Ionline_award_get_award * @property {number|Long|null} [pos] online_award_get_award pos */ /** * Constructs a new online_award_get_award. * @memberof game * @classdesc Represents an online_award_get_award. * @implements Ionline_award_get_award * @constructor * @param {game.Ionline_award_get_award=} [properties] Properties to set */ function online_award_get_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * online_award_get_award pos. * @member {number|Long} pos * @memberof game.online_award_get_award * @instance */ online_award_get_award.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new online_award_get_award instance using the specified properties. * @function create * @memberof game.online_award_get_award * @static * @param {game.Ionline_award_get_award=} [properties] Properties to set * @returns {game.online_award_get_award} online_award_get_award instance */ online_award_get_award.create = function create(properties) { return new online_award_get_award(properties); }; /** * Encodes the specified online_award_get_award message. Does not implicitly {@link game.online_award_get_award.verify|verify} messages. * @function encode * @memberof game.online_award_get_award * @static * @param {game.Ionline_award_get_award} message online_award_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pos); return writer; }; /** * Encodes the specified online_award_get_award message, length delimited. Does not implicitly {@link game.online_award_get_award.verify|verify} messages. * @function encodeDelimited * @memberof game.online_award_get_award * @static * @param {game.Ionline_award_get_award} message online_award_get_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an online_award_get_award message from the specified reader or buffer. * @function decode * @memberof game.online_award_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.online_award_get_award} online_award_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.online_award_get_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pos = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an online_award_get_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.online_award_get_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.online_award_get_award} online_award_get_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an online_award_get_award message. * @function verify * @memberof game.online_award_get_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ online_award_get_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; return null; }; /** * Creates an online_award_get_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.online_award_get_award * @static * @param {Object.} object Plain object * @returns {game.online_award_get_award} online_award_get_award */ online_award_get_award.fromObject = function fromObject(object) { if (object instanceof $root.game.online_award_get_award) return object; let message = new $root.game.online_award_get_award(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an online_award_get_award message. Also converts values to other types if specified. * @function toObject * @memberof game.online_award_get_award * @static * @param {game.online_award_get_award} message online_award_get_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ online_award_get_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; return object; }; /** * Converts this online_award_get_award to JSON. * @function toJSON * @memberof game.online_award_get_award * @instance * @returns {Object.} JSON object */ online_award_get_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return online_award_get_award; })(); game.online_award_get_award_rsp = (function() { /** * Properties of an online_award_get_award_rsp. * @memberof game * @interface Ionline_award_get_award_rsp * @property {number|Long|null} [errno] online_award_get_award_rsp errno * @property {number|Long|null} [award] online_award_get_award_rsp award */ /** * Constructs a new online_award_get_award_rsp. * @memberof game * @classdesc Represents an online_award_get_award_rsp. * @implements Ionline_award_get_award_rsp * @constructor * @param {game.Ionline_award_get_award_rsp=} [properties] Properties to set */ function online_award_get_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * online_award_get_award_rsp errno. * @member {number|Long} errno * @memberof game.online_award_get_award_rsp * @instance */ online_award_get_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * online_award_get_award_rsp award. * @member {number|Long} award * @memberof game.online_award_get_award_rsp * @instance */ online_award_get_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new online_award_get_award_rsp instance using the specified properties. * @function create * @memberof game.online_award_get_award_rsp * @static * @param {game.Ionline_award_get_award_rsp=} [properties] Properties to set * @returns {game.online_award_get_award_rsp} online_award_get_award_rsp instance */ online_award_get_award_rsp.create = function create(properties) { return new online_award_get_award_rsp(properties); }; /** * Encodes the specified online_award_get_award_rsp message. Does not implicitly {@link game.online_award_get_award_rsp.verify|verify} messages. * @function encode * @memberof game.online_award_get_award_rsp * @static * @param {game.Ionline_award_get_award_rsp} message online_award_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.award); return writer; }; /** * Encodes the specified online_award_get_award_rsp message, length delimited. Does not implicitly {@link game.online_award_get_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.online_award_get_award_rsp * @static * @param {game.Ionline_award_get_award_rsp} message online_award_get_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an online_award_get_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.online_award_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.online_award_get_award_rsp} online_award_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.online_award_get_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an online_award_get_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.online_award_get_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.online_award_get_award_rsp} online_award_get_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an online_award_get_award_rsp message. * @function verify * @memberof game.online_award_get_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ online_award_get_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates an online_award_get_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.online_award_get_award_rsp * @static * @param {Object.} object Plain object * @returns {game.online_award_get_award_rsp} online_award_get_award_rsp */ online_award_get_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.online_award_get_award_rsp) return object; let message = new $root.game.online_award_get_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an online_award_get_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.online_award_get_award_rsp * @static * @param {game.online_award_get_award_rsp} message online_award_get_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ online_award_get_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this online_award_get_award_rsp to JSON. * @function toJSON * @memberof game.online_award_get_award_rsp * @instance * @returns {Object.} JSON object */ online_award_get_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return online_award_get_award_rsp; })(); game.online_award_get_data = (function() { /** * Properties of an online_award_get_data. * @memberof game * @interface Ionline_award_get_data */ /** * Constructs a new online_award_get_data. * @memberof game * @classdesc Represents an online_award_get_data. * @implements Ionline_award_get_data * @constructor * @param {game.Ionline_award_get_data=} [properties] Properties to set */ function online_award_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new online_award_get_data instance using the specified properties. * @function create * @memberof game.online_award_get_data * @static * @param {game.Ionline_award_get_data=} [properties] Properties to set * @returns {game.online_award_get_data} online_award_get_data instance */ online_award_get_data.create = function create(properties) { return new online_award_get_data(properties); }; /** * Encodes the specified online_award_get_data message. Does not implicitly {@link game.online_award_get_data.verify|verify} messages. * @function encode * @memberof game.online_award_get_data * @static * @param {game.Ionline_award_get_data} message online_award_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified online_award_get_data message, length delimited. Does not implicitly {@link game.online_award_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.online_award_get_data * @static * @param {game.Ionline_award_get_data} message online_award_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an online_award_get_data message from the specified reader or buffer. * @function decode * @memberof game.online_award_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.online_award_get_data} online_award_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.online_award_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an online_award_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.online_award_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.online_award_get_data} online_award_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an online_award_get_data message. * @function verify * @memberof game.online_award_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ online_award_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an online_award_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.online_award_get_data * @static * @param {Object.} object Plain object * @returns {game.online_award_get_data} online_award_get_data */ online_award_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.online_award_get_data) return object; return new $root.game.online_award_get_data(); }; /** * Creates a plain object from an online_award_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.online_award_get_data * @static * @param {game.online_award_get_data} message online_award_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ online_award_get_data.toObject = function toObject() { return {}; }; /** * Converts this online_award_get_data to JSON. * @function toJSON * @memberof game.online_award_get_data * @instance * @returns {Object.} JSON object */ online_award_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return online_award_get_data; })(); game.online_award_get_data_rsp = (function() { /** * Properties of an online_award_get_data_rsp. * @memberof game * @interface Ionline_award_get_data_rsp * @property {number|Long|null} [errno] online_award_get_data_rsp errno */ /** * Constructs a new online_award_get_data_rsp. * @memberof game * @classdesc Represents an online_award_get_data_rsp. * @implements Ionline_award_get_data_rsp * @constructor * @param {game.Ionline_award_get_data_rsp=} [properties] Properties to set */ function online_award_get_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * online_award_get_data_rsp errno. * @member {number|Long} errno * @memberof game.online_award_get_data_rsp * @instance */ online_award_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new online_award_get_data_rsp instance using the specified properties. * @function create * @memberof game.online_award_get_data_rsp * @static * @param {game.Ionline_award_get_data_rsp=} [properties] Properties to set * @returns {game.online_award_get_data_rsp} online_award_get_data_rsp instance */ online_award_get_data_rsp.create = function create(properties) { return new online_award_get_data_rsp(properties); }; /** * Encodes the specified online_award_get_data_rsp message. Does not implicitly {@link game.online_award_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.online_award_get_data_rsp * @static * @param {game.Ionline_award_get_data_rsp} message online_award_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified online_award_get_data_rsp message, length delimited. Does not implicitly {@link game.online_award_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.online_award_get_data_rsp * @static * @param {game.Ionline_award_get_data_rsp} message online_award_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an online_award_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.online_award_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.online_award_get_data_rsp} online_award_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.online_award_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an online_award_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.online_award_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.online_award_get_data_rsp} online_award_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an online_award_get_data_rsp message. * @function verify * @memberof game.online_award_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ online_award_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates an online_award_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.online_award_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.online_award_get_data_rsp} online_award_get_data_rsp */ online_award_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.online_award_get_data_rsp) return object; let message = new $root.game.online_award_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an online_award_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.online_award_get_data_rsp * @static * @param {game.online_award_get_data_rsp} message online_award_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ online_award_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this online_award_get_data_rsp to JSON. * @function toJSON * @memberof game.online_award_get_data_rsp * @instance * @returns {Object.} JSON object */ online_award_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return online_award_get_data_rsp; })(); game.online_award_nty = (function() { /** * Properties of an online_award_nty. * @memberof game * @interface Ionline_award_nty * @property {boolean|null} [open] online_award_nty open * @property {number|Long|null} [time] online_award_nty time * @property {number|Long|null} [award] online_award_nty award */ /** * Constructs a new online_award_nty. * @memberof game * @classdesc Represents an online_award_nty. * @implements Ionline_award_nty * @constructor * @param {game.Ionline_award_nty=} [properties] Properties to set */ function online_award_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * online_award_nty open. * @member {boolean} open * @memberof game.online_award_nty * @instance */ online_award_nty.prototype.open = false; /** * online_award_nty time. * @member {number|Long} time * @memberof game.online_award_nty * @instance */ online_award_nty.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * online_award_nty award. * @member {number|Long} award * @memberof game.online_award_nty * @instance */ online_award_nty.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new online_award_nty instance using the specified properties. * @function create * @memberof game.online_award_nty * @static * @param {game.Ionline_award_nty=} [properties] Properties to set * @returns {game.online_award_nty} online_award_nty instance */ online_award_nty.create = function create(properties) { return new online_award_nty(properties); }; /** * Encodes the specified online_award_nty message. Does not implicitly {@link game.online_award_nty.verify|verify} messages. * @function encode * @memberof game.online_award_nty * @static * @param {game.Ionline_award_nty} message online_award_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.open != null && Object.hasOwnProperty.call(message, "open")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.open); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.time); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); return writer; }; /** * Encodes the specified online_award_nty message, length delimited. Does not implicitly {@link game.online_award_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.online_award_nty * @static * @param {game.Ionline_award_nty} message online_award_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ online_award_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an online_award_nty message from the specified reader or buffer. * @function decode * @memberof game.online_award_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.online_award_nty} online_award_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.online_award_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.open = reader.bool(); break; case 2: message.time = reader.int64(); break; case 3: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an online_award_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.online_award_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.online_award_nty} online_award_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ online_award_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an online_award_nty message. * @function verify * @memberof game.online_award_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ online_award_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.open != null && message.hasOwnProperty("open")) if (typeof message.open !== "boolean") return "open: boolean expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates an online_award_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.online_award_nty * @static * @param {Object.} object Plain object * @returns {game.online_award_nty} online_award_nty */ online_award_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.online_award_nty) return object; let message = new $root.game.online_award_nty(); if (object.open != null) message.open = Boolean(object.open); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an online_award_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.online_award_nty * @static * @param {game.online_award_nty} message online_award_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ online_award_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.open = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.open != null && message.hasOwnProperty("open")) object.open = message.open; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this online_award_nty to JSON. * @function toJSON * @memberof game.online_award_nty * @instance * @returns {Object.} JSON object */ online_award_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return online_award_nty; })(); game.speed_up_data = (function() { /** * Properties of a speed_up_data. * @memberof game * @interface Ispeed_up_data */ /** * Constructs a new speed_up_data. * @memberof game * @classdesc Represents a speed_up_data. * @implements Ispeed_up_data * @constructor * @param {game.Ispeed_up_data=} [properties] Properties to set */ function speed_up_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new speed_up_data instance using the specified properties. * @function create * @memberof game.speed_up_data * @static * @param {game.Ispeed_up_data=} [properties] Properties to set * @returns {game.speed_up_data} speed_up_data instance */ speed_up_data.create = function create(properties) { return new speed_up_data(properties); }; /** * Encodes the specified speed_up_data message. Does not implicitly {@link game.speed_up_data.verify|verify} messages. * @function encode * @memberof game.speed_up_data * @static * @param {game.Ispeed_up_data} message speed_up_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified speed_up_data message, length delimited. Does not implicitly {@link game.speed_up_data.verify|verify} messages. * @function encodeDelimited * @memberof game.speed_up_data * @static * @param {game.Ispeed_up_data} message speed_up_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a speed_up_data message from the specified reader or buffer. * @function decode * @memberof game.speed_up_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.speed_up_data} speed_up_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.speed_up_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a speed_up_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.speed_up_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.speed_up_data} speed_up_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a speed_up_data message. * @function verify * @memberof game.speed_up_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ speed_up_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a speed_up_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.speed_up_data * @static * @param {Object.} object Plain object * @returns {game.speed_up_data} speed_up_data */ speed_up_data.fromObject = function fromObject(object) { if (object instanceof $root.game.speed_up_data) return object; return new $root.game.speed_up_data(); }; /** * Creates a plain object from a speed_up_data message. Also converts values to other types if specified. * @function toObject * @memberof game.speed_up_data * @static * @param {game.speed_up_data} message speed_up_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ speed_up_data.toObject = function toObject() { return {}; }; /** * Converts this speed_up_data to JSON. * @function toJSON * @memberof game.speed_up_data * @instance * @returns {Object.} JSON object */ speed_up_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return speed_up_data; })(); game.speed_up_data_rsp = (function() { /** * Properties of a speed_up_data_rsp. * @memberof game * @interface Ispeed_up_data_rsp * @property {number|Long|null} [errno] speed_up_data_rsp errno * @property {number|Long|null} [time] speed_up_data_rsp time */ /** * Constructs a new speed_up_data_rsp. * @memberof game * @classdesc Represents a speed_up_data_rsp. * @implements Ispeed_up_data_rsp * @constructor * @param {game.Ispeed_up_data_rsp=} [properties] Properties to set */ function speed_up_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * speed_up_data_rsp errno. * @member {number|Long} errno * @memberof game.speed_up_data_rsp * @instance */ speed_up_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * speed_up_data_rsp time. * @member {number|Long} time * @memberof game.speed_up_data_rsp * @instance */ speed_up_data_rsp.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new speed_up_data_rsp instance using the specified properties. * @function create * @memberof game.speed_up_data_rsp * @static * @param {game.Ispeed_up_data_rsp=} [properties] Properties to set * @returns {game.speed_up_data_rsp} speed_up_data_rsp instance */ speed_up_data_rsp.create = function create(properties) { return new speed_up_data_rsp(properties); }; /** * Encodes the specified speed_up_data_rsp message. Does not implicitly {@link game.speed_up_data_rsp.verify|verify} messages. * @function encode * @memberof game.speed_up_data_rsp * @static * @param {game.Ispeed_up_data_rsp} message speed_up_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.time); return writer; }; /** * Encodes the specified speed_up_data_rsp message, length delimited. Does not implicitly {@link game.speed_up_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.speed_up_data_rsp * @static * @param {game.Ispeed_up_data_rsp} message speed_up_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a speed_up_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.speed_up_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.speed_up_data_rsp} speed_up_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.speed_up_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.time = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a speed_up_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.speed_up_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.speed_up_data_rsp} speed_up_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a speed_up_data_rsp message. * @function verify * @memberof game.speed_up_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ speed_up_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; return null; }; /** * Creates a speed_up_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.speed_up_data_rsp * @static * @param {Object.} object Plain object * @returns {game.speed_up_data_rsp} speed_up_data_rsp */ speed_up_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.speed_up_data_rsp) return object; let message = new $root.game.speed_up_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a speed_up_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.speed_up_data_rsp * @static * @param {game.speed_up_data_rsp} message speed_up_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ speed_up_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; return object; }; /** * Converts this speed_up_data_rsp to JSON. * @function toJSON * @memberof game.speed_up_data_rsp * @instance * @returns {Object.} JSON object */ speed_up_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return speed_up_data_rsp; })(); game.speed_up_buy = (function() { /** * Properties of a speed_up_buy. * @memberof game * @interface Ispeed_up_buy * @property {boolean|null} [free] speed_up_buy free */ /** * Constructs a new speed_up_buy. * @memberof game * @classdesc Represents a speed_up_buy. * @implements Ispeed_up_buy * @constructor * @param {game.Ispeed_up_buy=} [properties] Properties to set */ function speed_up_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * speed_up_buy free. * @member {boolean} free * @memberof game.speed_up_buy * @instance */ speed_up_buy.prototype.free = false; /** * Creates a new speed_up_buy instance using the specified properties. * @function create * @memberof game.speed_up_buy * @static * @param {game.Ispeed_up_buy=} [properties] Properties to set * @returns {game.speed_up_buy} speed_up_buy instance */ speed_up_buy.create = function create(properties) { return new speed_up_buy(properties); }; /** * Encodes the specified speed_up_buy message. Does not implicitly {@link game.speed_up_buy.verify|verify} messages. * @function encode * @memberof game.speed_up_buy * @static * @param {game.Ispeed_up_buy} message speed_up_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.free); return writer; }; /** * Encodes the specified speed_up_buy message, length delimited. Does not implicitly {@link game.speed_up_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.speed_up_buy * @static * @param {game.Ispeed_up_buy} message speed_up_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a speed_up_buy message from the specified reader or buffer. * @function decode * @memberof game.speed_up_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.speed_up_buy} speed_up_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.speed_up_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.free = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a speed_up_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.speed_up_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.speed_up_buy} speed_up_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a speed_up_buy message. * @function verify * @memberof game.speed_up_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ speed_up_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free !== "boolean") return "free: boolean expected"; return null; }; /** * Creates a speed_up_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.speed_up_buy * @static * @param {Object.} object Plain object * @returns {game.speed_up_buy} speed_up_buy */ speed_up_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.speed_up_buy) return object; let message = new $root.game.speed_up_buy(); if (object.free != null) message.free = Boolean(object.free); return message; }; /** * Creates a plain object from a speed_up_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.speed_up_buy * @static * @param {game.speed_up_buy} message speed_up_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ speed_up_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.free = false; if (message.free != null && message.hasOwnProperty("free")) object.free = message.free; return object; }; /** * Converts this speed_up_buy to JSON. * @function toJSON * @memberof game.speed_up_buy * @instance * @returns {Object.} JSON object */ speed_up_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return speed_up_buy; })(); game.speed_up_buy_rsp = (function() { /** * Properties of a speed_up_buy_rsp. * @memberof game * @interface Ispeed_up_buy_rsp * @property {number|Long|null} [errno] speed_up_buy_rsp errno * @property {number|Long|null} [time] speed_up_buy_rsp time */ /** * Constructs a new speed_up_buy_rsp. * @memberof game * @classdesc Represents a speed_up_buy_rsp. * @implements Ispeed_up_buy_rsp * @constructor * @param {game.Ispeed_up_buy_rsp=} [properties] Properties to set */ function speed_up_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * speed_up_buy_rsp errno. * @member {number|Long} errno * @memberof game.speed_up_buy_rsp * @instance */ speed_up_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * speed_up_buy_rsp time. * @member {number|Long} time * @memberof game.speed_up_buy_rsp * @instance */ speed_up_buy_rsp.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new speed_up_buy_rsp instance using the specified properties. * @function create * @memberof game.speed_up_buy_rsp * @static * @param {game.Ispeed_up_buy_rsp=} [properties] Properties to set * @returns {game.speed_up_buy_rsp} speed_up_buy_rsp instance */ speed_up_buy_rsp.create = function create(properties) { return new speed_up_buy_rsp(properties); }; /** * Encodes the specified speed_up_buy_rsp message. Does not implicitly {@link game.speed_up_buy_rsp.verify|verify} messages. * @function encode * @memberof game.speed_up_buy_rsp * @static * @param {game.Ispeed_up_buy_rsp} message speed_up_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.time); return writer; }; /** * Encodes the specified speed_up_buy_rsp message, length delimited. Does not implicitly {@link game.speed_up_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.speed_up_buy_rsp * @static * @param {game.Ispeed_up_buy_rsp} message speed_up_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ speed_up_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a speed_up_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.speed_up_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.speed_up_buy_rsp} speed_up_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.speed_up_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.time = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a speed_up_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.speed_up_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.speed_up_buy_rsp} speed_up_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ speed_up_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a speed_up_buy_rsp message. * @function verify * @memberof game.speed_up_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ speed_up_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; return null; }; /** * Creates a speed_up_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.speed_up_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.speed_up_buy_rsp} speed_up_buy_rsp */ speed_up_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.speed_up_buy_rsp) return object; let message = new $root.game.speed_up_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a speed_up_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.speed_up_buy_rsp * @static * @param {game.speed_up_buy_rsp} message speed_up_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ speed_up_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; return object; }; /** * Converts this speed_up_buy_rsp to JSON. * @function toJSON * @memberof game.speed_up_buy_rsp * @instance * @returns {Object.} JSON object */ speed_up_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return speed_up_buy_rsp; })(); game.city_skill_upgrade = (function() { /** * Properties of a city_skill_upgrade. * @memberof game * @interface Icity_skill_upgrade * @property {number|Long|null} [id] city_skill_upgrade id */ /** * Constructs a new city_skill_upgrade. * @memberof game * @classdesc Represents a city_skill_upgrade. * @implements Icity_skill_upgrade * @constructor * @param {game.Icity_skill_upgrade=} [properties] Properties to set */ function city_skill_upgrade(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_skill_upgrade id. * @member {number|Long} id * @memberof game.city_skill_upgrade * @instance */ city_skill_upgrade.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new city_skill_upgrade instance using the specified properties. * @function create * @memberof game.city_skill_upgrade * @static * @param {game.Icity_skill_upgrade=} [properties] Properties to set * @returns {game.city_skill_upgrade} city_skill_upgrade instance */ city_skill_upgrade.create = function create(properties) { return new city_skill_upgrade(properties); }; /** * Encodes the specified city_skill_upgrade message. Does not implicitly {@link game.city_skill_upgrade.verify|verify} messages. * @function encode * @memberof game.city_skill_upgrade * @static * @param {game.Icity_skill_upgrade} message city_skill_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_upgrade.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified city_skill_upgrade message, length delimited. Does not implicitly {@link game.city_skill_upgrade.verify|verify} messages. * @function encodeDelimited * @memberof game.city_skill_upgrade * @static * @param {game.Icity_skill_upgrade} message city_skill_upgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_upgrade.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_skill_upgrade message from the specified reader or buffer. * @function decode * @memberof game.city_skill_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_skill_upgrade} city_skill_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_upgrade.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_skill_upgrade(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_skill_upgrade message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_skill_upgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_skill_upgrade} city_skill_upgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_upgrade.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_skill_upgrade message. * @function verify * @memberof game.city_skill_upgrade * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_skill_upgrade.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"; return null; }; /** * Creates a city_skill_upgrade message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_skill_upgrade * @static * @param {Object.} object Plain object * @returns {game.city_skill_upgrade} city_skill_upgrade */ city_skill_upgrade.fromObject = function fromObject(object) { if (object instanceof $root.game.city_skill_upgrade) return object; let message = new $root.game.city_skill_upgrade(); 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(); return message; }; /** * Creates a plain object from a city_skill_upgrade message. Also converts values to other types if specified. * @function toObject * @memberof game.city_skill_upgrade * @static * @param {game.city_skill_upgrade} message city_skill_upgrade * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_skill_upgrade.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this city_skill_upgrade to JSON. * @function toJSON * @memberof game.city_skill_upgrade * @instance * @returns {Object.} JSON object */ city_skill_upgrade.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_skill_upgrade; })(); game.city_skill_upgrade_rsp = (function() { /** * Properties of a city_skill_upgrade_rsp. * @memberof game * @interface Icity_skill_upgrade_rsp * @property {number|Long|null} [errno] city_skill_upgrade_rsp errno * @property {number|Long|null} [id] city_skill_upgrade_rsp id */ /** * Constructs a new city_skill_upgrade_rsp. * @memberof game * @classdesc Represents a city_skill_upgrade_rsp. * @implements Icity_skill_upgrade_rsp * @constructor * @param {game.Icity_skill_upgrade_rsp=} [properties] Properties to set */ function city_skill_upgrade_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_skill_upgrade_rsp errno. * @member {number|Long} errno * @memberof game.city_skill_upgrade_rsp * @instance */ city_skill_upgrade_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * city_skill_upgrade_rsp id. * @member {number|Long} id * @memberof game.city_skill_upgrade_rsp * @instance */ city_skill_upgrade_rsp.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new city_skill_upgrade_rsp instance using the specified properties. * @function create * @memberof game.city_skill_upgrade_rsp * @static * @param {game.Icity_skill_upgrade_rsp=} [properties] Properties to set * @returns {game.city_skill_upgrade_rsp} city_skill_upgrade_rsp instance */ city_skill_upgrade_rsp.create = function create(properties) { return new city_skill_upgrade_rsp(properties); }; /** * Encodes the specified city_skill_upgrade_rsp message. Does not implicitly {@link game.city_skill_upgrade_rsp.verify|verify} messages. * @function encode * @memberof game.city_skill_upgrade_rsp * @static * @param {game.Icity_skill_upgrade_rsp} message city_skill_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_upgrade_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); return writer; }; /** * Encodes the specified city_skill_upgrade_rsp message, length delimited. Does not implicitly {@link game.city_skill_upgrade_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.city_skill_upgrade_rsp * @static * @param {game.Icity_skill_upgrade_rsp} message city_skill_upgrade_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_upgrade_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_skill_upgrade_rsp message from the specified reader or buffer. * @function decode * @memberof game.city_skill_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_skill_upgrade_rsp} city_skill_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_upgrade_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_skill_upgrade_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_skill_upgrade_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_skill_upgrade_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_skill_upgrade_rsp} city_skill_upgrade_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_upgrade_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_skill_upgrade_rsp message. * @function verify * @memberof game.city_skill_upgrade_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_skill_upgrade_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long 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"; return null; }; /** * Creates a city_skill_upgrade_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_skill_upgrade_rsp * @static * @param {Object.} object Plain object * @returns {game.city_skill_upgrade_rsp} city_skill_upgrade_rsp */ city_skill_upgrade_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.city_skill_upgrade_rsp) return object; let message = new $root.game.city_skill_upgrade_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); 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(); return message; }; /** * Creates a plain object from a city_skill_upgrade_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.city_skill_upgrade_rsp * @static * @param {game.city_skill_upgrade_rsp} message city_skill_upgrade_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_skill_upgrade_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let 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; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; 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; return object; }; /** * Converts this city_skill_upgrade_rsp to JSON. * @function toJSON * @memberof game.city_skill_upgrade_rsp * @instance * @returns {Object.} JSON object */ city_skill_upgrade_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_skill_upgrade_rsp; })(); game.city_skill_battle = (function() { /** * Properties of a city_skill_battle. * @memberof game * @interface Icity_skill_battle * @property {number|Long|null} [id] city_skill_battle id */ /** * Constructs a new city_skill_battle. * @memberof game * @classdesc Represents a city_skill_battle. * @implements Icity_skill_battle * @constructor * @param {game.Icity_skill_battle=} [properties] Properties to set */ function city_skill_battle(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_skill_battle id. * @member {number|Long} id * @memberof game.city_skill_battle * @instance */ city_skill_battle.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new city_skill_battle instance using the specified properties. * @function create * @memberof game.city_skill_battle * @static * @param {game.Icity_skill_battle=} [properties] Properties to set * @returns {game.city_skill_battle} city_skill_battle instance */ city_skill_battle.create = function create(properties) { return new city_skill_battle(properties); }; /** * Encodes the specified city_skill_battle message. Does not implicitly {@link game.city_skill_battle.verify|verify} messages. * @function encode * @memberof game.city_skill_battle * @static * @param {game.Icity_skill_battle} message city_skill_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_battle.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified city_skill_battle message, length delimited. Does not implicitly {@link game.city_skill_battle.verify|verify} messages. * @function encodeDelimited * @memberof game.city_skill_battle * @static * @param {game.Icity_skill_battle} message city_skill_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_battle.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_skill_battle message from the specified reader or buffer. * @function decode * @memberof game.city_skill_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_skill_battle} city_skill_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_battle.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_skill_battle(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_skill_battle message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_skill_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_skill_battle} city_skill_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_battle.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_skill_battle message. * @function verify * @memberof game.city_skill_battle * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_skill_battle.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"; return null; }; /** * Creates a city_skill_battle message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_skill_battle * @static * @param {Object.} object Plain object * @returns {game.city_skill_battle} city_skill_battle */ city_skill_battle.fromObject = function fromObject(object) { if (object instanceof $root.game.city_skill_battle) return object; let message = new $root.game.city_skill_battle(); 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(); return message; }; /** * Creates a plain object from a city_skill_battle message. Also converts values to other types if specified. * @function toObject * @memberof game.city_skill_battle * @static * @param {game.city_skill_battle} message city_skill_battle * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_skill_battle.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this city_skill_battle to JSON. * @function toJSON * @memberof game.city_skill_battle * @instance * @returns {Object.} JSON object */ city_skill_battle.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_skill_battle; })(); game.city_skill_battle_rsp = (function() { /** * Properties of a city_skill_battle_rsp. * @memberof game * @interface Icity_skill_battle_rsp * @property {number|Long|null} [errno] city_skill_battle_rsp errno * @property {number|Long|null} [id] city_skill_battle_rsp id */ /** * Constructs a new city_skill_battle_rsp. * @memberof game * @classdesc Represents a city_skill_battle_rsp. * @implements Icity_skill_battle_rsp * @constructor * @param {game.Icity_skill_battle_rsp=} [properties] Properties to set */ function city_skill_battle_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * city_skill_battle_rsp errno. * @member {number|Long} errno * @memberof game.city_skill_battle_rsp * @instance */ city_skill_battle_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * city_skill_battle_rsp id. * @member {number|Long} id * @memberof game.city_skill_battle_rsp * @instance */ city_skill_battle_rsp.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new city_skill_battle_rsp instance using the specified properties. * @function create * @memberof game.city_skill_battle_rsp * @static * @param {game.Icity_skill_battle_rsp=} [properties] Properties to set * @returns {game.city_skill_battle_rsp} city_skill_battle_rsp instance */ city_skill_battle_rsp.create = function create(properties) { return new city_skill_battle_rsp(properties); }; /** * Encodes the specified city_skill_battle_rsp message. Does not implicitly {@link game.city_skill_battle_rsp.verify|verify} messages. * @function encode * @memberof game.city_skill_battle_rsp * @static * @param {game.Icity_skill_battle_rsp} message city_skill_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_battle_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); return writer; }; /** * Encodes the specified city_skill_battle_rsp message, length delimited. Does not implicitly {@link game.city_skill_battle_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.city_skill_battle_rsp * @static * @param {game.Icity_skill_battle_rsp} message city_skill_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ city_skill_battle_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a city_skill_battle_rsp message from the specified reader or buffer. * @function decode * @memberof game.city_skill_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.city_skill_battle_rsp} city_skill_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_battle_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.city_skill_battle_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a city_skill_battle_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.city_skill_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.city_skill_battle_rsp} city_skill_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ city_skill_battle_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a city_skill_battle_rsp message. * @function verify * @memberof game.city_skill_battle_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ city_skill_battle_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long 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"; return null; }; /** * Creates a city_skill_battle_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.city_skill_battle_rsp * @static * @param {Object.} object Plain object * @returns {game.city_skill_battle_rsp} city_skill_battle_rsp */ city_skill_battle_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.city_skill_battle_rsp) return object; let message = new $root.game.city_skill_battle_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); 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(); return message; }; /** * Creates a plain object from a city_skill_battle_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.city_skill_battle_rsp * @static * @param {game.city_skill_battle_rsp} message city_skill_battle_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ city_skill_battle_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let 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; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; 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; return object; }; /** * Converts this city_skill_battle_rsp to JSON. * @function toJSON * @memberof game.city_skill_battle_rsp * @instance * @returns {Object.} JSON object */ city_skill_battle_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return city_skill_battle_rsp; })(); game.building_explore = (function() { /** * Properties of a building_explore. * @memberof game * @interface Ibuilding_explore * @property {number|Long|null} [id] building_explore id */ /** * Constructs a new building_explore. * @memberof game * @classdesc Represents a building_explore. * @implements Ibuilding_explore * @constructor * @param {game.Ibuilding_explore=} [properties] Properties to set */ function building_explore(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_explore id. * @member {number|Long} id * @memberof game.building_explore * @instance */ building_explore.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new building_explore instance using the specified properties. * @function create * @memberof game.building_explore * @static * @param {game.Ibuilding_explore=} [properties] Properties to set * @returns {game.building_explore} building_explore instance */ building_explore.create = function create(properties) { return new building_explore(properties); }; /** * Encodes the specified building_explore message. Does not implicitly {@link game.building_explore.verify|verify} messages. * @function encode * @memberof game.building_explore * @static * @param {game.Ibuilding_explore} message building_explore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified building_explore message, length delimited. Does not implicitly {@link game.building_explore.verify|verify} messages. * @function encodeDelimited * @memberof game.building_explore * @static * @param {game.Ibuilding_explore} message building_explore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_explore message from the specified reader or buffer. * @function decode * @memberof game.building_explore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_explore} building_explore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_explore(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_explore message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_explore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_explore} building_explore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_explore message. * @function verify * @memberof game.building_explore * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_explore.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"; return null; }; /** * Creates a building_explore message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_explore * @static * @param {Object.} object Plain object * @returns {game.building_explore} building_explore */ building_explore.fromObject = function fromObject(object) { if (object instanceof $root.game.building_explore) return object; let message = new $root.game.building_explore(); 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(); return message; }; /** * Creates a plain object from a building_explore message. Also converts values to other types if specified. * @function toObject * @memberof game.building_explore * @static * @param {game.building_explore} message building_explore * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_explore.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this building_explore to JSON. * @function toJSON * @memberof game.building_explore * @instance * @returns {Object.} JSON object */ building_explore.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_explore; })(); game.building_explore_rsp = (function() { /** * Properties of a building_explore_rsp. * @memberof game * @interface Ibuilding_explore_rsp * @property {number|Long|null} [errno] building_explore_rsp errno * @property {game.Ibuilding|null} [data] building_explore_rsp data */ /** * Constructs a new building_explore_rsp. * @memberof game * @classdesc Represents a building_explore_rsp. * @implements Ibuilding_explore_rsp * @constructor * @param {game.Ibuilding_explore_rsp=} [properties] Properties to set */ function building_explore_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_explore_rsp errno. * @member {number|Long} errno * @memberof game.building_explore_rsp * @instance */ building_explore_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_explore_rsp data. * @member {game.Ibuilding|null|undefined} data * @memberof game.building_explore_rsp * @instance */ building_explore_rsp.prototype.data = null; /** * Creates a new building_explore_rsp instance using the specified properties. * @function create * @memberof game.building_explore_rsp * @static * @param {game.Ibuilding_explore_rsp=} [properties] Properties to set * @returns {game.building_explore_rsp} building_explore_rsp instance */ building_explore_rsp.create = function create(properties) { return new building_explore_rsp(properties); }; /** * Encodes the specified building_explore_rsp message. Does not implicitly {@link game.building_explore_rsp.verify|verify} messages. * @function encode * @memberof game.building_explore_rsp * @static * @param {game.Ibuilding_explore_rsp} message building_explore_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.building.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified building_explore_rsp message, length delimited. Does not implicitly {@link game.building_explore_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.building_explore_rsp * @static * @param {game.Ibuilding_explore_rsp} message building_explore_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_explore_rsp message from the specified reader or buffer. * @function decode * @memberof game.building_explore_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_explore_rsp} building_explore_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_explore_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.building.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_explore_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_explore_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_explore_rsp} building_explore_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_explore_rsp message. * @function verify * @memberof game.building_explore_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_explore_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.building.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a building_explore_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_explore_rsp * @static * @param {Object.} object Plain object * @returns {game.building_explore_rsp} building_explore_rsp */ building_explore_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.building_explore_rsp) return object; let message = new $root.game.building_explore_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.building_explore_rsp.data: object expected"); message.data = $root.game.building.fromObject(object.data); } return message; }; /** * Creates a plain object from a building_explore_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.building_explore_rsp * @static * @param {game.building_explore_rsp} message building_explore_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_explore_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.building.toObject(message.data, options); return object; }; /** * Converts this building_explore_rsp to JSON. * @function toJSON * @memberof game.building_explore_rsp * @instance * @returns {Object.} JSON object */ building_explore_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_explore_rsp; })(); game.building_auto_explore_award = (function() { /** * Properties of a building_auto_explore_award. * @memberof game * @interface Ibuilding_auto_explore_award * @property {number|Long|null} [id] building_auto_explore_award id */ /** * Constructs a new building_auto_explore_award. * @memberof game * @classdesc Represents a building_auto_explore_award. * @implements Ibuilding_auto_explore_award * @constructor * @param {game.Ibuilding_auto_explore_award=} [properties] Properties to set */ function building_auto_explore_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_auto_explore_award id. * @member {number|Long} id * @memberof game.building_auto_explore_award * @instance */ building_auto_explore_award.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new building_auto_explore_award instance using the specified properties. * @function create * @memberof game.building_auto_explore_award * @static * @param {game.Ibuilding_auto_explore_award=} [properties] Properties to set * @returns {game.building_auto_explore_award} building_auto_explore_award instance */ building_auto_explore_award.create = function create(properties) { return new building_auto_explore_award(properties); }; /** * Encodes the specified building_auto_explore_award message. Does not implicitly {@link game.building_auto_explore_award.verify|verify} messages. * @function encode * @memberof game.building_auto_explore_award * @static * @param {game.Ibuilding_auto_explore_award} message building_auto_explore_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified building_auto_explore_award message, length delimited. Does not implicitly {@link game.building_auto_explore_award.verify|verify} messages. * @function encodeDelimited * @memberof game.building_auto_explore_award * @static * @param {game.Ibuilding_auto_explore_award} message building_auto_explore_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_auto_explore_award message from the specified reader or buffer. * @function decode * @memberof game.building_auto_explore_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_auto_explore_award} building_auto_explore_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_auto_explore_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_auto_explore_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_auto_explore_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_auto_explore_award} building_auto_explore_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_auto_explore_award message. * @function verify * @memberof game.building_auto_explore_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_auto_explore_award.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"; return null; }; /** * Creates a building_auto_explore_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_auto_explore_award * @static * @param {Object.} object Plain object * @returns {game.building_auto_explore_award} building_auto_explore_award */ building_auto_explore_award.fromObject = function fromObject(object) { if (object instanceof $root.game.building_auto_explore_award) return object; let message = new $root.game.building_auto_explore_award(); 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(); return message; }; /** * Creates a plain object from a building_auto_explore_award message. Also converts values to other types if specified. * @function toObject * @memberof game.building_auto_explore_award * @static * @param {game.building_auto_explore_award} message building_auto_explore_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_auto_explore_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this building_auto_explore_award to JSON. * @function toJSON * @memberof game.building_auto_explore_award * @instance * @returns {Object.} JSON object */ building_auto_explore_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_auto_explore_award; })(); game.building_auto_explore_award_rsp = (function() { /** * Properties of a building_auto_explore_award_rsp. * @memberof game * @interface Ibuilding_auto_explore_award_rsp * @property {number|Long|null} [errno] building_auto_explore_award_rsp errno * @property {game.Ibuilding|null} [data] building_auto_explore_award_rsp data */ /** * Constructs a new building_auto_explore_award_rsp. * @memberof game * @classdesc Represents a building_auto_explore_award_rsp. * @implements Ibuilding_auto_explore_award_rsp * @constructor * @param {game.Ibuilding_auto_explore_award_rsp=} [properties] Properties to set */ function building_auto_explore_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_auto_explore_award_rsp errno. * @member {number|Long} errno * @memberof game.building_auto_explore_award_rsp * @instance */ building_auto_explore_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_auto_explore_award_rsp data. * @member {game.Ibuilding|null|undefined} data * @memberof game.building_auto_explore_award_rsp * @instance */ building_auto_explore_award_rsp.prototype.data = null; /** * Creates a new building_auto_explore_award_rsp instance using the specified properties. * @function create * @memberof game.building_auto_explore_award_rsp * @static * @param {game.Ibuilding_auto_explore_award_rsp=} [properties] Properties to set * @returns {game.building_auto_explore_award_rsp} building_auto_explore_award_rsp instance */ building_auto_explore_award_rsp.create = function create(properties) { return new building_auto_explore_award_rsp(properties); }; /** * Encodes the specified building_auto_explore_award_rsp message. Does not implicitly {@link game.building_auto_explore_award_rsp.verify|verify} messages. * @function encode * @memberof game.building_auto_explore_award_rsp * @static * @param {game.Ibuilding_auto_explore_award_rsp} message building_auto_explore_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.building.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified building_auto_explore_award_rsp message, length delimited. Does not implicitly {@link game.building_auto_explore_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.building_auto_explore_award_rsp * @static * @param {game.Ibuilding_auto_explore_award_rsp} message building_auto_explore_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_auto_explore_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.building_auto_explore_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_auto_explore_award_rsp} building_auto_explore_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_auto_explore_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.building.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_auto_explore_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_auto_explore_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_auto_explore_award_rsp} building_auto_explore_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_auto_explore_award_rsp message. * @function verify * @memberof game.building_auto_explore_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_auto_explore_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.building.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a building_auto_explore_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_auto_explore_award_rsp * @static * @param {Object.} object Plain object * @returns {game.building_auto_explore_award_rsp} building_auto_explore_award_rsp */ building_auto_explore_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.building_auto_explore_award_rsp) return object; let message = new $root.game.building_auto_explore_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.building_auto_explore_award_rsp.data: object expected"); message.data = $root.game.building.fromObject(object.data); } return message; }; /** * Creates a plain object from a building_auto_explore_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.building_auto_explore_award_rsp * @static * @param {game.building_auto_explore_award_rsp} message building_auto_explore_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_auto_explore_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.building.toObject(message.data, options); return object; }; /** * Converts this building_auto_explore_award_rsp to JSON. * @function toJSON * @memberof game.building_auto_explore_award_rsp * @instance * @returns {Object.} JSON object */ building_auto_explore_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_auto_explore_award_rsp; })(); game.building_explore_battle = (function() { /** * Properties of a building_explore_battle. * @memberof game * @interface Ibuilding_explore_battle * @property {number|Long|null} [id] building_explore_battle id * @property {Array.|null} [list] building_explore_battle list */ /** * Constructs a new building_explore_battle. * @memberof game * @classdesc Represents a building_explore_battle. * @implements Ibuilding_explore_battle * @constructor * @param {game.Ibuilding_explore_battle=} [properties] Properties to set */ function building_explore_battle(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_explore_battle id. * @member {number|Long} id * @memberof game.building_explore_battle * @instance */ building_explore_battle.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_explore_battle list. * @member {Array.} list * @memberof game.building_explore_battle * @instance */ building_explore_battle.prototype.list = $util.emptyArray; /** * Creates a new building_explore_battle instance using the specified properties. * @function create * @memberof game.building_explore_battle * @static * @param {game.Ibuilding_explore_battle=} [properties] Properties to set * @returns {game.building_explore_battle} building_explore_battle instance */ building_explore_battle.create = function create(properties) { return new building_explore_battle(properties); }; /** * Encodes the specified building_explore_battle message. Does not implicitly {@link game.building_explore_battle.verify|verify} messages. * @function encode * @memberof game.building_explore_battle * @static * @param {game.Ibuilding_explore_battle} message building_explore_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore_battle.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.list[i]); return writer; }; /** * Encodes the specified building_explore_battle message, length delimited. Does not implicitly {@link game.building_explore_battle.verify|verify} messages. * @function encodeDelimited * @memberof game.building_explore_battle * @static * @param {game.Ibuilding_explore_battle} message building_explore_battle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore_battle.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_explore_battle message from the specified reader or buffer. * @function decode * @memberof game.building_explore_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_explore_battle} building_explore_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore_battle.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_explore_battle(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_explore_battle message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_explore_battle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_explore_battle} building_explore_battle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore_battle.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_explore_battle message. * @function verify * @memberof game.building_explore_battle * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_explore_battle.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.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } return null; }; /** * Creates a building_explore_battle message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_explore_battle * @static * @param {Object.} object Plain object * @returns {game.building_explore_battle} building_explore_battle */ building_explore_battle.fromObject = function fromObject(object) { if (object instanceof $root.game.building_explore_battle) return object; let message = new $root.game.building_explore_battle(); 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.list) { if (!Array.isArray(object.list)) throw TypeError(".game.building_explore_battle.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } return message; }; /** * Creates a plain object from a building_explore_battle message. Also converts values to other types if specified. * @function toObject * @memberof game.building_explore_battle * @static * @param {game.building_explore_battle} message building_explore_battle * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_explore_battle.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let 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; 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.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } return object; }; /** * Converts this building_explore_battle to JSON. * @function toJSON * @memberof game.building_explore_battle * @instance * @returns {Object.} JSON object */ building_explore_battle.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_explore_battle; })(); game.building_explore_battle_rsp = (function() { /** * Properties of a building_explore_battle_rsp. * @memberof game * @interface Ibuilding_explore_battle_rsp * @property {number|Long|null} [errno] building_explore_battle_rsp errno * @property {game.Ibuilding|null} [data] building_explore_battle_rsp data */ /** * Constructs a new building_explore_battle_rsp. * @memberof game * @classdesc Represents a building_explore_battle_rsp. * @implements Ibuilding_explore_battle_rsp * @constructor * @param {game.Ibuilding_explore_battle_rsp=} [properties] Properties to set */ function building_explore_battle_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_explore_battle_rsp errno. * @member {number|Long} errno * @memberof game.building_explore_battle_rsp * @instance */ building_explore_battle_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_explore_battle_rsp data. * @member {game.Ibuilding|null|undefined} data * @memberof game.building_explore_battle_rsp * @instance */ building_explore_battle_rsp.prototype.data = null; /** * Creates a new building_explore_battle_rsp instance using the specified properties. * @function create * @memberof game.building_explore_battle_rsp * @static * @param {game.Ibuilding_explore_battle_rsp=} [properties] Properties to set * @returns {game.building_explore_battle_rsp} building_explore_battle_rsp instance */ building_explore_battle_rsp.create = function create(properties) { return new building_explore_battle_rsp(properties); }; /** * Encodes the specified building_explore_battle_rsp message. Does not implicitly {@link game.building_explore_battle_rsp.verify|verify} messages. * @function encode * @memberof game.building_explore_battle_rsp * @static * @param {game.Ibuilding_explore_battle_rsp} message building_explore_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore_battle_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.building.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified building_explore_battle_rsp message, length delimited. Does not implicitly {@link game.building_explore_battle_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.building_explore_battle_rsp * @static * @param {game.Ibuilding_explore_battle_rsp} message building_explore_battle_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_explore_battle_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_explore_battle_rsp message from the specified reader or buffer. * @function decode * @memberof game.building_explore_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_explore_battle_rsp} building_explore_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore_battle_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_explore_battle_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.building.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_explore_battle_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_explore_battle_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_explore_battle_rsp} building_explore_battle_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_explore_battle_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_explore_battle_rsp message. * @function verify * @memberof game.building_explore_battle_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_explore_battle_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.building.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a building_explore_battle_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_explore_battle_rsp * @static * @param {Object.} object Plain object * @returns {game.building_explore_battle_rsp} building_explore_battle_rsp */ building_explore_battle_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.building_explore_battle_rsp) return object; let message = new $root.game.building_explore_battle_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.building_explore_battle_rsp.data: object expected"); message.data = $root.game.building.fromObject(object.data); } return message; }; /** * Creates a plain object from a building_explore_battle_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.building_explore_battle_rsp * @static * @param {game.building_explore_battle_rsp} message building_explore_battle_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_explore_battle_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.building.toObject(message.data, options); return object; }; /** * Converts this building_explore_battle_rsp to JSON. * @function toJSON * @memberof game.building_explore_battle_rsp * @instance * @returns {Object.} JSON object */ building_explore_battle_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_explore_battle_rsp; })(); game.building_auto_explore_option = (function() { /** * Properties of a building_auto_explore_option. * @memberof game * @interface Ibuilding_auto_explore_option * @property {number|Long|null} [id] building_auto_explore_option id * @property {boolean|null} [open] building_auto_explore_option open */ /** * Constructs a new building_auto_explore_option. * @memberof game * @classdesc Represents a building_auto_explore_option. * @implements Ibuilding_auto_explore_option * @constructor * @param {game.Ibuilding_auto_explore_option=} [properties] Properties to set */ function building_auto_explore_option(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_auto_explore_option id. * @member {number|Long} id * @memberof game.building_auto_explore_option * @instance */ building_auto_explore_option.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_auto_explore_option open. * @member {boolean} open * @memberof game.building_auto_explore_option * @instance */ building_auto_explore_option.prototype.open = false; /** * Creates a new building_auto_explore_option instance using the specified properties. * @function create * @memberof game.building_auto_explore_option * @static * @param {game.Ibuilding_auto_explore_option=} [properties] Properties to set * @returns {game.building_auto_explore_option} building_auto_explore_option instance */ building_auto_explore_option.create = function create(properties) { return new building_auto_explore_option(properties); }; /** * Encodes the specified building_auto_explore_option message. Does not implicitly {@link game.building_auto_explore_option.verify|verify} messages. * @function encode * @memberof game.building_auto_explore_option * @static * @param {game.Ibuilding_auto_explore_option} message building_auto_explore_option message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_option.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.open != null && Object.hasOwnProperty.call(message, "open")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.open); return writer; }; /** * Encodes the specified building_auto_explore_option message, length delimited. Does not implicitly {@link game.building_auto_explore_option.verify|verify} messages. * @function encodeDelimited * @memberof game.building_auto_explore_option * @static * @param {game.Ibuilding_auto_explore_option} message building_auto_explore_option message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_option.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_auto_explore_option message from the specified reader or buffer. * @function decode * @memberof game.building_auto_explore_option * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_auto_explore_option} building_auto_explore_option * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_option.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_auto_explore_option(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.open = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_auto_explore_option message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_auto_explore_option * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_auto_explore_option} building_auto_explore_option * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_option.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_auto_explore_option message. * @function verify * @memberof game.building_auto_explore_option * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_auto_explore_option.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.open != null && message.hasOwnProperty("open")) if (typeof message.open !== "boolean") return "open: boolean expected"; return null; }; /** * Creates a building_auto_explore_option message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_auto_explore_option * @static * @param {Object.} object Plain object * @returns {game.building_auto_explore_option} building_auto_explore_option */ building_auto_explore_option.fromObject = function fromObject(object) { if (object instanceof $root.game.building_auto_explore_option) return object; let message = new $root.game.building_auto_explore_option(); 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.open != null) message.open = Boolean(object.open); return message; }; /** * Creates a plain object from a building_auto_explore_option message. Also converts values to other types if specified. * @function toObject * @memberof game.building_auto_explore_option * @static * @param {game.building_auto_explore_option} message building_auto_explore_option * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_auto_explore_option.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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.open = false; } 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.open != null && message.hasOwnProperty("open")) object.open = message.open; return object; }; /** * Converts this building_auto_explore_option to JSON. * @function toJSON * @memberof game.building_auto_explore_option * @instance * @returns {Object.} JSON object */ building_auto_explore_option.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_auto_explore_option; })(); game.building_auto_explore_option_rsp = (function() { /** * Properties of a building_auto_explore_option_rsp. * @memberof game * @interface Ibuilding_auto_explore_option_rsp * @property {number|Long|null} [errno] building_auto_explore_option_rsp errno * @property {game.Ibuilding|null} [data] building_auto_explore_option_rsp data */ /** * Constructs a new building_auto_explore_option_rsp. * @memberof game * @classdesc Represents a building_auto_explore_option_rsp. * @implements Ibuilding_auto_explore_option_rsp * @constructor * @param {game.Ibuilding_auto_explore_option_rsp=} [properties] Properties to set */ function building_auto_explore_option_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building_auto_explore_option_rsp errno. * @member {number|Long} errno * @memberof game.building_auto_explore_option_rsp * @instance */ building_auto_explore_option_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building_auto_explore_option_rsp data. * @member {game.Ibuilding|null|undefined} data * @memberof game.building_auto_explore_option_rsp * @instance */ building_auto_explore_option_rsp.prototype.data = null; /** * Creates a new building_auto_explore_option_rsp instance using the specified properties. * @function create * @memberof game.building_auto_explore_option_rsp * @static * @param {game.Ibuilding_auto_explore_option_rsp=} [properties] Properties to set * @returns {game.building_auto_explore_option_rsp} building_auto_explore_option_rsp instance */ building_auto_explore_option_rsp.create = function create(properties) { return new building_auto_explore_option_rsp(properties); }; /** * Encodes the specified building_auto_explore_option_rsp message. Does not implicitly {@link game.building_auto_explore_option_rsp.verify|verify} messages. * @function encode * @memberof game.building_auto_explore_option_rsp * @static * @param {game.Ibuilding_auto_explore_option_rsp} message building_auto_explore_option_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_option_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.data != null && Object.hasOwnProperty.call(message, "data")) $root.game.building.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified building_auto_explore_option_rsp message, length delimited. Does not implicitly {@link game.building_auto_explore_option_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.building_auto_explore_option_rsp * @static * @param {game.Ibuilding_auto_explore_option_rsp} message building_auto_explore_option_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building_auto_explore_option_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building_auto_explore_option_rsp message from the specified reader or buffer. * @function decode * @memberof game.building_auto_explore_option_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building_auto_explore_option_rsp} building_auto_explore_option_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_option_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building_auto_explore_option_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.data = $root.game.building.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building_auto_explore_option_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building_auto_explore_option_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building_auto_explore_option_rsp} building_auto_explore_option_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building_auto_explore_option_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building_auto_explore_option_rsp message. * @function verify * @memberof game.building_auto_explore_option_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building_auto_explore_option_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.data != null && message.hasOwnProperty("data")) { let error = $root.game.building.verify(message.data); if (error) return "data." + error; } return null; }; /** * Creates a building_auto_explore_option_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building_auto_explore_option_rsp * @static * @param {Object.} object Plain object * @returns {game.building_auto_explore_option_rsp} building_auto_explore_option_rsp */ building_auto_explore_option_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.building_auto_explore_option_rsp) return object; let message = new $root.game.building_auto_explore_option_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.data != null) { if (typeof object.data !== "object") throw TypeError(".game.building_auto_explore_option_rsp.data: object expected"); message.data = $root.game.building.fromObject(object.data); } return message; }; /** * Creates a plain object from a building_auto_explore_option_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.building_auto_explore_option_rsp * @static * @param {game.building_auto_explore_option_rsp} message building_auto_explore_option_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building_auto_explore_option_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.data = null; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.data != null && message.hasOwnProperty("data")) object.data = $root.game.building.toObject(message.data, options); return object; }; /** * Converts this building_auto_explore_option_rsp to JSON. * @function toJSON * @memberof game.building_auto_explore_option_rsp * @instance * @returns {Object.} JSON object */ building_auto_explore_option_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building_auto_explore_option_rsp; })(); game.level_gift_data = (function() { /** * Properties of a level_gift_data. * @memberof game * @interface Ilevel_gift_data */ /** * Constructs a new level_gift_data. * @memberof game * @classdesc Represents a level_gift_data. * @implements Ilevel_gift_data * @constructor * @param {game.Ilevel_gift_data=} [properties] Properties to set */ function level_gift_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new level_gift_data instance using the specified properties. * @function create * @memberof game.level_gift_data * @static * @param {game.Ilevel_gift_data=} [properties] Properties to set * @returns {game.level_gift_data} level_gift_data instance */ level_gift_data.create = function create(properties) { return new level_gift_data(properties); }; /** * Encodes the specified level_gift_data message. Does not implicitly {@link game.level_gift_data.verify|verify} messages. * @function encode * @memberof game.level_gift_data * @static * @param {game.Ilevel_gift_data} message level_gift_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified level_gift_data message, length delimited. Does not implicitly {@link game.level_gift_data.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_data * @static * @param {game.Ilevel_gift_data} message level_gift_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_data message from the specified reader or buffer. * @function decode * @memberof game.level_gift_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_data} level_gift_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_data} level_gift_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_data message. * @function verify * @memberof game.level_gift_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a level_gift_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_data * @static * @param {Object.} object Plain object * @returns {game.level_gift_data} level_gift_data */ level_gift_data.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_data) return object; return new $root.game.level_gift_data(); }; /** * Creates a plain object from a level_gift_data message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_data * @static * @param {game.level_gift_data} message level_gift_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_data.toObject = function toObject() { return {}; }; /** * Converts this level_gift_data to JSON. * @function toJSON * @memberof game.level_gift_data * @instance * @returns {Object.} JSON object */ level_gift_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_data; })(); game.level_gift_data_rsp = (function() { /** * Properties of a level_gift_data_rsp. * @memberof game * @interface Ilevel_gift_data_rsp * @property {number|Long|null} [errno] level_gift_data_rsp errno */ /** * Constructs a new level_gift_data_rsp. * @memberof game * @classdesc Represents a level_gift_data_rsp. * @implements Ilevel_gift_data_rsp * @constructor * @param {game.Ilevel_gift_data_rsp=} [properties] Properties to set */ function level_gift_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * level_gift_data_rsp errno. * @member {number|Long} errno * @memberof game.level_gift_data_rsp * @instance */ level_gift_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new level_gift_data_rsp instance using the specified properties. * @function create * @memberof game.level_gift_data_rsp * @static * @param {game.Ilevel_gift_data_rsp=} [properties] Properties to set * @returns {game.level_gift_data_rsp} level_gift_data_rsp instance */ level_gift_data_rsp.create = function create(properties) { return new level_gift_data_rsp(properties); }; /** * Encodes the specified level_gift_data_rsp message. Does not implicitly {@link game.level_gift_data_rsp.verify|verify} messages. * @function encode * @memberof game.level_gift_data_rsp * @static * @param {game.Ilevel_gift_data_rsp} message level_gift_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified level_gift_data_rsp message, length delimited. Does not implicitly {@link game.level_gift_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_data_rsp * @static * @param {game.Ilevel_gift_data_rsp} message level_gift_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.level_gift_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_data_rsp} level_gift_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_data_rsp} level_gift_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_data_rsp message. * @function verify * @memberof game.level_gift_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a level_gift_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_data_rsp * @static * @param {Object.} object Plain object * @returns {game.level_gift_data_rsp} level_gift_data_rsp */ level_gift_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_data_rsp) return object; let message = new $root.game.level_gift_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a level_gift_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_data_rsp * @static * @param {game.level_gift_data_rsp} message level_gift_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this level_gift_data_rsp to JSON. * @function toJSON * @memberof game.level_gift_data_rsp * @instance * @returns {Object.} JSON object */ level_gift_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_data_rsp; })(); game.level_gift_buy = (function() { /** * Properties of a level_gift_buy. * @memberof game * @interface Ilevel_gift_buy * @property {number|Long|null} [id] level_gift_buy id */ /** * Constructs a new level_gift_buy. * @memberof game * @classdesc Represents a level_gift_buy. * @implements Ilevel_gift_buy * @constructor * @param {game.Ilevel_gift_buy=} [properties] Properties to set */ function level_gift_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * level_gift_buy id. * @member {number|Long} id * @memberof game.level_gift_buy * @instance */ level_gift_buy.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new level_gift_buy instance using the specified properties. * @function create * @memberof game.level_gift_buy * @static * @param {game.Ilevel_gift_buy=} [properties] Properties to set * @returns {game.level_gift_buy} level_gift_buy instance */ level_gift_buy.create = function create(properties) { return new level_gift_buy(properties); }; /** * Encodes the specified level_gift_buy message. Does not implicitly {@link game.level_gift_buy.verify|verify} messages. * @function encode * @memberof game.level_gift_buy * @static * @param {game.Ilevel_gift_buy} message level_gift_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); return writer; }; /** * Encodes the specified level_gift_buy message, length delimited. Does not implicitly {@link game.level_gift_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_buy * @static * @param {game.Ilevel_gift_buy} message level_gift_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_buy message from the specified reader or buffer. * @function decode * @memberof game.level_gift_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_buy} level_gift_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_buy} level_gift_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_buy message. * @function verify * @memberof game.level_gift_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_buy.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"; return null; }; /** * Creates a level_gift_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_buy * @static * @param {Object.} object Plain object * @returns {game.level_gift_buy} level_gift_buy */ level_gift_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_buy) return object; let message = new $root.game.level_gift_buy(); 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(); return message; }; /** * Creates a plain object from a level_gift_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_buy * @static * @param {game.level_gift_buy} message level_gift_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_buy.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this level_gift_buy to JSON. * @function toJSON * @memberof game.level_gift_buy * @instance * @returns {Object.} JSON object */ level_gift_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_buy; })(); game.level_gift_buy_rsp = (function() { /** * Properties of a level_gift_buy_rsp. * @memberof game * @interface Ilevel_gift_buy_rsp * @property {number|Long|null} [errno] level_gift_buy_rsp errno */ /** * Constructs a new level_gift_buy_rsp. * @memberof game * @classdesc Represents a level_gift_buy_rsp. * @implements Ilevel_gift_buy_rsp * @constructor * @param {game.Ilevel_gift_buy_rsp=} [properties] Properties to set */ function level_gift_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * level_gift_buy_rsp errno. * @member {number|Long} errno * @memberof game.level_gift_buy_rsp * @instance */ level_gift_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new level_gift_buy_rsp instance using the specified properties. * @function create * @memberof game.level_gift_buy_rsp * @static * @param {game.Ilevel_gift_buy_rsp=} [properties] Properties to set * @returns {game.level_gift_buy_rsp} level_gift_buy_rsp instance */ level_gift_buy_rsp.create = function create(properties) { return new level_gift_buy_rsp(properties); }; /** * Encodes the specified level_gift_buy_rsp message. Does not implicitly {@link game.level_gift_buy_rsp.verify|verify} messages. * @function encode * @memberof game.level_gift_buy_rsp * @static * @param {game.Ilevel_gift_buy_rsp} message level_gift_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified level_gift_buy_rsp message, length delimited. Does not implicitly {@link game.level_gift_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_buy_rsp * @static * @param {game.Ilevel_gift_buy_rsp} message level_gift_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.level_gift_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_buy_rsp} level_gift_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_buy_rsp} level_gift_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_buy_rsp message. * @function verify * @memberof game.level_gift_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a level_gift_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.level_gift_buy_rsp} level_gift_buy_rsp */ level_gift_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_buy_rsp) return object; let message = new $root.game.level_gift_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a level_gift_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_buy_rsp * @static * @param {game.level_gift_buy_rsp} message level_gift_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this level_gift_buy_rsp to JSON. * @function toJSON * @memberof game.level_gift_buy_rsp * @instance * @returns {Object.} JSON object */ level_gift_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_buy_rsp; })(); game.level_gift_nty = (function() { /** * Properties of a level_gift_nty. * @memberof game * @interface Ilevel_gift_nty * @property {Array.|null} [list] level_gift_nty list */ /** * Constructs a new level_gift_nty. * @memberof game * @classdesc Represents a level_gift_nty. * @implements Ilevel_gift_nty * @constructor * @param {game.Ilevel_gift_nty=} [properties] Properties to set */ function level_gift_nty(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * level_gift_nty list. * @member {Array.} list * @memberof game.level_gift_nty * @instance */ level_gift_nty.prototype.list = $util.emptyArray; /** * Creates a new level_gift_nty instance using the specified properties. * @function create * @memberof game.level_gift_nty * @static * @param {game.Ilevel_gift_nty=} [properties] Properties to set * @returns {game.level_gift_nty} level_gift_nty instance */ level_gift_nty.create = function create(properties) { return new level_gift_nty(properties); }; /** * Encodes the specified level_gift_nty message. Does not implicitly {@link game.level_gift_nty.verify|verify} messages. * @function encode * @memberof game.level_gift_nty * @static * @param {game.Ilevel_gift_nty} message level_gift_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.id_num.encode(message.list[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified level_gift_nty message, length delimited. Does not implicitly {@link game.level_gift_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_nty * @static * @param {game.Ilevel_gift_nty} message level_gift_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_nty message from the specified reader or buffer. * @function decode * @memberof game.level_gift_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_nty} level_gift_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_nty} level_gift_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_nty message. * @function verify * @memberof game.level_gift_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.id_num.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a level_gift_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_nty * @static * @param {Object.} object Plain object * @returns {game.level_gift_nty} level_gift_nty */ level_gift_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_nty) return object; let message = new $root.game.level_gift_nty(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.level_gift_nty.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.level_gift_nty.list: object expected"); message.list[i] = $root.game.id_num.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a level_gift_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_nty * @static * @param {game.level_gift_nty} message level_gift_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.id_num.toObject(message.list[j], options); } return object; }; /** * Converts this level_gift_nty to JSON. * @function toJSON * @memberof game.level_gift_nty * @instance * @returns {Object.} JSON object */ level_gift_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_nty; })(); game.level_gift_del_red_point = (function() { /** * Properties of a level_gift_del_red_point. * @memberof game * @interface Ilevel_gift_del_red_point */ /** * Constructs a new level_gift_del_red_point. * @memberof game * @classdesc Represents a level_gift_del_red_point. * @implements Ilevel_gift_del_red_point * @constructor * @param {game.Ilevel_gift_del_red_point=} [properties] Properties to set */ function level_gift_del_red_point(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new level_gift_del_red_point instance using the specified properties. * @function create * @memberof game.level_gift_del_red_point * @static * @param {game.Ilevel_gift_del_red_point=} [properties] Properties to set * @returns {game.level_gift_del_red_point} level_gift_del_red_point instance */ level_gift_del_red_point.create = function create(properties) { return new level_gift_del_red_point(properties); }; /** * Encodes the specified level_gift_del_red_point message. Does not implicitly {@link game.level_gift_del_red_point.verify|verify} messages. * @function encode * @memberof game.level_gift_del_red_point * @static * @param {game.Ilevel_gift_del_red_point} message level_gift_del_red_point message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_del_red_point.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified level_gift_del_red_point message, length delimited. Does not implicitly {@link game.level_gift_del_red_point.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_del_red_point * @static * @param {game.Ilevel_gift_del_red_point} message level_gift_del_red_point message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_del_red_point.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_del_red_point message from the specified reader or buffer. * @function decode * @memberof game.level_gift_del_red_point * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_del_red_point} level_gift_del_red_point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_del_red_point.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_del_red_point(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_del_red_point message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_del_red_point * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_del_red_point} level_gift_del_red_point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_del_red_point.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_del_red_point message. * @function verify * @memberof game.level_gift_del_red_point * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_del_red_point.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a level_gift_del_red_point message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_del_red_point * @static * @param {Object.} object Plain object * @returns {game.level_gift_del_red_point} level_gift_del_red_point */ level_gift_del_red_point.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_del_red_point) return object; return new $root.game.level_gift_del_red_point(); }; /** * Creates a plain object from a level_gift_del_red_point message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_del_red_point * @static * @param {game.level_gift_del_red_point} message level_gift_del_red_point * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_del_red_point.toObject = function toObject() { return {}; }; /** * Converts this level_gift_del_red_point to JSON. * @function toJSON * @memberof game.level_gift_del_red_point * @instance * @returns {Object.} JSON object */ level_gift_del_red_point.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_del_red_point; })(); game.level_gift_del_red_point_rsp = (function() { /** * Properties of a level_gift_del_red_point_rsp. * @memberof game * @interface Ilevel_gift_del_red_point_rsp * @property {number|Long|null} [errno] level_gift_del_red_point_rsp errno */ /** * Constructs a new level_gift_del_red_point_rsp. * @memberof game * @classdesc Represents a level_gift_del_red_point_rsp. * @implements Ilevel_gift_del_red_point_rsp * @constructor * @param {game.Ilevel_gift_del_red_point_rsp=} [properties] Properties to set */ function level_gift_del_red_point_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * level_gift_del_red_point_rsp errno. * @member {number|Long} errno * @memberof game.level_gift_del_red_point_rsp * @instance */ level_gift_del_red_point_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new level_gift_del_red_point_rsp instance using the specified properties. * @function create * @memberof game.level_gift_del_red_point_rsp * @static * @param {game.Ilevel_gift_del_red_point_rsp=} [properties] Properties to set * @returns {game.level_gift_del_red_point_rsp} level_gift_del_red_point_rsp instance */ level_gift_del_red_point_rsp.create = function create(properties) { return new level_gift_del_red_point_rsp(properties); }; /** * Encodes the specified level_gift_del_red_point_rsp message. Does not implicitly {@link game.level_gift_del_red_point_rsp.verify|verify} messages. * @function encode * @memberof game.level_gift_del_red_point_rsp * @static * @param {game.Ilevel_gift_del_red_point_rsp} message level_gift_del_red_point_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_del_red_point_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified level_gift_del_red_point_rsp message, length delimited. Does not implicitly {@link game.level_gift_del_red_point_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.level_gift_del_red_point_rsp * @static * @param {game.Ilevel_gift_del_red_point_rsp} message level_gift_del_red_point_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ level_gift_del_red_point_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a level_gift_del_red_point_rsp message from the specified reader or buffer. * @function decode * @memberof game.level_gift_del_red_point_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.level_gift_del_red_point_rsp} level_gift_del_red_point_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_del_red_point_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.level_gift_del_red_point_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a level_gift_del_red_point_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.level_gift_del_red_point_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.level_gift_del_red_point_rsp} level_gift_del_red_point_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ level_gift_del_red_point_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a level_gift_del_red_point_rsp message. * @function verify * @memberof game.level_gift_del_red_point_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ level_gift_del_red_point_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a level_gift_del_red_point_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.level_gift_del_red_point_rsp * @static * @param {Object.} object Plain object * @returns {game.level_gift_del_red_point_rsp} level_gift_del_red_point_rsp */ level_gift_del_red_point_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.level_gift_del_red_point_rsp) return object; let message = new $root.game.level_gift_del_red_point_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a level_gift_del_red_point_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.level_gift_del_red_point_rsp * @static * @param {game.level_gift_del_red_point_rsp} message level_gift_del_red_point_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ level_gift_del_red_point_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this level_gift_del_red_point_rsp to JSON. * @function toJSON * @memberof game.level_gift_del_red_point_rsp * @instance * @returns {Object.} JSON object */ level_gift_del_red_point_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return level_gift_del_red_point_rsp; })(); game.lottery_data = (function() { /** * Properties of a lottery_data. * @memberof game * @interface Ilottery_data */ /** * Constructs a new lottery_data. * @memberof game * @classdesc Represents a lottery_data. * @implements Ilottery_data * @constructor * @param {game.Ilottery_data=} [properties] Properties to set */ function lottery_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new lottery_data instance using the specified properties. * @function create * @memberof game.lottery_data * @static * @param {game.Ilottery_data=} [properties] Properties to set * @returns {game.lottery_data} lottery_data instance */ lottery_data.create = function create(properties) { return new lottery_data(properties); }; /** * Encodes the specified lottery_data message. Does not implicitly {@link game.lottery_data.verify|verify} messages. * @function encode * @memberof game.lottery_data * @static * @param {game.Ilottery_data} message lottery_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified lottery_data message, length delimited. Does not implicitly {@link game.lottery_data.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_data * @static * @param {game.Ilottery_data} message lottery_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_data message from the specified reader or buffer. * @function decode * @memberof game.lottery_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_data} lottery_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_data} lottery_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_data message. * @function verify * @memberof game.lottery_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a lottery_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_data * @static * @param {Object.} object Plain object * @returns {game.lottery_data} lottery_data */ lottery_data.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_data) return object; return new $root.game.lottery_data(); }; /** * Creates a plain object from a lottery_data message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_data * @static * @param {game.lottery_data} message lottery_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_data.toObject = function toObject() { return {}; }; /** * Converts this lottery_data to JSON. * @function toJSON * @memberof game.lottery_data * @instance * @returns {Object.} JSON object */ lottery_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_data; })(); game.lottery_data_rsp = (function() { /** * Properties of a lottery_data_rsp. * @memberof game * @interface Ilottery_data_rsp * @property {number|Long|null} [errno] lottery_data_rsp errno */ /** * Constructs a new lottery_data_rsp. * @memberof game * @classdesc Represents a lottery_data_rsp. * @implements Ilottery_data_rsp * @constructor * @param {game.Ilottery_data_rsp=} [properties] Properties to set */ function lottery_data_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * lottery_data_rsp errno. * @member {number|Long} errno * @memberof game.lottery_data_rsp * @instance */ lottery_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new lottery_data_rsp instance using the specified properties. * @function create * @memberof game.lottery_data_rsp * @static * @param {game.Ilottery_data_rsp=} [properties] Properties to set * @returns {game.lottery_data_rsp} lottery_data_rsp instance */ lottery_data_rsp.create = function create(properties) { return new lottery_data_rsp(properties); }; /** * Encodes the specified lottery_data_rsp message. Does not implicitly {@link game.lottery_data_rsp.verify|verify} messages. * @function encode * @memberof game.lottery_data_rsp * @static * @param {game.Ilottery_data_rsp} message lottery_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified lottery_data_rsp message, length delimited. Does not implicitly {@link game.lottery_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_data_rsp * @static * @param {game.Ilottery_data_rsp} message lottery_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.lottery_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_data_rsp} lottery_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_data_rsp} lottery_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_data_rsp message. * @function verify * @memberof game.lottery_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a lottery_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_data_rsp * @static * @param {Object.} object Plain object * @returns {game.lottery_data_rsp} lottery_data_rsp */ lottery_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_data_rsp) return object; let message = new $root.game.lottery_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a lottery_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_data_rsp * @static * @param {game.lottery_data_rsp} message lottery_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this lottery_data_rsp to JSON. * @function toJSON * @memberof game.lottery_data_rsp * @instance * @returns {Object.} JSON object */ lottery_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_data_rsp; })(); game.lottery_award = (function() { /** * Properties of a lottery_award. * @memberof game * @interface Ilottery_award * @property {boolean|null} [free] lottery_award free */ /** * Constructs a new lottery_award. * @memberof game * @classdesc Represents a lottery_award. * @implements Ilottery_award * @constructor * @param {game.Ilottery_award=} [properties] Properties to set */ function lottery_award(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * lottery_award free. * @member {boolean} free * @memberof game.lottery_award * @instance */ lottery_award.prototype.free = false; /** * Creates a new lottery_award instance using the specified properties. * @function create * @memberof game.lottery_award * @static * @param {game.Ilottery_award=} [properties] Properties to set * @returns {game.lottery_award} lottery_award instance */ lottery_award.create = function create(properties) { return new lottery_award(properties); }; /** * Encodes the specified lottery_award message. Does not implicitly {@link game.lottery_award.verify|verify} messages. * @function encode * @memberof game.lottery_award * @static * @param {game.Ilottery_award} message lottery_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_award.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.free); return writer; }; /** * Encodes the specified lottery_award message, length delimited. Does not implicitly {@link game.lottery_award.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_award * @static * @param {game.Ilottery_award} message lottery_award message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_award.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_award message from the specified reader or buffer. * @function decode * @memberof game.lottery_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_award} lottery_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_award.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_award(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.free = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_award message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_award * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_award} lottery_award * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_award.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_award message. * @function verify * @memberof game.lottery_award * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_award.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free !== "boolean") return "free: boolean expected"; return null; }; /** * Creates a lottery_award message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_award * @static * @param {Object.} object Plain object * @returns {game.lottery_award} lottery_award */ lottery_award.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_award) return object; let message = new $root.game.lottery_award(); if (object.free != null) message.free = Boolean(object.free); return message; }; /** * Creates a plain object from a lottery_award message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_award * @static * @param {game.lottery_award} message lottery_award * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_award.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) object.free = false; if (message.free != null && message.hasOwnProperty("free")) object.free = message.free; return object; }; /** * Converts this lottery_award to JSON. * @function toJSON * @memberof game.lottery_award * @instance * @returns {Object.} JSON object */ lottery_award.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_award; })(); game.lottery_award_rsp = (function() { /** * Properties of a lottery_award_rsp. * @memberof game * @interface Ilottery_award_rsp * @property {number|Long|null} [errno] lottery_award_rsp errno * @property {boolean|null} [free] lottery_award_rsp free * @property {number|Long|null} [award] lottery_award_rsp award */ /** * Constructs a new lottery_award_rsp. * @memberof game * @classdesc Represents a lottery_award_rsp. * @implements Ilottery_award_rsp * @constructor * @param {game.Ilottery_award_rsp=} [properties] Properties to set */ function lottery_award_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * lottery_award_rsp errno. * @member {number|Long} errno * @memberof game.lottery_award_rsp * @instance */ lottery_award_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * lottery_award_rsp free. * @member {boolean} free * @memberof game.lottery_award_rsp * @instance */ lottery_award_rsp.prototype.free = false; /** * lottery_award_rsp award. * @member {number|Long} award * @memberof game.lottery_award_rsp * @instance */ lottery_award_rsp.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new lottery_award_rsp instance using the specified properties. * @function create * @memberof game.lottery_award_rsp * @static * @param {game.Ilottery_award_rsp=} [properties] Properties to set * @returns {game.lottery_award_rsp} lottery_award_rsp instance */ lottery_award_rsp.create = function create(properties) { return new lottery_award_rsp(properties); }; /** * Encodes the specified lottery_award_rsp message. Does not implicitly {@link game.lottery_award_rsp.verify|verify} messages. * @function encode * @memberof game.lottery_award_rsp * @static * @param {game.Ilottery_award_rsp} message lottery_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_award_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.free); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); return writer; }; /** * Encodes the specified lottery_award_rsp message, length delimited. Does not implicitly {@link game.lottery_award_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_award_rsp * @static * @param {game.Ilottery_award_rsp} message lottery_award_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_award_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_award_rsp message from the specified reader or buffer. * @function decode * @memberof game.lottery_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_award_rsp} lottery_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_award_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_award_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.free = reader.bool(); break; case 3: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_award_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_award_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_award_rsp} lottery_award_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_award_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_award_rsp message. * @function verify * @memberof game.lottery_award_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_award_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free !== "boolean") return "free: boolean expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a lottery_award_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_award_rsp * @static * @param {Object.} object Plain object * @returns {game.lottery_award_rsp} lottery_award_rsp */ lottery_award_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_award_rsp) return object; let message = new $root.game.lottery_award_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.free != null) message.free = Boolean(object.free); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a lottery_award_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_award_rsp * @static * @param {game.lottery_award_rsp} message lottery_award_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_award_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; object.free = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.free != null && message.hasOwnProperty("free")) object.free = message.free; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this lottery_award_rsp to JSON. * @function toJSON * @memberof game.lottery_award_rsp * @instance * @returns {Object.} JSON object */ lottery_award_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_award_rsp; })(); game.lottery_buy = (function() { /** * Properties of a lottery_buy. * @memberof game * @interface Ilottery_buy */ /** * Constructs a new lottery_buy. * @memberof game * @classdesc Represents a lottery_buy. * @implements Ilottery_buy * @constructor * @param {game.Ilottery_buy=} [properties] Properties to set */ function lottery_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new lottery_buy instance using the specified properties. * @function create * @memberof game.lottery_buy * @static * @param {game.Ilottery_buy=} [properties] Properties to set * @returns {game.lottery_buy} lottery_buy instance */ lottery_buy.create = function create(properties) { return new lottery_buy(properties); }; /** * Encodes the specified lottery_buy message. Does not implicitly {@link game.lottery_buy.verify|verify} messages. * @function encode * @memberof game.lottery_buy * @static * @param {game.Ilottery_buy} message lottery_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified lottery_buy message, length delimited. Does not implicitly {@link game.lottery_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_buy * @static * @param {game.Ilottery_buy} message lottery_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_buy message from the specified reader or buffer. * @function decode * @memberof game.lottery_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_buy} lottery_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_buy} lottery_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_buy message. * @function verify * @memberof game.lottery_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a lottery_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_buy * @static * @param {Object.} object Plain object * @returns {game.lottery_buy} lottery_buy */ lottery_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_buy) return object; return new $root.game.lottery_buy(); }; /** * Creates a plain object from a lottery_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_buy * @static * @param {game.lottery_buy} message lottery_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_buy.toObject = function toObject() { return {}; }; /** * Converts this lottery_buy to JSON. * @function toJSON * @memberof game.lottery_buy * @instance * @returns {Object.} JSON object */ lottery_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_buy; })(); game.lottery_buy_rsp = (function() { /** * Properties of a lottery_buy_rsp. * @memberof game * @interface Ilottery_buy_rsp * @property {number|Long|null} [errno] lottery_buy_rsp errno */ /** * Constructs a new lottery_buy_rsp. * @memberof game * @classdesc Represents a lottery_buy_rsp. * @implements Ilottery_buy_rsp * @constructor * @param {game.Ilottery_buy_rsp=} [properties] Properties to set */ function lottery_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * lottery_buy_rsp errno. * @member {number|Long} errno * @memberof game.lottery_buy_rsp * @instance */ lottery_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new lottery_buy_rsp instance using the specified properties. * @function create * @memberof game.lottery_buy_rsp * @static * @param {game.Ilottery_buy_rsp=} [properties] Properties to set * @returns {game.lottery_buy_rsp} lottery_buy_rsp instance */ lottery_buy_rsp.create = function create(properties) { return new lottery_buy_rsp(properties); }; /** * Encodes the specified lottery_buy_rsp message. Does not implicitly {@link game.lottery_buy_rsp.verify|verify} messages. * @function encode * @memberof game.lottery_buy_rsp * @static * @param {game.Ilottery_buy_rsp} message lottery_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); return writer; }; /** * Encodes the specified lottery_buy_rsp message, length delimited. Does not implicitly {@link game.lottery_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_buy_rsp * @static * @param {game.Ilottery_buy_rsp} message lottery_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.lottery_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_buy_rsp} lottery_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_buy_rsp} lottery_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_buy_rsp message. * @function verify * @memberof game.lottery_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; return null; }; /** * Creates a lottery_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.lottery_buy_rsp} lottery_buy_rsp */ lottery_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_buy_rsp) return object; let message = new $root.game.lottery_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a lottery_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_buy_rsp * @static * @param {game.lottery_buy_rsp} message lottery_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; return object; }; /** * Converts this lottery_buy_rsp to JSON. * @function toJSON * @memberof game.lottery_buy_rsp * @instance * @returns {Object.} JSON object */ lottery_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_buy_rsp; })(); game.lottery_nty = (function() { /** * Properties of a lottery_nty. * @memberof game * @interface Ilottery_nty * @property {number|Long|null} [state] lottery_nty state * @property {number|Long|null} [free] lottery_nty free * @property {number|Long|null} [award] lottery_nty award * @property {number|Long|null} [day] lottery_nty day */ /** * Constructs a new lottery_nty. * @memberof game * @classdesc Represents a lottery_nty. * @implements Ilottery_nty * @constructor * @param {game.Ilottery_nty=} [properties] Properties to set */ function lottery_nty(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * lottery_nty state. * @member {number|Long} state * @memberof game.lottery_nty * @instance */ lottery_nty.prototype.state = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * lottery_nty free. * @member {number|Long} free * @memberof game.lottery_nty * @instance */ lottery_nty.prototype.free = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * lottery_nty award. * @member {number|Long} award * @memberof game.lottery_nty * @instance */ lottery_nty.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * lottery_nty day. * @member {number|Long} day * @memberof game.lottery_nty * @instance */ lottery_nty.prototype.day = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new lottery_nty instance using the specified properties. * @function create * @memberof game.lottery_nty * @static * @param {game.Ilottery_nty=} [properties] Properties to set * @returns {game.lottery_nty} lottery_nty instance */ lottery_nty.create = function create(properties) { return new lottery_nty(properties); }; /** * Encodes the specified lottery_nty message. Does not implicitly {@link game.lottery_nty.verify|verify} messages. * @function encode * @memberof game.lottery_nty * @static * @param {game.Ilottery_nty} message lottery_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_nty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.state); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.free); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.award); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.day); return writer; }; /** * Encodes the specified lottery_nty message, length delimited. Does not implicitly {@link game.lottery_nty.verify|verify} messages. * @function encodeDelimited * @memberof game.lottery_nty * @static * @param {game.Ilottery_nty} message lottery_nty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ lottery_nty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a lottery_nty message from the specified reader or buffer. * @function decode * @memberof game.lottery_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.lottery_nty} lottery_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_nty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.lottery_nty(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.state = reader.int64(); break; case 2: message.free = reader.int64(); break; case 3: message.award = reader.int64(); break; case 4: message.day = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a lottery_nty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.lottery_nty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.lottery_nty} lottery_nty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ lottery_nty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a lottery_nty message. * @function verify * @memberof game.lottery_nty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ lottery_nty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state) && !(message.state && $util.isInteger(message.state.low) && $util.isInteger(message.state.high))) return "state: integer|Long expected"; if (message.free != null && message.hasOwnProperty("free")) if (!$util.isInteger(message.free) && !(message.free && $util.isInteger(message.free.low) && $util.isInteger(message.free.high))) return "free: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day) && !(message.day && $util.isInteger(message.day.low) && $util.isInteger(message.day.high))) return "day: integer|Long expected"; return null; }; /** * Creates a lottery_nty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.lottery_nty * @static * @param {Object.} object Plain object * @returns {game.lottery_nty} lottery_nty */ lottery_nty.fromObject = function fromObject(object) { if (object instanceof $root.game.lottery_nty) return object; let message = new $root.game.lottery_nty(); if (object.state != null) if ($util.Long) (message.state = $util.Long.fromValue(object.state)).unsigned = false; else if (typeof object.state === "string") message.state = parseInt(object.state, 10); else if (typeof object.state === "number") message.state = object.state; else if (typeof object.state === "object") message.state = new $util.LongBits(object.state.low >>> 0, object.state.high >>> 0).toNumber(); if (object.free != null) if ($util.Long) (message.free = $util.Long.fromValue(object.free)).unsigned = false; else if (typeof object.free === "string") message.free = parseInt(object.free, 10); else if (typeof object.free === "number") message.free = object.free; else if (typeof object.free === "object") message.free = new $util.LongBits(object.free.low >>> 0, object.free.high >>> 0).toNumber(); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); if (object.day != null) if ($util.Long) (message.day = $util.Long.fromValue(object.day)).unsigned = false; else if (typeof object.day === "string") message.day = parseInt(object.day, 10); else if (typeof object.day === "number") message.day = object.day; else if (typeof object.day === "object") message.day = new $util.LongBits(object.day.low >>> 0, object.day.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a lottery_nty message. Also converts values to other types if specified. * @function toObject * @memberof game.lottery_nty * @static * @param {game.lottery_nty} message lottery_nty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ lottery_nty.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.state = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.state = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.free = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.free = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.day = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.day = options.longs === String ? "0" : 0; } if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state === "number") object.state = options.longs === String ? String(message.state) : message.state; else object.state = options.longs === String ? $util.Long.prototype.toString.call(message.state) : options.longs === Number ? new $util.LongBits(message.state.low >>> 0, message.state.high >>> 0).toNumber() : message.state; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free === "number") object.free = options.longs === String ? String(message.free) : message.free; else object.free = options.longs === String ? $util.Long.prototype.toString.call(message.free) : options.longs === Number ? new $util.LongBits(message.free.low >>> 0, message.free.high >>> 0).toNumber() : message.free; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; if (message.day != null && message.hasOwnProperty("day")) if (typeof message.day === "number") object.day = options.longs === String ? String(message.day) : message.day; else object.day = options.longs === String ? $util.Long.prototype.toString.call(message.day) : options.longs === Number ? new $util.LongBits(message.day.low >>> 0, message.day.high >>> 0).toNumber() : message.day; return object; }; /** * Converts this lottery_nty to JSON. * @function toJSON * @memberof game.lottery_nty * @instance * @returns {Object.} JSON object */ lottery_nty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return lottery_nty; })(); game.act_rank_data = (function() { /** * Properties of an act_rank_data. * @memberof game * @interface Iact_rank_data * @property {number|Long|null} [id] act_rank_data id */ /** * Constructs a new act_rank_data. * @memberof game * @classdesc Represents an act_rank_data. * @implements Iact_rank_data * @constructor * @param {game.Iact_rank_data=} [properties] Properties to set */ function act_rank_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * act_rank_data id. * @member {number|Long} id * @memberof game.act_rank_data * @instance */ act_rank_data.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new act_rank_data instance using the specified properties. * @function create * @memberof game.act_rank_data * @static * @param {game.Iact_rank_data=} [properties] Properties to set * @returns {game.act_rank_data} act_rank_data instance */ act_rank_data.create = function create(properties) { return new act_rank_data(properties); }; /** * Encodes the specified act_rank_data message. Does not implicitly {@link game.act_rank_data.verify|verify} messages. * @function encode * @memberof game.act_rank_data * @static * @param {game.Iact_rank_data} message act_rank_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ act_rank_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); return writer; }; /** * Encodes the specified act_rank_data message, length delimited. Does not implicitly {@link game.act_rank_data.verify|verify} messages. * @function encodeDelimited * @memberof game.act_rank_data * @static * @param {game.Iact_rank_data} message act_rank_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ act_rank_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an act_rank_data message from the specified reader or buffer. * @function decode * @memberof game.act_rank_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.act_rank_data} act_rank_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ act_rank_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.act_rank_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an act_rank_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.act_rank_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.act_rank_data} act_rank_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ act_rank_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an act_rank_data message. * @function verify * @memberof game.act_rank_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ act_rank_data.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"; return null; }; /** * Creates an act_rank_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.act_rank_data * @static * @param {Object.} object Plain object * @returns {game.act_rank_data} act_rank_data */ act_rank_data.fromObject = function fromObject(object) { if (object instanceof $root.game.act_rank_data) return object; let message = new $root.game.act_rank_data(); 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(); return message; }; /** * Creates a plain object from an act_rank_data message. Also converts values to other types if specified. * @function toObject * @memberof game.act_rank_data * @static * @param {game.act_rank_data} message act_rank_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ act_rank_data.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) if ($util.Long) { let 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; 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; return object; }; /** * Converts this act_rank_data to JSON. * @function toJSON * @memberof game.act_rank_data * @instance * @returns {Object.} JSON object */ act_rank_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return act_rank_data; })(); game.act_rank_data_rsp = (function() { /** * Properties of an act_rank_data_rsp. * @memberof game * @interface Iact_rank_data_rsp * @property {number|Long|null} [errno] act_rank_data_rsp errno * @property {Array.|null} [list] act_rank_data_rsp list */ /** * Constructs a new act_rank_data_rsp. * @memberof game * @classdesc Represents an act_rank_data_rsp. * @implements Iact_rank_data_rsp * @constructor * @param {game.Iact_rank_data_rsp=} [properties] Properties to set */ function act_rank_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * act_rank_data_rsp errno. * @member {number|Long} errno * @memberof game.act_rank_data_rsp * @instance */ act_rank_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * act_rank_data_rsp list. * @member {Array.} list * @memberof game.act_rank_data_rsp * @instance */ act_rank_data_rsp.prototype.list = $util.emptyArray; /** * Creates a new act_rank_data_rsp instance using the specified properties. * @function create * @memberof game.act_rank_data_rsp * @static * @param {game.Iact_rank_data_rsp=} [properties] Properties to set * @returns {game.act_rank_data_rsp} act_rank_data_rsp instance */ act_rank_data_rsp.create = function create(properties) { return new act_rank_data_rsp(properties); }; /** * Encodes the specified act_rank_data_rsp message. Does not implicitly {@link game.act_rank_data_rsp.verify|verify} messages. * @function encode * @memberof game.act_rank_data_rsp * @static * @param {game.Iact_rank_data_rsp} message act_rank_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ act_rank_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.ranking_info.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified act_rank_data_rsp message, length delimited. Does not implicitly {@link game.act_rank_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.act_rank_data_rsp * @static * @param {game.Iact_rank_data_rsp} message act_rank_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ act_rank_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an act_rank_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.act_rank_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.act_rank_data_rsp} act_rank_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ act_rank_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.act_rank_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.ranking_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an act_rank_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.act_rank_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.act_rank_data_rsp} act_rank_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ act_rank_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an act_rank_data_rsp message. * @function verify * @memberof game.act_rank_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ act_rank_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.ranking_info.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an act_rank_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.act_rank_data_rsp * @static * @param {Object.} object Plain object * @returns {game.act_rank_data_rsp} act_rank_data_rsp */ act_rank_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.act_rank_data_rsp) return object; let message = new $root.game.act_rank_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.act_rank_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.act_rank_data_rsp.list: object expected"); message.list[i] = $root.game.ranking_info.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an act_rank_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.act_rank_data_rsp * @static * @param {game.act_rank_data_rsp} message act_rank_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ act_rank_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.ranking_info.toObject(message.list[j], options); } return object; }; /** * Converts this act_rank_data_rsp to JSON. * @function toJSON * @memberof game.act_rank_data_rsp * @instance * @returns {Object.} JSON object */ act_rank_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return act_rank_data_rsp; })(); game.treasure_get_data = (function() { /** * Properties of a treasure_get_data. * @memberof game * @interface Itreasure_get_data */ /** * Constructs a new treasure_get_data. * @memberof game * @classdesc Represents a treasure_get_data. * @implements Itreasure_get_data * @constructor * @param {game.Itreasure_get_data=} [properties] Properties to set */ function treasure_get_data(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new treasure_get_data instance using the specified properties. * @function create * @memberof game.treasure_get_data * @static * @param {game.Itreasure_get_data=} [properties] Properties to set * @returns {game.treasure_get_data} treasure_get_data instance */ treasure_get_data.create = function create(properties) { return new treasure_get_data(properties); }; /** * Encodes the specified treasure_get_data message. Does not implicitly {@link game.treasure_get_data.verify|verify} messages. * @function encode * @memberof game.treasure_get_data * @static * @param {game.Itreasure_get_data} message treasure_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_get_data.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified treasure_get_data message, length delimited. Does not implicitly {@link game.treasure_get_data.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_get_data * @static * @param {game.Itreasure_get_data} message treasure_get_data message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_get_data.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_get_data message from the specified reader or buffer. * @function decode * @memberof game.treasure_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_get_data} treasure_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_get_data.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_get_data(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_get_data message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_get_data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_get_data} treasure_get_data * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_get_data.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_get_data message. * @function verify * @memberof game.treasure_get_data * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_get_data.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a treasure_get_data message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_get_data * @static * @param {Object.} object Plain object * @returns {game.treasure_get_data} treasure_get_data */ treasure_get_data.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_get_data) return object; return new $root.game.treasure_get_data(); }; /** * Creates a plain object from a treasure_get_data message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_get_data * @static * @param {game.treasure_get_data} message treasure_get_data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_get_data.toObject = function toObject() { return {}; }; /** * Converts this treasure_get_data to JSON. * @function toJSON * @memberof game.treasure_get_data * @instance * @returns {Object.} JSON object */ treasure_get_data.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_get_data; })(); game.treasure_get_data_rsp = (function() { /** * Properties of a treasure_get_data_rsp. * @memberof game * @interface Itreasure_get_data_rsp * @property {number|Long|null} [errno] treasure_get_data_rsp errno * @property {number|Long|null} [buy] treasure_get_data_rsp buy * @property {number|Long|null} [sign] treasure_get_data_rsp sign * @property {Array.|null} [list] treasure_get_data_rsp list * @property {boolean|null} [treasure] treasure_get_data_rsp treasure */ /** * Constructs a new treasure_get_data_rsp. * @memberof game * @classdesc Represents a treasure_get_data_rsp. * @implements Itreasure_get_data_rsp * @constructor * @param {game.Itreasure_get_data_rsp=} [properties] Properties to set */ function treasure_get_data_rsp(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * treasure_get_data_rsp errno. * @member {number|Long} errno * @memberof game.treasure_get_data_rsp * @instance */ treasure_get_data_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * treasure_get_data_rsp buy. * @member {number|Long} buy * @memberof game.treasure_get_data_rsp * @instance */ treasure_get_data_rsp.prototype.buy = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * treasure_get_data_rsp sign. * @member {number|Long} sign * @memberof game.treasure_get_data_rsp * @instance */ treasure_get_data_rsp.prototype.sign = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * treasure_get_data_rsp list. * @member {Array.} list * @memberof game.treasure_get_data_rsp * @instance */ treasure_get_data_rsp.prototype.list = $util.emptyArray; /** * treasure_get_data_rsp treasure. * @member {boolean} treasure * @memberof game.treasure_get_data_rsp * @instance */ treasure_get_data_rsp.prototype.treasure = false; /** * Creates a new treasure_get_data_rsp instance using the specified properties. * @function create * @memberof game.treasure_get_data_rsp * @static * @param {game.Itreasure_get_data_rsp=} [properties] Properties to set * @returns {game.treasure_get_data_rsp} treasure_get_data_rsp instance */ treasure_get_data_rsp.create = function create(properties) { return new treasure_get_data_rsp(properties); }; /** * Encodes the specified treasure_get_data_rsp message. Does not implicitly {@link game.treasure_get_data_rsp.verify|verify} messages. * @function encode * @memberof game.treasure_get_data_rsp * @static * @param {game.Itreasure_get_data_rsp} message treasure_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_get_data_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.buy != null && Object.hasOwnProperty.call(message, "buy")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.buy); if (message.sign != null && Object.hasOwnProperty.call(message, "sign")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sign); if (message.list != null && message.list.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (let i = 0; i < message.list.length; ++i) writer.int64(message.list[i]); writer.ldelim(); } if (message.treasure != null && Object.hasOwnProperty.call(message, "treasure")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.treasure); return writer; }; /** * Encodes the specified treasure_get_data_rsp message, length delimited. Does not implicitly {@link game.treasure_get_data_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_get_data_rsp * @static * @param {game.Itreasure_get_data_rsp} message treasure_get_data_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_get_data_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_get_data_rsp message from the specified reader or buffer. * @function decode * @memberof game.treasure_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_get_data_rsp} treasure_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_get_data_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_get_data_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.buy = reader.int64(); break; case 3: message.sign = reader.int64(); break; case 4: if (!(message.list && message.list.length)) message.list = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.list.push(reader.int64()); } else message.list.push(reader.int64()); break; case 5: message.treasure = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_get_data_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_get_data_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_get_data_rsp} treasure_get_data_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_get_data_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_get_data_rsp message. * @function verify * @memberof game.treasure_get_data_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_get_data_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.buy != null && message.hasOwnProperty("buy")) if (!$util.isInteger(message.buy) && !(message.buy && $util.isInteger(message.buy.low) && $util.isInteger(message.buy.high))) return "buy: integer|Long expected"; if (message.sign != null && message.hasOwnProperty("sign")) if (!$util.isInteger(message.sign) && !(message.sign && $util.isInteger(message.sign.low) && $util.isInteger(message.sign.high))) return "sign: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isInteger(message.list[i]) && !(message.list[i] && $util.isInteger(message.list[i].low) && $util.isInteger(message.list[i].high))) return "list: integer|Long[] expected"; } if (message.treasure != null && message.hasOwnProperty("treasure")) if (typeof message.treasure !== "boolean") return "treasure: boolean expected"; return null; }; /** * Creates a treasure_get_data_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_get_data_rsp * @static * @param {Object.} object Plain object * @returns {game.treasure_get_data_rsp} treasure_get_data_rsp */ treasure_get_data_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_get_data_rsp) return object; let message = new $root.game.treasure_get_data_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.buy != null) if ($util.Long) (message.buy = $util.Long.fromValue(object.buy)).unsigned = false; else if (typeof object.buy === "string") message.buy = parseInt(object.buy, 10); else if (typeof object.buy === "number") message.buy = object.buy; else if (typeof object.buy === "object") message.buy = new $util.LongBits(object.buy.low >>> 0, object.buy.high >>> 0).toNumber(); if (object.sign != null) if ($util.Long) (message.sign = $util.Long.fromValue(object.sign)).unsigned = false; else if (typeof object.sign === "string") message.sign = parseInt(object.sign, 10); else if (typeof object.sign === "number") message.sign = object.sign; else if (typeof object.sign === "object") message.sign = new $util.LongBits(object.sign.low >>> 0, object.sign.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.treasure_get_data_rsp.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) if ($util.Long) (message.list[i] = $util.Long.fromValue(object.list[i])).unsigned = false; else if (typeof object.list[i] === "string") message.list[i] = parseInt(object.list[i], 10); else if (typeof object.list[i] === "number") message.list[i] = object.list[i]; else if (typeof object.list[i] === "object") message.list[i] = new $util.LongBits(object.list[i].low >>> 0, object.list[i].high >>> 0).toNumber(); } if (object.treasure != null) message.treasure = Boolean(object.treasure); return message; }; /** * Creates a plain object from a treasure_get_data_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_get_data_rsp * @static * @param {game.treasure_get_data_rsp} message treasure_get_data_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_get_data_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.buy = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.buy = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.sign = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.sign = options.longs === String ? "0" : 0; object.treasure = false; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.buy != null && message.hasOwnProperty("buy")) if (typeof message.buy === "number") object.buy = options.longs === String ? String(message.buy) : message.buy; else object.buy = options.longs === String ? $util.Long.prototype.toString.call(message.buy) : options.longs === Number ? new $util.LongBits(message.buy.low >>> 0, message.buy.high >>> 0).toNumber() : message.buy; if (message.sign != null && message.hasOwnProperty("sign")) if (typeof message.sign === "number") object.sign = options.longs === String ? String(message.sign) : message.sign; else object.sign = options.longs === String ? $util.Long.prototype.toString.call(message.sign) : options.longs === Number ? new $util.LongBits(message.sign.low >>> 0, message.sign.high >>> 0).toNumber() : message.sign; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) if (typeof message.list[j] === "number") object.list[j] = options.longs === String ? String(message.list[j]) : message.list[j]; else object.list[j] = options.longs === String ? $util.Long.prototype.toString.call(message.list[j]) : options.longs === Number ? new $util.LongBits(message.list[j].low >>> 0, message.list[j].high >>> 0).toNumber() : message.list[j]; } if (message.treasure != null && message.hasOwnProperty("treasure")) object.treasure = message.treasure; return object; }; /** * Converts this treasure_get_data_rsp to JSON. * @function toJSON * @memberof game.treasure_get_data_rsp * @instance * @returns {Object.} JSON object */ treasure_get_data_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_get_data_rsp; })(); game.treasure_draw = (function() { /** * Properties of a treasure_draw. * @memberof game * @interface Itreasure_draw */ /** * Constructs a new treasure_draw. * @memberof game * @classdesc Represents a treasure_draw. * @implements Itreasure_draw * @constructor * @param {game.Itreasure_draw=} [properties] Properties to set */ function treasure_draw(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new treasure_draw instance using the specified properties. * @function create * @memberof game.treasure_draw * @static * @param {game.Itreasure_draw=} [properties] Properties to set * @returns {game.treasure_draw} treasure_draw instance */ treasure_draw.create = function create(properties) { return new treasure_draw(properties); }; /** * Encodes the specified treasure_draw message. Does not implicitly {@link game.treasure_draw.verify|verify} messages. * @function encode * @memberof game.treasure_draw * @static * @param {game.Itreasure_draw} message treasure_draw message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_draw.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified treasure_draw message, length delimited. Does not implicitly {@link game.treasure_draw.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_draw * @static * @param {game.Itreasure_draw} message treasure_draw message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_draw.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_draw message from the specified reader or buffer. * @function decode * @memberof game.treasure_draw * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_draw} treasure_draw * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_draw.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_draw(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_draw message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_draw * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_draw} treasure_draw * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_draw.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_draw message. * @function verify * @memberof game.treasure_draw * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_draw.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a treasure_draw message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_draw * @static * @param {Object.} object Plain object * @returns {game.treasure_draw} treasure_draw */ treasure_draw.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_draw) return object; return new $root.game.treasure_draw(); }; /** * Creates a plain object from a treasure_draw message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_draw * @static * @param {game.treasure_draw} message treasure_draw * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_draw.toObject = function toObject() { return {}; }; /** * Converts this treasure_draw to JSON. * @function toJSON * @memberof game.treasure_draw * @instance * @returns {Object.} JSON object */ treasure_draw.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_draw; })(); game.treasure_draw_rsp = (function() { /** * Properties of a treasure_draw_rsp. * @memberof game * @interface Itreasure_draw_rsp * @property {number|Long|null} [errno] treasure_draw_rsp errno * @property {number|Long|null} [pos] treasure_draw_rsp pos */ /** * Constructs a new treasure_draw_rsp. * @memberof game * @classdesc Represents a treasure_draw_rsp. * @implements Itreasure_draw_rsp * @constructor * @param {game.Itreasure_draw_rsp=} [properties] Properties to set */ function treasure_draw_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * treasure_draw_rsp errno. * @member {number|Long} errno * @memberof game.treasure_draw_rsp * @instance */ treasure_draw_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * treasure_draw_rsp pos. * @member {number|Long} pos * @memberof game.treasure_draw_rsp * @instance */ treasure_draw_rsp.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new treasure_draw_rsp instance using the specified properties. * @function create * @memberof game.treasure_draw_rsp * @static * @param {game.Itreasure_draw_rsp=} [properties] Properties to set * @returns {game.treasure_draw_rsp} treasure_draw_rsp instance */ treasure_draw_rsp.create = function create(properties) { return new treasure_draw_rsp(properties); }; /** * Encodes the specified treasure_draw_rsp message. Does not implicitly {@link game.treasure_draw_rsp.verify|verify} messages. * @function encode * @memberof game.treasure_draw_rsp * @static * @param {game.Itreasure_draw_rsp} message treasure_draw_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_draw_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pos); return writer; }; /** * Encodes the specified treasure_draw_rsp message, length delimited. Does not implicitly {@link game.treasure_draw_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_draw_rsp * @static * @param {game.Itreasure_draw_rsp} message treasure_draw_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_draw_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_draw_rsp message from the specified reader or buffer. * @function decode * @memberof game.treasure_draw_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_draw_rsp} treasure_draw_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_draw_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_draw_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.pos = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_draw_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_draw_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_draw_rsp} treasure_draw_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_draw_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_draw_rsp message. * @function verify * @memberof game.treasure_draw_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_draw_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; return null; }; /** * Creates a treasure_draw_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_draw_rsp * @static * @param {Object.} object Plain object * @returns {game.treasure_draw_rsp} treasure_draw_rsp */ treasure_draw_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_draw_rsp) return object; let message = new $root.game.treasure_draw_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a treasure_draw_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_draw_rsp * @static * @param {game.treasure_draw_rsp} message treasure_draw_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_draw_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; return object; }; /** * Converts this treasure_draw_rsp to JSON. * @function toJSON * @memberof game.treasure_draw_rsp * @instance * @returns {Object.} JSON object */ treasure_draw_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_draw_rsp; })(); game.treasure_sign = (function() { /** * Properties of a treasure_sign. * @memberof game * @interface Itreasure_sign */ /** * Constructs a new treasure_sign. * @memberof game * @classdesc Represents a treasure_sign. * @implements Itreasure_sign * @constructor * @param {game.Itreasure_sign=} [properties] Properties to set */ function treasure_sign(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new treasure_sign instance using the specified properties. * @function create * @memberof game.treasure_sign * @static * @param {game.Itreasure_sign=} [properties] Properties to set * @returns {game.treasure_sign} treasure_sign instance */ treasure_sign.create = function create(properties) { return new treasure_sign(properties); }; /** * Encodes the specified treasure_sign message. Does not implicitly {@link game.treasure_sign.verify|verify} messages. * @function encode * @memberof game.treasure_sign * @static * @param {game.Itreasure_sign} message treasure_sign message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_sign.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified treasure_sign message, length delimited. Does not implicitly {@link game.treasure_sign.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_sign * @static * @param {game.Itreasure_sign} message treasure_sign message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_sign.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_sign message from the specified reader or buffer. * @function decode * @memberof game.treasure_sign * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_sign} treasure_sign * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_sign.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_sign(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_sign message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_sign * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_sign} treasure_sign * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_sign.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_sign message. * @function verify * @memberof game.treasure_sign * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_sign.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a treasure_sign message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_sign * @static * @param {Object.} object Plain object * @returns {game.treasure_sign} treasure_sign */ treasure_sign.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_sign) return object; return new $root.game.treasure_sign(); }; /** * Creates a plain object from a treasure_sign message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_sign * @static * @param {game.treasure_sign} message treasure_sign * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_sign.toObject = function toObject() { return {}; }; /** * Converts this treasure_sign to JSON. * @function toJSON * @memberof game.treasure_sign * @instance * @returns {Object.} JSON object */ treasure_sign.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_sign; })(); game.treasure_sign_rsp = (function() { /** * Properties of a treasure_sign_rsp. * @memberof game * @interface Itreasure_sign_rsp * @property {number|Long|null} [errno] treasure_sign_rsp errno * @property {number|Long|null} [sign] treasure_sign_rsp sign */ /** * Constructs a new treasure_sign_rsp. * @memberof game * @classdesc Represents a treasure_sign_rsp. * @implements Itreasure_sign_rsp * @constructor * @param {game.Itreasure_sign_rsp=} [properties] Properties to set */ function treasure_sign_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * treasure_sign_rsp errno. * @member {number|Long} errno * @memberof game.treasure_sign_rsp * @instance */ treasure_sign_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * treasure_sign_rsp sign. * @member {number|Long} sign * @memberof game.treasure_sign_rsp * @instance */ treasure_sign_rsp.prototype.sign = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new treasure_sign_rsp instance using the specified properties. * @function create * @memberof game.treasure_sign_rsp * @static * @param {game.Itreasure_sign_rsp=} [properties] Properties to set * @returns {game.treasure_sign_rsp} treasure_sign_rsp instance */ treasure_sign_rsp.create = function create(properties) { return new treasure_sign_rsp(properties); }; /** * Encodes the specified treasure_sign_rsp message. Does not implicitly {@link game.treasure_sign_rsp.verify|verify} messages. * @function encode * @memberof game.treasure_sign_rsp * @static * @param {game.Itreasure_sign_rsp} message treasure_sign_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_sign_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.sign != null && Object.hasOwnProperty.call(message, "sign")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sign); return writer; }; /** * Encodes the specified treasure_sign_rsp message, length delimited. Does not implicitly {@link game.treasure_sign_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_sign_rsp * @static * @param {game.Itreasure_sign_rsp} message treasure_sign_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_sign_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_sign_rsp message from the specified reader or buffer. * @function decode * @memberof game.treasure_sign_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_sign_rsp} treasure_sign_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_sign_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_sign_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.sign = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_sign_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_sign_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_sign_rsp} treasure_sign_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_sign_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_sign_rsp message. * @function verify * @memberof game.treasure_sign_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_sign_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.sign != null && message.hasOwnProperty("sign")) if (!$util.isInteger(message.sign) && !(message.sign && $util.isInteger(message.sign.low) && $util.isInteger(message.sign.high))) return "sign: integer|Long expected"; return null; }; /** * Creates a treasure_sign_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_sign_rsp * @static * @param {Object.} object Plain object * @returns {game.treasure_sign_rsp} treasure_sign_rsp */ treasure_sign_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_sign_rsp) return object; let message = new $root.game.treasure_sign_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.sign != null) if ($util.Long) (message.sign = $util.Long.fromValue(object.sign)).unsigned = false; else if (typeof object.sign === "string") message.sign = parseInt(object.sign, 10); else if (typeof object.sign === "number") message.sign = object.sign; else if (typeof object.sign === "object") message.sign = new $util.LongBits(object.sign.low >>> 0, object.sign.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a treasure_sign_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_sign_rsp * @static * @param {game.treasure_sign_rsp} message treasure_sign_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_sign_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.sign = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.sign = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.sign != null && message.hasOwnProperty("sign")) if (typeof message.sign === "number") object.sign = options.longs === String ? String(message.sign) : message.sign; else object.sign = options.longs === String ? $util.Long.prototype.toString.call(message.sign) : options.longs === Number ? new $util.LongBits(message.sign.low >>> 0, message.sign.high >>> 0).toNumber() : message.sign; return object; }; /** * Converts this treasure_sign_rsp to JSON. * @function toJSON * @memberof game.treasure_sign_rsp * @instance * @returns {Object.} JSON object */ treasure_sign_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_sign_rsp; })(); game.treasure_buy = (function() { /** * Properties of a treasure_buy. * @memberof game * @interface Itreasure_buy */ /** * Constructs a new treasure_buy. * @memberof game * @classdesc Represents a treasure_buy. * @implements Itreasure_buy * @constructor * @param {game.Itreasure_buy=} [properties] Properties to set */ function treasure_buy(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new treasure_buy instance using the specified properties. * @function create * @memberof game.treasure_buy * @static * @param {game.Itreasure_buy=} [properties] Properties to set * @returns {game.treasure_buy} treasure_buy instance */ treasure_buy.create = function create(properties) { return new treasure_buy(properties); }; /** * Encodes the specified treasure_buy message. Does not implicitly {@link game.treasure_buy.verify|verify} messages. * @function encode * @memberof game.treasure_buy * @static * @param {game.Itreasure_buy} message treasure_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_buy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified treasure_buy message, length delimited. Does not implicitly {@link game.treasure_buy.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_buy * @static * @param {game.Itreasure_buy} message treasure_buy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_buy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_buy message from the specified reader or buffer. * @function decode * @memberof game.treasure_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_buy} treasure_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_buy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_buy(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_buy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_buy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_buy} treasure_buy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_buy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_buy message. * @function verify * @memberof game.treasure_buy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_buy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a treasure_buy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_buy * @static * @param {Object.} object Plain object * @returns {game.treasure_buy} treasure_buy */ treasure_buy.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_buy) return object; return new $root.game.treasure_buy(); }; /** * Creates a plain object from a treasure_buy message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_buy * @static * @param {game.treasure_buy} message treasure_buy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_buy.toObject = function toObject() { return {}; }; /** * Converts this treasure_buy to JSON. * @function toJSON * @memberof game.treasure_buy * @instance * @returns {Object.} JSON object */ treasure_buy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_buy; })(); game.treasure_buy_rsp = (function() { /** * Properties of a treasure_buy_rsp. * @memberof game * @interface Itreasure_buy_rsp * @property {number|Long|null} [errno] treasure_buy_rsp errno * @property {number|Long|null} [buy] treasure_buy_rsp buy */ /** * Constructs a new treasure_buy_rsp. * @memberof game * @classdesc Represents a treasure_buy_rsp. * @implements Itreasure_buy_rsp * @constructor * @param {game.Itreasure_buy_rsp=} [properties] Properties to set */ function treasure_buy_rsp(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * treasure_buy_rsp errno. * @member {number|Long} errno * @memberof game.treasure_buy_rsp * @instance */ treasure_buy_rsp.prototype.errno = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * treasure_buy_rsp buy. * @member {number|Long} buy * @memberof game.treasure_buy_rsp * @instance */ treasure_buy_rsp.prototype.buy = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new treasure_buy_rsp instance using the specified properties. * @function create * @memberof game.treasure_buy_rsp * @static * @param {game.Itreasure_buy_rsp=} [properties] Properties to set * @returns {game.treasure_buy_rsp} treasure_buy_rsp instance */ treasure_buy_rsp.create = function create(properties) { return new treasure_buy_rsp(properties); }; /** * Encodes the specified treasure_buy_rsp message. Does not implicitly {@link game.treasure_buy_rsp.verify|verify} messages. * @function encode * @memberof game.treasure_buy_rsp * @static * @param {game.Itreasure_buy_rsp} message treasure_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_buy_rsp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errno != null && Object.hasOwnProperty.call(message, "errno")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.errno); if (message.buy != null && Object.hasOwnProperty.call(message, "buy")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.buy); return writer; }; /** * Encodes the specified treasure_buy_rsp message, length delimited. Does not implicitly {@link game.treasure_buy_rsp.verify|verify} messages. * @function encodeDelimited * @memberof game.treasure_buy_rsp * @static * @param {game.Itreasure_buy_rsp} message treasure_buy_rsp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ treasure_buy_rsp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a treasure_buy_rsp message from the specified reader or buffer. * @function decode * @memberof game.treasure_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.treasure_buy_rsp} treasure_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_buy_rsp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.treasure_buy_rsp(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.errno = reader.int64(); break; case 2: message.buy = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a treasure_buy_rsp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.treasure_buy_rsp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.treasure_buy_rsp} treasure_buy_rsp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ treasure_buy_rsp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a treasure_buy_rsp message. * @function verify * @memberof game.treasure_buy_rsp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ treasure_buy_rsp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.errno != null && message.hasOwnProperty("errno")) if (!$util.isInteger(message.errno) && !(message.errno && $util.isInteger(message.errno.low) && $util.isInteger(message.errno.high))) return "errno: integer|Long expected"; if (message.buy != null && message.hasOwnProperty("buy")) if (!$util.isInteger(message.buy) && !(message.buy && $util.isInteger(message.buy.low) && $util.isInteger(message.buy.high))) return "buy: integer|Long expected"; return null; }; /** * Creates a treasure_buy_rsp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.treasure_buy_rsp * @static * @param {Object.} object Plain object * @returns {game.treasure_buy_rsp} treasure_buy_rsp */ treasure_buy_rsp.fromObject = function fromObject(object) { if (object instanceof $root.game.treasure_buy_rsp) return object; let message = new $root.game.treasure_buy_rsp(); if (object.errno != null) if ($util.Long) (message.errno = $util.Long.fromValue(object.errno)).unsigned = false; else if (typeof object.errno === "string") message.errno = parseInt(object.errno, 10); else if (typeof object.errno === "number") message.errno = object.errno; else if (typeof object.errno === "object") message.errno = new $util.LongBits(object.errno.low >>> 0, object.errno.high >>> 0).toNumber(); if (object.buy != null) if ($util.Long) (message.buy = $util.Long.fromValue(object.buy)).unsigned = false; else if (typeof object.buy === "string") message.buy = parseInt(object.buy, 10); else if (typeof object.buy === "number") message.buy = object.buy; else if (typeof object.buy === "object") message.buy = new $util.LongBits(object.buy.low >>> 0, object.buy.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a treasure_buy_rsp message. Also converts values to other types if specified. * @function toObject * @memberof game.treasure_buy_rsp * @static * @param {game.treasure_buy_rsp} message treasure_buy_rsp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ treasure_buy_rsp.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.errno = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.errno = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.buy = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.buy = options.longs === String ? "0" : 0; } if (message.errno != null && message.hasOwnProperty("errno")) if (typeof message.errno === "number") object.errno = options.longs === String ? String(message.errno) : message.errno; else object.errno = options.longs === String ? $util.Long.prototype.toString.call(message.errno) : options.longs === Number ? new $util.LongBits(message.errno.low >>> 0, message.errno.high >>> 0).toNumber() : message.errno; if (message.buy != null && message.hasOwnProperty("buy")) if (typeof message.buy === "number") object.buy = options.longs === String ? String(message.buy) : message.buy; else object.buy = options.longs === String ? $util.Long.prototype.toString.call(message.buy) : options.longs === Number ? new $util.LongBits(message.buy.low >>> 0, message.buy.high >>> 0).toNumber() : message.buy; return object; }; /** * Converts this treasure_buy_rsp to JSON. * @function toJSON * @memberof game.treasure_buy_rsp * @instance * @returns {Object.} JSON object */ treasure_buy_rsp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return treasure_buy_rsp; })(); game.id_num = (function() { /** * Properties of an id_num. * @memberof game * @interface Iid_num * @property {number|Long|null} [id] id_num id * @property {number|Long|null} [num] id_num num */ /** * Constructs a new id_num. * @memberof game * @classdesc Represents an id_num. * @implements Iid_num * @constructor * @param {game.Iid_num=} [properties] Properties to set */ function id_num(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * id_num id. * @member {number|Long} id * @memberof game.id_num * @instance */ id_num.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * id_num num. * @member {number|Long} num * @memberof game.id_num * @instance */ id_num.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new id_num instance using the specified properties. * @function create * @memberof game.id_num * @static * @param {game.Iid_num=} [properties] Properties to set * @returns {game.id_num} id_num instance */ id_num.create = function create(properties) { return new id_num(properties); }; /** * Encodes the specified id_num message. Does not implicitly {@link game.id_num.verify|verify} messages. * @function encode * @memberof game.id_num * @static * @param {game.Iid_num} message id_num message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ id_num.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); return writer; }; /** * Encodes the specified id_num message, length delimited. Does not implicitly {@link game.id_num.verify|verify} messages. * @function encodeDelimited * @memberof game.id_num * @static * @param {game.Iid_num} message id_num message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ id_num.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an id_num message from the specified reader or buffer. * @function decode * @memberof game.id_num * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.id_num} id_num * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ id_num.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.id_num(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an id_num message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.id_num * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.id_num} id_num * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ id_num.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an id_num message. * @function verify * @memberof game.id_num * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ id_num.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.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates an id_num message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.id_num * @static * @param {Object.} object Plain object * @returns {game.id_num} id_num */ id_num.fromObject = function fromObject(object) { if (object instanceof $root.game.id_num) return object; let message = new $root.game.id_num(); 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.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an id_num message. Also converts values to other types if specified. * @function toObject * @memberof game.id_num * @static * @param {game.id_num} message id_num * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ id_num.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 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.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this id_num to JSON. * @function toJSON * @memberof game.id_num * @instance * @returns {Object.} JSON object */ id_num.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return id_num; })(); game.sid_pos = (function() { /** * Properties of a sid_pos. * @memberof game * @interface Isid_pos * @property {string|null} [sid] sid_pos sid * @property {number|Long|null} [pos] sid_pos pos */ /** * Constructs a new sid_pos. * @memberof game * @classdesc Represents a sid_pos. * @implements Isid_pos * @constructor * @param {game.Isid_pos=} [properties] Properties to set */ function sid_pos(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * sid_pos sid. * @member {string} sid * @memberof game.sid_pos * @instance */ sid_pos.prototype.sid = ""; /** * sid_pos pos. * @member {number|Long} pos * @memberof game.sid_pos * @instance */ sid_pos.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new sid_pos instance using the specified properties. * @function create * @memberof game.sid_pos * @static * @param {game.Isid_pos=} [properties] Properties to set * @returns {game.sid_pos} sid_pos instance */ sid_pos.create = function create(properties) { return new sid_pos(properties); }; /** * Encodes the specified sid_pos message. Does not implicitly {@link game.sid_pos.verify|verify} messages. * @function encode * @memberof game.sid_pos * @static * @param {game.Isid_pos} message sid_pos message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sid_pos.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pos); return writer; }; /** * Encodes the specified sid_pos message, length delimited. Does not implicitly {@link game.sid_pos.verify|verify} messages. * @function encodeDelimited * @memberof game.sid_pos * @static * @param {game.Isid_pos} message sid_pos message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ sid_pos.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a sid_pos message from the specified reader or buffer. * @function decode * @memberof game.sid_pos * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.sid_pos} sid_pos * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sid_pos.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.sid_pos(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.pos = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a sid_pos message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.sid_pos * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.sid_pos} sid_pos * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ sid_pos.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a sid_pos message. * @function verify * @memberof game.sid_pos * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ sid_pos.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high))) return "pos: integer|Long expected"; return null; }; /** * Creates a sid_pos message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.sid_pos * @static * @param {Object.} object Plain object * @returns {game.sid_pos} sid_pos */ sid_pos.fromObject = function fromObject(object) { if (object instanceof $root.game.sid_pos) return object; let message = new $root.game.sid_pos(); if (object.sid != null) message.sid = String(object.sid); if (object.pos != null) if ($util.Long) (message.pos = $util.Long.fromValue(object.pos)).unsigned = false; else if (typeof object.pos === "string") message.pos = parseInt(object.pos, 10); else if (typeof object.pos === "number") message.pos = object.pos; else if (typeof object.pos === "object") message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a sid_pos message. Also converts values to other types if specified. * @function toObject * @memberof game.sid_pos * @static * @param {game.sid_pos} message sid_pos * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ sid_pos.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.pos = options.longs === String ? "0" : 0; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.pos != null && message.hasOwnProperty("pos")) if (typeof message.pos === "number") object.pos = options.longs === String ? String(message.pos) : message.pos; else object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber() : message.pos; return object; }; /** * Converts this sid_pos to JSON. * @function toJSON * @memberof game.sid_pos * @instance * @returns {Object.} JSON object */ sid_pos.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return sid_pos; })(); game.hero = (function() { /** * Properties of a hero. * @memberof game * @interface Ihero * @property {string|null} [sid] hero sid * @property {number|Long|null} [id] hero id * @property {number|Long|null} [lv] hero lv * @property {Array.|null} [equip] hero equip */ /** * Constructs a new hero. * @memberof game * @classdesc Represents a hero. * @implements Ihero * @constructor * @param {game.Ihero=} [properties] Properties to set */ function hero(properties) { this.equip = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero sid. * @member {string} sid * @memberof game.hero * @instance */ hero.prototype.sid = ""; /** * hero id. * @member {number|Long} id * @memberof game.hero * @instance */ hero.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero lv. * @member {number|Long} lv * @memberof game.hero * @instance */ hero.prototype.lv = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero equip. * @member {Array.} equip * @memberof game.hero * @instance */ hero.prototype.equip = $util.emptyArray; /** * Creates a new hero instance using the specified properties. * @function create * @memberof game.hero * @static * @param {game.Ihero=} [properties] Properties to set * @returns {game.hero} hero instance */ hero.create = function create(properties) { return new hero(properties); }; /** * Encodes the specified hero message. Does not implicitly {@link game.hero.verify|verify} messages. * @function encode * @memberof game.hero * @static * @param {game.Ihero} message hero message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); if (message.lv != null && Object.hasOwnProperty.call(message, "lv")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lv); if (message.equip != null && message.equip.length) for (let i = 0; i < message.equip.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.equip[i]); return writer; }; /** * Encodes the specified hero message, length delimited. Does not implicitly {@link game.hero.verify|verify} messages. * @function encodeDelimited * @memberof game.hero * @static * @param {game.Ihero} message hero message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero message from the specified reader or buffer. * @function decode * @memberof game.hero * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero} hero * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.id = reader.int64(); break; case 3: message.lv = reader.int64(); break; case 4: if (!(message.equip && message.equip.length)) message.equip = []; message.equip.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero} hero * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero message. * @function verify * @memberof game.hero * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string 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.lv != null && message.hasOwnProperty("lv")) if (!$util.isInteger(message.lv) && !(message.lv && $util.isInteger(message.lv.low) && $util.isInteger(message.lv.high))) return "lv: integer|Long expected"; if (message.equip != null && message.hasOwnProperty("equip")) { if (!Array.isArray(message.equip)) return "equip: array expected"; for (let i = 0; i < message.equip.length; ++i) if (!$util.isString(message.equip[i])) return "equip: string[] expected"; } return null; }; /** * Creates a hero message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero * @static * @param {Object.} object Plain object * @returns {game.hero} hero */ hero.fromObject = function fromObject(object) { if (object instanceof $root.game.hero) return object; let message = new $root.game.hero(); if (object.sid != null) message.sid = String(object.sid); 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.lv != null) if ($util.Long) (message.lv = $util.Long.fromValue(object.lv)).unsigned = false; else if (typeof object.lv === "string") message.lv = parseInt(object.lv, 10); else if (typeof object.lv === "number") message.lv = object.lv; else if (typeof object.lv === "object") message.lv = new $util.LongBits(object.lv.low >>> 0, object.lv.high >>> 0).toNumber(); if (object.equip) { if (!Array.isArray(object.equip)) throw TypeError(".game.hero.equip: array expected"); message.equip = []; for (let i = 0; i < object.equip.length; ++i) message.equip[i] = String(object.equip[i]); } return message; }; /** * Creates a plain object from a hero message. Also converts values to other types if specified. * @function toObject * @memberof game.hero * @static * @param {game.hero} message hero * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.equip = []; if (options.defaults) { object.sid = ""; if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.lv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.lv = options.longs === String ? "0" : 0; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; 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.lv != null && message.hasOwnProperty("lv")) if (typeof message.lv === "number") object.lv = options.longs === String ? String(message.lv) : message.lv; else object.lv = options.longs === String ? $util.Long.prototype.toString.call(message.lv) : options.longs === Number ? new $util.LongBits(message.lv.low >>> 0, message.lv.high >>> 0).toNumber() : message.lv; if (message.equip && message.equip.length) { object.equip = []; for (let j = 0; j < message.equip.length; ++j) object.equip[j] = message.equip[j]; } return object; }; /** * Converts this hero to JSON. * @function toJSON * @memberof game.hero * @instance * @returns {Object.} JSON object */ hero.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero; })(); game.card = (function() { /** * Properties of a card. * @memberof game * @interface Icard * @property {string|null} [sid] card sid * @property {number|Long|null} [id] card id * @property {number|Long|null} [lv] card lv */ /** * Constructs a new card. * @memberof game * @classdesc Represents a card. * @implements Icard * @constructor * @param {game.Icard=} [properties] Properties to set */ function card(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * card sid. * @member {string} sid * @memberof game.card * @instance */ card.prototype.sid = ""; /** * card id. * @member {number|Long} id * @memberof game.card * @instance */ card.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * card lv. * @member {number|Long} lv * @memberof game.card * @instance */ card.prototype.lv = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new card instance using the specified properties. * @function create * @memberof game.card * @static * @param {game.Icard=} [properties] Properties to set * @returns {game.card} card instance */ card.create = function create(properties) { return new card(properties); }; /** * Encodes the specified card message. Does not implicitly {@link game.card.verify|verify} messages. * @function encode * @memberof game.card * @static * @param {game.Icard} message card message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ card.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); if (message.lv != null && Object.hasOwnProperty.call(message, "lv")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lv); return writer; }; /** * Encodes the specified card message, length delimited. Does not implicitly {@link game.card.verify|verify} messages. * @function encodeDelimited * @memberof game.card * @static * @param {game.Icard} message card message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ card.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a card message from the specified reader or buffer. * @function decode * @memberof game.card * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.card} card * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ card.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.card(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.id = reader.int64(); break; case 3: message.lv = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a card message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.card * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.card} card * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ card.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a card message. * @function verify * @memberof game.card * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ card.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string 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.lv != null && message.hasOwnProperty("lv")) if (!$util.isInteger(message.lv) && !(message.lv && $util.isInteger(message.lv.low) && $util.isInteger(message.lv.high))) return "lv: integer|Long expected"; return null; }; /** * Creates a card message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.card * @static * @param {Object.} object Plain object * @returns {game.card} card */ card.fromObject = function fromObject(object) { if (object instanceof $root.game.card) return object; let message = new $root.game.card(); if (object.sid != null) message.sid = String(object.sid); 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.lv != null) if ($util.Long) (message.lv = $util.Long.fromValue(object.lv)).unsigned = false; else if (typeof object.lv === "string") message.lv = parseInt(object.lv, 10); else if (typeof object.lv === "number") message.lv = object.lv; else if (typeof object.lv === "object") message.lv = new $util.LongBits(object.lv.low >>> 0, object.lv.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a card message. Also converts values to other types if specified. * @function toObject * @memberof game.card * @static * @param {game.card} message card * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ card.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.lv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.lv = options.longs === String ? "0" : 0; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; 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.lv != null && message.hasOwnProperty("lv")) if (typeof message.lv === "number") object.lv = options.longs === String ? String(message.lv) : message.lv; else object.lv = options.longs === String ? $util.Long.prototype.toString.call(message.lv) : options.longs === Number ? new $util.LongBits(message.lv.low >>> 0, message.lv.high >>> 0).toNumber() : message.lv; return object; }; /** * Converts this card to JSON. * @function toJSON * @memberof game.card * @instance * @returns {Object.} JSON object */ card.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return card; })(); game.equip = (function() { /** * Properties of an equip. * @memberof game * @interface Iequip * @property {string|null} [sid] equip sid * @property {number|Long|null} [id] equip id * @property {number|Long|null} [lv] equip lv * @property {string|null} [hero] equip hero */ /** * Constructs a new equip. * @memberof game * @classdesc Represents an equip. * @implements Iequip * @constructor * @param {game.Iequip=} [properties] Properties to set */ function equip(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * equip sid. * @member {string} sid * @memberof game.equip * @instance */ equip.prototype.sid = ""; /** * equip id. * @member {number|Long} id * @memberof game.equip * @instance */ equip.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip lv. * @member {number|Long} lv * @memberof game.equip * @instance */ equip.prototype.lv = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * equip hero. * @member {string} hero * @memberof game.equip * @instance */ equip.prototype.hero = ""; /** * Creates a new equip instance using the specified properties. * @function create * @memberof game.equip * @static * @param {game.Iequip=} [properties] Properties to set * @returns {game.equip} equip instance */ equip.create = function create(properties) { return new equip(properties); }; /** * Encodes the specified equip message. Does not implicitly {@link game.equip.verify|verify} messages. * @function encode * @memberof game.equip * @static * @param {game.Iequip} message equip message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sid); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); if (message.lv != null && Object.hasOwnProperty.call(message, "lv")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lv); if (message.hero != null && Object.hasOwnProperty.call(message, "hero")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.hero); return writer; }; /** * Encodes the specified equip message, length delimited. Does not implicitly {@link game.equip.verify|verify} messages. * @function encodeDelimited * @memberof game.equip * @static * @param {game.Iequip} message equip message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ equip.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an equip message from the specified reader or buffer. * @function decode * @memberof game.equip * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.equip} equip * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.equip(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.sid = reader.string(); break; case 2: message.id = reader.int64(); break; case 3: message.lv = reader.int64(); break; case 4: message.hero = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an equip message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.equip * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.equip} equip * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ equip.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an equip message. * @function verify * @memberof game.equip * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ equip.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string 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.lv != null && message.hasOwnProperty("lv")) if (!$util.isInteger(message.lv) && !(message.lv && $util.isInteger(message.lv.low) && $util.isInteger(message.lv.high))) return "lv: integer|Long expected"; if (message.hero != null && message.hasOwnProperty("hero")) if (!$util.isString(message.hero)) return "hero: string expected"; return null; }; /** * Creates an equip message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.equip * @static * @param {Object.} object Plain object * @returns {game.equip} equip */ equip.fromObject = function fromObject(object) { if (object instanceof $root.game.equip) return object; let message = new $root.game.equip(); if (object.sid != null) message.sid = String(object.sid); 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.lv != null) if ($util.Long) (message.lv = $util.Long.fromValue(object.lv)).unsigned = false; else if (typeof object.lv === "string") message.lv = parseInt(object.lv, 10); else if (typeof object.lv === "number") message.lv = object.lv; else if (typeof object.lv === "object") message.lv = new $util.LongBits(object.lv.low >>> 0, object.lv.high >>> 0).toNumber(); if (object.hero != null) message.hero = String(object.hero); return message; }; /** * Creates a plain object from an equip message. Also converts values to other types if specified. * @function toObject * @memberof game.equip * @static * @param {game.equip} message equip * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ equip.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.lv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.lv = options.longs === String ? "0" : 0; object.hero = ""; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; 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.lv != null && message.hasOwnProperty("lv")) if (typeof message.lv === "number") object.lv = options.longs === String ? String(message.lv) : message.lv; else object.lv = options.longs === String ? $util.Long.prototype.toString.call(message.lv) : options.longs === Number ? new $util.LongBits(message.lv.low >>> 0, message.lv.high >>> 0).toNumber() : message.lv; if (message.hero != null && message.hasOwnProperty("hero")) object.hero = message.hero; return object; }; /** * Converts this equip to JSON. * @function toJSON * @memberof game.equip * @instance * @returns {Object.} JSON object */ equip.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return equip; })(); game.reward = (function() { /** * Properties of a reward. * @memberof game * @interface Ireward * @property {Array.|null} [currency] reward currency * @property {Array.|null} [heroes] reward heroes * @property {Array.|null} [skillCard] reward skillCard * @property {Array.|null} [debris] reward debris * @property {Array.|null} [equip] reward equip */ /** * Constructs a new reward. * @memberof game * @classdesc Represents a reward. * @implements Ireward * @constructor * @param {game.Ireward=} [properties] Properties to set */ function reward(properties) { this.currency = []; this.heroes = []; this.skillCard = []; this.debris = []; this.equip = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * reward currency. * @member {Array.} currency * @memberof game.reward * @instance */ reward.prototype.currency = $util.emptyArray; /** * reward heroes. * @member {Array.} heroes * @memberof game.reward * @instance */ reward.prototype.heroes = $util.emptyArray; /** * reward skillCard. * @member {Array.} skillCard * @memberof game.reward * @instance */ reward.prototype.skillCard = $util.emptyArray; /** * reward debris. * @member {Array.} debris * @memberof game.reward * @instance */ reward.prototype.debris = $util.emptyArray; /** * reward equip. * @member {Array.} equip * @memberof game.reward * @instance */ reward.prototype.equip = $util.emptyArray; /** * Creates a new reward instance using the specified properties. * @function create * @memberof game.reward * @static * @param {game.Ireward=} [properties] Properties to set * @returns {game.reward} reward instance */ reward.create = function create(properties) { return new reward(properties); }; /** * Encodes the specified reward message. Does not implicitly {@link game.reward.verify|verify} messages. * @function encode * @memberof game.reward * @static * @param {game.Ireward} message reward message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ reward.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.currency != null && message.currency.length) for (let i = 0; i < message.currency.length; ++i) $root.game.id_num.encode(message.currency[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.heroes != null && message.heroes.length) for (let i = 0; i < message.heroes.length; ++i) $root.game.hero.encode(message.heroes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.skillCard != null && message.skillCard.length) for (let i = 0; i < message.skillCard.length; ++i) $root.game.card.encode(message.skillCard[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.debris != null && message.debris.length) for (let i = 0; i < message.debris.length; ++i) $root.game.id_num.encode(message.debris[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.equip != null && message.equip.length) for (let i = 0; i < message.equip.length; ++i) $root.game.equip.encode(message.equip[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** * Encodes the specified reward message, length delimited. Does not implicitly {@link game.reward.verify|verify} messages. * @function encodeDelimited * @memberof game.reward * @static * @param {game.Ireward} message reward message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ reward.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a reward message from the specified reader or buffer. * @function decode * @memberof game.reward * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.reward} reward * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ reward.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.reward(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.currency && message.currency.length)) message.currency = []; message.currency.push($root.game.id_num.decode(reader, reader.uint32())); break; case 2: if (!(message.heroes && message.heroes.length)) message.heroes = []; message.heroes.push($root.game.hero.decode(reader, reader.uint32())); break; case 3: if (!(message.skillCard && message.skillCard.length)) message.skillCard = []; message.skillCard.push($root.game.card.decode(reader, reader.uint32())); break; case 4: if (!(message.debris && message.debris.length)) message.debris = []; message.debris.push($root.game.id_num.decode(reader, reader.uint32())); break; case 5: if (!(message.equip && message.equip.length)) message.equip = []; message.equip.push($root.game.equip.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a reward message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.reward * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.reward} reward * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ reward.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a reward message. * @function verify * @memberof game.reward * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ reward.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.currency != null && message.hasOwnProperty("currency")) { if (!Array.isArray(message.currency)) return "currency: array expected"; for (let i = 0; i < message.currency.length; ++i) { let error = $root.game.id_num.verify(message.currency[i]); if (error) return "currency." + error; } } if (message.heroes != null && message.hasOwnProperty("heroes")) { if (!Array.isArray(message.heroes)) return "heroes: array expected"; for (let i = 0; i < message.heroes.length; ++i) { let error = $root.game.hero.verify(message.heroes[i]); if (error) return "heroes." + error; } } if (message.skillCard != null && message.hasOwnProperty("skillCard")) { if (!Array.isArray(message.skillCard)) return "skillCard: array expected"; for (let i = 0; i < message.skillCard.length; ++i) { let error = $root.game.card.verify(message.skillCard[i]); if (error) return "skillCard." + error; } } if (message.debris != null && message.hasOwnProperty("debris")) { if (!Array.isArray(message.debris)) return "debris: array expected"; for (let i = 0; i < message.debris.length; ++i) { let error = $root.game.id_num.verify(message.debris[i]); if (error) return "debris." + error; } } if (message.equip != null && message.hasOwnProperty("equip")) { if (!Array.isArray(message.equip)) return "equip: array expected"; for (let i = 0; i < message.equip.length; ++i) { let error = $root.game.equip.verify(message.equip[i]); if (error) return "equip." + error; } } return null; }; /** * Creates a reward message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.reward * @static * @param {Object.} object Plain object * @returns {game.reward} reward */ reward.fromObject = function fromObject(object) { if (object instanceof $root.game.reward) return object; let message = new $root.game.reward(); if (object.currency) { if (!Array.isArray(object.currency)) throw TypeError(".game.reward.currency: array expected"); message.currency = []; for (let i = 0; i < object.currency.length; ++i) { if (typeof object.currency[i] !== "object") throw TypeError(".game.reward.currency: object expected"); message.currency[i] = $root.game.id_num.fromObject(object.currency[i]); } } if (object.heroes) { if (!Array.isArray(object.heroes)) throw TypeError(".game.reward.heroes: array expected"); message.heroes = []; for (let i = 0; i < object.heroes.length; ++i) { if (typeof object.heroes[i] !== "object") throw TypeError(".game.reward.heroes: object expected"); message.heroes[i] = $root.game.hero.fromObject(object.heroes[i]); } } if (object.skillCard) { if (!Array.isArray(object.skillCard)) throw TypeError(".game.reward.skillCard: array expected"); message.skillCard = []; for (let i = 0; i < object.skillCard.length; ++i) { if (typeof object.skillCard[i] !== "object") throw TypeError(".game.reward.skillCard: object expected"); message.skillCard[i] = $root.game.card.fromObject(object.skillCard[i]); } } if (object.debris) { if (!Array.isArray(object.debris)) throw TypeError(".game.reward.debris: array expected"); message.debris = []; for (let i = 0; i < object.debris.length; ++i) { if (typeof object.debris[i] !== "object") throw TypeError(".game.reward.debris: object expected"); message.debris[i] = $root.game.id_num.fromObject(object.debris[i]); } } if (object.equip) { if (!Array.isArray(object.equip)) throw TypeError(".game.reward.equip: array expected"); message.equip = []; for (let i = 0; i < object.equip.length; ++i) { if (typeof object.equip[i] !== "object") throw TypeError(".game.reward.equip: object expected"); message.equip[i] = $root.game.equip.fromObject(object.equip[i]); } } return message; }; /** * Creates a plain object from a reward message. Also converts values to other types if specified. * @function toObject * @memberof game.reward * @static * @param {game.reward} message reward * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ reward.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.currency = []; object.heroes = []; object.skillCard = []; object.debris = []; object.equip = []; } if (message.currency && message.currency.length) { object.currency = []; for (let j = 0; j < message.currency.length; ++j) object.currency[j] = $root.game.id_num.toObject(message.currency[j], options); } if (message.heroes && message.heroes.length) { object.heroes = []; for (let j = 0; j < message.heroes.length; ++j) object.heroes[j] = $root.game.hero.toObject(message.heroes[j], options); } if (message.skillCard && message.skillCard.length) { object.skillCard = []; for (let j = 0; j < message.skillCard.length; ++j) object.skillCard[j] = $root.game.card.toObject(message.skillCard[j], options); } if (message.debris && message.debris.length) { object.debris = []; for (let j = 0; j < message.debris.length; ++j) object.debris[j] = $root.game.id_num.toObject(message.debris[j], options); } if (message.equip && message.equip.length) { object.equip = []; for (let j = 0; j < message.equip.length; ++j) object.equip[j] = $root.game.equip.toObject(message.equip[j], options); } return object; }; /** * Converts this reward to JSON. * @function toJSON * @memberof game.reward * @instance * @returns {Object.} JSON object */ reward.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return reward; })(); game.building = (function() { /** * Properties of a building. * @memberof game * @interface Ibuilding * @property {number|Long|null} [id] building id * @property {number|Long|null} [level] building level * @property {number|Long|null} [time] building time * @property {Array.|null} [list] building list * @property {boolean|null} [autoExploreOption] building autoExploreOption * @property {number|Long|null} [exploreTime] building exploreTime * @property {number|Long|null} [exploreTimes] building exploreTimes * @property {number|Long|null} [autoExploreTimes] building autoExploreTimes */ /** * Constructs a new building. * @memberof game * @classdesc Represents a building. * @implements Ibuilding * @constructor * @param {game.Ibuilding=} [properties] Properties to set */ function building(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * building id. * @member {number|Long} id * @memberof game.building * @instance */ building.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building level. * @member {number|Long} level * @memberof game.building * @instance */ building.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building time. * @member {number|Long} time * @memberof game.building * @instance */ building.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building list. * @member {Array.} list * @memberof game.building * @instance */ building.prototype.list = $util.emptyArray; /** * building autoExploreOption. * @member {boolean} autoExploreOption * @memberof game.building * @instance */ building.prototype.autoExploreOption = false; /** * building exploreTime. * @member {number|Long} exploreTime * @memberof game.building * @instance */ building.prototype.exploreTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building exploreTimes. * @member {number|Long} exploreTimes * @memberof game.building * @instance */ building.prototype.exploreTimes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * building autoExploreTimes. * @member {number|Long} autoExploreTimes * @memberof game.building * @instance */ building.prototype.autoExploreTimes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new building instance using the specified properties. * @function create * @memberof game.building * @static * @param {game.Ibuilding=} [properties] Properties to set * @returns {game.building} building instance */ building.create = function create(properties) { return new building(properties); }; /** * Encodes the specified building message. Does not implicitly {@link game.building.verify|verify} messages. * @function encode * @memberof game.building * @static * @param {game.Ibuilding} message building message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.level); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.list[i]); if (message.autoExploreOption != null && Object.hasOwnProperty.call(message, "autoExploreOption")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.autoExploreOption); if (message.exploreTime != null && Object.hasOwnProperty.call(message, "exploreTime")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.exploreTime); if (message.exploreTimes != null && Object.hasOwnProperty.call(message, "exploreTimes")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.exploreTimes); if (message.autoExploreTimes != null && Object.hasOwnProperty.call(message, "autoExploreTimes")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.autoExploreTimes); return writer; }; /** * Encodes the specified building message, length delimited. Does not implicitly {@link game.building.verify|verify} messages. * @function encodeDelimited * @memberof game.building * @static * @param {game.Ibuilding} message building message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ building.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a building message from the specified reader or buffer. * @function decode * @memberof game.building * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.building} building * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.building(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.level = reader.int64(); break; case 3: message.time = reader.int64(); break; case 4: if (!(message.list && message.list.length)) message.list = []; message.list.push(reader.string()); break; case 5: message.autoExploreOption = reader.bool(); break; case 6: message.exploreTime = reader.int64(); break; case 7: message.exploreTimes = reader.int64(); break; case 8: message.autoExploreTimes = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a building message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.building * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.building} building * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ building.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a building message. * @function verify * @memberof game.building * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ building.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.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isString(message.list[i])) return "list: string[] expected"; } if (message.autoExploreOption != null && message.hasOwnProperty("autoExploreOption")) if (typeof message.autoExploreOption !== "boolean") return "autoExploreOption: boolean expected"; if (message.exploreTime != null && message.hasOwnProperty("exploreTime")) if (!$util.isInteger(message.exploreTime) && !(message.exploreTime && $util.isInteger(message.exploreTime.low) && $util.isInteger(message.exploreTime.high))) return "exploreTime: integer|Long expected"; if (message.exploreTimes != null && message.hasOwnProperty("exploreTimes")) if (!$util.isInteger(message.exploreTimes) && !(message.exploreTimes && $util.isInteger(message.exploreTimes.low) && $util.isInteger(message.exploreTimes.high))) return "exploreTimes: integer|Long expected"; if (message.autoExploreTimes != null && message.hasOwnProperty("autoExploreTimes")) if (!$util.isInteger(message.autoExploreTimes) && !(message.autoExploreTimes && $util.isInteger(message.autoExploreTimes.low) && $util.isInteger(message.autoExploreTimes.high))) return "autoExploreTimes: integer|Long expected"; return null; }; /** * Creates a building message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.building * @static * @param {Object.} object Plain object * @returns {game.building} building */ building.fromObject = function fromObject(object) { if (object instanceof $root.game.building) return object; let message = new $root.game.building(); 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.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.building.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) message.list[i] = String(object.list[i]); } if (object.autoExploreOption != null) message.autoExploreOption = Boolean(object.autoExploreOption); if (object.exploreTime != null) if ($util.Long) (message.exploreTime = $util.Long.fromValue(object.exploreTime)).unsigned = false; else if (typeof object.exploreTime === "string") message.exploreTime = parseInt(object.exploreTime, 10); else if (typeof object.exploreTime === "number") message.exploreTime = object.exploreTime; else if (typeof object.exploreTime === "object") message.exploreTime = new $util.LongBits(object.exploreTime.low >>> 0, object.exploreTime.high >>> 0).toNumber(); if (object.exploreTimes != null) if ($util.Long) (message.exploreTimes = $util.Long.fromValue(object.exploreTimes)).unsigned = false; else if (typeof object.exploreTimes === "string") message.exploreTimes = parseInt(object.exploreTimes, 10); else if (typeof object.exploreTimes === "number") message.exploreTimes = object.exploreTimes; else if (typeof object.exploreTimes === "object") message.exploreTimes = new $util.LongBits(object.exploreTimes.low >>> 0, object.exploreTimes.high >>> 0).toNumber(); if (object.autoExploreTimes != null) if ($util.Long) (message.autoExploreTimes = $util.Long.fromValue(object.autoExploreTimes)).unsigned = false; else if (typeof object.autoExploreTimes === "string") message.autoExploreTimes = parseInt(object.autoExploreTimes, 10); else if (typeof object.autoExploreTimes === "number") message.autoExploreTimes = object.autoExploreTimes; else if (typeof object.autoExploreTimes === "object") message.autoExploreTimes = new $util.LongBits(object.autoExploreTimes.low >>> 0, object.autoExploreTimes.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a building message. Also converts values to other types if specified. * @function toObject * @memberof game.building * @static * @param {game.building} message building * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ building.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; object.autoExploreOption = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exploreTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exploreTime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.exploreTimes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.exploreTimes = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.autoExploreTimes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.autoExploreTimes = options.longs === String ? "0" : 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.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = message.list[j]; } if (message.autoExploreOption != null && message.hasOwnProperty("autoExploreOption")) object.autoExploreOption = message.autoExploreOption; if (message.exploreTime != null && message.hasOwnProperty("exploreTime")) if (typeof message.exploreTime === "number") object.exploreTime = options.longs === String ? String(message.exploreTime) : message.exploreTime; else object.exploreTime = options.longs === String ? $util.Long.prototype.toString.call(message.exploreTime) : options.longs === Number ? new $util.LongBits(message.exploreTime.low >>> 0, message.exploreTime.high >>> 0).toNumber() : message.exploreTime; if (message.exploreTimes != null && message.hasOwnProperty("exploreTimes")) if (typeof message.exploreTimes === "number") object.exploreTimes = options.longs === String ? String(message.exploreTimes) : message.exploreTimes; else object.exploreTimes = options.longs === String ? $util.Long.prototype.toString.call(message.exploreTimes) : options.longs === Number ? new $util.LongBits(message.exploreTimes.low >>> 0, message.exploreTimes.high >>> 0).toNumber() : message.exploreTimes; if (message.autoExploreTimes != null && message.hasOwnProperty("autoExploreTimes")) if (typeof message.autoExploreTimes === "number") object.autoExploreTimes = options.longs === String ? String(message.autoExploreTimes) : message.autoExploreTimes; else object.autoExploreTimes = options.longs === String ? $util.Long.prototype.toString.call(message.autoExploreTimes) : options.longs === Number ? new $util.LongBits(message.autoExploreTimes.low >>> 0, message.autoExploreTimes.high >>> 0).toNumber() : message.autoExploreTimes; return object; }; /** * Converts this building to JSON. * @function toJSON * @memberof game.building * @instance * @returns {Object.} JSON object */ building.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return building; })(); game.packageMail = (function() { /** * Properties of a packageMail. * @memberof game * @interface IpackageMail * @property {Array.|null} [currency] packageMail currency */ /** * Constructs a new packageMail. * @memberof game * @classdesc Represents a packageMail. * @implements IpackageMail * @constructor * @param {game.IpackageMail=} [properties] Properties to set */ function packageMail(properties) { this.currency = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * packageMail currency. * @member {Array.} currency * @memberof game.packageMail * @instance */ packageMail.prototype.currency = $util.emptyArray; /** * Creates a new packageMail instance using the specified properties. * @function create * @memberof game.packageMail * @static * @param {game.IpackageMail=} [properties] Properties to set * @returns {game.packageMail} packageMail instance */ packageMail.create = function create(properties) { return new packageMail(properties); }; /** * Encodes the specified packageMail message. Does not implicitly {@link game.packageMail.verify|verify} messages. * @function encode * @memberof game.packageMail * @static * @param {game.IpackageMail} message packageMail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ packageMail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.currency != null && message.currency.length) for (let i = 0; i < message.currency.length; ++i) $root.game.id_num.encode(message.currency[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified packageMail message, length delimited. Does not implicitly {@link game.packageMail.verify|verify} messages. * @function encodeDelimited * @memberof game.packageMail * @static * @param {game.IpackageMail} message packageMail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ packageMail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a packageMail message from the specified reader or buffer. * @function decode * @memberof game.packageMail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.packageMail} packageMail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ packageMail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.packageMail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.currency && message.currency.length)) message.currency = []; message.currency.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a packageMail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.packageMail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.packageMail} packageMail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ packageMail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a packageMail message. * @function verify * @memberof game.packageMail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ packageMail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.currency != null && message.hasOwnProperty("currency")) { if (!Array.isArray(message.currency)) return "currency: array expected"; for (let i = 0; i < message.currency.length; ++i) { let error = $root.game.id_num.verify(message.currency[i]); if (error) return "currency." + error; } } return null; }; /** * Creates a packageMail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.packageMail * @static * @param {Object.} object Plain object * @returns {game.packageMail} packageMail */ packageMail.fromObject = function fromObject(object) { if (object instanceof $root.game.packageMail) return object; let message = new $root.game.packageMail(); if (object.currency) { if (!Array.isArray(object.currency)) throw TypeError(".game.packageMail.currency: array expected"); message.currency = []; for (let i = 0; i < object.currency.length; ++i) { if (typeof object.currency[i] !== "object") throw TypeError(".game.packageMail.currency: object expected"); message.currency[i] = $root.game.id_num.fromObject(object.currency[i]); } } return message; }; /** * Creates a plain object from a packageMail message. Also converts values to other types if specified. * @function toObject * @memberof game.packageMail * @static * @param {game.packageMail} message packageMail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ packageMail.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.currency = []; if (message.currency && message.currency.length) { object.currency = []; for (let j = 0; j < message.currency.length; ++j) object.currency[j] = $root.game.id_num.toObject(message.currency[j], options); } return object; }; /** * Converts this packageMail to JSON. * @function toJSON * @memberof game.packageMail * @instance * @returns {Object.} JSON object */ packageMail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return packageMail; })(); game.mail = (function() { /** * Properties of a mail. * @memberof game * @interface Imail * @property {string|null} [id] mail id * @property {number|Long|null} [date] mail date * @property {number|Long|null} [subject] mail subject * @property {string|null} [body] mail body * @property {Array.|null} [attachment] mail attachment * @property {boolean|null} [attach] mail attach * @property {boolean|null} [read] mail read * @property {boolean|null} [receive] mail receive */ /** * Constructs a new mail. * @memberof game * @classdesc Represents a mail. * @implements Imail * @constructor * @param {game.Imail=} [properties] Properties to set */ function mail(properties) { this.attachment = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * mail id. * @member {string} id * @memberof game.mail * @instance */ mail.prototype.id = ""; /** * mail date. * @member {number|Long} date * @memberof game.mail * @instance */ mail.prototype.date = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * mail subject. * @member {number|Long} subject * @memberof game.mail * @instance */ mail.prototype.subject = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * mail body. * @member {string} body * @memberof game.mail * @instance */ mail.prototype.body = ""; /** * mail attachment. * @member {Array.} attachment * @memberof game.mail * @instance */ mail.prototype.attachment = $util.emptyArray; /** * mail attach. * @member {boolean} attach * @memberof game.mail * @instance */ mail.prototype.attach = false; /** * mail read. * @member {boolean} read * @memberof game.mail * @instance */ mail.prototype.read = false; /** * mail receive. * @member {boolean} receive * @memberof game.mail * @instance */ mail.prototype.receive = false; /** * Creates a new mail instance using the specified properties. * @function create * @memberof game.mail * @static * @param {game.Imail=} [properties] Properties to set * @returns {game.mail} mail instance */ mail.create = function create(properties) { return new mail(properties); }; /** * Encodes the specified mail message. Does not implicitly {@link game.mail.verify|verify} messages. * @function encode * @memberof game.mail * @static * @param {game.Imail} message mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ mail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.date != null && Object.hasOwnProperty.call(message, "date")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.date); if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.subject); if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.body); if (message.attachment != null && message.attachment.length) for (let i = 0; i < message.attachment.length; ++i) $root.game.id_num.encode(message.attachment[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.attach != null && Object.hasOwnProperty.call(message, "attach")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.attach); if (message.read != null && Object.hasOwnProperty.call(message, "read")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.read); if (message.receive != null && Object.hasOwnProperty.call(message, "receive")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.receive); return writer; }; /** * Encodes the specified mail message, length delimited. Does not implicitly {@link game.mail.verify|verify} messages. * @function encodeDelimited * @memberof game.mail * @static * @param {game.Imail} message mail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ mail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a mail message from the specified reader or buffer. * @function decode * @memberof game.mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.mail} mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ mail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.mail(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.string(); break; case 2: message.date = reader.int64(); break; case 3: message.subject = reader.int64(); break; case 4: message.body = reader.string(); break; case 5: if (!(message.attachment && message.attachment.length)) message.attachment = []; message.attachment.push($root.game.id_num.decode(reader, reader.uint32())); break; case 6: message.attach = reader.bool(); break; case 7: message.read = reader.bool(); break; case 8: message.receive = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a mail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.mail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.mail} mail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ mail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a mail message. * @function verify * @memberof game.mail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ mail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; if (message.date != null && message.hasOwnProperty("date")) if (!$util.isInteger(message.date) && !(message.date && $util.isInteger(message.date.low) && $util.isInteger(message.date.high))) return "date: integer|Long expected"; if (message.subject != null && message.hasOwnProperty("subject")) if (!$util.isInteger(message.subject) && !(message.subject && $util.isInteger(message.subject.low) && $util.isInteger(message.subject.high))) return "subject: integer|Long expected"; if (message.body != null && message.hasOwnProperty("body")) if (!$util.isString(message.body)) return "body: string expected"; if (message.attachment != null && message.hasOwnProperty("attachment")) { if (!Array.isArray(message.attachment)) return "attachment: array expected"; for (let i = 0; i < message.attachment.length; ++i) { let error = $root.game.id_num.verify(message.attachment[i]); if (error) return "attachment." + error; } } if (message.attach != null && message.hasOwnProperty("attach")) if (typeof message.attach !== "boolean") return "attach: boolean expected"; if (message.read != null && message.hasOwnProperty("read")) if (typeof message.read !== "boolean") return "read: boolean expected"; if (message.receive != null && message.hasOwnProperty("receive")) if (typeof message.receive !== "boolean") return "receive: boolean expected"; return null; }; /** * Creates a mail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.mail * @static * @param {Object.} object Plain object * @returns {game.mail} mail */ mail.fromObject = function fromObject(object) { if (object instanceof $root.game.mail) return object; let message = new $root.game.mail(); if (object.id != null) message.id = String(object.id); if (object.date != null) if ($util.Long) (message.date = $util.Long.fromValue(object.date)).unsigned = false; else if (typeof object.date === "string") message.date = parseInt(object.date, 10); else if (typeof object.date === "number") message.date = object.date; else if (typeof object.date === "object") message.date = new $util.LongBits(object.date.low >>> 0, object.date.high >>> 0).toNumber(); if (object.subject != null) if ($util.Long) (message.subject = $util.Long.fromValue(object.subject)).unsigned = false; else if (typeof object.subject === "string") message.subject = parseInt(object.subject, 10); else if (typeof object.subject === "number") message.subject = object.subject; else if (typeof object.subject === "object") message.subject = new $util.LongBits(object.subject.low >>> 0, object.subject.high >>> 0).toNumber(); if (object.body != null) message.body = String(object.body); if (object.attachment) { if (!Array.isArray(object.attachment)) throw TypeError(".game.mail.attachment: array expected"); message.attachment = []; for (let i = 0; i < object.attachment.length; ++i) { if (typeof object.attachment[i] !== "object") throw TypeError(".game.mail.attachment: object expected"); message.attachment[i] = $root.game.id_num.fromObject(object.attachment[i]); } } if (object.attach != null) message.attach = Boolean(object.attach); if (object.read != null) message.read = Boolean(object.read); if (object.receive != null) message.receive = Boolean(object.receive); return message; }; /** * Creates a plain object from a mail message. Also converts values to other types if specified. * @function toObject * @memberof game.mail * @static * @param {game.mail} message mail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ mail.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.attachment = []; if (options.defaults) { object.id = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.date = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.date = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.subject = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.subject = options.longs === String ? "0" : 0; object.body = ""; object.attach = false; object.read = false; object.receive = false; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.date != null && message.hasOwnProperty("date")) if (typeof message.date === "number") object.date = options.longs === String ? String(message.date) : message.date; else object.date = options.longs === String ? $util.Long.prototype.toString.call(message.date) : options.longs === Number ? new $util.LongBits(message.date.low >>> 0, message.date.high >>> 0).toNumber() : message.date; if (message.subject != null && message.hasOwnProperty("subject")) if (typeof message.subject === "number") object.subject = options.longs === String ? String(message.subject) : message.subject; else object.subject = options.longs === String ? $util.Long.prototype.toString.call(message.subject) : options.longs === Number ? new $util.LongBits(message.subject.low >>> 0, message.subject.high >>> 0).toNumber() : message.subject; if (message.body != null && message.hasOwnProperty("body")) object.body = message.body; if (message.attachment && message.attachment.length) { object.attachment = []; for (let j = 0; j < message.attachment.length; ++j) object.attachment[j] = $root.game.id_num.toObject(message.attachment[j], options); } if (message.attach != null && message.hasOwnProperty("attach")) object.attach = message.attach; if (message.read != null && message.hasOwnProperty("read")) object.read = message.read; if (message.receive != null && message.hasOwnProperty("receive")) object.receive = message.receive; return object; }; /** * Converts this mail to JSON. * @function toJSON * @memberof game.mail * @instance * @returns {Object.} JSON object */ mail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return mail; })(); game.quest = (function() { /** * Properties of a quest. * @memberof game * @interface Iquest * @property {number|Long|null} [id] quest id * @property {number|Long|null} [progress] quest progress * @property {number|Long|null} [state] quest state */ /** * Constructs a new quest. * @memberof game * @classdesc Represents a quest. * @implements Iquest * @constructor * @param {game.Iquest=} [properties] Properties to set */ function quest(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * quest id. * @member {number|Long} id * @memberof game.quest * @instance */ quest.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest progress. * @member {number|Long} progress * @memberof game.quest * @instance */ quest.prototype.progress = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * quest state. * @member {number|Long} state * @memberof game.quest * @instance */ quest.prototype.state = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new quest instance using the specified properties. * @function create * @memberof game.quest * @static * @param {game.Iquest=} [properties] Properties to set * @returns {game.quest} quest instance */ quest.create = function create(properties) { return new quest(properties); }; /** * Encodes the specified quest message. Does not implicitly {@link game.quest.verify|verify} messages. * @function encode * @memberof game.quest * @static * @param {game.Iquest} message quest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.progress); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.state); return writer; }; /** * Encodes the specified quest message, length delimited. Does not implicitly {@link game.quest.verify|verify} messages. * @function encodeDelimited * @memberof game.quest * @static * @param {game.Iquest} message quest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ quest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a quest message from the specified reader or buffer. * @function decode * @memberof game.quest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.quest} quest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.quest(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.progress = reader.int64(); break; case 3: message.state = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a quest message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.quest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.quest} quest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ quest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a quest message. * @function verify * @memberof game.quest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ quest.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.progress != null && message.hasOwnProperty("progress")) if (!$util.isInteger(message.progress) && !(message.progress && $util.isInteger(message.progress.low) && $util.isInteger(message.progress.high))) return "progress: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state) && !(message.state && $util.isInteger(message.state.low) && $util.isInteger(message.state.high))) return "state: integer|Long expected"; return null; }; /** * Creates a quest message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.quest * @static * @param {Object.} object Plain object * @returns {game.quest} quest */ quest.fromObject = function fromObject(object) { if (object instanceof $root.game.quest) return object; let message = new $root.game.quest(); 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.progress != null) if ($util.Long) (message.progress = $util.Long.fromValue(object.progress)).unsigned = false; else if (typeof object.progress === "string") message.progress = parseInt(object.progress, 10); else if (typeof object.progress === "number") message.progress = object.progress; else if (typeof object.progress === "object") message.progress = new $util.LongBits(object.progress.low >>> 0, object.progress.high >>> 0).toNumber(); if (object.state != null) if ($util.Long) (message.state = $util.Long.fromValue(object.state)).unsigned = false; else if (typeof object.state === "string") message.state = parseInt(object.state, 10); else if (typeof object.state === "number") message.state = object.state; else if (typeof object.state === "object") message.state = new $util.LongBits(object.state.low >>> 0, object.state.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a quest message. Also converts values to other types if specified. * @function toObject * @memberof game.quest * @static * @param {game.quest} message quest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ quest.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.progress = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.progress = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.state = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.state = options.longs === String ? "0" : 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.progress != null && message.hasOwnProperty("progress")) if (typeof message.progress === "number") object.progress = options.longs === String ? String(message.progress) : message.progress; else object.progress = options.longs === String ? $util.Long.prototype.toString.call(message.progress) : options.longs === Number ? new $util.LongBits(message.progress.low >>> 0, message.progress.high >>> 0).toNumber() : message.progress; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state === "number") object.state = options.longs === String ? String(message.state) : message.state; else object.state = options.longs === String ? $util.Long.prototype.toString.call(message.state) : options.longs === Number ? new $util.LongBits(message.state.low >>> 0, message.state.high >>> 0).toNumber() : message.state; return object; }; /** * Converts this quest to JSON. * @function toJSON * @memberof game.quest * @instance * @returns {Object.} JSON object */ quest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return quest; })(); game.manual = (function() { /** * Properties of a manual. * @memberof game * @interface Imanual * @property {boolean|null} [lock] manual lock * @property {number|Long|null} [award] manual award */ /** * Constructs a new manual. * @memberof game * @classdesc Represents a manual. * @implements Imanual * @constructor * @param {game.Imanual=} [properties] Properties to set */ function manual(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * manual lock. * @member {boolean} lock * @memberof game.manual * @instance */ manual.prototype.lock = false; /** * manual award. * @member {number|Long} award * @memberof game.manual * @instance */ manual.prototype.award = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new manual instance using the specified properties. * @function create * @memberof game.manual * @static * @param {game.Imanual=} [properties] Properties to set * @returns {game.manual} manual instance */ manual.create = function create(properties) { return new manual(properties); }; /** * Encodes the specified manual message. Does not implicitly {@link game.manual.verify|verify} messages. * @function encode * @memberof game.manual * @static * @param {game.Imanual} message manual message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.lock != null && Object.hasOwnProperty.call(message, "lock")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.lock); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.award); return writer; }; /** * Encodes the specified manual message, length delimited. Does not implicitly {@link game.manual.verify|verify} messages. * @function encodeDelimited * @memberof game.manual * @static * @param {game.Imanual} message manual message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ manual.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a manual message from the specified reader or buffer. * @function decode * @memberof game.manual * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.manual} manual * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.manual(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.lock = reader.bool(); break; case 2: message.award = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a manual message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.manual * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.manual} manual * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ manual.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a manual message. * @function verify * @memberof game.manual * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ manual.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.lock != null && message.hasOwnProperty("lock")) if (typeof message.lock !== "boolean") return "lock: boolean expected"; if (message.award != null && message.hasOwnProperty("award")) if (!$util.isInteger(message.award) && !(message.award && $util.isInteger(message.award.low) && $util.isInteger(message.award.high))) return "award: integer|Long expected"; return null; }; /** * Creates a manual message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.manual * @static * @param {Object.} object Plain object * @returns {game.manual} manual */ manual.fromObject = function fromObject(object) { if (object instanceof $root.game.manual) return object; let message = new $root.game.manual(); if (object.lock != null) message.lock = Boolean(object.lock); if (object.award != null) if ($util.Long) (message.award = $util.Long.fromValue(object.award)).unsigned = false; else if (typeof object.award === "string") message.award = parseInt(object.award, 10); else if (typeof object.award === "number") message.award = object.award; else if (typeof object.award === "object") message.award = new $util.LongBits(object.award.low >>> 0, object.award.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a manual message. Also converts values to other types if specified. * @function toObject * @memberof game.manual * @static * @param {game.manual} message manual * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ manual.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.lock = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.award = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.award = options.longs === String ? "0" : 0; } if (message.lock != null && message.hasOwnProperty("lock")) object.lock = message.lock; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award === "number") object.award = options.longs === String ? String(message.award) : message.award; else object.award = options.longs === String ? $util.Long.prototype.toString.call(message.award) : options.longs === Number ? new $util.LongBits(message.award.low >>> 0, message.award.high >>> 0).toNumber() : message.award; return object; }; /** * Converts this manual to JSON. * @function toJSON * @memberof game.manual * @instance * @returns {Object.} JSON object */ manual.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return manual; })(); game.draw_award_info = (function() { /** * Properties of a draw_award_info. * @memberof game * @interface Idraw_award_info * @property {number|Long|null} [id] draw_award_info id * @property {number|Long|null} [num] draw_award_info num * @property {number|Long|null} [quality] draw_award_info quality */ /** * Constructs a new draw_award_info. * @memberof game * @classdesc Represents a draw_award_info. * @implements Idraw_award_info * @constructor * @param {game.Idraw_award_info=} [properties] Properties to set */ function draw_award_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * draw_award_info id. * @member {number|Long} id * @memberof game.draw_award_info * @instance */ draw_award_info.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_award_info num. * @member {number|Long} num * @memberof game.draw_award_info * @instance */ draw_award_info.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_award_info quality. * @member {number|Long} quality * @memberof game.draw_award_info * @instance */ draw_award_info.prototype.quality = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new draw_award_info instance using the specified properties. * @function create * @memberof game.draw_award_info * @static * @param {game.Idraw_award_info=} [properties] Properties to set * @returns {game.draw_award_info} draw_award_info instance */ draw_award_info.create = function create(properties) { return new draw_award_info(properties); }; /** * Encodes the specified draw_award_info message. Does not implicitly {@link game.draw_award_info.verify|verify} messages. * @function encode * @memberof game.draw_award_info * @static * @param {game.Idraw_award_info} message draw_award_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_award_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.quality); return writer; }; /** * Encodes the specified draw_award_info message, length delimited. Does not implicitly {@link game.draw_award_info.verify|verify} messages. * @function encodeDelimited * @memberof game.draw_award_info * @static * @param {game.Idraw_award_info} message draw_award_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_award_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a draw_award_info message from the specified reader or buffer. * @function decode * @memberof game.draw_award_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.draw_award_info} draw_award_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_award_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.draw_award_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.num = reader.int64(); break; case 3: message.quality = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a draw_award_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.draw_award_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.draw_award_info} draw_award_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_award_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a draw_award_info message. * @function verify * @memberof game.draw_award_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ draw_award_info.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.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.quality != null && message.hasOwnProperty("quality")) if (!$util.isInteger(message.quality) && !(message.quality && $util.isInteger(message.quality.low) && $util.isInteger(message.quality.high))) return "quality: integer|Long expected"; return null; }; /** * Creates a draw_award_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.draw_award_info * @static * @param {Object.} object Plain object * @returns {game.draw_award_info} draw_award_info */ draw_award_info.fromObject = function fromObject(object) { if (object instanceof $root.game.draw_award_info) return object; let message = new $root.game.draw_award_info(); 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.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.quality != null) if ($util.Long) (message.quality = $util.Long.fromValue(object.quality)).unsigned = false; else if (typeof object.quality === "string") message.quality = parseInt(object.quality, 10); else if (typeof object.quality === "number") message.quality = object.quality; else if (typeof object.quality === "object") message.quality = new $util.LongBits(object.quality.low >>> 0, object.quality.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a draw_award_info message. Also converts values to other types if specified. * @function toObject * @memberof game.draw_award_info * @static * @param {game.draw_award_info} message draw_award_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ draw_award_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.quality = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.quality = options.longs === String ? "0" : 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.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.quality != null && message.hasOwnProperty("quality")) if (typeof message.quality === "number") object.quality = options.longs === String ? String(message.quality) : message.quality; else object.quality = options.longs === String ? $util.Long.prototype.toString.call(message.quality) : options.longs === Number ? new $util.LongBits(message.quality.low >>> 0, message.quality.high >>> 0).toNumber() : message.quality; return object; }; /** * Converts this draw_award_info to JSON. * @function toJSON * @memberof game.draw_award_info * @instance * @returns {Object.} JSON object */ draw_award_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return draw_award_info; })(); game.draw_info = (function() { /** * Properties of a draw_info. * @memberof game * @interface Idraw_info * @property {number|Long|null} [daily] draw_info daily * @property {number|Long|null} [free] draw_info free * @property {Array.|null} [list] draw_info list */ /** * Constructs a new draw_info. * @memberof game * @classdesc Represents a draw_info. * @implements Idraw_info * @constructor * @param {game.Idraw_info=} [properties] Properties to set */ function draw_info(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * draw_info daily. * @member {number|Long} daily * @memberof game.draw_info * @instance */ draw_info.prototype.daily = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_info free. * @member {number|Long} free * @memberof game.draw_info * @instance */ draw_info.prototype.free = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * draw_info list. * @member {Array.} list * @memberof game.draw_info * @instance */ draw_info.prototype.list = $util.emptyArray; /** * Creates a new draw_info instance using the specified properties. * @function create * @memberof game.draw_info * @static * @param {game.Idraw_info=} [properties] Properties to set * @returns {game.draw_info} draw_info instance */ draw_info.create = function create(properties) { return new draw_info(properties); }; /** * Encodes the specified draw_info message. Does not implicitly {@link game.draw_info.verify|verify} messages. * @function encode * @memberof game.draw_info * @static * @param {game.Idraw_info} message draw_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.daily != null && Object.hasOwnProperty.call(message, "daily")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.daily); if (message.free != null && Object.hasOwnProperty.call(message, "free")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.free); if (message.list != null && message.list.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (let i = 0; i < message.list.length; ++i) writer.int64(message.list[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified draw_info message, length delimited. Does not implicitly {@link game.draw_info.verify|verify} messages. * @function encodeDelimited * @memberof game.draw_info * @static * @param {game.Idraw_info} message draw_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ draw_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a draw_info message from the specified reader or buffer. * @function decode * @memberof game.draw_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.draw_info} draw_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.draw_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.daily = reader.int64(); break; case 2: message.free = reader.int64(); break; case 3: if (!(message.list && message.list.length)) message.list = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.list.push(reader.int64()); } else message.list.push(reader.int64()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a draw_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.draw_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.draw_info} draw_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ draw_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a draw_info message. * @function verify * @memberof game.draw_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ draw_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.daily != null && message.hasOwnProperty("daily")) if (!$util.isInteger(message.daily) && !(message.daily && $util.isInteger(message.daily.low) && $util.isInteger(message.daily.high))) return "daily: integer|Long expected"; if (message.free != null && message.hasOwnProperty("free")) if (!$util.isInteger(message.free) && !(message.free && $util.isInteger(message.free.low) && $util.isInteger(message.free.high))) return "free: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) if (!$util.isInteger(message.list[i]) && !(message.list[i] && $util.isInteger(message.list[i].low) && $util.isInteger(message.list[i].high))) return "list: integer|Long[] expected"; } return null; }; /** * Creates a draw_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.draw_info * @static * @param {Object.} object Plain object * @returns {game.draw_info} draw_info */ draw_info.fromObject = function fromObject(object) { if (object instanceof $root.game.draw_info) return object; let message = new $root.game.draw_info(); if (object.daily != null) if ($util.Long) (message.daily = $util.Long.fromValue(object.daily)).unsigned = false; else if (typeof object.daily === "string") message.daily = parseInt(object.daily, 10); else if (typeof object.daily === "number") message.daily = object.daily; else if (typeof object.daily === "object") message.daily = new $util.LongBits(object.daily.low >>> 0, object.daily.high >>> 0).toNumber(); if (object.free != null) if ($util.Long) (message.free = $util.Long.fromValue(object.free)).unsigned = false; else if (typeof object.free === "string") message.free = parseInt(object.free, 10); else if (typeof object.free === "number") message.free = object.free; else if (typeof object.free === "object") message.free = new $util.LongBits(object.free.low >>> 0, object.free.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.draw_info.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) if ($util.Long) (message.list[i] = $util.Long.fromValue(object.list[i])).unsigned = false; else if (typeof object.list[i] === "string") message.list[i] = parseInt(object.list[i], 10); else if (typeof object.list[i] === "number") message.list[i] = object.list[i]; else if (typeof object.list[i] === "object") message.list[i] = new $util.LongBits(object.list[i].low >>> 0, object.list[i].high >>> 0).toNumber(); } return message; }; /** * Creates a plain object from a draw_info message. Also converts values to other types if specified. * @function toObject * @memberof game.draw_info * @static * @param {game.draw_info} message draw_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ draw_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.daily = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.daily = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.free = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.free = options.longs === String ? "0" : 0; } if (message.daily != null && message.hasOwnProperty("daily")) if (typeof message.daily === "number") object.daily = options.longs === String ? String(message.daily) : message.daily; else object.daily = options.longs === String ? $util.Long.prototype.toString.call(message.daily) : options.longs === Number ? new $util.LongBits(message.daily.low >>> 0, message.daily.high >>> 0).toNumber() : message.daily; if (message.free != null && message.hasOwnProperty("free")) if (typeof message.free === "number") object.free = options.longs === String ? String(message.free) : message.free; else object.free = options.longs === String ? $util.Long.prototype.toString.call(message.free) : options.longs === Number ? new $util.LongBits(message.free.low >>> 0, message.free.high >>> 0).toNumber() : message.free; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) if (typeof message.list[j] === "number") object.list[j] = options.longs === String ? String(message.list[j]) : message.list[j]; else object.list[j] = options.longs === String ? $util.Long.prototype.toString.call(message.list[j]) : options.longs === Number ? new $util.LongBits(message.list[j].low >>> 0, message.list[j].high >>> 0).toNumber() : message.list[j]; } return object; }; /** * Converts this draw_info to JSON. * @function toJSON * @memberof game.draw_info * @instance * @returns {Object.} JSON object */ draw_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return draw_info; })(); game.shop_info = (function() { /** * Properties of a shop_info. * @memberof game * @interface Ishop_info * @property {number|Long|null} [type] shop_info type * @property {Array.|null} [list] shop_info list */ /** * Constructs a new shop_info. * @memberof game * @classdesc Represents a shop_info. * @implements Ishop_info * @constructor * @param {game.Ishop_info=} [properties] Properties to set */ function shop_info(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * shop_info type. * @member {number|Long} type * @memberof game.shop_info * @instance */ shop_info.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * shop_info list. * @member {Array.} list * @memberof game.shop_info * @instance */ shop_info.prototype.list = $util.emptyArray; /** * Creates a new shop_info instance using the specified properties. * @function create * @memberof game.shop_info * @static * @param {game.Ishop_info=} [properties] Properties to set * @returns {game.shop_info} shop_info instance */ shop_info.create = function create(properties) { return new shop_info(properties); }; /** * Encodes the specified shop_info message. Does not implicitly {@link game.shop_info.verify|verify} messages. * @function encode * @memberof game.shop_info * @static * @param {game.Ishop_info} message shop_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.id_num.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified shop_info message, length delimited. Does not implicitly {@link game.shop_info.verify|verify} messages. * @function encodeDelimited * @memberof game.shop_info * @static * @param {game.Ishop_info} message shop_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ shop_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a shop_info message from the specified reader or buffer. * @function decode * @memberof game.shop_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.shop_info} shop_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.shop_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a shop_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.shop_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.shop_info} shop_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ shop_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a shop_info message. * @function verify * @memberof game.shop_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ shop_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.id_num.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates a shop_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.shop_info * @static * @param {Object.} object Plain object * @returns {game.shop_info} shop_info */ shop_info.fromObject = function fromObject(object) { if (object instanceof $root.game.shop_info) return object; let message = new $root.game.shop_info(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.list) { if (!Array.isArray(object.list)) throw TypeError(".game.shop_info.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.shop_info.list: object expected"); message.list[i] = $root.game.id_num.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from a shop_info message. Also converts values to other types if specified. * @function toObject * @memberof game.shop_info * @static * @param {game.shop_info} message shop_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ shop_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.id_num.toObject(message.list[j], options); } return object; }; /** * Converts this shop_info to JSON. * @function toJSON * @memberof game.shop_info * @instance * @returns {Object.} JSON object */ shop_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return shop_info; })(); game.role_info = (function() { /** * Properties of a role_info. * @memberof game * @interface Irole_info * @property {string|null} [uid] role_info uid * @property {string|null} [nickname] role_info nickname * @property {number|Long|null} [avatar] role_info avatar * @property {number|Long|null} [level] role_info level */ /** * Constructs a new role_info. * @memberof game * @classdesc Represents a role_info. * @implements Irole_info * @constructor * @param {game.Irole_info=} [properties] Properties to set */ function role_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * role_info uid. * @member {string} uid * @memberof game.role_info * @instance */ role_info.prototype.uid = ""; /** * role_info nickname. * @member {string} nickname * @memberof game.role_info * @instance */ role_info.prototype.nickname = ""; /** * role_info avatar. * @member {number|Long} avatar * @memberof game.role_info * @instance */ role_info.prototype.avatar = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * role_info level. * @member {number|Long} level * @memberof game.role_info * @instance */ role_info.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new role_info instance using the specified properties. * @function create * @memberof game.role_info * @static * @param {game.Irole_info=} [properties] Properties to set * @returns {game.role_info} role_info instance */ role_info.create = function create(properties) { return new role_info(properties); }; /** * Encodes the specified role_info message. Does not implicitly {@link game.role_info.verify|verify} messages. * @function encode * @memberof game.role_info * @static * @param {game.Irole_info} message role_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid); if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nickname); if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.avatar); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.level); return writer; }; /** * Encodes the specified role_info message, length delimited. Does not implicitly {@link game.role_info.verify|verify} messages. * @function encodeDelimited * @memberof game.role_info * @static * @param {game.Irole_info} message role_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ role_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a role_info message from the specified reader or buffer. * @function decode * @memberof game.role_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.role_info} role_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.role_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.uid = reader.string(); break; case 2: message.nickname = reader.string(); break; case 3: message.avatar = reader.int64(); break; case 4: message.level = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a role_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.role_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.role_info} role_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ role_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a role_info message. * @function verify * @memberof game.role_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ role_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; if (message.nickname != null && message.hasOwnProperty("nickname")) if (!$util.isString(message.nickname)) return "nickname: string expected"; if (message.avatar != null && message.hasOwnProperty("avatar")) if (!$util.isInteger(message.avatar) && !(message.avatar && $util.isInteger(message.avatar.low) && $util.isInteger(message.avatar.high))) return "avatar: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long expected"; return null; }; /** * Creates a role_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.role_info * @static * @param {Object.} object Plain object * @returns {game.role_info} role_info */ role_info.fromObject = function fromObject(object) { if (object instanceof $root.game.role_info) return object; let message = new $root.game.role_info(); if (object.uid != null) message.uid = String(object.uid); if (object.nickname != null) message.nickname = String(object.nickname); if (object.avatar != null) if ($util.Long) (message.avatar = $util.Long.fromValue(object.avatar)).unsigned = false; else if (typeof object.avatar === "string") message.avatar = parseInt(object.avatar, 10); else if (typeof object.avatar === "number") message.avatar = object.avatar; else if (typeof object.avatar === "object") message.avatar = new $util.LongBits(object.avatar.low >>> 0, object.avatar.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a role_info message. Also converts values to other types if specified. * @function toObject * @memberof game.role_info * @static * @param {game.role_info} message role_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ role_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.uid = ""; object.nickname = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.avatar = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.avatar = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; } if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; if (message.nickname != null && message.hasOwnProperty("nickname")) object.nickname = message.nickname; if (message.avatar != null && message.hasOwnProperty("avatar")) if (typeof message.avatar === "number") object.avatar = options.longs === String ? String(message.avatar) : message.avatar; else object.avatar = options.longs === String ? $util.Long.prototype.toString.call(message.avatar) : options.longs === Number ? new $util.LongBits(message.avatar.low >>> 0, message.avatar.high >>> 0).toNumber() : message.avatar; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; return object; }; /** * Converts this role_info to JSON. * @function toJSON * @memberof game.role_info * @instance * @returns {Object.} JSON object */ role_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return role_info; })(); game.hero_info = (function() { /** * Properties of a hero_info. * @memberof game * @interface Ihero_info * @property {number|Long|null} [id] hero_info id * @property {number|Long|null} [lv] hero_info lv */ /** * Constructs a new hero_info. * @memberof game * @classdesc Represents a hero_info. * @implements Ihero_info * @constructor * @param {game.Ihero_info=} [properties] Properties to set */ function hero_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * hero_info id. * @member {number|Long} id * @memberof game.hero_info * @instance */ hero_info.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * hero_info lv. * @member {number|Long} lv * @memberof game.hero_info * @instance */ hero_info.prototype.lv = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new hero_info instance using the specified properties. * @function create * @memberof game.hero_info * @static * @param {game.Ihero_info=} [properties] Properties to set * @returns {game.hero_info} hero_info instance */ hero_info.create = function create(properties) { return new hero_info(properties); }; /** * Encodes the specified hero_info message. Does not implicitly {@link game.hero_info.verify|verify} messages. * @function encode * @memberof game.hero_info * @static * @param {game.Ihero_info} message hero_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.lv != null && Object.hasOwnProperty.call(message, "lv")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lv); return writer; }; /** * Encodes the specified hero_info message, length delimited. Does not implicitly {@link game.hero_info.verify|verify} messages. * @function encodeDelimited * @memberof game.hero_info * @static * @param {game.Ihero_info} message hero_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ hero_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a hero_info message from the specified reader or buffer. * @function decode * @memberof game.hero_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.hero_info} hero_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.hero_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.lv = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a hero_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.hero_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.hero_info} hero_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ hero_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a hero_info message. * @function verify * @memberof game.hero_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ hero_info.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.lv != null && message.hasOwnProperty("lv")) if (!$util.isInteger(message.lv) && !(message.lv && $util.isInteger(message.lv.low) && $util.isInteger(message.lv.high))) return "lv: integer|Long expected"; return null; }; /** * Creates a hero_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.hero_info * @static * @param {Object.} object Plain object * @returns {game.hero_info} hero_info */ hero_info.fromObject = function fromObject(object) { if (object instanceof $root.game.hero_info) return object; let message = new $root.game.hero_info(); 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.lv != null) if ($util.Long) (message.lv = $util.Long.fromValue(object.lv)).unsigned = false; else if (typeof object.lv === "string") message.lv = parseInt(object.lv, 10); else if (typeof object.lv === "number") message.lv = object.lv; else if (typeof object.lv === "object") message.lv = new $util.LongBits(object.lv.low >>> 0, object.lv.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a hero_info message. Also converts values to other types if specified. * @function toObject * @memberof game.hero_info * @static * @param {game.hero_info} message hero_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ hero_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.lv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.lv = options.longs === String ? "0" : 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.lv != null && message.hasOwnProperty("lv")) if (typeof message.lv === "number") object.lv = options.longs === String ? String(message.lv) : message.lv; else object.lv = options.longs === String ? $util.Long.prototype.toString.call(message.lv) : options.longs === Number ? new $util.LongBits(message.lv.low >>> 0, message.lv.high >>> 0).toNumber() : message.lv; return object; }; /** * Converts this hero_info to JSON. * @function toJSON * @memberof game.hero_info * @instance * @returns {Object.} JSON object */ hero_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return hero_info; })(); game.ranking_info = (function() { /** * Properties of a ranking_info. * @memberof game * @interface Iranking_info * @property {number|Long|null} [ranking] ranking_info ranking * @property {number|Long|null} [num] ranking_info num * @property {game.Irole_info|null} [role] ranking_info role * @property {game.Ihero_info|null} [hero] ranking_info hero */ /** * Constructs a new ranking_info. * @memberof game * @classdesc Represents a ranking_info. * @implements Iranking_info * @constructor * @param {game.Iranking_info=} [properties] Properties to set */ function ranking_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ranking_info ranking. * @member {number|Long} ranking * @memberof game.ranking_info * @instance */ ranking_info.prototype.ranking = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * ranking_info num. * @member {number|Long} num * @memberof game.ranking_info * @instance */ ranking_info.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * ranking_info role. * @member {game.Irole_info|null|undefined} role * @memberof game.ranking_info * @instance */ ranking_info.prototype.role = null; /** * ranking_info hero. * @member {game.Ihero_info|null|undefined} hero * @memberof game.ranking_info * @instance */ ranking_info.prototype.hero = null; /** * Creates a new ranking_info instance using the specified properties. * @function create * @memberof game.ranking_info * @static * @param {game.Iranking_info=} [properties] Properties to set * @returns {game.ranking_info} ranking_info instance */ ranking_info.create = function create(properties) { return new ranking_info(properties); }; /** * Encodes the specified ranking_info message. Does not implicitly {@link game.ranking_info.verify|verify} messages. * @function encode * @memberof game.ranking_info * @static * @param {game.Iranking_info} message ranking_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ranking_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ranking != null && Object.hasOwnProperty.call(message, "ranking")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.ranking); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); if (message.role != null && Object.hasOwnProperty.call(message, "role")) $root.game.role_info.encode(message.role, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.hero != null && Object.hasOwnProperty.call(message, "hero")) $root.game.hero_info.encode(message.hero, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified ranking_info message, length delimited. Does not implicitly {@link game.ranking_info.verify|verify} messages. * @function encodeDelimited * @memberof game.ranking_info * @static * @param {game.Iranking_info} message ranking_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ranking_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ranking_info message from the specified reader or buffer. * @function decode * @memberof game.ranking_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.ranking_info} ranking_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ranking_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.ranking_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.ranking = reader.int64(); break; case 2: message.num = reader.int64(); break; case 3: message.role = $root.game.role_info.decode(reader, reader.uint32()); break; case 4: message.hero = $root.game.hero_info.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ranking_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.ranking_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.ranking_info} ranking_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ranking_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ranking_info message. * @function verify * @memberof game.ranking_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ranking_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ranking != null && message.hasOwnProperty("ranking")) if (!$util.isInteger(message.ranking) && !(message.ranking && $util.isInteger(message.ranking.low) && $util.isInteger(message.ranking.high))) return "ranking: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.role != null && message.hasOwnProperty("role")) { let error = $root.game.role_info.verify(message.role); if (error) return "role." + error; } if (message.hero != null && message.hasOwnProperty("hero")) { let error = $root.game.hero_info.verify(message.hero); if (error) return "hero." + error; } return null; }; /** * Creates a ranking_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.ranking_info * @static * @param {Object.} object Plain object * @returns {game.ranking_info} ranking_info */ ranking_info.fromObject = function fromObject(object) { if (object instanceof $root.game.ranking_info) return object; let message = new $root.game.ranking_info(); if (object.ranking != null) if ($util.Long) (message.ranking = $util.Long.fromValue(object.ranking)).unsigned = false; else if (typeof object.ranking === "string") message.ranking = parseInt(object.ranking, 10); else if (typeof object.ranking === "number") message.ranking = object.ranking; else if (typeof object.ranking === "object") message.ranking = new $util.LongBits(object.ranking.low >>> 0, object.ranking.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.role != null) { if (typeof object.role !== "object") throw TypeError(".game.ranking_info.role: object expected"); message.role = $root.game.role_info.fromObject(object.role); } if (object.hero != null) { if (typeof object.hero !== "object") throw TypeError(".game.ranking_info.hero: object expected"); message.hero = $root.game.hero_info.fromObject(object.hero); } return message; }; /** * Creates a plain object from a ranking_info message. Also converts values to other types if specified. * @function toObject * @memberof game.ranking_info * @static * @param {game.ranking_info} message ranking_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ranking_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.ranking = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ranking = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; object.role = null; object.hero = null; } if (message.ranking != null && message.hasOwnProperty("ranking")) if (typeof message.ranking === "number") object.ranking = options.longs === String ? String(message.ranking) : message.ranking; else object.ranking = options.longs === String ? $util.Long.prototype.toString.call(message.ranking) : options.longs === Number ? new $util.LongBits(message.ranking.low >>> 0, message.ranking.high >>> 0).toNumber() : message.ranking; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.role != null && message.hasOwnProperty("role")) object.role = $root.game.role_info.toObject(message.role, options); if (message.hero != null && message.hasOwnProperty("hero")) object.hero = $root.game.hero_info.toObject(message.hero, options); return object; }; /** * Converts this ranking_info to JSON. * @function toJSON * @memberof game.ranking_info * @instance * @returns {Object.} JSON object */ ranking_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return ranking_info; })(); game.grocery_info = (function() { /** * Properties of a grocery_info. * @memberof game * @interface Igrocery_info * @property {number|Long|null} [type] grocery_info type * @property {number|Long|null} [freeTime] grocery_info freeTime * @property {number|Long|null} [freeNum] grocery_info freeNum * @property {number|Long|null} [buyNum] grocery_info buyNum */ /** * Constructs a new grocery_info. * @memberof game * @classdesc Represents a grocery_info. * @implements Igrocery_info * @constructor * @param {game.Igrocery_info=} [properties] Properties to set */ function grocery_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * grocery_info type. * @member {number|Long} type * @memberof game.grocery_info * @instance */ grocery_info.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * grocery_info freeTime. * @member {number|Long} freeTime * @memberof game.grocery_info * @instance */ grocery_info.prototype.freeTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * grocery_info freeNum. * @member {number|Long} freeNum * @memberof game.grocery_info * @instance */ grocery_info.prototype.freeNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * grocery_info buyNum. * @member {number|Long} buyNum * @memberof game.grocery_info * @instance */ grocery_info.prototype.buyNum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new grocery_info instance using the specified properties. * @function create * @memberof game.grocery_info * @static * @param {game.Igrocery_info=} [properties] Properties to set * @returns {game.grocery_info} grocery_info instance */ grocery_info.create = function create(properties) { return new grocery_info(properties); }; /** * Encodes the specified grocery_info message. Does not implicitly {@link game.grocery_info.verify|verify} messages. * @function encode * @memberof game.grocery_info * @static * @param {game.Igrocery_info} message grocery_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.freeTime != null && Object.hasOwnProperty.call(message, "freeTime")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.freeTime); if (message.freeNum != null && Object.hasOwnProperty.call(message, "freeNum")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.freeNum); if (message.buyNum != null && Object.hasOwnProperty.call(message, "buyNum")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.buyNum); return writer; }; /** * Encodes the specified grocery_info message, length delimited. Does not implicitly {@link game.grocery_info.verify|verify} messages. * @function encodeDelimited * @memberof game.grocery_info * @static * @param {game.Igrocery_info} message grocery_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ grocery_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a grocery_info message from the specified reader or buffer. * @function decode * @memberof game.grocery_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.grocery_info} grocery_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.grocery_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.freeTime = reader.int64(); break; case 3: message.freeNum = reader.int64(); break; case 4: message.buyNum = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a grocery_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.grocery_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.grocery_info} grocery_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ grocery_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a grocery_info message. * @function verify * @memberof game.grocery_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ grocery_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.freeTime != null && message.hasOwnProperty("freeTime")) if (!$util.isInteger(message.freeTime) && !(message.freeTime && $util.isInteger(message.freeTime.low) && $util.isInteger(message.freeTime.high))) return "freeTime: integer|Long expected"; if (message.freeNum != null && message.hasOwnProperty("freeNum")) if (!$util.isInteger(message.freeNum) && !(message.freeNum && $util.isInteger(message.freeNum.low) && $util.isInteger(message.freeNum.high))) return "freeNum: integer|Long expected"; if (message.buyNum != null && message.hasOwnProperty("buyNum")) if (!$util.isInteger(message.buyNum) && !(message.buyNum && $util.isInteger(message.buyNum.low) && $util.isInteger(message.buyNum.high))) return "buyNum: integer|Long expected"; return null; }; /** * Creates a grocery_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.grocery_info * @static * @param {Object.} object Plain object * @returns {game.grocery_info} grocery_info */ grocery_info.fromObject = function fromObject(object) { if (object instanceof $root.game.grocery_info) return object; let message = new $root.game.grocery_info(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.freeTime != null) if ($util.Long) (message.freeTime = $util.Long.fromValue(object.freeTime)).unsigned = false; else if (typeof object.freeTime === "string") message.freeTime = parseInt(object.freeTime, 10); else if (typeof object.freeTime === "number") message.freeTime = object.freeTime; else if (typeof object.freeTime === "object") message.freeTime = new $util.LongBits(object.freeTime.low >>> 0, object.freeTime.high >>> 0).toNumber(); if (object.freeNum != null) if ($util.Long) (message.freeNum = $util.Long.fromValue(object.freeNum)).unsigned = false; else if (typeof object.freeNum === "string") message.freeNum = parseInt(object.freeNum, 10); else if (typeof object.freeNum === "number") message.freeNum = object.freeNum; else if (typeof object.freeNum === "object") message.freeNum = new $util.LongBits(object.freeNum.low >>> 0, object.freeNum.high >>> 0).toNumber(); if (object.buyNum != null) if ($util.Long) (message.buyNum = $util.Long.fromValue(object.buyNum)).unsigned = false; else if (typeof object.buyNum === "string") message.buyNum = parseInt(object.buyNum, 10); else if (typeof object.buyNum === "number") message.buyNum = object.buyNum; else if (typeof object.buyNum === "object") message.buyNum = new $util.LongBits(object.buyNum.low >>> 0, object.buyNum.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a grocery_info message. Also converts values to other types if specified. * @function toObject * @memberof game.grocery_info * @static * @param {game.grocery_info} message grocery_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ grocery_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.freeTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.freeTime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.freeNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.freeNum = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.buyNum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.buyNum = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.freeTime != null && message.hasOwnProperty("freeTime")) if (typeof message.freeTime === "number") object.freeTime = options.longs === String ? String(message.freeTime) : message.freeTime; else object.freeTime = options.longs === String ? $util.Long.prototype.toString.call(message.freeTime) : options.longs === Number ? new $util.LongBits(message.freeTime.low >>> 0, message.freeTime.high >>> 0).toNumber() : message.freeTime; if (message.freeNum != null && message.hasOwnProperty("freeNum")) if (typeof message.freeNum === "number") object.freeNum = options.longs === String ? String(message.freeNum) : message.freeNum; else object.freeNum = options.longs === String ? $util.Long.prototype.toString.call(message.freeNum) : options.longs === Number ? new $util.LongBits(message.freeNum.low >>> 0, message.freeNum.high >>> 0).toNumber() : message.freeNum; if (message.buyNum != null && message.hasOwnProperty("buyNum")) if (typeof message.buyNum === "number") object.buyNum = options.longs === String ? String(message.buyNum) : message.buyNum; else object.buyNum = options.longs === String ? $util.Long.prototype.toString.call(message.buyNum) : options.longs === Number ? new $util.LongBits(message.buyNum.low >>> 0, message.buyNum.high >>> 0).toNumber() : message.buyNum; return object; }; /** * Converts this grocery_info to JSON. * @function toJSON * @memberof game.grocery_info * @instance * @returns {Object.} JSON object */ grocery_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return grocery_info; })(); game.altar_info = (function() { /** * Properties of an altar_info. * @memberof game * @interface Ialtar_info * @property {string|null} [sid] altar_info sid * @property {number|Long|null} [time] altar_info time * @property {number|Long|null} [level] altar_info level * @property {number|Long|null} [id] altar_info id */ /** * Constructs a new altar_info. * @memberof game * @classdesc Represents an altar_info. * @implements Ialtar_info * @constructor * @param {game.Ialtar_info=} [properties] Properties to set */ function altar_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * altar_info sid. * @member {string} sid * @memberof game.altar_info * @instance */ altar_info.prototype.sid = ""; /** * altar_info time. * @member {number|Long} time * @memberof game.altar_info * @instance */ altar_info.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_info level. * @member {number|Long} level * @memberof game.altar_info * @instance */ altar_info.prototype.level = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * altar_info id. * @member {number|Long} id * @memberof game.altar_info * @instance */ altar_info.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new altar_info instance using the specified properties. * @function create * @memberof game.altar_info * @static * @param {game.Ialtar_info=} [properties] Properties to set * @returns {game.altar_info} altar_info instance */ altar_info.create = function create(properties) { return new altar_info(properties); }; /** * Encodes the specified altar_info message. Does not implicitly {@link game.altar_info.verify|verify} messages. * @function encode * @memberof game.altar_info * @static * @param {game.Ialtar_info} message altar_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sid); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time); if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.level); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.id); return writer; }; /** * Encodes the specified altar_info message, length delimited. Does not implicitly {@link game.altar_info.verify|verify} messages. * @function encodeDelimited * @memberof game.altar_info * @static * @param {game.Ialtar_info} message altar_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ altar_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an altar_info message from the specified reader or buffer. * @function decode * @memberof game.altar_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.altar_info} altar_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.altar_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 2: message.sid = reader.string(); break; case 3: message.time = reader.int64(); break; case 4: message.level = reader.int64(); break; case 5: message.id = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an altar_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.altar_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.altar_info} altar_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ altar_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an altar_info message. * @function verify * @memberof game.altar_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ altar_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isString(message.sid)) return "sid: string expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level) && !(message.level && $util.isInteger(message.level.low) && $util.isInteger(message.level.high))) return "level: integer|Long 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"; return null; }; /** * Creates an altar_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.altar_info * @static * @param {Object.} object Plain object * @returns {game.altar_info} altar_info */ altar_info.fromObject = function fromObject(object) { if (object instanceof $root.game.altar_info) return object; let message = new $root.game.altar_info(); if (object.sid != null) message.sid = String(object.sid); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); if (object.level != null) if ($util.Long) (message.level = $util.Long.fromValue(object.level)).unsigned = false; else if (typeof object.level === "string") message.level = parseInt(object.level, 10); else if (typeof object.level === "number") message.level = object.level; else if (typeof object.level === "object") message.level = new $util.LongBits(object.level.low >>> 0, object.level.high >>> 0).toNumber(); 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(); return message; }; /** * Creates a plain object from an altar_info message. Also converts values to other types if specified. * @function toObject * @memberof game.altar_info * @static * @param {game.altar_info} message altar_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ altar_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { object.sid = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.level = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.level = options.longs === String ? "0" : 0; if ($util.Long) { let 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; } if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; if (message.level != null && message.hasOwnProperty("level")) if (typeof message.level === "number") object.level = options.longs === String ? String(message.level) : message.level; else object.level = options.longs === String ? $util.Long.prototype.toString.call(message.level) : options.longs === Number ? new $util.LongBits(message.level.low >>> 0, message.level.high >>> 0).toNumber() : message.level; 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; return object; }; /** * Converts this altar_info to JSON. * @function toJSON * @memberof game.altar_info * @instance * @returns {Object.} JSON object */ altar_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return altar_info; })(); game.activity_time_info = (function() { /** * Properties of an activity_time_info. * @memberof game * @interface Iactivity_time_info * @property {number|Long|null} [type] activity_time_info type * @property {number|Long|null} [state] activity_time_info state * @property {number|Long|null} [opentime] activity_time_info opentime * @property {number|Long|null} [endtime] activity_time_info endtime * @property {string|null} [name] activity_time_info name * @property {number|Long|null} [sort] activity_time_info sort * @property {string|null} [icon] activity_time_info icon */ /** * Constructs a new activity_time_info. * @memberof game * @classdesc Represents an activity_time_info. * @implements Iactivity_time_info * @constructor * @param {game.Iactivity_time_info=} [properties] Properties to set */ function activity_time_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * activity_time_info type. * @member {number|Long} type * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_time_info state. * @member {number|Long} state * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.state = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_time_info opentime. * @member {number|Long} opentime * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.opentime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_time_info endtime. * @member {number|Long} endtime * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.endtime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_time_info name. * @member {string} name * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.name = ""; /** * activity_time_info sort. * @member {number|Long} sort * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.sort = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_time_info icon. * @member {string} icon * @memberof game.activity_time_info * @instance */ activity_time_info.prototype.icon = ""; /** * Creates a new activity_time_info instance using the specified properties. * @function create * @memberof game.activity_time_info * @static * @param {game.Iactivity_time_info=} [properties] Properties to set * @returns {game.activity_time_info} activity_time_info instance */ activity_time_info.create = function create(properties) { return new activity_time_info(properties); }; /** * Encodes the specified activity_time_info message. Does not implicitly {@link game.activity_time_info.verify|verify} messages. * @function encode * @memberof game.activity_time_info * @static * @param {game.Iactivity_time_info} message activity_time_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_time_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.state); if (message.opentime != null && Object.hasOwnProperty.call(message, "opentime")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.opentime); if (message.endtime != null && Object.hasOwnProperty.call(message, "endtime")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.endtime); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); if (message.sort != null && Object.hasOwnProperty.call(message, "sort")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sort); if (message.icon != null && Object.hasOwnProperty.call(message, "icon")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.icon); return writer; }; /** * Encodes the specified activity_time_info message, length delimited. Does not implicitly {@link game.activity_time_info.verify|verify} messages. * @function encodeDelimited * @memberof game.activity_time_info * @static * @param {game.Iactivity_time_info} message activity_time_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_time_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an activity_time_info message from the specified reader or buffer. * @function decode * @memberof game.activity_time_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.activity_time_info} activity_time_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_time_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.activity_time_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.state = reader.int64(); break; case 3: message.opentime = reader.int64(); break; case 4: message.endtime = reader.int64(); break; case 5: message.name = reader.string(); break; case 6: message.sort = reader.int64(); break; case 7: message.icon = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an activity_time_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.activity_time_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.activity_time_info} activity_time_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_time_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an activity_time_info message. * @function verify * @memberof game.activity_time_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ activity_time_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state) && !(message.state && $util.isInteger(message.state.low) && $util.isInteger(message.state.high))) return "state: integer|Long expected"; if (message.opentime != null && message.hasOwnProperty("opentime")) if (!$util.isInteger(message.opentime) && !(message.opentime && $util.isInteger(message.opentime.low) && $util.isInteger(message.opentime.high))) return "opentime: integer|Long expected"; if (message.endtime != null && message.hasOwnProperty("endtime")) if (!$util.isInteger(message.endtime) && !(message.endtime && $util.isInteger(message.endtime.low) && $util.isInteger(message.endtime.high))) return "endtime: integer|Long expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.sort != null && message.hasOwnProperty("sort")) if (!$util.isInteger(message.sort) && !(message.sort && $util.isInteger(message.sort.low) && $util.isInteger(message.sort.high))) return "sort: integer|Long expected"; if (message.icon != null && message.hasOwnProperty("icon")) if (!$util.isString(message.icon)) return "icon: string expected"; return null; }; /** * Creates an activity_time_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.activity_time_info * @static * @param {Object.} object Plain object * @returns {game.activity_time_info} activity_time_info */ activity_time_info.fromObject = function fromObject(object) { if (object instanceof $root.game.activity_time_info) return object; let message = new $root.game.activity_time_info(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.state != null) if ($util.Long) (message.state = $util.Long.fromValue(object.state)).unsigned = false; else if (typeof object.state === "string") message.state = parseInt(object.state, 10); else if (typeof object.state === "number") message.state = object.state; else if (typeof object.state === "object") message.state = new $util.LongBits(object.state.low >>> 0, object.state.high >>> 0).toNumber(); if (object.opentime != null) if ($util.Long) (message.opentime = $util.Long.fromValue(object.opentime)).unsigned = false; else if (typeof object.opentime === "string") message.opentime = parseInt(object.opentime, 10); else if (typeof object.opentime === "number") message.opentime = object.opentime; else if (typeof object.opentime === "object") message.opentime = new $util.LongBits(object.opentime.low >>> 0, object.opentime.high >>> 0).toNumber(); if (object.endtime != null) if ($util.Long) (message.endtime = $util.Long.fromValue(object.endtime)).unsigned = false; else if (typeof object.endtime === "string") message.endtime = parseInt(object.endtime, 10); else if (typeof object.endtime === "number") message.endtime = object.endtime; else if (typeof object.endtime === "object") message.endtime = new $util.LongBits(object.endtime.low >>> 0, object.endtime.high >>> 0).toNumber(); if (object.name != null) message.name = String(object.name); if (object.sort != null) if ($util.Long) (message.sort = $util.Long.fromValue(object.sort)).unsigned = false; else if (typeof object.sort === "string") message.sort = parseInt(object.sort, 10); else if (typeof object.sort === "number") message.sort = object.sort; else if (typeof object.sort === "object") message.sort = new $util.LongBits(object.sort.low >>> 0, object.sort.high >>> 0).toNumber(); if (object.icon != null) message.icon = String(object.icon); return message; }; /** * Creates a plain object from an activity_time_info message. Also converts values to other types if specified. * @function toObject * @memberof game.activity_time_info * @static * @param {game.activity_time_info} message activity_time_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ activity_time_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.state = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.state = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.opentime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.opentime = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.endtime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.endtime = options.longs === String ? "0" : 0; object.name = ""; if ($util.Long) { let long = new $util.Long(0, 0, false); object.sort = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.sort = options.longs === String ? "0" : 0; object.icon = ""; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state === "number") object.state = options.longs === String ? String(message.state) : message.state; else object.state = options.longs === String ? $util.Long.prototype.toString.call(message.state) : options.longs === Number ? new $util.LongBits(message.state.low >>> 0, message.state.high >>> 0).toNumber() : message.state; if (message.opentime != null && message.hasOwnProperty("opentime")) if (typeof message.opentime === "number") object.opentime = options.longs === String ? String(message.opentime) : message.opentime; else object.opentime = options.longs === String ? $util.Long.prototype.toString.call(message.opentime) : options.longs === Number ? new $util.LongBits(message.opentime.low >>> 0, message.opentime.high >>> 0).toNumber() : message.opentime; if (message.endtime != null && message.hasOwnProperty("endtime")) if (typeof message.endtime === "number") object.endtime = options.longs === String ? String(message.endtime) : message.endtime; else object.endtime = options.longs === String ? $util.Long.prototype.toString.call(message.endtime) : options.longs === Number ? new $util.LongBits(message.endtime.low >>> 0, message.endtime.high >>> 0).toNumber() : message.endtime; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.sort != null && message.hasOwnProperty("sort")) if (typeof message.sort === "number") object.sort = options.longs === String ? String(message.sort) : message.sort; else object.sort = options.longs === String ? $util.Long.prototype.toString.call(message.sort) : options.longs === Number ? new $util.LongBits(message.sort.low >>> 0, message.sort.high >>> 0).toNumber() : message.sort; if (message.icon != null && message.hasOwnProperty("icon")) object.icon = message.icon; return object; }; /** * Converts this activity_time_info to JSON. * @function toJSON * @memberof game.activity_time_info * @instance * @returns {Object.} JSON object */ activity_time_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return activity_time_info; })(); game.gift_conf_info = (function() { /** * Properties of a gift_conf_info. * @memberof game * @interface Igift_conf_info * @property {number|Long|null} [ID] gift_conf_info ID * @property {Array.|null} [library] gift_conf_info library * @property {number|Long|null} [sort] gift_conf_info sort * @property {number|Long|null} [spendtype] gift_conf_info spendtype * @property {number|Long|null} [spend] gift_conf_info spend * @property {number|Long|null} [num] gift_conf_info num * @property {number|Long|null} [daylimit] gift_conf_info daylimit * @property {number|Long|null} [weeklimit] gift_conf_info weeklimit * @property {number|Long|null} [video] gift_conf_info video * @property {number|Long|null} [icon] gift_conf_info icon * @property {Array.|null} [parameter] gift_conf_info parameter */ /** * Constructs a new gift_conf_info. * @memberof game * @classdesc Represents a gift_conf_info. * @implements Igift_conf_info * @constructor * @param {game.Igift_conf_info=} [properties] Properties to set */ function gift_conf_info(properties) { this.library = []; this.parameter = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * gift_conf_info ID. * @member {number|Long} ID * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.ID = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info library. * @member {Array.} library * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.library = $util.emptyArray; /** * gift_conf_info sort. * @member {number|Long} sort * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.sort = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info spendtype. * @member {number|Long} spendtype * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.spendtype = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info spend. * @member {number|Long} spend * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.spend = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info num. * @member {number|Long} num * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info daylimit. * @member {number|Long} daylimit * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.daylimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info weeklimit. * @member {number|Long} weeklimit * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.weeklimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info video. * @member {number|Long} video * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.video = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info icon. * @member {number|Long} icon * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.icon = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * gift_conf_info parameter. * @member {Array.} parameter * @memberof game.gift_conf_info * @instance */ gift_conf_info.prototype.parameter = $util.emptyArray; /** * Creates a new gift_conf_info instance using the specified properties. * @function create * @memberof game.gift_conf_info * @static * @param {game.Igift_conf_info=} [properties] Properties to set * @returns {game.gift_conf_info} gift_conf_info instance */ gift_conf_info.create = function create(properties) { return new gift_conf_info(properties); }; /** * Encodes the specified gift_conf_info message. Does not implicitly {@link game.gift_conf_info.verify|verify} messages. * @function encode * @memberof game.gift_conf_info * @static * @param {game.Igift_conf_info} message gift_conf_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ gift_conf_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ID != null && Object.hasOwnProperty.call(message, "ID")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.ID); if (message.library != null && message.library.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); for (let i = 0; i < message.library.length; ++i) writer.int64(message.library[i]); writer.ldelim(); } if (message.sort != null && Object.hasOwnProperty.call(message, "sort")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sort); if (message.spendtype != null && Object.hasOwnProperty.call(message, "spendtype")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.spendtype); if (message.spend != null && Object.hasOwnProperty.call(message, "spend")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.spend); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.num); if (message.daylimit != null && Object.hasOwnProperty.call(message, "daylimit")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.daylimit); if (message.weeklimit != null && Object.hasOwnProperty.call(message, "weeklimit")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.weeklimit); if (message.video != null && Object.hasOwnProperty.call(message, "video")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.video); if (message.icon != null && Object.hasOwnProperty.call(message, "icon")) writer.uint32(/* id 10, wireType 0 =*/80).int64(message.icon); if (message.parameter != null && message.parameter.length) { writer.uint32(/* id 11, wireType 2 =*/90).fork(); for (let i = 0; i < message.parameter.length; ++i) writer.int64(message.parameter[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified gift_conf_info message, length delimited. Does not implicitly {@link game.gift_conf_info.verify|verify} messages. * @function encodeDelimited * @memberof game.gift_conf_info * @static * @param {game.Igift_conf_info} message gift_conf_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ gift_conf_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a gift_conf_info message from the specified reader or buffer. * @function decode * @memberof game.gift_conf_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.gift_conf_info} gift_conf_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ gift_conf_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.gift_conf_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.ID = reader.int64(); break; case 2: if (!(message.library && message.library.length)) message.library = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.library.push(reader.int64()); } else message.library.push(reader.int64()); break; case 3: message.sort = reader.int64(); break; case 4: message.spendtype = reader.int64(); break; case 5: message.spend = reader.int64(); break; case 6: message.num = reader.int64(); break; case 7: message.daylimit = reader.int64(); break; case 8: message.weeklimit = reader.int64(); break; case 9: message.video = reader.int64(); break; case 10: message.icon = reader.int64(); break; case 11: if (!(message.parameter && message.parameter.length)) message.parameter = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.parameter.push(reader.int64()); } else message.parameter.push(reader.int64()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a gift_conf_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.gift_conf_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.gift_conf_info} gift_conf_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ gift_conf_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a gift_conf_info message. * @function verify * @memberof game.gift_conf_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ gift_conf_info.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.library != null && message.hasOwnProperty("library")) { if (!Array.isArray(message.library)) return "library: array expected"; for (let i = 0; i < message.library.length; ++i) if (!$util.isInteger(message.library[i]) && !(message.library[i] && $util.isInteger(message.library[i].low) && $util.isInteger(message.library[i].high))) return "library: integer|Long[] expected"; } if (message.sort != null && message.hasOwnProperty("sort")) if (!$util.isInteger(message.sort) && !(message.sort && $util.isInteger(message.sort.low) && $util.isInteger(message.sort.high))) return "sort: integer|Long expected"; if (message.spendtype != null && message.hasOwnProperty("spendtype")) if (!$util.isInteger(message.spendtype) && !(message.spendtype && $util.isInteger(message.spendtype.low) && $util.isInteger(message.spendtype.high))) return "spendtype: integer|Long expected"; if (message.spend != null && message.hasOwnProperty("spend")) if (!$util.isInteger(message.spend) && !(message.spend && $util.isInteger(message.spend.low) && $util.isInteger(message.spend.high))) return "spend: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.daylimit != null && message.hasOwnProperty("daylimit")) if (!$util.isInteger(message.daylimit) && !(message.daylimit && $util.isInteger(message.daylimit.low) && $util.isInteger(message.daylimit.high))) return "daylimit: integer|Long expected"; if (message.weeklimit != null && message.hasOwnProperty("weeklimit")) if (!$util.isInteger(message.weeklimit) && !(message.weeklimit && $util.isInteger(message.weeklimit.low) && $util.isInteger(message.weeklimit.high))) return "weeklimit: integer|Long expected"; if (message.video != null && message.hasOwnProperty("video")) if (!$util.isInteger(message.video) && !(message.video && $util.isInteger(message.video.low) && $util.isInteger(message.video.high))) return "video: integer|Long expected"; if (message.icon != null && message.hasOwnProperty("icon")) if (!$util.isInteger(message.icon) && !(message.icon && $util.isInteger(message.icon.low) && $util.isInteger(message.icon.high))) return "icon: integer|Long expected"; if (message.parameter != null && message.hasOwnProperty("parameter")) { if (!Array.isArray(message.parameter)) return "parameter: array expected"; for (let i = 0; i < message.parameter.length; ++i) if (!$util.isInteger(message.parameter[i]) && !(message.parameter[i] && $util.isInteger(message.parameter[i].low) && $util.isInteger(message.parameter[i].high))) return "parameter: integer|Long[] expected"; } return null; }; /** * Creates a gift_conf_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.gift_conf_info * @static * @param {Object.} object Plain object * @returns {game.gift_conf_info} gift_conf_info */ gift_conf_info.fromObject = function fromObject(object) { if (object instanceof $root.game.gift_conf_info) return object; let message = new $root.game.gift_conf_info(); 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.library) { if (!Array.isArray(object.library)) throw TypeError(".game.gift_conf_info.library: array expected"); message.library = []; for (let i = 0; i < object.library.length; ++i) if ($util.Long) (message.library[i] = $util.Long.fromValue(object.library[i])).unsigned = false; else if (typeof object.library[i] === "string") message.library[i] = parseInt(object.library[i], 10); else if (typeof object.library[i] === "number") message.library[i] = object.library[i]; else if (typeof object.library[i] === "object") message.library[i] = new $util.LongBits(object.library[i].low >>> 0, object.library[i].high >>> 0).toNumber(); } if (object.sort != null) if ($util.Long) (message.sort = $util.Long.fromValue(object.sort)).unsigned = false; else if (typeof object.sort === "string") message.sort = parseInt(object.sort, 10); else if (typeof object.sort === "number") message.sort = object.sort; else if (typeof object.sort === "object") message.sort = new $util.LongBits(object.sort.low >>> 0, object.sort.high >>> 0).toNumber(); if (object.spendtype != null) if ($util.Long) (message.spendtype = $util.Long.fromValue(object.spendtype)).unsigned = false; else if (typeof object.spendtype === "string") message.spendtype = parseInt(object.spendtype, 10); else if (typeof object.spendtype === "number") message.spendtype = object.spendtype; else if (typeof object.spendtype === "object") message.spendtype = new $util.LongBits(object.spendtype.low >>> 0, object.spendtype.high >>> 0).toNumber(); if (object.spend != null) if ($util.Long) (message.spend = $util.Long.fromValue(object.spend)).unsigned = false; else if (typeof object.spend === "string") message.spend = parseInt(object.spend, 10); else if (typeof object.spend === "number") message.spend = object.spend; else if (typeof object.spend === "object") message.spend = new $util.LongBits(object.spend.low >>> 0, object.spend.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.daylimit != null) if ($util.Long) (message.daylimit = $util.Long.fromValue(object.daylimit)).unsigned = false; else if (typeof object.daylimit === "string") message.daylimit = parseInt(object.daylimit, 10); else if (typeof object.daylimit === "number") message.daylimit = object.daylimit; else if (typeof object.daylimit === "object") message.daylimit = new $util.LongBits(object.daylimit.low >>> 0, object.daylimit.high >>> 0).toNumber(); if (object.weeklimit != null) if ($util.Long) (message.weeklimit = $util.Long.fromValue(object.weeklimit)).unsigned = false; else if (typeof object.weeklimit === "string") message.weeklimit = parseInt(object.weeklimit, 10); else if (typeof object.weeklimit === "number") message.weeklimit = object.weeklimit; else if (typeof object.weeklimit === "object") message.weeklimit = new $util.LongBits(object.weeklimit.low >>> 0, object.weeklimit.high >>> 0).toNumber(); if (object.video != null) if ($util.Long) (message.video = $util.Long.fromValue(object.video)).unsigned = false; else if (typeof object.video === "string") message.video = parseInt(object.video, 10); else if (typeof object.video === "number") message.video = object.video; else if (typeof object.video === "object") message.video = new $util.LongBits(object.video.low >>> 0, object.video.high >>> 0).toNumber(); if (object.icon != null) if ($util.Long) (message.icon = $util.Long.fromValue(object.icon)).unsigned = false; else if (typeof object.icon === "string") message.icon = parseInt(object.icon, 10); else if (typeof object.icon === "number") message.icon = object.icon; else if (typeof object.icon === "object") message.icon = new $util.LongBits(object.icon.low >>> 0, object.icon.high >>> 0).toNumber(); if (object.parameter) { if (!Array.isArray(object.parameter)) throw TypeError(".game.gift_conf_info.parameter: array expected"); message.parameter = []; for (let i = 0; i < object.parameter.length; ++i) if ($util.Long) (message.parameter[i] = $util.Long.fromValue(object.parameter[i])).unsigned = false; else if (typeof object.parameter[i] === "string") message.parameter[i] = parseInt(object.parameter[i], 10); else if (typeof object.parameter[i] === "number") message.parameter[i] = object.parameter[i]; else if (typeof object.parameter[i] === "object") message.parameter[i] = new $util.LongBits(object.parameter[i].low >>> 0, object.parameter[i].high >>> 0).toNumber(); } return message; }; /** * Creates a plain object from a gift_conf_info message. Also converts values to other types if specified. * @function toObject * @memberof game.gift_conf_info * @static * @param {game.gift_conf_info} message gift_conf_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ gift_conf_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.library = []; object.parameter = []; } if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.sort = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.sort = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.spendtype = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.spendtype = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.spend = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.spend = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.daylimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.daylimit = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.weeklimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.weeklimit = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.video = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.video = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.icon = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.icon = options.longs === String ? "0" : 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.library && message.library.length) { object.library = []; for (let j = 0; j < message.library.length; ++j) if (typeof message.library[j] === "number") object.library[j] = options.longs === String ? String(message.library[j]) : message.library[j]; else object.library[j] = options.longs === String ? $util.Long.prototype.toString.call(message.library[j]) : options.longs === Number ? new $util.LongBits(message.library[j].low >>> 0, message.library[j].high >>> 0).toNumber() : message.library[j]; } if (message.sort != null && message.hasOwnProperty("sort")) if (typeof message.sort === "number") object.sort = options.longs === String ? String(message.sort) : message.sort; else object.sort = options.longs === String ? $util.Long.prototype.toString.call(message.sort) : options.longs === Number ? new $util.LongBits(message.sort.low >>> 0, message.sort.high >>> 0).toNumber() : message.sort; if (message.spendtype != null && message.hasOwnProperty("spendtype")) if (typeof message.spendtype === "number") object.spendtype = options.longs === String ? String(message.spendtype) : message.spendtype; else object.spendtype = options.longs === String ? $util.Long.prototype.toString.call(message.spendtype) : options.longs === Number ? new $util.LongBits(message.spendtype.low >>> 0, message.spendtype.high >>> 0).toNumber() : message.spendtype; if (message.spend != null && message.hasOwnProperty("spend")) if (typeof message.spend === "number") object.spend = options.longs === String ? String(message.spend) : message.spend; else object.spend = options.longs === String ? $util.Long.prototype.toString.call(message.spend) : options.longs === Number ? new $util.LongBits(message.spend.low >>> 0, message.spend.high >>> 0).toNumber() : message.spend; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.daylimit != null && message.hasOwnProperty("daylimit")) if (typeof message.daylimit === "number") object.daylimit = options.longs === String ? String(message.daylimit) : message.daylimit; else object.daylimit = options.longs === String ? $util.Long.prototype.toString.call(message.daylimit) : options.longs === Number ? new $util.LongBits(message.daylimit.low >>> 0, message.daylimit.high >>> 0).toNumber() : message.daylimit; if (message.weeklimit != null && message.hasOwnProperty("weeklimit")) if (typeof message.weeklimit === "number") object.weeklimit = options.longs === String ? String(message.weeklimit) : message.weeklimit; else object.weeklimit = options.longs === String ? $util.Long.prototype.toString.call(message.weeklimit) : options.longs === Number ? new $util.LongBits(message.weeklimit.low >>> 0, message.weeklimit.high >>> 0).toNumber() : message.weeklimit; if (message.video != null && message.hasOwnProperty("video")) if (typeof message.video === "number") object.video = options.longs === String ? String(message.video) : message.video; else object.video = options.longs === String ? $util.Long.prototype.toString.call(message.video) : options.longs === Number ? new $util.LongBits(message.video.low >>> 0, message.video.high >>> 0).toNumber() : message.video; if (message.icon != null && message.hasOwnProperty("icon")) if (typeof message.icon === "number") object.icon = options.longs === String ? String(message.icon) : message.icon; else object.icon = options.longs === String ? $util.Long.prototype.toString.call(message.icon) : options.longs === Number ? new $util.LongBits(message.icon.low >>> 0, message.icon.high >>> 0).toNumber() : message.icon; if (message.parameter && message.parameter.length) { object.parameter = []; for (let j = 0; j < message.parameter.length; ++j) if (typeof message.parameter[j] === "number") object.parameter[j] = options.longs === String ? String(message.parameter[j]) : message.parameter[j]; else object.parameter[j] = options.longs === String ? $util.Long.prototype.toString.call(message.parameter[j]) : options.longs === Number ? new $util.LongBits(message.parameter[j].low >>> 0, message.parameter[j].high >>> 0).toNumber() : message.parameter[j]; } return object; }; /** * Converts this gift_conf_info to JSON. * @function toJSON * @memberof game.gift_conf_info * @instance * @returns {Object.} JSON object */ gift_conf_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return gift_conf_info; })(); game.award_conf_info = (function() { /** * Properties of an award_conf_info. * @memberof game * @interface Iaward_conf_info * @property {number|Long|null} [id] award_conf_info id * @property {Array.|null} [list] award_conf_info list */ /** * Constructs a new award_conf_info. * @memberof game * @classdesc Represents an award_conf_info. * @implements Iaward_conf_info * @constructor * @param {game.Iaward_conf_info=} [properties] Properties to set */ function award_conf_info(properties) { this.list = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * award_conf_info id. * @member {number|Long} id * @memberof game.award_conf_info * @instance */ award_conf_info.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * award_conf_info list. * @member {Array.} list * @memberof game.award_conf_info * @instance */ award_conf_info.prototype.list = $util.emptyArray; /** * Creates a new award_conf_info instance using the specified properties. * @function create * @memberof game.award_conf_info * @static * @param {game.Iaward_conf_info=} [properties] Properties to set * @returns {game.award_conf_info} award_conf_info instance */ award_conf_info.create = function create(properties) { return new award_conf_info(properties); }; /** * Encodes the specified award_conf_info message. Does not implicitly {@link game.award_conf_info.verify|verify} messages. * @function encode * @memberof game.award_conf_info * @static * @param {game.Iaward_conf_info} message award_conf_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ award_conf_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.list != null && message.list.length) for (let i = 0; i < message.list.length; ++i) $root.game.id_num.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified award_conf_info message, length delimited. Does not implicitly {@link game.award_conf_info.verify|verify} messages. * @function encodeDelimited * @memberof game.award_conf_info * @static * @param {game.Iaward_conf_info} message award_conf_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ award_conf_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an award_conf_info message from the specified reader or buffer. * @function decode * @memberof game.award_conf_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.award_conf_info} award_conf_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ award_conf_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.award_conf_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: if (!(message.list && message.list.length)) message.list = []; message.list.push($root.game.id_num.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an award_conf_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.award_conf_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.award_conf_info} award_conf_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ award_conf_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an award_conf_info message. * @function verify * @memberof game.award_conf_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ award_conf_info.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.list != null && message.hasOwnProperty("list")) { if (!Array.isArray(message.list)) return "list: array expected"; for (let i = 0; i < message.list.length; ++i) { let error = $root.game.id_num.verify(message.list[i]); if (error) return "list." + error; } } return null; }; /** * Creates an award_conf_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.award_conf_info * @static * @param {Object.} object Plain object * @returns {game.award_conf_info} award_conf_info */ award_conf_info.fromObject = function fromObject(object) { if (object instanceof $root.game.award_conf_info) return object; let message = new $root.game.award_conf_info(); 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.list) { if (!Array.isArray(object.list)) throw TypeError(".game.award_conf_info.list: array expected"); message.list = []; for (let i = 0; i < object.list.length; ++i) { if (typeof object.list[i] !== "object") throw TypeError(".game.award_conf_info.list: object expected"); message.list[i] = $root.game.id_num.fromObject(object.list[i]); } } return message; }; /** * Creates a plain object from an award_conf_info message. Also converts values to other types if specified. * @function toObject * @memberof game.award_conf_info * @static * @param {game.award_conf_info} message award_conf_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ award_conf_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) object.list = []; if (options.defaults) if ($util.Long) { let 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; 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.list && message.list.length) { object.list = []; for (let j = 0; j < message.list.length; ++j) object.list[j] = $root.game.id_num.toObject(message.list[j], options); } return object; }; /** * Converts this award_conf_info to JSON. * @function toJSON * @memberof game.award_conf_info * @instance * @returns {Object.} JSON object */ award_conf_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return award_conf_info; })(); game.activity_conf_info = (function() { /** * Properties of an activity_conf_info. * @memberof game * @interface Iactivity_conf_info * @property {number|Long|null} [type] activity_conf_info type * @property {Array.|null} [describe] activity_conf_info describe * @property {Array.|null} [parameter1] activity_conf_info parameter1 * @property {Array.|null} [parameter2] activity_conf_info parameter2 * @property {Array.|null} [parameter3] activity_conf_info parameter3 * @property {Array.|null} [giftList] activity_conf_info giftList * @property {Array.|null} [rewardList] activity_conf_info rewardList */ /** * Constructs a new activity_conf_info. * @memberof game * @classdesc Represents an activity_conf_info. * @implements Iactivity_conf_info * @constructor * @param {game.Iactivity_conf_info=} [properties] Properties to set */ function activity_conf_info(properties) { this.describe = []; this.parameter1 = []; this.parameter2 = []; this.parameter3 = []; this.giftList = []; this.rewardList = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * activity_conf_info type. * @member {number|Long} type * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * activity_conf_info describe. * @member {Array.} describe * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.describe = $util.emptyArray; /** * activity_conf_info parameter1. * @member {Array.} parameter1 * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.parameter1 = $util.emptyArray; /** * activity_conf_info parameter2. * @member {Array.} parameter2 * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.parameter2 = $util.emptyArray; /** * activity_conf_info parameter3. * @member {Array.} parameter3 * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.parameter3 = $util.emptyArray; /** * activity_conf_info giftList. * @member {Array.} giftList * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.giftList = $util.emptyArray; /** * activity_conf_info rewardList. * @member {Array.} rewardList * @memberof game.activity_conf_info * @instance */ activity_conf_info.prototype.rewardList = $util.emptyArray; /** * Creates a new activity_conf_info instance using the specified properties. * @function create * @memberof game.activity_conf_info * @static * @param {game.Iactivity_conf_info=} [properties] Properties to set * @returns {game.activity_conf_info} activity_conf_info instance */ activity_conf_info.create = function create(properties) { return new activity_conf_info(properties); }; /** * Encodes the specified activity_conf_info message. Does not implicitly {@link game.activity_conf_info.verify|verify} messages. * @function encode * @memberof game.activity_conf_info * @static * @param {game.Iactivity_conf_info} message activity_conf_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_conf_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.describe != null && message.describe.length) for (let i = 0; i < message.describe.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.describe[i]); if (message.parameter1 != null && message.parameter1.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (let i = 0; i < message.parameter1.length; ++i) writer.int64(message.parameter1[i]); writer.ldelim(); } if (message.parameter2 != null && message.parameter2.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (let i = 0; i < message.parameter2.length; ++i) writer.int64(message.parameter2[i]); writer.ldelim(); } if (message.parameter3 != null && message.parameter3.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (let i = 0; i < message.parameter3.length; ++i) writer.int64(message.parameter3[i]); writer.ldelim(); } if (message.giftList != null && message.giftList.length) for (let i = 0; i < message.giftList.length; ++i) $root.game.gift_conf_info.encode(message.giftList[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.rewardList != null && message.rewardList.length) for (let i = 0; i < message.rewardList.length; ++i) $root.game.award_conf_info.encode(message.rewardList[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** * Encodes the specified activity_conf_info message, length delimited. Does not implicitly {@link game.activity_conf_info.verify|verify} messages. * @function encodeDelimited * @memberof game.activity_conf_info * @static * @param {game.Iactivity_conf_info} message activity_conf_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ activity_conf_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an activity_conf_info message from the specified reader or buffer. * @function decode * @memberof game.activity_conf_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.activity_conf_info} activity_conf_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_conf_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.activity_conf_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: if (!(message.describe && message.describe.length)) message.describe = []; message.describe.push(reader.string()); break; case 3: if (!(message.parameter1 && message.parameter1.length)) message.parameter1 = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.parameter1.push(reader.int64()); } else message.parameter1.push(reader.int64()); break; case 4: if (!(message.parameter2 && message.parameter2.length)) message.parameter2 = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.parameter2.push(reader.int64()); } else message.parameter2.push(reader.int64()); break; case 5: if (!(message.parameter3 && message.parameter3.length)) message.parameter3 = []; if ((tag & 7) === 2) { let end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.parameter3.push(reader.int64()); } else message.parameter3.push(reader.int64()); break; case 6: if (!(message.giftList && message.giftList.length)) message.giftList = []; message.giftList.push($root.game.gift_conf_info.decode(reader, reader.uint32())); break; case 7: if (!(message.rewardList && message.rewardList.length)) message.rewardList = []; message.rewardList.push($root.game.award_conf_info.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an activity_conf_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.activity_conf_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.activity_conf_info} activity_conf_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ activity_conf_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an activity_conf_info message. * @function verify * @memberof game.activity_conf_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ activity_conf_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.describe != null && message.hasOwnProperty("describe")) { if (!Array.isArray(message.describe)) return "describe: array expected"; for (let i = 0; i < message.describe.length; ++i) if (!$util.isString(message.describe[i])) return "describe: string[] expected"; } if (message.parameter1 != null && message.hasOwnProperty("parameter1")) { if (!Array.isArray(message.parameter1)) return "parameter1: array expected"; for (let i = 0; i < message.parameter1.length; ++i) if (!$util.isInteger(message.parameter1[i]) && !(message.parameter1[i] && $util.isInteger(message.parameter1[i].low) && $util.isInteger(message.parameter1[i].high))) return "parameter1: integer|Long[] expected"; } if (message.parameter2 != null && message.hasOwnProperty("parameter2")) { if (!Array.isArray(message.parameter2)) return "parameter2: array expected"; for (let i = 0; i < message.parameter2.length; ++i) if (!$util.isInteger(message.parameter2[i]) && !(message.parameter2[i] && $util.isInteger(message.parameter2[i].low) && $util.isInteger(message.parameter2[i].high))) return "parameter2: integer|Long[] expected"; } if (message.parameter3 != null && message.hasOwnProperty("parameter3")) { if (!Array.isArray(message.parameter3)) return "parameter3: array expected"; for (let i = 0; i < message.parameter3.length; ++i) if (!$util.isInteger(message.parameter3[i]) && !(message.parameter3[i] && $util.isInteger(message.parameter3[i].low) && $util.isInteger(message.parameter3[i].high))) return "parameter3: integer|Long[] expected"; } if (message.giftList != null && message.hasOwnProperty("giftList")) { if (!Array.isArray(message.giftList)) return "giftList: array expected"; for (let i = 0; i < message.giftList.length; ++i) { let error = $root.game.gift_conf_info.verify(message.giftList[i]); if (error) return "giftList." + error; } } if (message.rewardList != null && message.hasOwnProperty("rewardList")) { if (!Array.isArray(message.rewardList)) return "rewardList: array expected"; for (let i = 0; i < message.rewardList.length; ++i) { let error = $root.game.award_conf_info.verify(message.rewardList[i]); if (error) return "rewardList." + error; } } return null; }; /** * Creates an activity_conf_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.activity_conf_info * @static * @param {Object.} object Plain object * @returns {game.activity_conf_info} activity_conf_info */ activity_conf_info.fromObject = function fromObject(object) { if (object instanceof $root.game.activity_conf_info) return object; let message = new $root.game.activity_conf_info(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.describe) { if (!Array.isArray(object.describe)) throw TypeError(".game.activity_conf_info.describe: array expected"); message.describe = []; for (let i = 0; i < object.describe.length; ++i) message.describe[i] = String(object.describe[i]); } if (object.parameter1) { if (!Array.isArray(object.parameter1)) throw TypeError(".game.activity_conf_info.parameter1: array expected"); message.parameter1 = []; for (let i = 0; i < object.parameter1.length; ++i) if ($util.Long) (message.parameter1[i] = $util.Long.fromValue(object.parameter1[i])).unsigned = false; else if (typeof object.parameter1[i] === "string") message.parameter1[i] = parseInt(object.parameter1[i], 10); else if (typeof object.parameter1[i] === "number") message.parameter1[i] = object.parameter1[i]; else if (typeof object.parameter1[i] === "object") message.parameter1[i] = new $util.LongBits(object.parameter1[i].low >>> 0, object.parameter1[i].high >>> 0).toNumber(); } if (object.parameter2) { if (!Array.isArray(object.parameter2)) throw TypeError(".game.activity_conf_info.parameter2: array expected"); message.parameter2 = []; for (let i = 0; i < object.parameter2.length; ++i) if ($util.Long) (message.parameter2[i] = $util.Long.fromValue(object.parameter2[i])).unsigned = false; else if (typeof object.parameter2[i] === "string") message.parameter2[i] = parseInt(object.parameter2[i], 10); else if (typeof object.parameter2[i] === "number") message.parameter2[i] = object.parameter2[i]; else if (typeof object.parameter2[i] === "object") message.parameter2[i] = new $util.LongBits(object.parameter2[i].low >>> 0, object.parameter2[i].high >>> 0).toNumber(); } if (object.parameter3) { if (!Array.isArray(object.parameter3)) throw TypeError(".game.activity_conf_info.parameter3: array expected"); message.parameter3 = []; for (let i = 0; i < object.parameter3.length; ++i) if ($util.Long) (message.parameter3[i] = $util.Long.fromValue(object.parameter3[i])).unsigned = false; else if (typeof object.parameter3[i] === "string") message.parameter3[i] = parseInt(object.parameter3[i], 10); else if (typeof object.parameter3[i] === "number") message.parameter3[i] = object.parameter3[i]; else if (typeof object.parameter3[i] === "object") message.parameter3[i] = new $util.LongBits(object.parameter3[i].low >>> 0, object.parameter3[i].high >>> 0).toNumber(); } if (object.giftList) { if (!Array.isArray(object.giftList)) throw TypeError(".game.activity_conf_info.giftList: array expected"); message.giftList = []; for (let i = 0; i < object.giftList.length; ++i) { if (typeof object.giftList[i] !== "object") throw TypeError(".game.activity_conf_info.giftList: object expected"); message.giftList[i] = $root.game.gift_conf_info.fromObject(object.giftList[i]); } } if (object.rewardList) { if (!Array.isArray(object.rewardList)) throw TypeError(".game.activity_conf_info.rewardList: array expected"); message.rewardList = []; for (let i = 0; i < object.rewardList.length; ++i) { if (typeof object.rewardList[i] !== "object") throw TypeError(".game.activity_conf_info.rewardList: object expected"); message.rewardList[i] = $root.game.award_conf_info.fromObject(object.rewardList[i]); } } return message; }; /** * Creates a plain object from an activity_conf_info message. Also converts values to other types if specified. * @function toObject * @memberof game.activity_conf_info * @static * @param {game.activity_conf_info} message activity_conf_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ activity_conf_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.arrays || options.defaults) { object.describe = []; object.parameter1 = []; object.parameter2 = []; object.parameter3 = []; object.giftList = []; object.rewardList = []; } if (options.defaults) if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.describe && message.describe.length) { object.describe = []; for (let j = 0; j < message.describe.length; ++j) object.describe[j] = message.describe[j]; } if (message.parameter1 && message.parameter1.length) { object.parameter1 = []; for (let j = 0; j < message.parameter1.length; ++j) if (typeof message.parameter1[j] === "number") object.parameter1[j] = options.longs === String ? String(message.parameter1[j]) : message.parameter1[j]; else object.parameter1[j] = options.longs === String ? $util.Long.prototype.toString.call(message.parameter1[j]) : options.longs === Number ? new $util.LongBits(message.parameter1[j].low >>> 0, message.parameter1[j].high >>> 0).toNumber() : message.parameter1[j]; } if (message.parameter2 && message.parameter2.length) { object.parameter2 = []; for (let j = 0; j < message.parameter2.length; ++j) if (typeof message.parameter2[j] === "number") object.parameter2[j] = options.longs === String ? String(message.parameter2[j]) : message.parameter2[j]; else object.parameter2[j] = options.longs === String ? $util.Long.prototype.toString.call(message.parameter2[j]) : options.longs === Number ? new $util.LongBits(message.parameter2[j].low >>> 0, message.parameter2[j].high >>> 0).toNumber() : message.parameter2[j]; } if (message.parameter3 && message.parameter3.length) { object.parameter3 = []; for (let j = 0; j < message.parameter3.length; ++j) if (typeof message.parameter3[j] === "number") object.parameter3[j] = options.longs === String ? String(message.parameter3[j]) : message.parameter3[j]; else object.parameter3[j] = options.longs === String ? $util.Long.prototype.toString.call(message.parameter3[j]) : options.longs === Number ? new $util.LongBits(message.parameter3[j].low >>> 0, message.parameter3[j].high >>> 0).toNumber() : message.parameter3[j]; } if (message.giftList && message.giftList.length) { object.giftList = []; for (let j = 0; j < message.giftList.length; ++j) object.giftList[j] = $root.game.gift_conf_info.toObject(message.giftList[j], options); } if (message.rewardList && message.rewardList.length) { object.rewardList = []; for (let j = 0; j < message.rewardList.length; ++j) object.rewardList[j] = $root.game.award_conf_info.toObject(message.rewardList[j], options); } return object; }; /** * Converts this activity_conf_info to JSON. * @function toJSON * @memberof game.activity_conf_info * @instance * @returns {Object.} JSON object */ activity_conf_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return activity_conf_info; })(); game.privilege_card_info = (function() { /** * Properties of a privilege_card_info. * @memberof game * @interface Iprivilege_card_info * @property {number|Long|null} [moduleid] privilege_card_info moduleid * @property {boolean|null} [state] privilege_card_info state * @property {number|Long|null} [startTime] privilege_card_info startTime * @property {boolean|null} [award] privilege_card_info award */ /** * Constructs a new privilege_card_info. * @memberof game * @classdesc Represents a privilege_card_info. * @implements Iprivilege_card_info * @constructor * @param {game.Iprivilege_card_info=} [properties] Properties to set */ function privilege_card_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * privilege_card_info moduleid. * @member {number|Long} moduleid * @memberof game.privilege_card_info * @instance */ privilege_card_info.prototype.moduleid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * privilege_card_info state. * @member {boolean} state * @memberof game.privilege_card_info * @instance */ privilege_card_info.prototype.state = false; /** * privilege_card_info startTime. * @member {number|Long} startTime * @memberof game.privilege_card_info * @instance */ privilege_card_info.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * privilege_card_info award. * @member {boolean} award * @memberof game.privilege_card_info * @instance */ privilege_card_info.prototype.award = false; /** * Creates a new privilege_card_info instance using the specified properties. * @function create * @memberof game.privilege_card_info * @static * @param {game.Iprivilege_card_info=} [properties] Properties to set * @returns {game.privilege_card_info} privilege_card_info instance */ privilege_card_info.create = function create(properties) { return new privilege_card_info(properties); }; /** * Encodes the specified privilege_card_info message. Does not implicitly {@link game.privilege_card_info.verify|verify} messages. * @function encode * @memberof game.privilege_card_info * @static * @param {game.Iprivilege_card_info} message privilege_card_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.moduleid != null && Object.hasOwnProperty.call(message, "moduleid")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.moduleid); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.state); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.startTime); if (message.award != null && Object.hasOwnProperty.call(message, "award")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.award); return writer; }; /** * Encodes the specified privilege_card_info message, length delimited. Does not implicitly {@link game.privilege_card_info.verify|verify} messages. * @function encodeDelimited * @memberof game.privilege_card_info * @static * @param {game.Iprivilege_card_info} message privilege_card_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ privilege_card_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a privilege_card_info message from the specified reader or buffer. * @function decode * @memberof game.privilege_card_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.privilege_card_info} privilege_card_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.privilege_card_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.moduleid = reader.int64(); break; case 2: message.state = reader.bool(); break; case 3: message.startTime = reader.int64(); break; case 4: message.award = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a privilege_card_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.privilege_card_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.privilege_card_info} privilege_card_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ privilege_card_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a privilege_card_info message. * @function verify * @memberof game.privilege_card_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ privilege_card_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (!$util.isInteger(message.moduleid) && !(message.moduleid && $util.isInteger(message.moduleid.low) && $util.isInteger(message.moduleid.high))) return "moduleid: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) if (typeof message.state !== "boolean") return "state: boolean expected"; if (message.startTime != null && message.hasOwnProperty("startTime")) if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; if (message.award != null && message.hasOwnProperty("award")) if (typeof message.award !== "boolean") return "award: boolean expected"; return null; }; /** * Creates a privilege_card_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.privilege_card_info * @static * @param {Object.} object Plain object * @returns {game.privilege_card_info} privilege_card_info */ privilege_card_info.fromObject = function fromObject(object) { if (object instanceof $root.game.privilege_card_info) return object; let message = new $root.game.privilege_card_info(); if (object.moduleid != null) if ($util.Long) (message.moduleid = $util.Long.fromValue(object.moduleid)).unsigned = false; else if (typeof object.moduleid === "string") message.moduleid = parseInt(object.moduleid, 10); else if (typeof object.moduleid === "number") message.moduleid = object.moduleid; else if (typeof object.moduleid === "object") message.moduleid = new $util.LongBits(object.moduleid.low >>> 0, object.moduleid.high >>> 0).toNumber(); if (object.state != null) message.state = Boolean(object.state); if (object.startTime != null) if ($util.Long) (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; else if (typeof object.startTime === "string") message.startTime = parseInt(object.startTime, 10); else if (typeof object.startTime === "number") message.startTime = object.startTime; else if (typeof object.startTime === "object") message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); if (object.award != null) message.award = Boolean(object.award); return message; }; /** * Creates a plain object from a privilege_card_info message. Also converts values to other types if specified. * @function toObject * @memberof game.privilege_card_info * @static * @param {game.privilege_card_info} message privilege_card_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ privilege_card_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.moduleid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.moduleid = options.longs === String ? "0" : 0; object.state = false; if ($util.Long) { let long = new $util.Long(0, 0, false); object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.startTime = options.longs === String ? "0" : 0; object.award = false; } if (message.moduleid != null && message.hasOwnProperty("moduleid")) if (typeof message.moduleid === "number") object.moduleid = options.longs === String ? String(message.moduleid) : message.moduleid; else object.moduleid = options.longs === String ? $util.Long.prototype.toString.call(message.moduleid) : options.longs === Number ? new $util.LongBits(message.moduleid.low >>> 0, message.moduleid.high >>> 0).toNumber() : message.moduleid; if (message.state != null && message.hasOwnProperty("state")) object.state = message.state; if (message.startTime != null && message.hasOwnProperty("startTime")) if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; if (message.award != null && message.hasOwnProperty("award")) object.award = message.award; return object; }; /** * Converts this privilege_card_info to JSON. * @function toJSON * @memberof game.privilege_card_info * @instance * @returns {Object.} JSON object */ privilege_card_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return privilege_card_info; })(); game.daily_dungeons_info = (function() { /** * Properties of a daily_dungeons_info. * @memberof game * @interface Idaily_dungeons_info * @property {number|Long|null} [type] daily_dungeons_info type * @property {number|Long|null} [diff] daily_dungeons_info diff * @property {number|Long|null} [num] daily_dungeons_info num */ /** * Constructs a new daily_dungeons_info. * @memberof game * @classdesc Represents a daily_dungeons_info. * @implements Idaily_dungeons_info * @constructor * @param {game.Idaily_dungeons_info=} [properties] Properties to set */ function daily_dungeons_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * daily_dungeons_info type. * @member {number|Long} type * @memberof game.daily_dungeons_info * @instance */ daily_dungeons_info.prototype.type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_info diff. * @member {number|Long} diff * @memberof game.daily_dungeons_info * @instance */ daily_dungeons_info.prototype.diff = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * daily_dungeons_info num. * @member {number|Long} num * @memberof game.daily_dungeons_info * @instance */ daily_dungeons_info.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new daily_dungeons_info instance using the specified properties. * @function create * @memberof game.daily_dungeons_info * @static * @param {game.Idaily_dungeons_info=} [properties] Properties to set * @returns {game.daily_dungeons_info} daily_dungeons_info instance */ daily_dungeons_info.create = function create(properties) { return new daily_dungeons_info(properties); }; /** * Encodes the specified daily_dungeons_info message. Does not implicitly {@link game.daily_dungeons_info.verify|verify} messages. * @function encode * @memberof game.daily_dungeons_info * @static * @param {game.Idaily_dungeons_info} message daily_dungeons_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.type); if (message.diff != null && Object.hasOwnProperty.call(message, "diff")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diff); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.num); return writer; }; /** * Encodes the specified daily_dungeons_info message, length delimited. Does not implicitly {@link game.daily_dungeons_info.verify|verify} messages. * @function encodeDelimited * @memberof game.daily_dungeons_info * @static * @param {game.Idaily_dungeons_info} message daily_dungeons_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ daily_dungeons_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a daily_dungeons_info message from the specified reader or buffer. * @function decode * @memberof game.daily_dungeons_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.daily_dungeons_info} daily_dungeons_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.daily_dungeons_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.type = reader.int64(); break; case 2: message.diff = reader.int64(); break; case 3: message.num = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a daily_dungeons_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.daily_dungeons_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.daily_dungeons_info} daily_dungeons_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ daily_dungeons_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a daily_dungeons_info message. * @function verify * @memberof game.daily_dungeons_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ daily_dungeons_info.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type) && !(message.type && $util.isInteger(message.type.low) && $util.isInteger(message.type.high))) return "type: integer|Long expected"; if (message.diff != null && message.hasOwnProperty("diff")) if (!$util.isInteger(message.diff) && !(message.diff && $util.isInteger(message.diff.low) && $util.isInteger(message.diff.high))) return "diff: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; return null; }; /** * Creates a daily_dungeons_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.daily_dungeons_info * @static * @param {Object.} object Plain object * @returns {game.daily_dungeons_info} daily_dungeons_info */ daily_dungeons_info.fromObject = function fromObject(object) { if (object instanceof $root.game.daily_dungeons_info) return object; let message = new $root.game.daily_dungeons_info(); if (object.type != null) if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false; else if (typeof object.type === "string") message.type = parseInt(object.type, 10); else if (typeof object.type === "number") message.type = object.type; else if (typeof object.type === "object") message.type = new $util.LongBits(object.type.low >>> 0, object.type.high >>> 0).toNumber(); if (object.diff != null) if ($util.Long) (message.diff = $util.Long.fromValue(object.diff)).unsigned = false; else if (typeof object.diff === "string") message.diff = parseInt(object.diff, 10); else if (typeof object.diff === "number") message.diff = object.diff; else if (typeof object.diff === "object") message.diff = new $util.LongBits(object.diff.low >>> 0, object.diff.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a daily_dungeons_info message. Also converts values to other types if specified. * @function toObject * @memberof game.daily_dungeons_info * @static * @param {game.daily_dungeons_info} message daily_dungeons_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ daily_dungeons_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.type = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.diff = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.diff = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; } if (message.type != null && message.hasOwnProperty("type")) if (typeof message.type === "number") object.type = options.longs === String ? String(message.type) : message.type; else object.type = options.longs === String ? $util.Long.prototype.toString.call(message.type) : options.longs === Number ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber() : message.type; if (message.diff != null && message.hasOwnProperty("diff")) if (typeof message.diff === "number") object.diff = options.longs === String ? String(message.diff) : message.diff; else object.diff = options.longs === String ? $util.Long.prototype.toString.call(message.diff) : options.longs === Number ? new $util.LongBits(message.diff.low >>> 0, message.diff.high >>> 0).toNumber() : message.diff; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; return object; }; /** * Converts this daily_dungeons_info to JSON. * @function toJSON * @memberof game.daily_dungeons_info * @instance * @returns {Object.} JSON object */ daily_dungeons_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return daily_dungeons_info; })(); game.pop_gift_conf = (function() { /** * Properties of a pop_gift_conf. * @memberof game * @interface Ipop_gift_conf * @property {number|Long|null} [spendtype] pop_gift_conf spendtype * @property {number|Long|null} [spend] pop_gift_conf spend * @property {number|Long|null} [num] pop_gift_conf num * @property {number|Long|null} [library] pop_gift_conf library */ /** * Constructs a new pop_gift_conf. * @memberof game * @classdesc Represents a pop_gift_conf. * @implements Ipop_gift_conf * @constructor * @param {game.Ipop_gift_conf=} [properties] Properties to set */ function pop_gift_conf(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_conf spendtype. * @member {number|Long} spendtype * @memberof game.pop_gift_conf * @instance */ pop_gift_conf.prototype.spendtype = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_conf spend. * @member {number|Long} spend * @memberof game.pop_gift_conf * @instance */ pop_gift_conf.prototype.spend = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_conf num. * @member {number|Long} num * @memberof game.pop_gift_conf * @instance */ pop_gift_conf.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_conf library. * @member {number|Long} library * @memberof game.pop_gift_conf * @instance */ pop_gift_conf.prototype.library = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new pop_gift_conf instance using the specified properties. * @function create * @memberof game.pop_gift_conf * @static * @param {game.Ipop_gift_conf=} [properties] Properties to set * @returns {game.pop_gift_conf} pop_gift_conf instance */ pop_gift_conf.create = function create(properties) { return new pop_gift_conf(properties); }; /** * Encodes the specified pop_gift_conf message. Does not implicitly {@link game.pop_gift_conf.verify|verify} messages. * @function encode * @memberof game.pop_gift_conf * @static * @param {game.Ipop_gift_conf} message pop_gift_conf message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_conf.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.spendtype != null && Object.hasOwnProperty.call(message, "spendtype")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.spendtype); if (message.spend != null && Object.hasOwnProperty.call(message, "spend")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.spend); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.num); if (message.library != null && Object.hasOwnProperty.call(message, "library")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.library); return writer; }; /** * Encodes the specified pop_gift_conf message, length delimited. Does not implicitly {@link game.pop_gift_conf.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_conf * @static * @param {game.Ipop_gift_conf} message pop_gift_conf message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_conf.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_conf message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_conf * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_conf} pop_gift_conf * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_conf.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_conf(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.spendtype = reader.int64(); break; case 2: message.spend = reader.int64(); break; case 3: message.num = reader.int64(); break; case 4: message.library = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_conf message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_conf * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_conf} pop_gift_conf * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_conf.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_conf message. * @function verify * @memberof game.pop_gift_conf * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_conf.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.spendtype != null && message.hasOwnProperty("spendtype")) if (!$util.isInteger(message.spendtype) && !(message.spendtype && $util.isInteger(message.spendtype.low) && $util.isInteger(message.spendtype.high))) return "spendtype: integer|Long expected"; if (message.spend != null && message.hasOwnProperty("spend")) if (!$util.isInteger(message.spend) && !(message.spend && $util.isInteger(message.spend.low) && $util.isInteger(message.spend.high))) return "spend: integer|Long expected"; if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.library != null && message.hasOwnProperty("library")) if (!$util.isInteger(message.library) && !(message.library && $util.isInteger(message.library.low) && $util.isInteger(message.library.high))) return "library: integer|Long expected"; return null; }; /** * Creates a pop_gift_conf message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_conf * @static * @param {Object.} object Plain object * @returns {game.pop_gift_conf} pop_gift_conf */ pop_gift_conf.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_conf) return object; let message = new $root.game.pop_gift_conf(); if (object.spendtype != null) if ($util.Long) (message.spendtype = $util.Long.fromValue(object.spendtype)).unsigned = false; else if (typeof object.spendtype === "string") message.spendtype = parseInt(object.spendtype, 10); else if (typeof object.spendtype === "number") message.spendtype = object.spendtype; else if (typeof object.spendtype === "object") message.spendtype = new $util.LongBits(object.spendtype.low >>> 0, object.spendtype.high >>> 0).toNumber(); if (object.spend != null) if ($util.Long) (message.spend = $util.Long.fromValue(object.spend)).unsigned = false; else if (typeof object.spend === "string") message.spend = parseInt(object.spend, 10); else if (typeof object.spend === "number") message.spend = object.spend; else if (typeof object.spend === "object") message.spend = new $util.LongBits(object.spend.low >>> 0, object.spend.high >>> 0).toNumber(); if (object.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.library != null) if ($util.Long) (message.library = $util.Long.fromValue(object.library)).unsigned = false; else if (typeof object.library === "string") message.library = parseInt(object.library, 10); else if (typeof object.library === "number") message.library = object.library; else if (typeof object.library === "object") message.library = new $util.LongBits(object.library.low >>> 0, object.library.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a pop_gift_conf message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_conf * @static * @param {game.pop_gift_conf} message pop_gift_conf * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_conf.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let long = new $util.Long(0, 0, false); object.spendtype = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.spendtype = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.spend = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.spend = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.library = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.library = options.longs === String ? "0" : 0; } if (message.spendtype != null && message.hasOwnProperty("spendtype")) if (typeof message.spendtype === "number") object.spendtype = options.longs === String ? String(message.spendtype) : message.spendtype; else object.spendtype = options.longs === String ? $util.Long.prototype.toString.call(message.spendtype) : options.longs === Number ? new $util.LongBits(message.spendtype.low >>> 0, message.spendtype.high >>> 0).toNumber() : message.spendtype; if (message.spend != null && message.hasOwnProperty("spend")) if (typeof message.spend === "number") object.spend = options.longs === String ? String(message.spend) : message.spend; else object.spend = options.longs === String ? $util.Long.prototype.toString.call(message.spend) : options.longs === Number ? new $util.LongBits(message.spend.low >>> 0, message.spend.high >>> 0).toNumber() : message.spend; if (message.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.library != null && message.hasOwnProperty("library")) if (typeof message.library === "number") object.library = options.longs === String ? String(message.library) : message.library; else object.library = options.longs === String ? $util.Long.prototype.toString.call(message.library) : options.longs === Number ? new $util.LongBits(message.library.low >>> 0, message.library.high >>> 0).toNumber() : message.library; return object; }; /** * Converts this pop_gift_conf to JSON. * @function toJSON * @memberof game.pop_gift_conf * @instance * @returns {Object.} JSON object */ pop_gift_conf.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_conf; })(); game.pop_gift_info = (function() { /** * Properties of a pop_gift_info. * @memberof game * @interface Ipop_gift_info * @property {number|Long|null} [id] pop_gift_info id * @property {number|Long|null} [num] pop_gift_info num * @property {number|Long|null} [time] pop_gift_info time * @property {game.Ipop_gift_conf|null} [conf] pop_gift_info conf */ /** * Constructs a new pop_gift_info. * @memberof game * @classdesc Represents a pop_gift_info. * @implements Ipop_gift_info * @constructor * @param {game.Ipop_gift_info=} [properties] Properties to set */ function pop_gift_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * pop_gift_info id. * @member {number|Long} id * @memberof game.pop_gift_info * @instance */ pop_gift_info.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_info num. * @member {number|Long} num * @memberof game.pop_gift_info * @instance */ pop_gift_info.prototype.num = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_info time. * @member {number|Long} time * @memberof game.pop_gift_info * @instance */ pop_gift_info.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * pop_gift_info conf. * @member {game.Ipop_gift_conf|null|undefined} conf * @memberof game.pop_gift_info * @instance */ pop_gift_info.prototype.conf = null; /** * Creates a new pop_gift_info instance using the specified properties. * @function create * @memberof game.pop_gift_info * @static * @param {game.Ipop_gift_info=} [properties] Properties to set * @returns {game.pop_gift_info} pop_gift_info instance */ pop_gift_info.create = function create(properties) { return new pop_gift_info(properties); }; /** * Encodes the specified pop_gift_info message. Does not implicitly {@link game.pop_gift_info.verify|verify} messages. * @function encode * @memberof game.pop_gift_info * @static * @param {game.Ipop_gift_info} message pop_gift_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.num); if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time); if (message.conf != null && Object.hasOwnProperty.call(message, "conf")) $root.game.pop_gift_conf.encode(message.conf, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified pop_gift_info message, length delimited. Does not implicitly {@link game.pop_gift_info.verify|verify} messages. * @function encodeDelimited * @memberof game.pop_gift_info * @static * @param {game.Ipop_gift_info} message pop_gift_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ pop_gift_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a pop_gift_info message from the specified reader or buffer. * @function decode * @memberof game.pop_gift_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.pop_gift_info} pop_gift_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.pop_gift_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.num = reader.int64(); break; case 3: message.time = reader.int64(); break; case 4: message.conf = $root.game.pop_gift_conf.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a pop_gift_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.pop_gift_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.pop_gift_info} pop_gift_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ pop_gift_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a pop_gift_info message. * @function verify * @memberof game.pop_gift_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ pop_gift_info.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.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))) return "num: integer|Long expected"; if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) return "time: integer|Long expected"; if (message.conf != null && message.hasOwnProperty("conf")) { let error = $root.game.pop_gift_conf.verify(message.conf); if (error) return "conf." + error; } return null; }; /** * Creates a pop_gift_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.pop_gift_info * @static * @param {Object.} object Plain object * @returns {game.pop_gift_info} pop_gift_info */ pop_gift_info.fromObject = function fromObject(object) { if (object instanceof $root.game.pop_gift_info) return object; let message = new $root.game.pop_gift_info(); 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.num != null) if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false; else if (typeof object.num === "string") message.num = parseInt(object.num, 10); else if (typeof object.num === "number") message.num = object.num; else if (typeof object.num === "object") message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(); if (object.time != null) if ($util.Long) (message.time = $util.Long.fromValue(object.time)).unsigned = false; else if (typeof object.time === "string") message.time = parseInt(object.time, 10); else if (typeof object.time === "number") message.time = object.time; else if (typeof object.time === "object") message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(); if (object.conf != null) { if (typeof object.conf !== "object") throw TypeError(".game.pop_gift_info.conf: object expected"); message.conf = $root.game.pop_gift_conf.fromObject(object.conf); } return message; }; /** * Creates a plain object from a pop_gift_info message. Also converts values to other types if specified. * @function toObject * @memberof game.pop_gift_info * @static * @param {game.pop_gift_info} message pop_gift_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ pop_gift_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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; if ($util.Long) { let long = new $util.Long(0, 0, false); object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.num = options.longs === String ? "0" : 0; if ($util.Long) { let long = new $util.Long(0, 0, false); object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.time = options.longs === String ? "0" : 0; object.conf = null; } 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.num != null && message.hasOwnProperty("num")) if (typeof message.num === "number") object.num = options.longs === String ? String(message.num) : message.num; else object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber() : message.num; if (message.time != null && message.hasOwnProperty("time")) if (typeof message.time === "number") object.time = options.longs === String ? String(message.time) : message.time; else object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber() : message.time; if (message.conf != null && message.hasOwnProperty("conf")) object.conf = $root.game.pop_gift_conf.toObject(message.conf, options); return object; }; /** * Converts this pop_gift_info to JSON. * @function toJSON * @memberof game.pop_gift_info * @instance * @returns {Object.} JSON object */ pop_gift_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return pop_gift_info; })(); game.red_point_info = (function() { /** * Properties of a red_point_info. * @memberof game * @interface Ired_point_info * @property {number|Long|null} [id] red_point_info id * @property {boolean|null} [red] red_point_info red */ /** * Constructs a new red_point_info. * @memberof game * @classdesc Represents a red_point_info. * @implements Ired_point_info * @constructor * @param {game.Ired_point_info=} [properties] Properties to set */ function red_point_info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * red_point_info id. * @member {number|Long} id * @memberof game.red_point_info * @instance */ red_point_info.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * red_point_info red. * @member {boolean} red * @memberof game.red_point_info * @instance */ red_point_info.prototype.red = false; /** * Creates a new red_point_info instance using the specified properties. * @function create * @memberof game.red_point_info * @static * @param {game.Ired_point_info=} [properties] Properties to set * @returns {game.red_point_info} red_point_info instance */ red_point_info.create = function create(properties) { return new red_point_info(properties); }; /** * Encodes the specified red_point_info message. Does not implicitly {@link game.red_point_info.verify|verify} messages. * @function encode * @memberof game.red_point_info * @static * @param {game.Ired_point_info} message red_point_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ red_point_info.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); if (message.red != null && Object.hasOwnProperty.call(message, "red")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.red); return writer; }; /** * Encodes the specified red_point_info message, length delimited. Does not implicitly {@link game.red_point_info.verify|verify} messages. * @function encodeDelimited * @memberof game.red_point_info * @static * @param {game.Ired_point_info} message red_point_info message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ red_point_info.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a red_point_info message from the specified reader or buffer. * @function decode * @memberof game.red_point_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {game.red_point_info} red_point_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ red_point_info.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); let end = length === undefined ? reader.len : reader.pos + length, message = new $root.game.red_point_info(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = reader.int64(); break; case 2: message.red = reader.bool(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a red_point_info message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof game.red_point_info * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {game.red_point_info} red_point_info * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ red_point_info.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a red_point_info message. * @function verify * @memberof game.red_point_info * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ red_point_info.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.red != null && message.hasOwnProperty("red")) if (typeof message.red !== "boolean") return "red: boolean expected"; return null; }; /** * Creates a red_point_info message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof game.red_point_info * @static * @param {Object.} object Plain object * @returns {game.red_point_info} red_point_info */ red_point_info.fromObject = function fromObject(object) { if (object instanceof $root.game.red_point_info) return object; let message = new $root.game.red_point_info(); 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.red != null) message.red = Boolean(object.red); return message; }; /** * Creates a plain object from a red_point_info message. Also converts values to other types if specified. * @function toObject * @memberof game.red_point_info * @static * @param {game.red_point_info} message red_point_info * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ red_point_info.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; if (options.defaults) { if ($util.Long) { let 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.red = false; } 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.red != null && message.hasOwnProperty("red")) object.red = message.red; return object; }; /** * Converts this red_point_info to JSON. * @function toJSON * @memberof game.red_point_info * @instance * @returns {Object.} JSON object */ red_point_info.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return red_point_info; })(); /** * msg_cmd enum. * @name game.msg_cmd * @enum {number} * @property {number} cmd_ping=0 cmd_ping value * @property {number} cmd_ping_rsp=1 cmd_ping_rsp value * @property {number} cmd_login=2 cmd_login value * @property {number} cmd_login_rsp=3 cmd_login_rsp value * @property {number} cmd_create=4 cmd_create value * @property {number} cmd_create_rsp=5 cmd_create_rsp value * @property {number} cmd_reward_info=6 cmd_reward_info value * @property {number} cmd_user=7 cmd_user value * @property {number} cmd_pay_currency=8 cmd_pay_currency value * @property {number} cmd_pay_debris_nty=9 cmd_pay_debris_nty value * @property {number} cmd_exception_nty=10 cmd_exception_nty value * @property {number} cmd_create_order_nty=11 cmd_create_order_nty value * @property {number} cmd_recharge_result=100 cmd_recharge_result value * @property {number} cmd_recharge_result_rsp=101 cmd_recharge_result_rsp value * @property {number} cmd_city_change=1000 cmd_city_change value * @property {number} cmd_city_data=1001 cmd_city_data value * @property {number} cmd_city_data_rsp=1002 cmd_city_data_rsp value * @property {number} cmd_building_upgrade=1003 cmd_building_upgrade value * @property {number} cmd_building_upgrade_rsp=1004 cmd_building_upgrade_rsp value * @property {number} cmd_building_one_key=1005 cmd_building_one_key value * @property {number} cmd_building_one_key_rsp=1006 cmd_building_one_key_rsp value * @property {number} cmd_city_data_send=1007 cmd_city_data_send value * @property {number} cmd_city_skill_upgrade=1010 cmd_city_skill_upgrade value * @property {number} cmd_city_skill_upgrade_rsp=1011 cmd_city_skill_upgrade_rsp value * @property {number} cmd_city_skill_battle=1012 cmd_city_skill_battle value * @property {number} cmd_city_skill_battle_rsp=1013 cmd_city_skill_battle_rsp value * @property {number} cmd_building_explore=1020 cmd_building_explore value * @property {number} cmd_building_explore_rsp=1021 cmd_building_explore_rsp value * @property {number} cmd_building_auto_explore_award=1022 cmd_building_auto_explore_award value * @property {number} cmd_building_auto_explore_award_rsp=1023 cmd_building_auto_explore_award_rsp value * @property {number} cmd_building_explore_battle=1024 cmd_building_explore_battle value * @property {number} cmd_building_explore_battle_rsp=1025 cmd_building_explore_battle_rsp value * @property {number} cmd_building_auto_explore_option=1026 cmd_building_auto_explore_option value * @property {number} cmd_building_auto_explore_option_rsp=1027 cmd_building_auto_explore_option_rsp value * @property {number} cmd_adventure_data=1100 cmd_adventure_data value * @property {number} cmd_adventure_data_rsp=1101 cmd_adventure_data_rsp value * @property {number} cmd_adventure_start=1102 cmd_adventure_start value * @property {number} cmd_adventure_start_rsp=1103 cmd_adventure_start_rsp value * @property {number} cmd_adventure_end=1104 cmd_adventure_end value * @property {number} cmd_adventure_end_rsp=1105 cmd_adventure_end_rsp value * @property {number} cmd_adventure_layer=1106 cmd_adventure_layer value * @property {number} cmd_adventure_layer_rsp=1107 cmd_adventure_layer_rsp value * @property {number} cmd_adventure_sweep=1108 cmd_adventure_sweep value * @property {number} cmd_adventure_sweep_rsp=1109 cmd_adventure_sweep_rsp value * @property {number} cmd_adventure_pass_award=1110 cmd_adventure_pass_award value * @property {number} cmd_adventure_pass_award_rsp=1111 cmd_adventure_pass_award_rsp value * @property {number} cmd_adventure_ad_award=1112 cmd_adventure_ad_award value * @property {number} cmd_adventure_ad_award_rsp=1113 cmd_adventure_ad_award_rsp value * @property {number} cmd_adventure_trial=1114 cmd_adventure_trial value * @property {number} cmd_adventure_trial_rsp=1115 cmd_adventure_trial_rsp value * @property {number} cmd_get_mail=1200 cmd_get_mail value * @property {number} cmd_get_mail_rsp=1201 cmd_get_mail_rsp value * @property {number} cmd_get_mail_goods=1202 cmd_get_mail_goods value * @property {number} cmd_get_mail_goods_rsp=1203 cmd_get_mail_goods_rsp value * @property {number} cmd_del_mail=1204 cmd_del_mail value * @property {number} cmd_del_mail_rsp=1205 cmd_del_mail_rsp value * @property {number} cmd_flag_mail=1206 cmd_flag_mail value * @property {number} cmd_flag_mail_rsp=1207 cmd_flag_mail_rsp value * @property {number} cmd_send_mail=1208 cmd_send_mail value * @property {number} cmd_simple_mail=1209 cmd_simple_mail value * @property {number} cmd_embattle_get_data=1300 cmd_embattle_get_data value * @property {number} cmd_embattle_get_data_rsp=1301 cmd_embattle_get_data_rsp value * @property {number} cmd_embattle_battle=1302 cmd_embattle_battle value * @property {number} cmd_embattle_battle_rsp=1303 cmd_embattle_battle_rsp value * @property {number} cmd_hero_get_data=1400 cmd_hero_get_data value * @property {number} cmd_hero_get_data_rsp=1401 cmd_hero_get_data_rsp value * @property {number} cmd_hero_upgrade=1402 cmd_hero_upgrade value * @property {number} cmd_hero_upgrade_rsp=1403 cmd_hero_upgrade_rsp value * @property {number} cmd_hero_upgrade_star=1404 cmd_hero_upgrade_star value * @property {number} cmd_hero_upgrade_star_rsp=1405 cmd_hero_upgrade_star_rsp value * @property {number} cmd_hero_onekey_upgrade_star=1406 cmd_hero_onekey_upgrade_star value * @property {number} cmd_hero_onekey_upgrade_star_rsp=1407 cmd_hero_onekey_upgrade_star_rsp value * @property {number} cmd_hero_reset=1408 cmd_hero_reset value * @property {number} cmd_hero_reset_rsp=1409 cmd_hero_reset_rsp value * @property {number} cmd_hero_wear_equip=1410 cmd_hero_wear_equip value * @property {number} cmd_hero_wear_equip_rsp=1411 cmd_hero_wear_equip_rsp value * @property {number} cmd_hero_change_nty=1450 cmd_hero_change_nty value * @property {number} cmd_skill_card_get_data=1500 cmd_skill_card_get_data value * @property {number} cmd_skill_card_get_data_rsp=1501 cmd_skill_card_get_data_rsp value * @property {number} cmd_skill_card_upgrade=1502 cmd_skill_card_upgrade value * @property {number} cmd_skill_card_upgrade_rsp=1503 cmd_skill_card_upgrade_rsp value * @property {number} cmd_skill_card_upgrade_star=1504 cmd_skill_card_upgrade_star value * @property {number} cmd_skill_card_upgrade_star_rsp=1505 cmd_skill_card_upgrade_star_rsp value * @property {number} cmd_role_get_data=1600 cmd_role_get_data value * @property {number} cmd_role_get_data_rsp=1601 cmd_role_get_data_rsp value * @property {number} cmd_role_upgrade=1602 cmd_role_upgrade value * @property {number} cmd_role_upgrade_rsp=1603 cmd_role_upgrade_rsp value * @property {number} cmd_role_rename=1604 cmd_role_rename value * @property {number} cmd_role_rename_rsp=1605 cmd_role_rename_rsp value * @property {number} cmd_equip_get_data=1700 cmd_equip_get_data value * @property {number} cmd_equip_get_data_rsp=1701 cmd_equip_get_data_rsp value * @property {number} cmd_equip_upgrade=1702 cmd_equip_upgrade value * @property {number} cmd_equip_upgrade_rsp=1703 cmd_equip_upgrade_rsp value * @property {number} cmd_equip_upgrade_star=1704 cmd_equip_upgrade_star value * @property {number} cmd_equip_upgrade_star_rsp=1705 cmd_equip_upgrade_star_rsp value * @property {number} cmd_equip_onekey_upgrade_star=1706 cmd_equip_onekey_upgrade_star value * @property {number} cmd_equip_onekey_upgrade_star_rsp=1707 cmd_equip_onekey_upgrade_star_rsp value * @property {number} cmd_equip_reset=1708 cmd_equip_reset value * @property {number} cmd_equip_reset_rsp=1709 cmd_equip_reset_rsp value * @property {number} cmd_equip_change_nty=1750 cmd_equip_change_nty value * @property {number} cmd_debris_get_data=1800 cmd_debris_get_data value * @property {number} cmd_debris_get_data_rsp=1801 cmd_debris_get_data_rsp value * @property {number} cmd_debris_merge=1802 cmd_debris_merge value * @property {number} cmd_debris_merge_rsp=1803 cmd_debris_merge_rsp value * @property {number} cmd_talent_get_data=1900 cmd_talent_get_data value * @property {number} cmd_talent_get_data_rsp=1901 cmd_talent_get_data_rsp value * @property {number} cmd_talent_activate=1902 cmd_talent_activate value * @property {number} cmd_talent_activate_rsp=1903 cmd_talent_activate_rsp value * @property {number} cmd_sign_in_get_data=2000 cmd_sign_in_get_data value * @property {number} cmd_sign_in_get_data_rsp=2001 cmd_sign_in_get_data_rsp value * @property {number} cmd_sign_in_award=2002 cmd_sign_in_award value * @property {number} cmd_sign_in_award_rsp=2003 cmd_sign_in_award_rsp value * @property {number} cmd_sign_in_nty=2004 cmd_sign_in_nty value * @property {number} cmd_quest_get_data=2100 cmd_quest_get_data value * @property {number} cmd_quest_get_data_rsp=2101 cmd_quest_get_data_rsp value * @property {number} cmd_quest_get_award=2102 cmd_quest_get_award value * @property {number} cmd_quest_get_award_rsp=2103 cmd_quest_get_award_rsp value * @property {number} cmd_quest_active_award=2104 cmd_quest_active_award value * @property {number} cmd_quest_active_award_rsp=2105 cmd_quest_active_award_rsp value * @property {number} cmd_quest_cmplate_notify=2150 cmd_quest_cmplate_notify value * @property {number} cmd_manual_get_data=2200 cmd_manual_get_data value * @property {number} cmd_manual_get_data_rsp=2201 cmd_manual_get_data_rsp value * @property {number} cmd_manual_buy_exp=2202 cmd_manual_buy_exp value * @property {number} cmd_manual_buy_exp_rsp=2203 cmd_manual_buy_exp_rsp value * @property {number} cmd_manual_get_award=2204 cmd_manual_get_award value * @property {number} cmd_manual_get_award_rsp=2205 cmd_manual_get_award_rsp value * @property {number} cmd_manual_buy=2206 cmd_manual_buy value * @property {number} cmd_manual_buy_rsp=2207 cmd_manual_buy_rsp value * @property {number} cmd_manual_notify=2250 cmd_manual_notify value * @property {number} cmd_draw=2300 cmd_draw value * @property {number} cmd_draw_rsp=2301 cmd_draw_rsp value * @property {number} cmd_draw_get_data=2302 cmd_draw_get_data value * @property {number} cmd_draw_get_data_rsp=2303 cmd_draw_get_data_rsp value * @property {number} cmd_shop_data=2400 cmd_shop_data value * @property {number} cmd_shop_data_rsp=2401 cmd_shop_data_rsp value * @property {number} cmd_shop_buy=2402 cmd_shop_buy value * @property {number} cmd_shop_buy_rsp=2403 cmd_shop_buy_rsp value * @property {number} cmd_shop_notify=2450 cmd_shop_notify value * @property {number} cmd_ranking_data=2501 cmd_ranking_data value * @property {number} cmd_ranking_data_rsp=2502 cmd_ranking_data_rsp value * @property {number} cmd_grocery_data=2601 cmd_grocery_data value * @property {number} cmd_grocery_data_rsp=2602 cmd_grocery_data_rsp value * @property {number} cmd_grocery_buy=2603 cmd_grocery_buy value * @property {number} cmd_grocery_buy_rsp=2604 cmd_grocery_buy_rsp value * @property {number} cmd_box_get_award=2605 cmd_box_get_award value * @property {number} cmd_box_get_award_rsp=2606 cmd_box_get_award_rsp value * @property {number} cmd_altar_data=2701 cmd_altar_data value * @property {number} cmd_altar_data_rsp=2702 cmd_altar_data_rsp value * @property {number} cmd_altar_battle=2703 cmd_altar_battle value * @property {number} cmd_altar_battle_rsp=2704 cmd_altar_battle_rsp value * @property {number} cmd_altar_exchange=2705 cmd_altar_exchange value * @property {number} cmd_altar_exchange_rsp=2706 cmd_altar_exchange_rsp value * @property {number} cmd_altar_exchange_confirm=2707 cmd_altar_exchange_confirm value * @property {number} cmd_altar_exchange_confirm_rsp=2708 cmd_altar_exchange_confirm_rsp value * @property {number} cmd_altar_buy_battle_space=2709 cmd_altar_buy_battle_space value * @property {number} cmd_altar_buy_battle_space_rsp=2710 cmd_altar_buy_battle_space_rsp value * @property {number} cmd_altar_reset_cd=2711 cmd_altar_reset_cd value * @property {number} cmd_altar_reset_cd_rsp=2712 cmd_altar_reset_cd_rsp value * @property {number} cmd_relic_data=2801 cmd_relic_data value * @property {number} cmd_relic_data_rsp=2802 cmd_relic_data_rsp value * @property {number} cmd_relic_next_pos=2803 cmd_relic_next_pos value * @property {number} cmd_relic_next_pos_rsp=2804 cmd_relic_next_pos_rsp value * @property {number} cmd_relic_next_layer=2805 cmd_relic_next_layer value * @property {number} cmd_relic_next_layer_rsp=2806 cmd_relic_next_layer_rsp value * @property {number} cmd_relic_select_buff=2807 cmd_relic_select_buff value * @property {number} cmd_relic_select_buff_rsp=2808 cmd_relic_select_buff_rsp value * @property {number} cmd_relic_reset=2809 cmd_relic_reset value * @property {number} cmd_relic_reset_rsp=2810 cmd_relic_reset_rsp value * @property {number} cmd_relic_event_select=2811 cmd_relic_event_select value * @property {number} cmd_relic_event_select_rsp=2812 cmd_relic_event_select_rsp value * @property {number} cmd_relic_event_nty=2850 cmd_relic_event_nty value * @property {number} cmd_relic_data_nty=2851 cmd_relic_data_nty value * @property {number} cmd_activity_get_conf_list=2900 cmd_activity_get_conf_list value * @property {number} cmd_activity_get_conf_list_rsp=2901 cmd_activity_get_conf_list_rsp value * @property {number} cmd_activity_time_list_nty=2950 cmd_activity_time_list_nty value * @property {number} cmd_activity_get_conf_nty=2951 cmd_activity_get_conf_nty value * @property {number} cmd_privilege_card_data=3000 cmd_privilege_card_data value * @property {number} cmd_privilege_card_data_rsp=3001 cmd_privilege_card_data_rsp value * @property {number} cmd_privilege_card_buy=3002 cmd_privilege_card_buy value * @property {number} cmd_privilege_card_buy_rsp=3003 cmd_privilege_card_buy_rsp value * @property {number} cmd_privilege_card_award=3004 cmd_privilege_card_award value * @property {number} cmd_privilege_card_award_rsp=3005 cmd_privilege_card_award_rsp value * @property {number} cmd_privilege_card_unlock_nty=3050 cmd_privilege_card_unlock_nty value * @property {number} cmd_first_recharge_data=3100 cmd_first_recharge_data value * @property {number} cmd_first_recharge_data_rsp=3101 cmd_first_recharge_data_rsp value * @property {number} cmd_first_recharge_buy=3102 cmd_first_recharge_buy value * @property {number} cmd_first_recharge_buy_rsp=3103 cmd_first_recharge_buy_rsp value * @property {number} cmd_first_recharge_award=3104 cmd_first_recharge_award value * @property {number} cmd_first_recharge_award_rsp=3105 cmd_first_recharge_award_rsp value * @property {number} cmd_first_recharge_nty=3150 cmd_first_recharge_nty value * @property {number} cmd_daily_dungeons_data=3200 cmd_daily_dungeons_data value * @property {number} cmd_daily_dungeons_data_rsp=3201 cmd_daily_dungeons_data_rsp value * @property {number} cmd_daily_dungeons_start=3202 cmd_daily_dungeons_start value * @property {number} cmd_daily_dungeons_start_rsp=3203 cmd_daily_dungeons_start_rsp value * @property {number} cmd_daily_dungeons_end=3204 cmd_daily_dungeons_end value * @property {number} cmd_daily_dungeons_end_rsp=3205 cmd_daily_dungeons_end_rsp value * @property {number} cmd_daily_dungeons_sweep=3206 cmd_daily_dungeons_sweep value * @property {number} cmd_daily_dungeons_sweep_rsp=3207 cmd_daily_dungeons_sweep_rsp value * @property {number} cmd_adv_gift_data=3300 cmd_adv_gift_data value * @property {number} cmd_adv_gift_data_rsp=3301 cmd_adv_gift_data_rsp value * @property {number} cmd_adv_gift_buy=3302 cmd_adv_gift_buy value * @property {number} cmd_adv_gift_buy_rsp=3303 cmd_adv_gift_buy_rsp value * @property {number} cmd_adv_gift_nty=3350 cmd_adv_gift_nty value * @property {number} cmd_pop_gift_data=3400 cmd_pop_gift_data value * @property {number} cmd_pop_gift_data_rsp=3401 cmd_pop_gift_data_rsp value * @property {number} cmd_pop_gift_buy=3402 cmd_pop_gift_buy value * @property {number} cmd_pop_gift_buy_rsp=3403 cmd_pop_gift_buy_rsp value * @property {number} cmd_pop_gift_nty=3450 cmd_pop_gift_nty value * @property {number} cmd_pop_gift_change_nty=3451 cmd_pop_gift_change_nty value * @property {number} cmd_fund_data=3500 cmd_fund_data value * @property {number} cmd_fund_data_rsp=3501 cmd_fund_data_rsp value * @property {number} cmd_fund_buy=3502 cmd_fund_buy value * @property {number} cmd_fund_buy_rsp=3503 cmd_fund_buy_rsp value * @property {number} cmd_fund_award=3504 cmd_fund_award value * @property {number} cmd_fund_award_rsp=3505 cmd_fund_award_rsp value * @property {number} cmd_fund_nty=3550 cmd_fund_nty value * @property {number} cmd_keep_recharge_data=3600 cmd_keep_recharge_data value * @property {number} cmd_keep_recharge_data_rsp=3601 cmd_keep_recharge_data_rsp value * @property {number} cmd_keep_recharge_award=3602 cmd_keep_recharge_award value * @property {number} cmd_keep_recharge_award_rsp=3603 cmd_keep_recharge_award_rsp value * @property {number} cmd_get_red_point_list=3710 cmd_get_red_point_list value * @property {number} cmd_get_red_point_list_rsp=3711 cmd_get_red_point_list_rsp value * @property {number} cmd_online_award_get_award=3800 cmd_online_award_get_award value * @property {number} cmd_online_award_get_award_rsp=3801 cmd_online_award_get_award_rsp value * @property {number} cmd_online_award_get_data=3802 cmd_online_award_get_data value * @property {number} cmd_online_award_get_data_rsp=3803 cmd_online_award_get_data_rsp value * @property {number} cmd_online_award_nty=3850 cmd_online_award_nty value * @property {number} cmd_speed_up_data=3900 cmd_speed_up_data value * @property {number} cmd_speed_up_data_rsp=3901 cmd_speed_up_data_rsp value * @property {number} cmd_speed_up_buy=3902 cmd_speed_up_buy value * @property {number} cmd_speed_up_buy_rsp=3903 cmd_speed_up_buy_rsp value * @property {number} cmd_level_gift_data=4000 cmd_level_gift_data value * @property {number} cmd_level_gift_data_rsp=4001 cmd_level_gift_data_rsp value * @property {number} cmd_level_gift_buy=4002 cmd_level_gift_buy value * @property {number} cmd_level_gift_buy_rsp=4003 cmd_level_gift_buy_rsp value * @property {number} cmd_level_gift_del_red_point=4004 cmd_level_gift_del_red_point value * @property {number} cmd_level_gift_del_red_point_rsp=4005 cmd_level_gift_del_red_point_rsp value * @property {number} cmd_level_gift_nty=4050 cmd_level_gift_nty value * @property {number} cmd_lottery_data=4100 cmd_lottery_data value * @property {number} cmd_lottery_data_rsp=4101 cmd_lottery_data_rsp value * @property {number} cmd_lottery_award=4102 cmd_lottery_award value * @property {number} cmd_lottery_award_rsp=4103 cmd_lottery_award_rsp value * @property {number} cmd_lottery_buy=4104 cmd_lottery_buy value * @property {number} cmd_lottery_buy_rsp=4105 cmd_lottery_buy_rsp value * @property {number} cmd_lottery_nty=4150 cmd_lottery_nty value * @property {number} cmd_act_rank_data=4200 cmd_act_rank_data value * @property {number} cmd_act_rank_data_rsp=4201 cmd_act_rank_data_rsp value * @property {number} cmd_treasure_get_data=4300 cmd_treasure_get_data value * @property {number} cmd_treasure_get_data_rsp=4301 cmd_treasure_get_data_rsp value * @property {number} cmd_treasure_draw=4302 cmd_treasure_draw value * @property {number} cmd_treasure_draw_rsp=4303 cmd_treasure_draw_rsp value * @property {number} cmd_treasure_sign=4304 cmd_treasure_sign value * @property {number} cmd_treasure_sign_rsp=4305 cmd_treasure_sign_rsp value * @property {number} cmd_treasure_buy=4306 cmd_treasure_buy value * @property {number} cmd_treasure_buy_rsp=4307 cmd_treasure_buy_rsp value */ game.msg_cmd = (function() { const valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "cmd_ping"] = 0; values[valuesById[1] = "cmd_ping_rsp"] = 1; values[valuesById[2] = "cmd_login"] = 2; values[valuesById[3] = "cmd_login_rsp"] = 3; values[valuesById[4] = "cmd_create"] = 4; values[valuesById[5] = "cmd_create_rsp"] = 5; values[valuesById[6] = "cmd_reward_info"] = 6; values[valuesById[7] = "cmd_user"] = 7; values[valuesById[8] = "cmd_pay_currency"] = 8; values[valuesById[9] = "cmd_pay_debris_nty"] = 9; values[valuesById[10] = "cmd_exception_nty"] = 10; values[valuesById[11] = "cmd_create_order_nty"] = 11; values[valuesById[100] = "cmd_recharge_result"] = 100; values[valuesById[101] = "cmd_recharge_result_rsp"] = 101; values[valuesById[1000] = "cmd_city_change"] = 1000; values[valuesById[1001] = "cmd_city_data"] = 1001; values[valuesById[1002] = "cmd_city_data_rsp"] = 1002; values[valuesById[1003] = "cmd_building_upgrade"] = 1003; values[valuesById[1004] = "cmd_building_upgrade_rsp"] = 1004; values[valuesById[1005] = "cmd_building_one_key"] = 1005; values[valuesById[1006] = "cmd_building_one_key_rsp"] = 1006; values[valuesById[1007] = "cmd_city_data_send"] = 1007; values[valuesById[1010] = "cmd_city_skill_upgrade"] = 1010; values[valuesById[1011] = "cmd_city_skill_upgrade_rsp"] = 1011; values[valuesById[1012] = "cmd_city_skill_battle"] = 1012; values[valuesById[1013] = "cmd_city_skill_battle_rsp"] = 1013; values[valuesById[1020] = "cmd_building_explore"] = 1020; values[valuesById[1021] = "cmd_building_explore_rsp"] = 1021; values[valuesById[1022] = "cmd_building_auto_explore_award"] = 1022; values[valuesById[1023] = "cmd_building_auto_explore_award_rsp"] = 1023; values[valuesById[1024] = "cmd_building_explore_battle"] = 1024; values[valuesById[1025] = "cmd_building_explore_battle_rsp"] = 1025; values[valuesById[1026] = "cmd_building_auto_explore_option"] = 1026; values[valuesById[1027] = "cmd_building_auto_explore_option_rsp"] = 1027; values[valuesById[1100] = "cmd_adventure_data"] = 1100; values[valuesById[1101] = "cmd_adventure_data_rsp"] = 1101; values[valuesById[1102] = "cmd_adventure_start"] = 1102; values[valuesById[1103] = "cmd_adventure_start_rsp"] = 1103; values[valuesById[1104] = "cmd_adventure_end"] = 1104; values[valuesById[1105] = "cmd_adventure_end_rsp"] = 1105; values[valuesById[1106] = "cmd_adventure_layer"] = 1106; values[valuesById[1107] = "cmd_adventure_layer_rsp"] = 1107; values[valuesById[1108] = "cmd_adventure_sweep"] = 1108; values[valuesById[1109] = "cmd_adventure_sweep_rsp"] = 1109; values[valuesById[1110] = "cmd_adventure_pass_award"] = 1110; values[valuesById[1111] = "cmd_adventure_pass_award_rsp"] = 1111; values[valuesById[1112] = "cmd_adventure_ad_award"] = 1112; values[valuesById[1113] = "cmd_adventure_ad_award_rsp"] = 1113; values[valuesById[1114] = "cmd_adventure_trial"] = 1114; values[valuesById[1115] = "cmd_adventure_trial_rsp"] = 1115; values[valuesById[1200] = "cmd_get_mail"] = 1200; values[valuesById[1201] = "cmd_get_mail_rsp"] = 1201; values[valuesById[1202] = "cmd_get_mail_goods"] = 1202; values[valuesById[1203] = "cmd_get_mail_goods_rsp"] = 1203; values[valuesById[1204] = "cmd_del_mail"] = 1204; values[valuesById[1205] = "cmd_del_mail_rsp"] = 1205; values[valuesById[1206] = "cmd_flag_mail"] = 1206; values[valuesById[1207] = "cmd_flag_mail_rsp"] = 1207; values[valuesById[1208] = "cmd_send_mail"] = 1208; values[valuesById[1209] = "cmd_simple_mail"] = 1209; values[valuesById[1300] = "cmd_embattle_get_data"] = 1300; values[valuesById[1301] = "cmd_embattle_get_data_rsp"] = 1301; values[valuesById[1302] = "cmd_embattle_battle"] = 1302; values[valuesById[1303] = "cmd_embattle_battle_rsp"] = 1303; values[valuesById[1400] = "cmd_hero_get_data"] = 1400; values[valuesById[1401] = "cmd_hero_get_data_rsp"] = 1401; values[valuesById[1402] = "cmd_hero_upgrade"] = 1402; values[valuesById[1403] = "cmd_hero_upgrade_rsp"] = 1403; values[valuesById[1404] = "cmd_hero_upgrade_star"] = 1404; values[valuesById[1405] = "cmd_hero_upgrade_star_rsp"] = 1405; values[valuesById[1406] = "cmd_hero_onekey_upgrade_star"] = 1406; values[valuesById[1407] = "cmd_hero_onekey_upgrade_star_rsp"] = 1407; values[valuesById[1408] = "cmd_hero_reset"] = 1408; values[valuesById[1409] = "cmd_hero_reset_rsp"] = 1409; values[valuesById[1410] = "cmd_hero_wear_equip"] = 1410; values[valuesById[1411] = "cmd_hero_wear_equip_rsp"] = 1411; values[valuesById[1450] = "cmd_hero_change_nty"] = 1450; values[valuesById[1500] = "cmd_skill_card_get_data"] = 1500; values[valuesById[1501] = "cmd_skill_card_get_data_rsp"] = 1501; values[valuesById[1502] = "cmd_skill_card_upgrade"] = 1502; values[valuesById[1503] = "cmd_skill_card_upgrade_rsp"] = 1503; values[valuesById[1504] = "cmd_skill_card_upgrade_star"] = 1504; values[valuesById[1505] = "cmd_skill_card_upgrade_star_rsp"] = 1505; values[valuesById[1600] = "cmd_role_get_data"] = 1600; values[valuesById[1601] = "cmd_role_get_data_rsp"] = 1601; values[valuesById[1602] = "cmd_role_upgrade"] = 1602; values[valuesById[1603] = "cmd_role_upgrade_rsp"] = 1603; values[valuesById[1604] = "cmd_role_rename"] = 1604; values[valuesById[1605] = "cmd_role_rename_rsp"] = 1605; values[valuesById[1700] = "cmd_equip_get_data"] = 1700; values[valuesById[1701] = "cmd_equip_get_data_rsp"] = 1701; values[valuesById[1702] = "cmd_equip_upgrade"] = 1702; values[valuesById[1703] = "cmd_equip_upgrade_rsp"] = 1703; values[valuesById[1704] = "cmd_equip_upgrade_star"] = 1704; values[valuesById[1705] = "cmd_equip_upgrade_star_rsp"] = 1705; values[valuesById[1706] = "cmd_equip_onekey_upgrade_star"] = 1706; values[valuesById[1707] = "cmd_equip_onekey_upgrade_star_rsp"] = 1707; values[valuesById[1708] = "cmd_equip_reset"] = 1708; values[valuesById[1709] = "cmd_equip_reset_rsp"] = 1709; values[valuesById[1750] = "cmd_equip_change_nty"] = 1750; values[valuesById[1800] = "cmd_debris_get_data"] = 1800; values[valuesById[1801] = "cmd_debris_get_data_rsp"] = 1801; values[valuesById[1802] = "cmd_debris_merge"] = 1802; values[valuesById[1803] = "cmd_debris_merge_rsp"] = 1803; values[valuesById[1900] = "cmd_talent_get_data"] = 1900; values[valuesById[1901] = "cmd_talent_get_data_rsp"] = 1901; values[valuesById[1902] = "cmd_talent_activate"] = 1902; values[valuesById[1903] = "cmd_talent_activate_rsp"] = 1903; values[valuesById[2000] = "cmd_sign_in_get_data"] = 2000; values[valuesById[2001] = "cmd_sign_in_get_data_rsp"] = 2001; values[valuesById[2002] = "cmd_sign_in_award"] = 2002; values[valuesById[2003] = "cmd_sign_in_award_rsp"] = 2003; values[valuesById[2004] = "cmd_sign_in_nty"] = 2004; values[valuesById[2100] = "cmd_quest_get_data"] = 2100; values[valuesById[2101] = "cmd_quest_get_data_rsp"] = 2101; values[valuesById[2102] = "cmd_quest_get_award"] = 2102; values[valuesById[2103] = "cmd_quest_get_award_rsp"] = 2103; values[valuesById[2104] = "cmd_quest_active_award"] = 2104; values[valuesById[2105] = "cmd_quest_active_award_rsp"] = 2105; values[valuesById[2150] = "cmd_quest_cmplate_notify"] = 2150; values[valuesById[2200] = "cmd_manual_get_data"] = 2200; values[valuesById[2201] = "cmd_manual_get_data_rsp"] = 2201; values[valuesById[2202] = "cmd_manual_buy_exp"] = 2202; values[valuesById[2203] = "cmd_manual_buy_exp_rsp"] = 2203; values[valuesById[2204] = "cmd_manual_get_award"] = 2204; values[valuesById[2205] = "cmd_manual_get_award_rsp"] = 2205; values[valuesById[2206] = "cmd_manual_buy"] = 2206; values[valuesById[2207] = "cmd_manual_buy_rsp"] = 2207; values[valuesById[2250] = "cmd_manual_notify"] = 2250; values[valuesById[2300] = "cmd_draw"] = 2300; values[valuesById[2301] = "cmd_draw_rsp"] = 2301; values[valuesById[2302] = "cmd_draw_get_data"] = 2302; values[valuesById[2303] = "cmd_draw_get_data_rsp"] = 2303; values[valuesById[2400] = "cmd_shop_data"] = 2400; values[valuesById[2401] = "cmd_shop_data_rsp"] = 2401; values[valuesById[2402] = "cmd_shop_buy"] = 2402; values[valuesById[2403] = "cmd_shop_buy_rsp"] = 2403; values[valuesById[2450] = "cmd_shop_notify"] = 2450; values[valuesById[2501] = "cmd_ranking_data"] = 2501; values[valuesById[2502] = "cmd_ranking_data_rsp"] = 2502; values[valuesById[2601] = "cmd_grocery_data"] = 2601; values[valuesById[2602] = "cmd_grocery_data_rsp"] = 2602; values[valuesById[2603] = "cmd_grocery_buy"] = 2603; values[valuesById[2604] = "cmd_grocery_buy_rsp"] = 2604; values[valuesById[2605] = "cmd_box_get_award"] = 2605; values[valuesById[2606] = "cmd_box_get_award_rsp"] = 2606; values[valuesById[2701] = "cmd_altar_data"] = 2701; values[valuesById[2702] = "cmd_altar_data_rsp"] = 2702; values[valuesById[2703] = "cmd_altar_battle"] = 2703; values[valuesById[2704] = "cmd_altar_battle_rsp"] = 2704; values[valuesById[2705] = "cmd_altar_exchange"] = 2705; values[valuesById[2706] = "cmd_altar_exchange_rsp"] = 2706; values[valuesById[2707] = "cmd_altar_exchange_confirm"] = 2707; values[valuesById[2708] = "cmd_altar_exchange_confirm_rsp"] = 2708; values[valuesById[2709] = "cmd_altar_buy_battle_space"] = 2709; values[valuesById[2710] = "cmd_altar_buy_battle_space_rsp"] = 2710; values[valuesById[2711] = "cmd_altar_reset_cd"] = 2711; values[valuesById[2712] = "cmd_altar_reset_cd_rsp"] = 2712; values[valuesById[2801] = "cmd_relic_data"] = 2801; values[valuesById[2802] = "cmd_relic_data_rsp"] = 2802; values[valuesById[2803] = "cmd_relic_next_pos"] = 2803; values[valuesById[2804] = "cmd_relic_next_pos_rsp"] = 2804; values[valuesById[2805] = "cmd_relic_next_layer"] = 2805; values[valuesById[2806] = "cmd_relic_next_layer_rsp"] = 2806; values[valuesById[2807] = "cmd_relic_select_buff"] = 2807; values[valuesById[2808] = "cmd_relic_select_buff_rsp"] = 2808; values[valuesById[2809] = "cmd_relic_reset"] = 2809; values[valuesById[2810] = "cmd_relic_reset_rsp"] = 2810; values[valuesById[2811] = "cmd_relic_event_select"] = 2811; values[valuesById[2812] = "cmd_relic_event_select_rsp"] = 2812; values[valuesById[2850] = "cmd_relic_event_nty"] = 2850; values[valuesById[2851] = "cmd_relic_data_nty"] = 2851; values[valuesById[2900] = "cmd_activity_get_conf_list"] = 2900; values[valuesById[2901] = "cmd_activity_get_conf_list_rsp"] = 2901; values[valuesById[2950] = "cmd_activity_time_list_nty"] = 2950; values[valuesById[2951] = "cmd_activity_get_conf_nty"] = 2951; values[valuesById[3000] = "cmd_privilege_card_data"] = 3000; values[valuesById[3001] = "cmd_privilege_card_data_rsp"] = 3001; values[valuesById[3002] = "cmd_privilege_card_buy"] = 3002; values[valuesById[3003] = "cmd_privilege_card_buy_rsp"] = 3003; values[valuesById[3004] = "cmd_privilege_card_award"] = 3004; values[valuesById[3005] = "cmd_privilege_card_award_rsp"] = 3005; values[valuesById[3050] = "cmd_privilege_card_unlock_nty"] = 3050; values[valuesById[3100] = "cmd_first_recharge_data"] = 3100; values[valuesById[3101] = "cmd_first_recharge_data_rsp"] = 3101; values[valuesById[3102] = "cmd_first_recharge_buy"] = 3102; values[valuesById[3103] = "cmd_first_recharge_buy_rsp"] = 3103; values[valuesById[3104] = "cmd_first_recharge_award"] = 3104; values[valuesById[3105] = "cmd_first_recharge_award_rsp"] = 3105; values[valuesById[3150] = "cmd_first_recharge_nty"] = 3150; values[valuesById[3200] = "cmd_daily_dungeons_data"] = 3200; values[valuesById[3201] = "cmd_daily_dungeons_data_rsp"] = 3201; values[valuesById[3202] = "cmd_daily_dungeons_start"] = 3202; values[valuesById[3203] = "cmd_daily_dungeons_start_rsp"] = 3203; values[valuesById[3204] = "cmd_daily_dungeons_end"] = 3204; values[valuesById[3205] = "cmd_daily_dungeons_end_rsp"] = 3205; values[valuesById[3206] = "cmd_daily_dungeons_sweep"] = 3206; values[valuesById[3207] = "cmd_daily_dungeons_sweep_rsp"] = 3207; values[valuesById[3300] = "cmd_adv_gift_data"] = 3300; values[valuesById[3301] = "cmd_adv_gift_data_rsp"] = 3301; values[valuesById[3302] = "cmd_adv_gift_buy"] = 3302; values[valuesById[3303] = "cmd_adv_gift_buy_rsp"] = 3303; values[valuesById[3350] = "cmd_adv_gift_nty"] = 3350; values[valuesById[3400] = "cmd_pop_gift_data"] = 3400; values[valuesById[3401] = "cmd_pop_gift_data_rsp"] = 3401; values[valuesById[3402] = "cmd_pop_gift_buy"] = 3402; values[valuesById[3403] = "cmd_pop_gift_buy_rsp"] = 3403; values[valuesById[3450] = "cmd_pop_gift_nty"] = 3450; values[valuesById[3451] = "cmd_pop_gift_change_nty"] = 3451; values[valuesById[3500] = "cmd_fund_data"] = 3500; values[valuesById[3501] = "cmd_fund_data_rsp"] = 3501; values[valuesById[3502] = "cmd_fund_buy"] = 3502; values[valuesById[3503] = "cmd_fund_buy_rsp"] = 3503; values[valuesById[3504] = "cmd_fund_award"] = 3504; values[valuesById[3505] = "cmd_fund_award_rsp"] = 3505; values[valuesById[3550] = "cmd_fund_nty"] = 3550; values[valuesById[3600] = "cmd_keep_recharge_data"] = 3600; values[valuesById[3601] = "cmd_keep_recharge_data_rsp"] = 3601; values[valuesById[3602] = "cmd_keep_recharge_award"] = 3602; values[valuesById[3603] = "cmd_keep_recharge_award_rsp"] = 3603; values[valuesById[3710] = "cmd_get_red_point_list"] = 3710; values[valuesById[3711] = "cmd_get_red_point_list_rsp"] = 3711; values[valuesById[3800] = "cmd_online_award_get_award"] = 3800; values[valuesById[3801] = "cmd_online_award_get_award_rsp"] = 3801; values[valuesById[3802] = "cmd_online_award_get_data"] = 3802; values[valuesById[3803] = "cmd_online_award_get_data_rsp"] = 3803; values[valuesById[3850] = "cmd_online_award_nty"] = 3850; values[valuesById[3900] = "cmd_speed_up_data"] = 3900; values[valuesById[3901] = "cmd_speed_up_data_rsp"] = 3901; values[valuesById[3902] = "cmd_speed_up_buy"] = 3902; values[valuesById[3903] = "cmd_speed_up_buy_rsp"] = 3903; values[valuesById[4000] = "cmd_level_gift_data"] = 4000; values[valuesById[4001] = "cmd_level_gift_data_rsp"] = 4001; values[valuesById[4002] = "cmd_level_gift_buy"] = 4002; values[valuesById[4003] = "cmd_level_gift_buy_rsp"] = 4003; values[valuesById[4004] = "cmd_level_gift_del_red_point"] = 4004; values[valuesById[4005] = "cmd_level_gift_del_red_point_rsp"] = 4005; values[valuesById[4050] = "cmd_level_gift_nty"] = 4050; values[valuesById[4100] = "cmd_lottery_data"] = 4100; values[valuesById[4101] = "cmd_lottery_data_rsp"] = 4101; values[valuesById[4102] = "cmd_lottery_award"] = 4102; values[valuesById[4103] = "cmd_lottery_award_rsp"] = 4103; values[valuesById[4104] = "cmd_lottery_buy"] = 4104; values[valuesById[4105] = "cmd_lottery_buy_rsp"] = 4105; values[valuesById[4150] = "cmd_lottery_nty"] = 4150; values[valuesById[4200] = "cmd_act_rank_data"] = 4200; values[valuesById[4201] = "cmd_act_rank_data_rsp"] = 4201; values[valuesById[4300] = "cmd_treasure_get_data"] = 4300; values[valuesById[4301] = "cmd_treasure_get_data_rsp"] = 4301; values[valuesById[4302] = "cmd_treasure_draw"] = 4302; values[valuesById[4303] = "cmd_treasure_draw_rsp"] = 4303; values[valuesById[4304] = "cmd_treasure_sign"] = 4304; values[valuesById[4305] = "cmd_treasure_sign_rsp"] = 4305; values[valuesById[4306] = "cmd_treasure_buy"] = 4306; values[valuesById[4307] = "cmd_treasure_buy_rsp"] = 4307; return values; })(); return game; })(); export { $root as default };