/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ "use strict"; var $protobuf = require("protobufjs/minimal.js"); // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); $root.gamehall = (function() { /** * Namespace gamehall. * @exports gamehall * @namespace */ var gamehall = {}; /** * OpResultCode enum. * @name gamehall.OpResultCode * @enum {number} * @property {number} OPRC_Sucess=0 OPRC_Sucess value * @property {number} OPRC_Error=1 OPRC_Error value * @property {number} OPRC_RoomIsFull=1019 OPRC_RoomIsFull value * @property {number} OPRC_RoomHadClosed=1053 OPRC_RoomHadClosed value * @property {number} OPRC_SceneServerMaintain=1054 OPRC_SceneServerMaintain value * @property {number} OPRC_CoinNotEnough=1056 OPRC_CoinNotEnough value * @property {number} OPRC_CoinTooMore=1058 OPRC_CoinTooMore value * @property {number} OPRC_CoinSceneYouAreGaming=1059 OPRC_CoinSceneYouAreGaming value * @property {number} OPRC_NoFindDownTiceRoom=1079 OPRC_NoFindDownTiceRoom value * @property {number} OPRC_ChangeRoomTooOften=1080 OPRC_ChangeRoomTooOften value * @property {number} OPRC_NoOtherDownTiceRoom=1081 OPRC_NoOtherDownTiceRoom value * @property {number} OPRC_OpYield=1082 OPRC_OpYield value * @property {number} OPRC_RoomGameTimes=1103 OPRC_RoomGameTimes value * @property {number} OPRC_CoinSceneEnterQueueSucc=1105 OPRC_CoinSceneEnterQueueSucc value * @property {number} OPRC_CoinSceneEnterQueueFail=1106 OPRC_CoinSceneEnterQueueFail value * @property {number} OPRC_CoinSceneEnterQueueOverTime=1107 OPRC_CoinSceneEnterQueueOverTime value * @property {number} OPRC_MustBindPromoter=1113 OPRC_MustBindPromoter value * @property {number} OPRC_YourAreGamingCannotLeave=1078 OPRC_YourAreGamingCannotLeave value */ gamehall.OpResultCode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OPRC_Sucess"] = 0; values[valuesById[1] = "OPRC_Error"] = 1; values[valuesById[1019] = "OPRC_RoomIsFull"] = 1019; values[valuesById[1053] = "OPRC_RoomHadClosed"] = 1053; values[valuesById[1054] = "OPRC_SceneServerMaintain"] = 1054; values[valuesById[1056] = "OPRC_CoinNotEnough"] = 1056; values[valuesById[1058] = "OPRC_CoinTooMore"] = 1058; values[valuesById[1059] = "OPRC_CoinSceneYouAreGaming"] = 1059; values[valuesById[1079] = "OPRC_NoFindDownTiceRoom"] = 1079; values[valuesById[1080] = "OPRC_ChangeRoomTooOften"] = 1080; values[valuesById[1081] = "OPRC_NoOtherDownTiceRoom"] = 1081; values[valuesById[1082] = "OPRC_OpYield"] = 1082; values[valuesById[1103] = "OPRC_RoomGameTimes"] = 1103; values[valuesById[1105] = "OPRC_CoinSceneEnterQueueSucc"] = 1105; values[valuesById[1106] = "OPRC_CoinSceneEnterQueueFail"] = 1106; values[valuesById[1107] = "OPRC_CoinSceneEnterQueueOverTime"] = 1107; values[valuesById[1113] = "OPRC_MustBindPromoter"] = 1113; values[valuesById[1078] = "OPRC_YourAreGamingCannotLeave"] = 1078; return values; })(); /** * CoinSceneGamePacketID enum. * @name gamehall.CoinSceneGamePacketID * @enum {number} * @property {number} PACKET_CoinSceneGame_ZERO=0 PACKET_CoinSceneGame_ZERO value * @property {number} PACKET_CS_COINSCENE_GETPLAYERNUM=2320 PACKET_CS_COINSCENE_GETPLAYERNUM value * @property {number} PACKET_SC_COINSCENE_GETPLAYERNUM=2321 PACKET_SC_COINSCENE_GETPLAYERNUM value * @property {number} PACKET_CS_COINSCENE_OP=2322 PACKET_CS_COINSCENE_OP value * @property {number} PACKET_SC_COINSCENE_OP=2323 PACKET_SC_COINSCENE_OP value * @property {number} PACKET_CS_COINSCENE_LISTROOM=2324 PACKET_CS_COINSCENE_LISTROOM value * @property {number} PACKET_SC_COINSCENE_LISTROOM=2325 PACKET_SC_COINSCENE_LISTROOM value * @property {number} PACKET_SC_COINSCENE_QUEUESTATE=2326 PACKET_SC_COINSCENE_QUEUESTATE value */ gamehall.CoinSceneGamePacketID = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "PACKET_CoinSceneGame_ZERO"] = 0; values[valuesById[2320] = "PACKET_CS_COINSCENE_GETPLAYERNUM"] = 2320; values[valuesById[2321] = "PACKET_SC_COINSCENE_GETPLAYERNUM"] = 2321; values[valuesById[2322] = "PACKET_CS_COINSCENE_OP"] = 2322; values[valuesById[2323] = "PACKET_SC_COINSCENE_OP"] = 2323; values[valuesById[2324] = "PACKET_CS_COINSCENE_LISTROOM"] = 2324; values[valuesById[2325] = "PACKET_SC_COINSCENE_LISTROOM"] = 2325; values[valuesById[2326] = "PACKET_SC_COINSCENE_QUEUESTATE"] = 2326; return values; })(); gamehall.CSCoinSceneGetPlayerNum = (function() { /** * Properties of a CSCoinSceneGetPlayerNum. * @memberof gamehall * @interface ICSCoinSceneGetPlayerNum * @property {number|null} [GameId] CSCoinSceneGetPlayerNum GameId * @property {number|null} [GameModel] CSCoinSceneGetPlayerNum GameModel */ /** * Constructs a new CSCoinSceneGetPlayerNum. * @memberof gamehall * @classdesc Represents a CSCoinSceneGetPlayerNum. * @implements ICSCoinSceneGetPlayerNum * @constructor * @param {gamehall.ICSCoinSceneGetPlayerNum=} [properties] Properties to set */ function CSCoinSceneGetPlayerNum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCoinSceneGetPlayerNum GameId. * @member {number} GameId * @memberof gamehall.CSCoinSceneGetPlayerNum * @instance */ CSCoinSceneGetPlayerNum.prototype.GameId = 0; /** * CSCoinSceneGetPlayerNum GameModel. * @member {number} GameModel * @memberof gamehall.CSCoinSceneGetPlayerNum * @instance */ CSCoinSceneGetPlayerNum.prototype.GameModel = 0; /** * Creates a new CSCoinSceneGetPlayerNum instance using the specified properties. * @function create * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {gamehall.ICSCoinSceneGetPlayerNum=} [properties] Properties to set * @returns {gamehall.CSCoinSceneGetPlayerNum} CSCoinSceneGetPlayerNum instance */ CSCoinSceneGetPlayerNum.create = function create(properties) { return new CSCoinSceneGetPlayerNum(properties); }; /** * Encodes the specified CSCoinSceneGetPlayerNum message. Does not implicitly {@link gamehall.CSCoinSceneGetPlayerNum.verify|verify} messages. * @function encode * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {gamehall.ICSCoinSceneGetPlayerNum} message CSCoinSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinSceneGetPlayerNum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.GameModel != null && Object.hasOwnProperty.call(message, "GameModel")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameModel); return writer; }; /** * Encodes the specified CSCoinSceneGetPlayerNum message, length delimited. Does not implicitly {@link gamehall.CSCoinSceneGetPlayerNum.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {gamehall.ICSCoinSceneGetPlayerNum} message CSCoinSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinSceneGetPlayerNum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCoinSceneGetPlayerNum message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCoinSceneGetPlayerNum} CSCoinSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinSceneGetPlayerNum.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCoinSceneGetPlayerNum(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.GameModel = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCoinSceneGetPlayerNum message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCoinSceneGetPlayerNum} CSCoinSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinSceneGetPlayerNum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCoinSceneGetPlayerNum message. * @function verify * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCoinSceneGetPlayerNum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.GameModel != null && message.hasOwnProperty("GameModel")) if (!$util.isInteger(message.GameModel)) return "GameModel: integer expected"; return null; }; /** * Creates a CSCoinSceneGetPlayerNum message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {Object.} object Plain object * @returns {gamehall.CSCoinSceneGetPlayerNum} CSCoinSceneGetPlayerNum */ CSCoinSceneGetPlayerNum.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCoinSceneGetPlayerNum) return object; var message = new $root.gamehall.CSCoinSceneGetPlayerNum(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.GameModel != null) message.GameModel = object.GameModel | 0; return message; }; /** * Creates a plain object from a CSCoinSceneGetPlayerNum message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {gamehall.CSCoinSceneGetPlayerNum} message CSCoinSceneGetPlayerNum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCoinSceneGetPlayerNum.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameId = 0; object.GameModel = 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.GameModel != null && message.hasOwnProperty("GameModel")) object.GameModel = message.GameModel; return object; }; /** * Converts this CSCoinSceneGetPlayerNum to JSON. * @function toJSON * @memberof gamehall.CSCoinSceneGetPlayerNum * @instance * @returns {Object.} JSON object */ CSCoinSceneGetPlayerNum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCoinSceneGetPlayerNum * @function getTypeUrl * @memberof gamehall.CSCoinSceneGetPlayerNum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCoinSceneGetPlayerNum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCoinSceneGetPlayerNum"; }; return CSCoinSceneGetPlayerNum; })(); gamehall.SCCoinSceneGetPlayerNum = (function() { /** * Properties of a SCCoinSceneGetPlayerNum. * @memberof gamehall * @interface ISCCoinSceneGetPlayerNum * @property {Array.|null} [Nums] SCCoinSceneGetPlayerNum Nums */ /** * Constructs a new SCCoinSceneGetPlayerNum. * @memberof gamehall * @classdesc Represents a SCCoinSceneGetPlayerNum. * @implements ISCCoinSceneGetPlayerNum * @constructor * @param {gamehall.ISCCoinSceneGetPlayerNum=} [properties] Properties to set */ function SCCoinSceneGetPlayerNum(properties) { this.Nums = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCoinSceneGetPlayerNum Nums. * @member {Array.} Nums * @memberof gamehall.SCCoinSceneGetPlayerNum * @instance */ SCCoinSceneGetPlayerNum.prototype.Nums = $util.emptyArray; /** * Creates a new SCCoinSceneGetPlayerNum instance using the specified properties. * @function create * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {gamehall.ISCCoinSceneGetPlayerNum=} [properties] Properties to set * @returns {gamehall.SCCoinSceneGetPlayerNum} SCCoinSceneGetPlayerNum instance */ SCCoinSceneGetPlayerNum.create = function create(properties) { return new SCCoinSceneGetPlayerNum(properties); }; /** * Encodes the specified SCCoinSceneGetPlayerNum message. Does not implicitly {@link gamehall.SCCoinSceneGetPlayerNum.verify|verify} messages. * @function encode * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {gamehall.ISCCoinSceneGetPlayerNum} message SCCoinSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneGetPlayerNum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Nums != null && message.Nums.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.Nums.length; ++i) writer.int32(message.Nums[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCCoinSceneGetPlayerNum message, length delimited. Does not implicitly {@link gamehall.SCCoinSceneGetPlayerNum.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {gamehall.ISCCoinSceneGetPlayerNum} message SCCoinSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneGetPlayerNum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCoinSceneGetPlayerNum message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCoinSceneGetPlayerNum} SCCoinSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneGetPlayerNum.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCoinSceneGetPlayerNum(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.Nums && message.Nums.length)) message.Nums = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Nums.push(reader.int32()); } else message.Nums.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCoinSceneGetPlayerNum message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCoinSceneGetPlayerNum} SCCoinSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneGetPlayerNum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCoinSceneGetPlayerNum message. * @function verify * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCoinSceneGetPlayerNum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Nums != null && message.hasOwnProperty("Nums")) { if (!Array.isArray(message.Nums)) return "Nums: array expected"; for (var i = 0; i < message.Nums.length; ++i) if (!$util.isInteger(message.Nums[i])) return "Nums: integer[] expected"; } return null; }; /** * Creates a SCCoinSceneGetPlayerNum message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {Object.} object Plain object * @returns {gamehall.SCCoinSceneGetPlayerNum} SCCoinSceneGetPlayerNum */ SCCoinSceneGetPlayerNum.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCoinSceneGetPlayerNum) return object; var message = new $root.gamehall.SCCoinSceneGetPlayerNum(); if (object.Nums) { if (!Array.isArray(object.Nums)) throw TypeError(".gamehall.SCCoinSceneGetPlayerNum.Nums: array expected"); message.Nums = []; for (var i = 0; i < object.Nums.length; ++i) message.Nums[i] = object.Nums[i] | 0; } return message; }; /** * Creates a plain object from a SCCoinSceneGetPlayerNum message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {gamehall.SCCoinSceneGetPlayerNum} message SCCoinSceneGetPlayerNum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCoinSceneGetPlayerNum.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Nums = []; if (message.Nums && message.Nums.length) { object.Nums = []; for (var j = 0; j < message.Nums.length; ++j) object.Nums[j] = message.Nums[j]; } return object; }; /** * Converts this SCCoinSceneGetPlayerNum to JSON. * @function toJSON * @memberof gamehall.SCCoinSceneGetPlayerNum * @instance * @returns {Object.} JSON object */ SCCoinSceneGetPlayerNum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCoinSceneGetPlayerNum * @function getTypeUrl * @memberof gamehall.SCCoinSceneGetPlayerNum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCoinSceneGetPlayerNum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCoinSceneGetPlayerNum"; }; return SCCoinSceneGetPlayerNum; })(); gamehall.CSCoinSceneOp = (function() { /** * Properties of a CSCoinSceneOp. * @memberof gamehall * @interface ICSCoinSceneOp * @property {number|null} [Id] CSCoinSceneOp Id * @property {number|null} [OpType] CSCoinSceneOp OpType * @property {Array.|null} [OpParams] CSCoinSceneOp OpParams * @property {string|null} [Platform] CSCoinSceneOp Platform */ /** * Constructs a new CSCoinSceneOp. * @memberof gamehall * @classdesc Represents a CSCoinSceneOp. * @implements ICSCoinSceneOp * @constructor * @param {gamehall.ICSCoinSceneOp=} [properties] Properties to set */ function CSCoinSceneOp(properties) { this.OpParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCoinSceneOp Id. * @member {number} Id * @memberof gamehall.CSCoinSceneOp * @instance */ CSCoinSceneOp.prototype.Id = 0; /** * CSCoinSceneOp OpType. * @member {number} OpType * @memberof gamehall.CSCoinSceneOp * @instance */ CSCoinSceneOp.prototype.OpType = 0; /** * CSCoinSceneOp OpParams. * @member {Array.} OpParams * @memberof gamehall.CSCoinSceneOp * @instance */ CSCoinSceneOp.prototype.OpParams = $util.emptyArray; /** * CSCoinSceneOp Platform. * @member {string} Platform * @memberof gamehall.CSCoinSceneOp * @instance */ CSCoinSceneOp.prototype.Platform = ""; /** * Creates a new CSCoinSceneOp instance using the specified properties. * @function create * @memberof gamehall.CSCoinSceneOp * @static * @param {gamehall.ICSCoinSceneOp=} [properties] Properties to set * @returns {gamehall.CSCoinSceneOp} CSCoinSceneOp instance */ CSCoinSceneOp.create = function create(properties) { return new CSCoinSceneOp(properties); }; /** * Encodes the specified CSCoinSceneOp message. Does not implicitly {@link gamehall.CSCoinSceneOp.verify|verify} messages. * @function encode * @memberof gamehall.CSCoinSceneOp * @static * @param {gamehall.ICSCoinSceneOp} message CSCoinSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinSceneOp.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).int32(message.Id); if (message.OpType != null && Object.hasOwnProperty.call(message, "OpType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpType); if (message.OpParams != null && message.OpParams.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (var i = 0; i < message.OpParams.length; ++i) writer.int32(message.OpParams[i]); writer.ldelim(); } if (message.Platform != null && Object.hasOwnProperty.call(message, "Platform")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.Platform); return writer; }; /** * Encodes the specified CSCoinSceneOp message, length delimited. Does not implicitly {@link gamehall.CSCoinSceneOp.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCoinSceneOp * @static * @param {gamehall.ICSCoinSceneOp} message CSCoinSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinSceneOp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCoinSceneOp message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCoinSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCoinSceneOp} CSCoinSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinSceneOp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCoinSceneOp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.OpType = reader.int32(); break; } case 3: { if (!(message.OpParams && message.OpParams.length)) message.OpParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OpParams.push(reader.int32()); } else message.OpParams.push(reader.int32()); break; } case 4: { message.Platform = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCoinSceneOp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCoinSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCoinSceneOp} CSCoinSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinSceneOp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCoinSceneOp message. * @function verify * @memberof gamehall.CSCoinSceneOp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCoinSceneOp.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)) return "Id: integer expected"; if (message.OpType != null && message.hasOwnProperty("OpType")) if (!$util.isInteger(message.OpType)) return "OpType: integer expected"; if (message.OpParams != null && message.hasOwnProperty("OpParams")) { if (!Array.isArray(message.OpParams)) return "OpParams: array expected"; for (var i = 0; i < message.OpParams.length; ++i) if (!$util.isInteger(message.OpParams[i])) return "OpParams: integer[] expected"; } if (message.Platform != null && message.hasOwnProperty("Platform")) if (!$util.isString(message.Platform)) return "Platform: string expected"; return null; }; /** * Creates a CSCoinSceneOp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCoinSceneOp * @static * @param {Object.} object Plain object * @returns {gamehall.CSCoinSceneOp} CSCoinSceneOp */ CSCoinSceneOp.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCoinSceneOp) return object; var message = new $root.gamehall.CSCoinSceneOp(); if (object.Id != null) message.Id = object.Id | 0; if (object.OpType != null) message.OpType = object.OpType | 0; if (object.OpParams) { if (!Array.isArray(object.OpParams)) throw TypeError(".gamehall.CSCoinSceneOp.OpParams: array expected"); message.OpParams = []; for (var i = 0; i < object.OpParams.length; ++i) message.OpParams[i] = object.OpParams[i] | 0; } if (object.Platform != null) message.Platform = String(object.Platform); return message; }; /** * Creates a plain object from a CSCoinSceneOp message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCoinSceneOp * @static * @param {gamehall.CSCoinSceneOp} message CSCoinSceneOp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCoinSceneOp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OpParams = []; if (options.defaults) { object.Id = 0; object.OpType = 0; object.Platform = ""; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpType != null && message.hasOwnProperty("OpType")) object.OpType = message.OpType; if (message.OpParams && message.OpParams.length) { object.OpParams = []; for (var j = 0; j < message.OpParams.length; ++j) object.OpParams[j] = message.OpParams[j]; } if (message.Platform != null && message.hasOwnProperty("Platform")) object.Platform = message.Platform; return object; }; /** * Converts this CSCoinSceneOp to JSON. * @function toJSON * @memberof gamehall.CSCoinSceneOp * @instance * @returns {Object.} JSON object */ CSCoinSceneOp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCoinSceneOp * @function getTypeUrl * @memberof gamehall.CSCoinSceneOp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCoinSceneOp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCoinSceneOp"; }; return CSCoinSceneOp; })(); gamehall.SCCoinSceneOp = (function() { /** * Properties of a SCCoinSceneOp. * @memberof gamehall * @interface ISCCoinSceneOp * @property {gamehall.OpResultCode|null} [OpCode] SCCoinSceneOp OpCode * @property {number|null} [Id] SCCoinSceneOp Id * @property {number|null} [OpType] SCCoinSceneOp OpType * @property {Array.|null} [OpParams] SCCoinSceneOp OpParams */ /** * Constructs a new SCCoinSceneOp. * @memberof gamehall * @classdesc Represents a SCCoinSceneOp. * @implements ISCCoinSceneOp * @constructor * @param {gamehall.ISCCoinSceneOp=} [properties] Properties to set */ function SCCoinSceneOp(properties) { this.OpParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCoinSceneOp OpCode. * @member {gamehall.OpResultCode} OpCode * @memberof gamehall.SCCoinSceneOp * @instance */ SCCoinSceneOp.prototype.OpCode = 0; /** * SCCoinSceneOp Id. * @member {number} Id * @memberof gamehall.SCCoinSceneOp * @instance */ SCCoinSceneOp.prototype.Id = 0; /** * SCCoinSceneOp OpType. * @member {number} OpType * @memberof gamehall.SCCoinSceneOp * @instance */ SCCoinSceneOp.prototype.OpType = 0; /** * SCCoinSceneOp OpParams. * @member {Array.} OpParams * @memberof gamehall.SCCoinSceneOp * @instance */ SCCoinSceneOp.prototype.OpParams = $util.emptyArray; /** * Creates a new SCCoinSceneOp instance using the specified properties. * @function create * @memberof gamehall.SCCoinSceneOp * @static * @param {gamehall.ISCCoinSceneOp=} [properties] Properties to set * @returns {gamehall.SCCoinSceneOp} SCCoinSceneOp instance */ SCCoinSceneOp.create = function create(properties) { return new SCCoinSceneOp(properties); }; /** * Encodes the specified SCCoinSceneOp message. Does not implicitly {@link gamehall.SCCoinSceneOp.verify|verify} messages. * @function encode * @memberof gamehall.SCCoinSceneOp * @static * @param {gamehall.ISCCoinSceneOp} message SCCoinSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneOp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpCode); if (message.Id != null && Object.hasOwnProperty.call(message, "Id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Id); if (message.OpType != null && Object.hasOwnProperty.call(message, "OpType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.OpType); if (message.OpParams != null && message.OpParams.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (var i = 0; i < message.OpParams.length; ++i) writer.int32(message.OpParams[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCCoinSceneOp message, length delimited. Does not implicitly {@link gamehall.SCCoinSceneOp.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCoinSceneOp * @static * @param {gamehall.ISCCoinSceneOp} message SCCoinSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneOp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCoinSceneOp message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCoinSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCoinSceneOp} SCCoinSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneOp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCoinSceneOp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpCode = reader.int32(); break; } case 2: { message.Id = reader.int32(); break; } case 3: { message.OpType = reader.int32(); break; } case 4: { if (!(message.OpParams && message.OpParams.length)) message.OpParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OpParams.push(reader.int32()); } else message.OpParams.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCoinSceneOp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCoinSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCoinSceneOp} SCCoinSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneOp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCoinSceneOp message. * @function verify * @memberof gamehall.SCCoinSceneOp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCoinSceneOp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) switch (message.OpCode) { default: return "OpCode: enum value expected"; case 0: case 1: case 1019: case 1053: case 1054: case 1056: case 1058: case 1059: case 1079: case 1080: case 1081: case 1082: case 1103: case 1105: case 1106: case 1107: case 1113: case 1078: break; } if (message.Id != null && message.hasOwnProperty("Id")) if (!$util.isInteger(message.Id)) return "Id: integer expected"; if (message.OpType != null && message.hasOwnProperty("OpType")) if (!$util.isInteger(message.OpType)) return "OpType: integer expected"; if (message.OpParams != null && message.hasOwnProperty("OpParams")) { if (!Array.isArray(message.OpParams)) return "OpParams: array expected"; for (var i = 0; i < message.OpParams.length; ++i) if (!$util.isInteger(message.OpParams[i])) return "OpParams: integer[] expected"; } return null; }; /** * Creates a SCCoinSceneOp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCoinSceneOp * @static * @param {Object.} object Plain object * @returns {gamehall.SCCoinSceneOp} SCCoinSceneOp */ SCCoinSceneOp.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCoinSceneOp) return object; var message = new $root.gamehall.SCCoinSceneOp(); switch (object.OpCode) { default: if (typeof object.OpCode === "number") { message.OpCode = object.OpCode; break; } break; case "OPRC_Sucess": case 0: message.OpCode = 0; break; case "OPRC_Error": case 1: message.OpCode = 1; break; case "OPRC_RoomIsFull": case 1019: message.OpCode = 1019; break; case "OPRC_RoomHadClosed": case 1053: message.OpCode = 1053; break; case "OPRC_SceneServerMaintain": case 1054: message.OpCode = 1054; break; case "OPRC_CoinNotEnough": case 1056: message.OpCode = 1056; break; case "OPRC_CoinTooMore": case 1058: message.OpCode = 1058; break; case "OPRC_CoinSceneYouAreGaming": case 1059: message.OpCode = 1059; break; case "OPRC_NoFindDownTiceRoom": case 1079: message.OpCode = 1079; break; case "OPRC_ChangeRoomTooOften": case 1080: message.OpCode = 1080; break; case "OPRC_NoOtherDownTiceRoom": case 1081: message.OpCode = 1081; break; case "OPRC_OpYield": case 1082: message.OpCode = 1082; break; case "OPRC_RoomGameTimes": case 1103: message.OpCode = 1103; break; case "OPRC_CoinSceneEnterQueueSucc": case 1105: message.OpCode = 1105; break; case "OPRC_CoinSceneEnterQueueFail": case 1106: message.OpCode = 1106; break; case "OPRC_CoinSceneEnterQueueOverTime": case 1107: message.OpCode = 1107; break; case "OPRC_MustBindPromoter": case 1113: message.OpCode = 1113; break; case "OPRC_YourAreGamingCannotLeave": case 1078: message.OpCode = 1078; break; } if (object.Id != null) message.Id = object.Id | 0; if (object.OpType != null) message.OpType = object.OpType | 0; if (object.OpParams) { if (!Array.isArray(object.OpParams)) throw TypeError(".gamehall.SCCoinSceneOp.OpParams: array expected"); message.OpParams = []; for (var i = 0; i < object.OpParams.length; ++i) message.OpParams[i] = object.OpParams[i] | 0; } return message; }; /** * Creates a plain object from a SCCoinSceneOp message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCoinSceneOp * @static * @param {gamehall.SCCoinSceneOp} message SCCoinSceneOp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCoinSceneOp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OpParams = []; if (options.defaults) { object.OpCode = options.enums === String ? "OPRC_Sucess" : 0; object.Id = 0; object.OpType = 0; } if (message.OpCode != null && message.hasOwnProperty("OpCode")) object.OpCode = options.enums === String ? $root.gamehall.OpResultCode[message.OpCode] === undefined ? message.OpCode : $root.gamehall.OpResultCode[message.OpCode] : message.OpCode; if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpType != null && message.hasOwnProperty("OpType")) object.OpType = message.OpType; if (message.OpParams && message.OpParams.length) { object.OpParams = []; for (var j = 0; j < message.OpParams.length; ++j) object.OpParams[j] = message.OpParams[j]; } return object; }; /** * Converts this SCCoinSceneOp to JSON. * @function toJSON * @memberof gamehall.SCCoinSceneOp * @instance * @returns {Object.} JSON object */ SCCoinSceneOp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCoinSceneOp * @function getTypeUrl * @memberof gamehall.SCCoinSceneOp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCoinSceneOp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCoinSceneOp"; }; return SCCoinSceneOp; })(); gamehall.CSCoinSceneListRoom = (function() { /** * Properties of a CSCoinSceneListRoom. * @memberof gamehall * @interface ICSCoinSceneListRoom * @property {number|null} [Id] CSCoinSceneListRoom Id */ /** * Constructs a new CSCoinSceneListRoom. * @memberof gamehall * @classdesc Represents a CSCoinSceneListRoom. * @implements ICSCoinSceneListRoom * @constructor * @param {gamehall.ICSCoinSceneListRoom=} [properties] Properties to set */ function CSCoinSceneListRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCoinSceneListRoom Id. * @member {number} Id * @memberof gamehall.CSCoinSceneListRoom * @instance */ CSCoinSceneListRoom.prototype.Id = 0; /** * Creates a new CSCoinSceneListRoom instance using the specified properties. * @function create * @memberof gamehall.CSCoinSceneListRoom * @static * @param {gamehall.ICSCoinSceneListRoom=} [properties] Properties to set * @returns {gamehall.CSCoinSceneListRoom} CSCoinSceneListRoom instance */ CSCoinSceneListRoom.create = function create(properties) { return new CSCoinSceneListRoom(properties); }; /** * Encodes the specified CSCoinSceneListRoom message. Does not implicitly {@link gamehall.CSCoinSceneListRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSCoinSceneListRoom * @static * @param {gamehall.ICSCoinSceneListRoom} message CSCoinSceneListRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinSceneListRoom.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).int32(message.Id); return writer; }; /** * Encodes the specified CSCoinSceneListRoom message, length delimited. Does not implicitly {@link gamehall.CSCoinSceneListRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCoinSceneListRoom * @static * @param {gamehall.ICSCoinSceneListRoom} message CSCoinSceneListRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinSceneListRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCoinSceneListRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCoinSceneListRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCoinSceneListRoom} CSCoinSceneListRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinSceneListRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCoinSceneListRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCoinSceneListRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCoinSceneListRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCoinSceneListRoom} CSCoinSceneListRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinSceneListRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCoinSceneListRoom message. * @function verify * @memberof gamehall.CSCoinSceneListRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCoinSceneListRoom.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)) return "Id: integer expected"; return null; }; /** * Creates a CSCoinSceneListRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCoinSceneListRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSCoinSceneListRoom} CSCoinSceneListRoom */ CSCoinSceneListRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCoinSceneListRoom) return object; var message = new $root.gamehall.CSCoinSceneListRoom(); if (object.Id != null) message.Id = object.Id | 0; return message; }; /** * Creates a plain object from a CSCoinSceneListRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCoinSceneListRoom * @static * @param {gamehall.CSCoinSceneListRoom} message CSCoinSceneListRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCoinSceneListRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.Id = 0; if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; return object; }; /** * Converts this CSCoinSceneListRoom to JSON. * @function toJSON * @memberof gamehall.CSCoinSceneListRoom * @instance * @returns {Object.} JSON object */ CSCoinSceneListRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCoinSceneListRoom * @function getTypeUrl * @memberof gamehall.CSCoinSceneListRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCoinSceneListRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCoinSceneListRoom"; }; return CSCoinSceneListRoom; })(); gamehall.CoinSceneInfo = (function() { /** * Properties of a CoinSceneInfo. * @memberof gamehall * @interface ICoinSceneInfo * @property {number|null} [SceneId] CoinSceneInfo SceneId * @property {number|null} [PlayerNum] CoinSceneInfo PlayerNum */ /** * Constructs a new CoinSceneInfo. * @memberof gamehall * @classdesc Represents a CoinSceneInfo. * @implements ICoinSceneInfo * @constructor * @param {gamehall.ICoinSceneInfo=} [properties] Properties to set */ function CoinSceneInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CoinSceneInfo SceneId. * @member {number} SceneId * @memberof gamehall.CoinSceneInfo * @instance */ CoinSceneInfo.prototype.SceneId = 0; /** * CoinSceneInfo PlayerNum. * @member {number} PlayerNum * @memberof gamehall.CoinSceneInfo * @instance */ CoinSceneInfo.prototype.PlayerNum = 0; /** * Creates a new CoinSceneInfo instance using the specified properties. * @function create * @memberof gamehall.CoinSceneInfo * @static * @param {gamehall.ICoinSceneInfo=} [properties] Properties to set * @returns {gamehall.CoinSceneInfo} CoinSceneInfo instance */ CoinSceneInfo.create = function create(properties) { return new CoinSceneInfo(properties); }; /** * Encodes the specified CoinSceneInfo message. Does not implicitly {@link gamehall.CoinSceneInfo.verify|verify} messages. * @function encode * @memberof gamehall.CoinSceneInfo * @static * @param {gamehall.ICoinSceneInfo} message CoinSceneInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CoinSceneInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.SceneId != null && Object.hasOwnProperty.call(message, "SceneId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.SceneId); if (message.PlayerNum != null && Object.hasOwnProperty.call(message, "PlayerNum")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.PlayerNum); return writer; }; /** * Encodes the specified CoinSceneInfo message, length delimited. Does not implicitly {@link gamehall.CoinSceneInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CoinSceneInfo * @static * @param {gamehall.ICoinSceneInfo} message CoinSceneInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CoinSceneInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CoinSceneInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.CoinSceneInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CoinSceneInfo} CoinSceneInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CoinSceneInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CoinSceneInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.SceneId = reader.int32(); break; } case 2: { message.PlayerNum = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CoinSceneInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CoinSceneInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CoinSceneInfo} CoinSceneInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CoinSceneInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CoinSceneInfo message. * @function verify * @memberof gamehall.CoinSceneInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CoinSceneInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.SceneId != null && message.hasOwnProperty("SceneId")) if (!$util.isInteger(message.SceneId)) return "SceneId: integer expected"; if (message.PlayerNum != null && message.hasOwnProperty("PlayerNum")) if (!$util.isInteger(message.PlayerNum)) return "PlayerNum: integer expected"; return null; }; /** * Creates a CoinSceneInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CoinSceneInfo * @static * @param {Object.} object Plain object * @returns {gamehall.CoinSceneInfo} CoinSceneInfo */ CoinSceneInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CoinSceneInfo) return object; var message = new $root.gamehall.CoinSceneInfo(); if (object.SceneId != null) message.SceneId = object.SceneId | 0; if (object.PlayerNum != null) message.PlayerNum = object.PlayerNum | 0; return message; }; /** * Creates a plain object from a CoinSceneInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CoinSceneInfo * @static * @param {gamehall.CoinSceneInfo} message CoinSceneInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CoinSceneInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.SceneId = 0; object.PlayerNum = 0; } if (message.SceneId != null && message.hasOwnProperty("SceneId")) object.SceneId = message.SceneId; if (message.PlayerNum != null && message.hasOwnProperty("PlayerNum")) object.PlayerNum = message.PlayerNum; return object; }; /** * Converts this CoinSceneInfo to JSON. * @function toJSON * @memberof gamehall.CoinSceneInfo * @instance * @returns {Object.} JSON object */ CoinSceneInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CoinSceneInfo * @function getTypeUrl * @memberof gamehall.CoinSceneInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CoinSceneInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CoinSceneInfo"; }; return CoinSceneInfo; })(); gamehall.SCCoinSceneListRoom = (function() { /** * Properties of a SCCoinSceneListRoom. * @memberof gamehall * @interface ISCCoinSceneListRoom * @property {number|null} [Id] SCCoinSceneListRoom Id * @property {number|null} [LimitCoin] SCCoinSceneListRoom LimitCoin * @property {number|null} [MaxCoinLimit] SCCoinSceneListRoom MaxCoinLimit * @property {number|null} [BaseScore] SCCoinSceneListRoom BaseScore * @property {number|null} [MaxScore] SCCoinSceneListRoom MaxScore * @property {number|null} [MaxPlayerNum] SCCoinSceneListRoom MaxPlayerNum * @property {Array.|null} [OtherIntParams] SCCoinSceneListRoom OtherIntParams * @property {Array.|null} [Datas] SCCoinSceneListRoom Datas */ /** * Constructs a new SCCoinSceneListRoom. * @memberof gamehall * @classdesc Represents a SCCoinSceneListRoom. * @implements ISCCoinSceneListRoom * @constructor * @param {gamehall.ISCCoinSceneListRoom=} [properties] Properties to set */ function SCCoinSceneListRoom(properties) { this.OtherIntParams = []; this.Datas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCoinSceneListRoom Id. * @member {number} Id * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.Id = 0; /** * SCCoinSceneListRoom LimitCoin. * @member {number} LimitCoin * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.LimitCoin = 0; /** * SCCoinSceneListRoom MaxCoinLimit. * @member {number} MaxCoinLimit * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.MaxCoinLimit = 0; /** * SCCoinSceneListRoom BaseScore. * @member {number} BaseScore * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.BaseScore = 0; /** * SCCoinSceneListRoom MaxScore. * @member {number} MaxScore * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.MaxScore = 0; /** * SCCoinSceneListRoom MaxPlayerNum. * @member {number} MaxPlayerNum * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.MaxPlayerNum = 0; /** * SCCoinSceneListRoom OtherIntParams. * @member {Array.} OtherIntParams * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.OtherIntParams = $util.emptyArray; /** * SCCoinSceneListRoom Datas. * @member {Array.} Datas * @memberof gamehall.SCCoinSceneListRoom * @instance */ SCCoinSceneListRoom.prototype.Datas = $util.emptyArray; /** * Creates a new SCCoinSceneListRoom instance using the specified properties. * @function create * @memberof gamehall.SCCoinSceneListRoom * @static * @param {gamehall.ISCCoinSceneListRoom=} [properties] Properties to set * @returns {gamehall.SCCoinSceneListRoom} SCCoinSceneListRoom instance */ SCCoinSceneListRoom.create = function create(properties) { return new SCCoinSceneListRoom(properties); }; /** * Encodes the specified SCCoinSceneListRoom message. Does not implicitly {@link gamehall.SCCoinSceneListRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCCoinSceneListRoom * @static * @param {gamehall.ISCCoinSceneListRoom} message SCCoinSceneListRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneListRoom.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).int32(message.Id); if (message.LimitCoin != null && Object.hasOwnProperty.call(message, "LimitCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.LimitCoin); if (message.MaxCoinLimit != null && Object.hasOwnProperty.call(message, "MaxCoinLimit")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.MaxCoinLimit); if (message.BaseScore != null && Object.hasOwnProperty.call(message, "BaseScore")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.BaseScore); if (message.MaxScore != null && Object.hasOwnProperty.call(message, "MaxScore")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.MaxScore); if (message.MaxPlayerNum != null && Object.hasOwnProperty.call(message, "MaxPlayerNum")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.MaxPlayerNum); if (message.OtherIntParams != null && message.OtherIntParams.length) { writer.uint32(/* id 7, wireType 2 =*/58).fork(); for (var i = 0; i < message.OtherIntParams.length; ++i) writer.int32(message.OtherIntParams[i]); writer.ldelim(); } if (message.Datas != null && message.Datas.length) for (var i = 0; i < message.Datas.length; ++i) $root.gamehall.CoinSceneInfo.encode(message.Datas[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** * Encodes the specified SCCoinSceneListRoom message, length delimited. Does not implicitly {@link gamehall.SCCoinSceneListRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCoinSceneListRoom * @static * @param {gamehall.ISCCoinSceneListRoom} message SCCoinSceneListRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneListRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCoinSceneListRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCoinSceneListRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCoinSceneListRoom} SCCoinSceneListRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneListRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCoinSceneListRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.LimitCoin = reader.int32(); break; } case 3: { message.MaxCoinLimit = reader.int32(); break; } case 4: { message.BaseScore = reader.int32(); break; } case 5: { message.MaxScore = reader.int32(); break; } case 6: { message.MaxPlayerNum = reader.int32(); break; } case 7: { if (!(message.OtherIntParams && message.OtherIntParams.length)) message.OtherIntParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OtherIntParams.push(reader.int32()); } else message.OtherIntParams.push(reader.int32()); break; } case 8: { if (!(message.Datas && message.Datas.length)) message.Datas = []; message.Datas.push($root.gamehall.CoinSceneInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCoinSceneListRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCoinSceneListRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCoinSceneListRoom} SCCoinSceneListRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneListRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCoinSceneListRoom message. * @function verify * @memberof gamehall.SCCoinSceneListRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCoinSceneListRoom.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)) return "Id: integer expected"; if (message.LimitCoin != null && message.hasOwnProperty("LimitCoin")) if (!$util.isInteger(message.LimitCoin)) return "LimitCoin: integer expected"; if (message.MaxCoinLimit != null && message.hasOwnProperty("MaxCoinLimit")) if (!$util.isInteger(message.MaxCoinLimit)) return "MaxCoinLimit: integer expected"; if (message.BaseScore != null && message.hasOwnProperty("BaseScore")) if (!$util.isInteger(message.BaseScore)) return "BaseScore: integer expected"; if (message.MaxScore != null && message.hasOwnProperty("MaxScore")) if (!$util.isInteger(message.MaxScore)) return "MaxScore: integer expected"; if (message.MaxPlayerNum != null && message.hasOwnProperty("MaxPlayerNum")) if (!$util.isInteger(message.MaxPlayerNum)) return "MaxPlayerNum: integer expected"; if (message.OtherIntParams != null && message.hasOwnProperty("OtherIntParams")) { if (!Array.isArray(message.OtherIntParams)) return "OtherIntParams: array expected"; for (var i = 0; i < message.OtherIntParams.length; ++i) if (!$util.isInteger(message.OtherIntParams[i])) return "OtherIntParams: integer[] expected"; } if (message.Datas != null && message.hasOwnProperty("Datas")) { if (!Array.isArray(message.Datas)) return "Datas: array expected"; for (var i = 0; i < message.Datas.length; ++i) { var error = $root.gamehall.CoinSceneInfo.verify(message.Datas[i]); if (error) return "Datas." + error; } } return null; }; /** * Creates a SCCoinSceneListRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCoinSceneListRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCCoinSceneListRoom} SCCoinSceneListRoom */ SCCoinSceneListRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCoinSceneListRoom) return object; var message = new $root.gamehall.SCCoinSceneListRoom(); if (object.Id != null) message.Id = object.Id | 0; if (object.LimitCoin != null) message.LimitCoin = object.LimitCoin | 0; if (object.MaxCoinLimit != null) message.MaxCoinLimit = object.MaxCoinLimit | 0; if (object.BaseScore != null) message.BaseScore = object.BaseScore | 0; if (object.MaxScore != null) message.MaxScore = object.MaxScore | 0; if (object.MaxPlayerNum != null) message.MaxPlayerNum = object.MaxPlayerNum | 0; if (object.OtherIntParams) { if (!Array.isArray(object.OtherIntParams)) throw TypeError(".gamehall.SCCoinSceneListRoom.OtherIntParams: array expected"); message.OtherIntParams = []; for (var i = 0; i < object.OtherIntParams.length; ++i) message.OtherIntParams[i] = object.OtherIntParams[i] | 0; } if (object.Datas) { if (!Array.isArray(object.Datas)) throw TypeError(".gamehall.SCCoinSceneListRoom.Datas: array expected"); message.Datas = []; for (var i = 0; i < object.Datas.length; ++i) { if (typeof object.Datas[i] !== "object") throw TypeError(".gamehall.SCCoinSceneListRoom.Datas: object expected"); message.Datas[i] = $root.gamehall.CoinSceneInfo.fromObject(object.Datas[i]); } } return message; }; /** * Creates a plain object from a SCCoinSceneListRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCoinSceneListRoom * @static * @param {gamehall.SCCoinSceneListRoom} message SCCoinSceneListRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCoinSceneListRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.OtherIntParams = []; object.Datas = []; } if (options.defaults) { object.Id = 0; object.LimitCoin = 0; object.MaxCoinLimit = 0; object.BaseScore = 0; object.MaxScore = 0; object.MaxPlayerNum = 0; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.LimitCoin != null && message.hasOwnProperty("LimitCoin")) object.LimitCoin = message.LimitCoin; if (message.MaxCoinLimit != null && message.hasOwnProperty("MaxCoinLimit")) object.MaxCoinLimit = message.MaxCoinLimit; if (message.BaseScore != null && message.hasOwnProperty("BaseScore")) object.BaseScore = message.BaseScore; if (message.MaxScore != null && message.hasOwnProperty("MaxScore")) object.MaxScore = message.MaxScore; if (message.MaxPlayerNum != null && message.hasOwnProperty("MaxPlayerNum")) object.MaxPlayerNum = message.MaxPlayerNum; if (message.OtherIntParams && message.OtherIntParams.length) { object.OtherIntParams = []; for (var j = 0; j < message.OtherIntParams.length; ++j) object.OtherIntParams[j] = message.OtherIntParams[j]; } if (message.Datas && message.Datas.length) { object.Datas = []; for (var j = 0; j < message.Datas.length; ++j) object.Datas[j] = $root.gamehall.CoinSceneInfo.toObject(message.Datas[j], options); } return object; }; /** * Converts this SCCoinSceneListRoom to JSON. * @function toJSON * @memberof gamehall.SCCoinSceneListRoom * @instance * @returns {Object.} JSON object */ SCCoinSceneListRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCoinSceneListRoom * @function getTypeUrl * @memberof gamehall.SCCoinSceneListRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCoinSceneListRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCoinSceneListRoom"; }; return SCCoinSceneListRoom; })(); gamehall.SCCoinSceneQueueState = (function() { /** * Properties of a SCCoinSceneQueueState. * @memberof gamehall * @interface ISCCoinSceneQueueState * @property {number|null} [GameFreeId] SCCoinSceneQueueState GameFreeId * @property {number|null} [Count] SCCoinSceneQueueState Count * @property {number|Long|null} [Ts] SCCoinSceneQueueState Ts */ /** * Constructs a new SCCoinSceneQueueState. * @memberof gamehall * @classdesc Represents a SCCoinSceneQueueState. * @implements ISCCoinSceneQueueState * @constructor * @param {gamehall.ISCCoinSceneQueueState=} [properties] Properties to set */ function SCCoinSceneQueueState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCoinSceneQueueState GameFreeId. * @member {number} GameFreeId * @memberof gamehall.SCCoinSceneQueueState * @instance */ SCCoinSceneQueueState.prototype.GameFreeId = 0; /** * SCCoinSceneQueueState Count. * @member {number} Count * @memberof gamehall.SCCoinSceneQueueState * @instance */ SCCoinSceneQueueState.prototype.Count = 0; /** * SCCoinSceneQueueState Ts. * @member {number|Long} Ts * @memberof gamehall.SCCoinSceneQueueState * @instance */ SCCoinSceneQueueState.prototype.Ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCCoinSceneQueueState instance using the specified properties. * @function create * @memberof gamehall.SCCoinSceneQueueState * @static * @param {gamehall.ISCCoinSceneQueueState=} [properties] Properties to set * @returns {gamehall.SCCoinSceneQueueState} SCCoinSceneQueueState instance */ SCCoinSceneQueueState.create = function create(properties) { return new SCCoinSceneQueueState(properties); }; /** * Encodes the specified SCCoinSceneQueueState message. Does not implicitly {@link gamehall.SCCoinSceneQueueState.verify|verify} messages. * @function encode * @memberof gamehall.SCCoinSceneQueueState * @static * @param {gamehall.ISCCoinSceneQueueState} message SCCoinSceneQueueState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneQueueState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.Count != null && Object.hasOwnProperty.call(message, "Count")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Count); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.Ts); return writer; }; /** * Encodes the specified SCCoinSceneQueueState message, length delimited. Does not implicitly {@link gamehall.SCCoinSceneQueueState.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCoinSceneQueueState * @static * @param {gamehall.ISCCoinSceneQueueState} message SCCoinSceneQueueState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinSceneQueueState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCoinSceneQueueState message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCoinSceneQueueState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCoinSceneQueueState} SCCoinSceneQueueState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneQueueState.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCoinSceneQueueState(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.Count = reader.int32(); break; } case 3: { message.Ts = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCoinSceneQueueState message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCoinSceneQueueState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCoinSceneQueueState} SCCoinSceneQueueState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinSceneQueueState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCoinSceneQueueState message. * @function verify * @memberof gamehall.SCCoinSceneQueueState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCoinSceneQueueState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.Count != null && message.hasOwnProperty("Count")) if (!$util.isInteger(message.Count)) return "Count: integer expected"; if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts) && !(message.Ts && $util.isInteger(message.Ts.low) && $util.isInteger(message.Ts.high))) return "Ts: integer|Long expected"; return null; }; /** * Creates a SCCoinSceneQueueState message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCoinSceneQueueState * @static * @param {Object.} object Plain object * @returns {gamehall.SCCoinSceneQueueState} SCCoinSceneQueueState */ SCCoinSceneQueueState.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCoinSceneQueueState) return object; var message = new $root.gamehall.SCCoinSceneQueueState(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.Count != null) message.Count = object.Count | 0; if (object.Ts != null) if ($util.Long) (message.Ts = $util.Long.fromValue(object.Ts)).unsigned = false; else if (typeof object.Ts === "string") message.Ts = parseInt(object.Ts, 10); else if (typeof object.Ts === "number") message.Ts = object.Ts; else if (typeof object.Ts === "object") message.Ts = new $util.LongBits(object.Ts.low >>> 0, object.Ts.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCCoinSceneQueueState message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCoinSceneQueueState * @static * @param {gamehall.SCCoinSceneQueueState} message SCCoinSceneQueueState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCoinSceneQueueState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; object.Count = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Ts = options.longs === String ? "0" : 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.Count != null && message.hasOwnProperty("Count")) object.Count = message.Count; if (message.Ts != null && message.hasOwnProperty("Ts")) if (typeof message.Ts === "number") object.Ts = options.longs === String ? String(message.Ts) : message.Ts; else object.Ts = options.longs === String ? $util.Long.prototype.toString.call(message.Ts) : options.longs === Number ? new $util.LongBits(message.Ts.low >>> 0, message.Ts.high >>> 0).toNumber() : message.Ts; return object; }; /** * Converts this SCCoinSceneQueueState to JSON. * @function toJSON * @memberof gamehall.SCCoinSceneQueueState * @instance * @returns {Object.} JSON object */ SCCoinSceneQueueState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCoinSceneQueueState * @function getTypeUrl * @memberof gamehall.SCCoinSceneQueueState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCoinSceneQueueState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCoinSceneQueueState"; }; return SCCoinSceneQueueState; })(); /** * OpResultCode_Game enum. * @name gamehall.OpResultCode_Game * @enum {number} * @property {number} OPRC_Sucess_Game=0 OPRC_Sucess_Game value * @property {number} OPRC_Error_Game=1 OPRC_Error_Game value * @property {number} OPRC_RoomNotExist_Game=1016 OPRC_RoomNotExist_Game value * @property {number} OPRC_GameNotExist_Game=1017 OPRC_GameNotExist_Game value * @property {number} OPRC_GameHadClosed=1018 OPRC_GameHadClosed value * @property {number} OPRC_RoomIsFull_Game=1019 OPRC_RoomIsFull_Game value * @property {number} OPRC_RoomHadExist_Game=1020 OPRC_RoomHadExist_Game value * @property {number} OPRC_GameStarting_Game=1022 OPRC_GameStarting_Game value * @property {number} OPRC_CannotWatchReasonInOther_Game=1024 OPRC_CannotWatchReasonInOther_Game value * @property {number} OPRC_MoneyNotEnough_Game=1040 OPRC_MoneyNotEnough_Game value * @property {number} OPRC_CannotWatchReasonRoomNotStart_Game=1042 OPRC_CannotWatchReasonRoomNotStart_Game value * @property {number} OPRC_OnlyAllowClubMemberEnter_Game=1043 OPRC_OnlyAllowClubMemberEnter_Game value * @property {number} OPRC_YourResVerIsLow_Game=1044 OPRC_YourResVerIsLow_Game value * @property {number} OPRC_YourAppVerIsLow_Game=1045 OPRC_YourAppVerIsLow_Game value * @property {number} OPRC_ScenePosFull_Game=1048 OPRC_ScenePosFull_Game value * @property {number} OPRC_SceneEnterForWatcher_Game=1050 OPRC_SceneEnterForWatcher_Game value * @property {number} OPRC_RoomHadClosed_Game=1053 OPRC_RoomHadClosed_Game value * @property {number} OPRC_SceneServerMaintain_Game=1054 OPRC_SceneServerMaintain_Game value * @property {number} OPRC_SameIpForbid_Game=1055 OPRC_SameIpForbid_Game value * @property {number} OPRC_CoinNotEnough_Game=1056 OPRC_CoinNotEnough_Game value * @property {number} OPRC_CoinTooMore_Game=1058 OPRC_CoinTooMore_Game value * @property {number} OPRC_InOtherGameIng_Game=1059 OPRC_InOtherGameIng_Game value * @property {number} OPRC_OpYield_Game=1082 OPRC_OpYield_Game value * @property {number} OPRC_AllocRoomIdFailed_Game=1097 OPRC_AllocRoomIdFailed_Game value * @property {number} OPRC_PrivateRoomCountLimit_Game=1098 OPRC_PrivateRoomCountLimit_Game value * @property {number} OPRC_LowerRice_ScenceMax_Game=1075 OPRC_LowerRice_ScenceMax_Game value * @property {number} OPRC_LowerRice_PlayerMax_Game=1076 OPRC_LowerRice_PlayerMax_Game value * @property {number} OPRC_LowerRice_PlayerDownMax_Game=1077 OPRC_LowerRice_PlayerDownMax_Game value * @property {number} OPRC_YourAreGamingCannotLeave_Game=1078 OPRC_YourAreGamingCannotLeave_Game value * @property {number} OPRC_ThirdPltProcessing_Game=1096 OPRC_ThirdPltProcessing_Game value * @property {number} OPRC_RoomGameTimes_Game=1103 OPRC_RoomGameTimes_Game value * @property {number} OPRC_MustBindPromoter_Game=1113 OPRC_MustBindPromoter_Game value * @property {number} Oprc_Club_ClubIsClose_Game=5023 Oprc_Club_ClubIsClose_Game value * @property {number} OPRC_Dg_RegistErr_Game=9000 OPRC_Dg_RegistErr_Game value * @property {number} OPRC_Dg_LoginErr_Game=9001 OPRC_Dg_LoginErr_Game value * @property {number} OPRC_Dg_PlatErr_Game=9002 OPRC_Dg_PlatErr_Game value * @property {number} OPRC_Dg_QuotaNotEnough_Game=9003 OPRC_Dg_QuotaNotEnough_Game value * @property {number} OPRC_Thr_GameClose_Game=9010 OPRC_Thr_GameClose_Game value */ gamehall.OpResultCode_Game = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OPRC_Sucess_Game"] = 0; values[valuesById[1] = "OPRC_Error_Game"] = 1; values[valuesById[1016] = "OPRC_RoomNotExist_Game"] = 1016; values[valuesById[1017] = "OPRC_GameNotExist_Game"] = 1017; values[valuesById[1018] = "OPRC_GameHadClosed"] = 1018; values[valuesById[1019] = "OPRC_RoomIsFull_Game"] = 1019; values[valuesById[1020] = "OPRC_RoomHadExist_Game"] = 1020; values[valuesById[1022] = "OPRC_GameStarting_Game"] = 1022; values[valuesById[1024] = "OPRC_CannotWatchReasonInOther_Game"] = 1024; values[valuesById[1040] = "OPRC_MoneyNotEnough_Game"] = 1040; values[valuesById[1042] = "OPRC_CannotWatchReasonRoomNotStart_Game"] = 1042; values[valuesById[1043] = "OPRC_OnlyAllowClubMemberEnter_Game"] = 1043; values[valuesById[1044] = "OPRC_YourResVerIsLow_Game"] = 1044; values[valuesById[1045] = "OPRC_YourAppVerIsLow_Game"] = 1045; values[valuesById[1048] = "OPRC_ScenePosFull_Game"] = 1048; values[valuesById[1050] = "OPRC_SceneEnterForWatcher_Game"] = 1050; values[valuesById[1053] = "OPRC_RoomHadClosed_Game"] = 1053; values[valuesById[1054] = "OPRC_SceneServerMaintain_Game"] = 1054; values[valuesById[1055] = "OPRC_SameIpForbid_Game"] = 1055; values[valuesById[1056] = "OPRC_CoinNotEnough_Game"] = 1056; values[valuesById[1058] = "OPRC_CoinTooMore_Game"] = 1058; values[valuesById[1059] = "OPRC_InOtherGameIng_Game"] = 1059; values[valuesById[1082] = "OPRC_OpYield_Game"] = 1082; values[valuesById[1097] = "OPRC_AllocRoomIdFailed_Game"] = 1097; values[valuesById[1098] = "OPRC_PrivateRoomCountLimit_Game"] = 1098; values[valuesById[1075] = "OPRC_LowerRice_ScenceMax_Game"] = 1075; values[valuesById[1076] = "OPRC_LowerRice_PlayerMax_Game"] = 1076; values[valuesById[1077] = "OPRC_LowerRice_PlayerDownMax_Game"] = 1077; values[valuesById[1078] = "OPRC_YourAreGamingCannotLeave_Game"] = 1078; values[valuesById[1096] = "OPRC_ThirdPltProcessing_Game"] = 1096; values[valuesById[1103] = "OPRC_RoomGameTimes_Game"] = 1103; values[valuesById[1113] = "OPRC_MustBindPromoter_Game"] = 1113; values[valuesById[5023] = "Oprc_Club_ClubIsClose_Game"] = 5023; values[valuesById[9000] = "OPRC_Dg_RegistErr_Game"] = 9000; values[valuesById[9001] = "OPRC_Dg_LoginErr_Game"] = 9001; values[valuesById[9002] = "OPRC_Dg_PlatErr_Game"] = 9002; values[valuesById[9003] = "OPRC_Dg_QuotaNotEnough_Game"] = 9003; values[valuesById[9010] = "OPRC_Thr_GameClose_Game"] = 9010; return values; })(); /** * GameHallPacketID enum. * @name gamehall.GameHallPacketID * @enum {number} * @property {number} PACKET_GameHall_ZERO=0 PACKET_GameHall_ZERO value * @property {number} PACKET_CS_JOINGAME=2200 PACKET_CS_JOINGAME value * @property {number} PACKET_SC_JOINGAME=2201 PACKET_SC_JOINGAME value * @property {number} PACKET_CS_CREATEROOM=2202 PACKET_CS_CREATEROOM value * @property {number} PACKET_SC_CREATEROOM=2203 PACKET_SC_CREATEROOM value * @property {number} PACKET_CS_ENTERROOM=2204 PACKET_CS_ENTERROOM value * @property {number} PACKET_SC_ENTERROOM=2205 PACKET_SC_ENTERROOM value * @property {number} PACKET_CS_RETURNROOM=2206 PACKET_CS_RETURNROOM value * @property {number} PACKET_SC_RETURNROOM=2207 PACKET_SC_RETURNROOM value * @property {number} PACKET_CS_AUDIENCE_ENTERROOM=2208 PACKET_CS_AUDIENCE_ENTERROOM value * @property {number} PACKET_CS_ENTERGAME=2209 PACKET_CS_ENTERGAME value * @property {number} PACKET_SC_ENTERGAME=2210 PACKET_SC_ENTERGAME value * @property {number} PACKET_CS_QUITGAME=2211 PACKET_CS_QUITGAME value * @property {number} PACKET_SC_QUITGAME=2212 PACKET_SC_QUITGAME value * @property {number} PACKET_SC_CARDGAINWAY=2213 PACKET_SC_CARDGAINWAY value * @property {number} PACKET_CS_TASKLIST=2214 PACKET_CS_TASKLIST value * @property {number} PACKET_SC_TASKLIST=2215 PACKET_SC_TASKLIST value * @property {number} PACKET_SC_TASKCHG=2216 PACKET_SC_TASKCHG value * @property {number} PACKET_SC_TACKCOMPLETE=2217 PACKET_SC_TACKCOMPLETE value * @property {number} PACKET_SC_TASKDEL=2218 PACKET_SC_TASKDEL value * @property {number} PACKET_CS_TACKDRAWPRIZE=2219 PACKET_CS_TACKDRAWPRIZE value * @property {number} PACKET_SC_TACKDRAWPRIZE=2220 PACKET_SC_TACKDRAWPRIZE value * @property {number} PACKET_CS_GETAGENTGAMEREC=2223 PACKET_CS_GETAGENTGAMEREC value * @property {number} PACKET_SC_GETAGENTGAMEREC=2224 PACKET_SC_GETAGENTGAMEREC value * @property {number} PACKET_CS_DELAGENTGAMEREC=2225 PACKET_CS_DELAGENTGAMEREC value * @property {number} PACKET_CS_SHOPBUY=2226 PACKET_CS_SHOPBUY value * @property {number} PACKET_SC_SHOPBUY=2227 PACKET_SC_SHOPBUY value * @property {number} PACKET_SC_LIMITLIST=2228 PACKET_SC_LIMITLIST value * @property {number} PACKET_CS_GETLATELYGAMEIDS=2229 PACKET_CS_GETLATELYGAMEIDS value * @property {number} PACKET_SC_GETLATELYGAMEIDS=2230 PACKET_SC_GETLATELYGAMEIDS value * @property {number} PACKET_CS_GETGAMECONFIG=2231 PACKET_CS_GETGAMECONFIG value * @property {number} PACKET_SC_GETGAMECONFIG=2232 PACKET_SC_GETGAMECONFIG value * @property {number} PACKET_SC_CHANGEGAMESTATUS=2233 PACKET_SC_CHANGEGAMESTATUS value * @property {number} PACKET_CS_ENTERHALL=2240 PACKET_CS_ENTERHALL value * @property {number} PACKET_SC_ENTERHALL=2241 PACKET_SC_ENTERHALL value * @property {number} PACKET_CS_LEAVEHALL=2242 PACKET_CS_LEAVEHALL value * @property {number} PACKET_SC_LEAVEHALL=2243 PACKET_SC_LEAVEHALL value * @property {number} PACKET_CS_HALLROOMLIST=2244 PACKET_CS_HALLROOMLIST value * @property {number} PACKET_SC_HALLROOMLIST=2245 PACKET_SC_HALLROOMLIST value * @property {number} PACKET_SC_ROOMPLAYERENTER=2246 PACKET_SC_ROOMPLAYERENTER value * @property {number} PACKET_SC_ROOMPLAYERLEAVE=2247 PACKET_SC_ROOMPLAYERLEAVE value * @property {number} PACKET_SC_ROOMSTATECHANG=2248 PACKET_SC_ROOMSTATECHANG value * @property {number} PACKET_SC_HALLPLAYERNUM=2249 PACKET_SC_HALLPLAYERNUM value * @property {number} PACKET_SC_BULLETIONINFO=2250 PACKET_SC_BULLETIONINFO value * @property {number} PACKET_CS_BULLETIONINFO=2251 PACKET_CS_BULLETIONINFO value * @property {number} PACKET_CS_CUSTOMERINFOLIST=2252 PACKET_CS_CUSTOMERINFOLIST value * @property {number} PACKET_SC_CUSTOMERINFOLIST=2253 PACKET_SC_CUSTOMERINFOLIST value * @property {number} PACKET_CS_ENTERDGGAME=2254 PACKET_CS_ENTERDGGAME value * @property {number} PACKET_SC_ENTERDGGAME=2255 PACKET_SC_ENTERDGGAME value * @property {number} PACKET_CS_LEAVEDGGAME=2256 PACKET_CS_LEAVEDGGAME value * @property {number} PACKET_SC_LEAVEDGGAME=2257 PACKET_SC_LEAVEDGGAME value * @property {number} PACKET_SC_PLAYERRECHARGEANSWER=2258 PACKET_SC_PLAYERRECHARGEANSWER value * @property {number} PACKET_CS_THRIDACCOUNTSTATICSTIC=2259 PACKET_CS_THRIDACCOUNTSTATICSTIC value * @property {number} PACKET_SC_THRIDACCOUNTSTATICSTIC=2260 PACKET_SC_THRIDACCOUNTSTATICSTIC value * @property {number} PACKET_CS_THRIDACCOUNTTRANSFER=2261 PACKET_CS_THRIDACCOUNTTRANSFER value * @property {number} PACKET_SC_THRIDACCOUNTTRANSFER=2262 PACKET_SC_THRIDACCOUNTTRANSFER value * @property {number} PACKET_CS_ENTERTHRIDGAME=2263 PACKET_CS_ENTERTHRIDGAME value * @property {number} PACKET_SC_ENTERTHRIDGAME=2264 PACKET_SC_ENTERTHRIDGAME value * @property {number} PACKET_CS_LEAVETHRIDGAME=2265 PACKET_CS_LEAVETHRIDGAME value * @property {number} PACKET_SC_LEAVETHRIDGAME=2266 PACKET_SC_LEAVETHRIDGAME value * @property {number} PACKET_CS_THRIDGAMELIST=2267 PACKET_CS_THRIDGAMELIST value * @property {number} PACKET_SC_THRIDGAMELIST=2268 PACKET_SC_THRIDGAMELIST value * @property {number} PACKET_CS_THRIDGAMEBALANCEUPDATE=2269 PACKET_CS_THRIDGAMEBALANCEUPDATE value * @property {number} PACKET_SC_THRIDGAMEBALANCEUPDATE=2270 PACKET_SC_THRIDGAMEBALANCEUPDATE value * @property {number} PACKET_SC_THRIDGAMEBALANCEUPDATESTATE=2271 PACKET_SC_THRIDGAMEBALANCEUPDATESTATE value * @property {number} PACKET_CS_CREATEPRIVATEROOM=2272 PACKET_CS_CREATEPRIVATEROOM value * @property {number} PACKET_SC_CREATEPRIVATEROOM=2273 PACKET_SC_CREATEPRIVATEROOM value * @property {number} PACKET_CS_GETPRIVATEROOMLIST=2274 PACKET_CS_GETPRIVATEROOMLIST value * @property {number} PACKET_SC_GETPRIVATEROOMLIST=2275 PACKET_SC_GETPRIVATEROOMLIST value * @property {number} PACKET_CS_GETPRIVATEROOMHISTORY=2276 PACKET_CS_GETPRIVATEROOMHISTORY value * @property {number} PACKET_SC_GETPRIVATEROOMHISTORY=2277 PACKET_SC_GETPRIVATEROOMHISTORY value * @property {number} PACKET_CS_DESTROYPRIVATEROOM=2278 PACKET_CS_DESTROYPRIVATEROOM value * @property {number} PACKET_SC_DESTROYPRIVATEROOM=2279 PACKET_SC_DESTROYPRIVATEROOM value * @property {number} PACKET_CS_QUERYROOMINFO=2280 PACKET_CS_QUERYROOMINFO value * @property {number} PACKET_SC_QUERYROOMINFO=2281 PACKET_SC_QUERYROOMINFO value * @property {number} PACKET_SC_GAMESUBLIST=2283 PACKET_SC_GAMESUBLIST value * @property {number} PACKET_CS_GAMEOBSERVE=2284 PACKET_CS_GAMEOBSERVE value * @property {number} PACKET_SC_GAMESTATE=2285 PACKET_SC_GAMESTATE value * @property {number} PACKET_SC_SYNCGAMEFREE=2286 PACKET_SC_SYNCGAMEFREE value * @property {number} PACKET_SC_LOTTERYSYNC=2287 PACKET_SC_LOTTERYSYNC value * @property {number} PACKET_CS_LOTTERYLOG=2288 PACKET_CS_LOTTERYLOG value * @property {number} PACKET_SC_LOTTERYLOG=2289 PACKET_SC_LOTTERYLOG value * @property {number} PACKET_SC_LOTTERYBILL=2290 PACKET_SC_LOTTERYBILL value * @property {number} PACKET_CS_UPLOADLOC=2291 PACKET_CS_UPLOADLOC value * @property {number} PACKET_SC_UPLOADLOC=2292 PACKET_SC_UPLOADLOC value * @property {number} PACKET_CS_AUDIENCESIT=2293 PACKET_CS_AUDIENCESIT value * @property {number} PACKET_SC_AUDIENCESIT=2294 PACKET_SC_AUDIENCESIT value * @property {number} PACKET_CS_COMNOTICE=2295 PACKET_CS_COMNOTICE value * @property {number} PACKET_SC_COMNOTICE=2296 PACKET_SC_COMNOTICE value * @property {number} PACKET_SC_CHANGEENTRYSWITCH=2297 PACKET_SC_CHANGEENTRYSWITCH value * @property {number} PACKET_CS_LEAVEROOM=8001 PACKET_CS_LEAVEROOM value * @property {number} PACKET_SC_LEAVEROOM=8002 PACKET_SC_LEAVEROOM value * @property {number} PACKET_CS_DESTROYROOM=8003 PACKET_CS_DESTROYROOM value * @property {number} PACKET_SC_DESTROYROOM=8004 PACKET_SC_DESTROYROOM value * @property {number} PACKET_CS_FORCESTART=8005 PACKET_CS_FORCESTART value * @property {number} PACKET_SC_FORCESTART=8006 PACKET_SC_FORCESTART value * @property {number} PACKET_CS_AUDIENCE_LEAVEROOM=8007 PACKET_CS_AUDIENCE_LEAVEROOM value * @property {number} PACKET_CS_PLAYER_SWITCHFLAG=8008 PACKET_CS_PLAYER_SWITCHFLAG value */ gamehall.GameHallPacketID = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "PACKET_GameHall_ZERO"] = 0; values[valuesById[2200] = "PACKET_CS_JOINGAME"] = 2200; values[valuesById[2201] = "PACKET_SC_JOINGAME"] = 2201; values[valuesById[2202] = "PACKET_CS_CREATEROOM"] = 2202; values[valuesById[2203] = "PACKET_SC_CREATEROOM"] = 2203; values[valuesById[2204] = "PACKET_CS_ENTERROOM"] = 2204; values[valuesById[2205] = "PACKET_SC_ENTERROOM"] = 2205; values[valuesById[2206] = "PACKET_CS_RETURNROOM"] = 2206; values[valuesById[2207] = "PACKET_SC_RETURNROOM"] = 2207; values[valuesById[2208] = "PACKET_CS_AUDIENCE_ENTERROOM"] = 2208; values[valuesById[2209] = "PACKET_CS_ENTERGAME"] = 2209; values[valuesById[2210] = "PACKET_SC_ENTERGAME"] = 2210; values[valuesById[2211] = "PACKET_CS_QUITGAME"] = 2211; values[valuesById[2212] = "PACKET_SC_QUITGAME"] = 2212; values[valuesById[2213] = "PACKET_SC_CARDGAINWAY"] = 2213; values[valuesById[2214] = "PACKET_CS_TASKLIST"] = 2214; values[valuesById[2215] = "PACKET_SC_TASKLIST"] = 2215; values[valuesById[2216] = "PACKET_SC_TASKCHG"] = 2216; values[valuesById[2217] = "PACKET_SC_TACKCOMPLETE"] = 2217; values[valuesById[2218] = "PACKET_SC_TASKDEL"] = 2218; values[valuesById[2219] = "PACKET_CS_TACKDRAWPRIZE"] = 2219; values[valuesById[2220] = "PACKET_SC_TACKDRAWPRIZE"] = 2220; values[valuesById[2223] = "PACKET_CS_GETAGENTGAMEREC"] = 2223; values[valuesById[2224] = "PACKET_SC_GETAGENTGAMEREC"] = 2224; values[valuesById[2225] = "PACKET_CS_DELAGENTGAMEREC"] = 2225; values[valuesById[2226] = "PACKET_CS_SHOPBUY"] = 2226; values[valuesById[2227] = "PACKET_SC_SHOPBUY"] = 2227; values[valuesById[2228] = "PACKET_SC_LIMITLIST"] = 2228; values[valuesById[2229] = "PACKET_CS_GETLATELYGAMEIDS"] = 2229; values[valuesById[2230] = "PACKET_SC_GETLATELYGAMEIDS"] = 2230; values[valuesById[2231] = "PACKET_CS_GETGAMECONFIG"] = 2231; values[valuesById[2232] = "PACKET_SC_GETGAMECONFIG"] = 2232; values[valuesById[2233] = "PACKET_SC_CHANGEGAMESTATUS"] = 2233; values[valuesById[2240] = "PACKET_CS_ENTERHALL"] = 2240; values[valuesById[2241] = "PACKET_SC_ENTERHALL"] = 2241; values[valuesById[2242] = "PACKET_CS_LEAVEHALL"] = 2242; values[valuesById[2243] = "PACKET_SC_LEAVEHALL"] = 2243; values[valuesById[2244] = "PACKET_CS_HALLROOMLIST"] = 2244; values[valuesById[2245] = "PACKET_SC_HALLROOMLIST"] = 2245; values[valuesById[2246] = "PACKET_SC_ROOMPLAYERENTER"] = 2246; values[valuesById[2247] = "PACKET_SC_ROOMPLAYERLEAVE"] = 2247; values[valuesById[2248] = "PACKET_SC_ROOMSTATECHANG"] = 2248; values[valuesById[2249] = "PACKET_SC_HALLPLAYERNUM"] = 2249; values[valuesById[2250] = "PACKET_SC_BULLETIONINFO"] = 2250; values[valuesById[2251] = "PACKET_CS_BULLETIONINFO"] = 2251; values[valuesById[2252] = "PACKET_CS_CUSTOMERINFOLIST"] = 2252; values[valuesById[2253] = "PACKET_SC_CUSTOMERINFOLIST"] = 2253; values[valuesById[2254] = "PACKET_CS_ENTERDGGAME"] = 2254; values[valuesById[2255] = "PACKET_SC_ENTERDGGAME"] = 2255; values[valuesById[2256] = "PACKET_CS_LEAVEDGGAME"] = 2256; values[valuesById[2257] = "PACKET_SC_LEAVEDGGAME"] = 2257; values[valuesById[2258] = "PACKET_SC_PLAYERRECHARGEANSWER"] = 2258; values[valuesById[2259] = "PACKET_CS_THRIDACCOUNTSTATICSTIC"] = 2259; values[valuesById[2260] = "PACKET_SC_THRIDACCOUNTSTATICSTIC"] = 2260; values[valuesById[2261] = "PACKET_CS_THRIDACCOUNTTRANSFER"] = 2261; values[valuesById[2262] = "PACKET_SC_THRIDACCOUNTTRANSFER"] = 2262; values[valuesById[2263] = "PACKET_CS_ENTERTHRIDGAME"] = 2263; values[valuesById[2264] = "PACKET_SC_ENTERTHRIDGAME"] = 2264; values[valuesById[2265] = "PACKET_CS_LEAVETHRIDGAME"] = 2265; values[valuesById[2266] = "PACKET_SC_LEAVETHRIDGAME"] = 2266; values[valuesById[2267] = "PACKET_CS_THRIDGAMELIST"] = 2267; values[valuesById[2268] = "PACKET_SC_THRIDGAMELIST"] = 2268; values[valuesById[2269] = "PACKET_CS_THRIDGAMEBALANCEUPDATE"] = 2269; values[valuesById[2270] = "PACKET_SC_THRIDGAMEBALANCEUPDATE"] = 2270; values[valuesById[2271] = "PACKET_SC_THRIDGAMEBALANCEUPDATESTATE"] = 2271; values[valuesById[2272] = "PACKET_CS_CREATEPRIVATEROOM"] = 2272; values[valuesById[2273] = "PACKET_SC_CREATEPRIVATEROOM"] = 2273; values[valuesById[2274] = "PACKET_CS_GETPRIVATEROOMLIST"] = 2274; values[valuesById[2275] = "PACKET_SC_GETPRIVATEROOMLIST"] = 2275; values[valuesById[2276] = "PACKET_CS_GETPRIVATEROOMHISTORY"] = 2276; values[valuesById[2277] = "PACKET_SC_GETPRIVATEROOMHISTORY"] = 2277; values[valuesById[2278] = "PACKET_CS_DESTROYPRIVATEROOM"] = 2278; values[valuesById[2279] = "PACKET_SC_DESTROYPRIVATEROOM"] = 2279; values[valuesById[2280] = "PACKET_CS_QUERYROOMINFO"] = 2280; values[valuesById[2281] = "PACKET_SC_QUERYROOMINFO"] = 2281; values[valuesById[2283] = "PACKET_SC_GAMESUBLIST"] = 2283; values[valuesById[2284] = "PACKET_CS_GAMEOBSERVE"] = 2284; values[valuesById[2285] = "PACKET_SC_GAMESTATE"] = 2285; values[valuesById[2286] = "PACKET_SC_SYNCGAMEFREE"] = 2286; values[valuesById[2287] = "PACKET_SC_LOTTERYSYNC"] = 2287; values[valuesById[2288] = "PACKET_CS_LOTTERYLOG"] = 2288; values[valuesById[2289] = "PACKET_SC_LOTTERYLOG"] = 2289; values[valuesById[2290] = "PACKET_SC_LOTTERYBILL"] = 2290; values[valuesById[2291] = "PACKET_CS_UPLOADLOC"] = 2291; values[valuesById[2292] = "PACKET_SC_UPLOADLOC"] = 2292; values[valuesById[2293] = "PACKET_CS_AUDIENCESIT"] = 2293; values[valuesById[2294] = "PACKET_SC_AUDIENCESIT"] = 2294; values[valuesById[2295] = "PACKET_CS_COMNOTICE"] = 2295; values[valuesById[2296] = "PACKET_SC_COMNOTICE"] = 2296; values[valuesById[2297] = "PACKET_SC_CHANGEENTRYSWITCH"] = 2297; values[valuesById[8001] = "PACKET_CS_LEAVEROOM"] = 8001; values[valuesById[8002] = "PACKET_SC_LEAVEROOM"] = 8002; values[valuesById[8003] = "PACKET_CS_DESTROYROOM"] = 8003; values[valuesById[8004] = "PACKET_SC_DESTROYROOM"] = 8004; values[valuesById[8005] = "PACKET_CS_FORCESTART"] = 8005; values[valuesById[8006] = "PACKET_SC_FORCESTART"] = 8006; values[valuesById[8007] = "PACKET_CS_AUDIENCE_LEAVEROOM"] = 8007; values[valuesById[8008] = "PACKET_CS_PLAYER_SWITCHFLAG"] = 8008; return values; })(); gamehall.CSEnterHall = (function() { /** * Properties of a CSEnterHall. * @memberof gamehall * @interface ICSEnterHall * @property {number|null} [HallId] CSEnterHall HallId */ /** * Constructs a new CSEnterHall. * @memberof gamehall * @classdesc Represents a CSEnterHall. * @implements ICSEnterHall * @constructor * @param {gamehall.ICSEnterHall=} [properties] Properties to set */ function CSEnterHall(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSEnterHall HallId. * @member {number} HallId * @memberof gamehall.CSEnterHall * @instance */ CSEnterHall.prototype.HallId = 0; /** * Creates a new CSEnterHall instance using the specified properties. * @function create * @memberof gamehall.CSEnterHall * @static * @param {gamehall.ICSEnterHall=} [properties] Properties to set * @returns {gamehall.CSEnterHall} CSEnterHall instance */ CSEnterHall.create = function create(properties) { return new CSEnterHall(properties); }; /** * Encodes the specified CSEnterHall message. Does not implicitly {@link gamehall.CSEnterHall.verify|verify} messages. * @function encode * @memberof gamehall.CSEnterHall * @static * @param {gamehall.ICSEnterHall} message CSEnterHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterHall.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.HallId); return writer; }; /** * Encodes the specified CSEnterHall message, length delimited. Does not implicitly {@link gamehall.CSEnterHall.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSEnterHall * @static * @param {gamehall.ICSEnterHall} message CSEnterHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterHall.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSEnterHall message from the specified reader or buffer. * @function decode * @memberof gamehall.CSEnterHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSEnterHall} CSEnterHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterHall.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSEnterHall(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.HallId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSEnterHall message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSEnterHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSEnterHall} CSEnterHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterHall.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSEnterHall message. * @function verify * @memberof gamehall.CSEnterHall * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSEnterHall.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; return null; }; /** * Creates a CSEnterHall message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSEnterHall * @static * @param {Object.} object Plain object * @returns {gamehall.CSEnterHall} CSEnterHall */ CSEnterHall.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSEnterHall) return object; var message = new $root.gamehall.CSEnterHall(); if (object.HallId != null) message.HallId = object.HallId | 0; return message; }; /** * Creates a plain object from a CSEnterHall message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSEnterHall * @static * @param {gamehall.CSEnterHall} message CSEnterHall * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSEnterHall.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.HallId = 0; if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; return object; }; /** * Converts this CSEnterHall to JSON. * @function toJSON * @memberof gamehall.CSEnterHall * @instance * @returns {Object.} JSON object */ CSEnterHall.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSEnterHall * @function getTypeUrl * @memberof gamehall.CSEnterHall * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSEnterHall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSEnterHall"; }; return CSEnterHall; })(); gamehall.SCEnterHall = (function() { /** * Properties of a SCEnterHall. * @memberof gamehall * @interface ISCEnterHall * @property {number|null} [HallId] SCEnterHall HallId * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCEnterHall OpRetCode */ /** * Constructs a new SCEnterHall. * @memberof gamehall * @classdesc Represents a SCEnterHall. * @implements ISCEnterHall * @constructor * @param {gamehall.ISCEnterHall=} [properties] Properties to set */ function SCEnterHall(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCEnterHall HallId. * @member {number} HallId * @memberof gamehall.SCEnterHall * @instance */ SCEnterHall.prototype.HallId = 0; /** * SCEnterHall OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCEnterHall * @instance */ SCEnterHall.prototype.OpRetCode = 0; /** * Creates a new SCEnterHall instance using the specified properties. * @function create * @memberof gamehall.SCEnterHall * @static * @param {gamehall.ISCEnterHall=} [properties] Properties to set * @returns {gamehall.SCEnterHall} SCEnterHall instance */ SCEnterHall.create = function create(properties) { return new SCEnterHall(properties); }; /** * Encodes the specified SCEnterHall message. Does not implicitly {@link gamehall.SCEnterHall.verify|verify} messages. * @function encode * @memberof gamehall.SCEnterHall * @static * @param {gamehall.ISCEnterHall} message SCEnterHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterHall.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.HallId); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCEnterHall message, length delimited. Does not implicitly {@link gamehall.SCEnterHall.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCEnterHall * @static * @param {gamehall.ISCEnterHall} message SCEnterHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterHall.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCEnterHall message from the specified reader or buffer. * @function decode * @memberof gamehall.SCEnterHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCEnterHall} SCEnterHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterHall.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCEnterHall(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.HallId = reader.int32(); break; } case 2: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCEnterHall message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCEnterHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCEnterHall} SCEnterHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterHall.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCEnterHall message. * @function verify * @memberof gamehall.SCEnterHall * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCEnterHall.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCEnterHall message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCEnterHall * @static * @param {Object.} object Plain object * @returns {gamehall.SCEnterHall} SCEnterHall */ SCEnterHall.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCEnterHall) return object; var message = new $root.gamehall.SCEnterHall(); if (object.HallId != null) message.HallId = object.HallId | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCEnterHall message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCEnterHall * @static * @param {gamehall.SCEnterHall} message SCEnterHall * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCEnterHall.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.HallId = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; } if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCEnterHall to JSON. * @function toJSON * @memberof gamehall.SCEnterHall * @instance * @returns {Object.} JSON object */ SCEnterHall.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCEnterHall * @function getTypeUrl * @memberof gamehall.SCEnterHall * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCEnterHall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCEnterHall"; }; return SCEnterHall; })(); gamehall.CSLeaveHall = (function() { /** * Properties of a CSLeaveHall. * @memberof gamehall * @interface ICSLeaveHall */ /** * Constructs a new CSLeaveHall. * @memberof gamehall * @classdesc Represents a CSLeaveHall. * @implements ICSLeaveHall * @constructor * @param {gamehall.ICSLeaveHall=} [properties] Properties to set */ function CSLeaveHall(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSLeaveHall instance using the specified properties. * @function create * @memberof gamehall.CSLeaveHall * @static * @param {gamehall.ICSLeaveHall=} [properties] Properties to set * @returns {gamehall.CSLeaveHall} CSLeaveHall instance */ CSLeaveHall.create = function create(properties) { return new CSLeaveHall(properties); }; /** * Encodes the specified CSLeaveHall message. Does not implicitly {@link gamehall.CSLeaveHall.verify|verify} messages. * @function encode * @memberof gamehall.CSLeaveHall * @static * @param {gamehall.ICSLeaveHall} message CSLeaveHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveHall.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSLeaveHall message, length delimited. Does not implicitly {@link gamehall.CSLeaveHall.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSLeaveHall * @static * @param {gamehall.ICSLeaveHall} message CSLeaveHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveHall.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLeaveHall message from the specified reader or buffer. * @function decode * @memberof gamehall.CSLeaveHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSLeaveHall} CSLeaveHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveHall.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSLeaveHall(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLeaveHall message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSLeaveHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSLeaveHall} CSLeaveHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveHall.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLeaveHall message. * @function verify * @memberof gamehall.CSLeaveHall * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLeaveHall.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSLeaveHall message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSLeaveHall * @static * @param {Object.} object Plain object * @returns {gamehall.CSLeaveHall} CSLeaveHall */ CSLeaveHall.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSLeaveHall) return object; return new $root.gamehall.CSLeaveHall(); }; /** * Creates a plain object from a CSLeaveHall message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSLeaveHall * @static * @param {gamehall.CSLeaveHall} message CSLeaveHall * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLeaveHall.toObject = function toObject() { return {}; }; /** * Converts this CSLeaveHall to JSON. * @function toJSON * @memberof gamehall.CSLeaveHall * @instance * @returns {Object.} JSON object */ CSLeaveHall.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLeaveHall * @function getTypeUrl * @memberof gamehall.CSLeaveHall * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLeaveHall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSLeaveHall"; }; return CSLeaveHall; })(); gamehall.SCLeaveHall = (function() { /** * Properties of a SCLeaveHall. * @memberof gamehall * @interface ISCLeaveHall * @property {number|null} [HallId] SCLeaveHall HallId */ /** * Constructs a new SCLeaveHall. * @memberof gamehall * @classdesc Represents a SCLeaveHall. * @implements ISCLeaveHall * @constructor * @param {gamehall.ISCLeaveHall=} [properties] Properties to set */ function SCLeaveHall(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLeaveHall HallId. * @member {number} HallId * @memberof gamehall.SCLeaveHall * @instance */ SCLeaveHall.prototype.HallId = 0; /** * Creates a new SCLeaveHall instance using the specified properties. * @function create * @memberof gamehall.SCLeaveHall * @static * @param {gamehall.ISCLeaveHall=} [properties] Properties to set * @returns {gamehall.SCLeaveHall} SCLeaveHall instance */ SCLeaveHall.create = function create(properties) { return new SCLeaveHall(properties); }; /** * Encodes the specified SCLeaveHall message. Does not implicitly {@link gamehall.SCLeaveHall.verify|verify} messages. * @function encode * @memberof gamehall.SCLeaveHall * @static * @param {gamehall.ISCLeaveHall} message SCLeaveHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveHall.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.HallId); return writer; }; /** * Encodes the specified SCLeaveHall message, length delimited. Does not implicitly {@link gamehall.SCLeaveHall.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLeaveHall * @static * @param {gamehall.ISCLeaveHall} message SCLeaveHall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveHall.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLeaveHall message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLeaveHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLeaveHall} SCLeaveHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveHall.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLeaveHall(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.HallId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLeaveHall message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLeaveHall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLeaveHall} SCLeaveHall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveHall.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLeaveHall message. * @function verify * @memberof gamehall.SCLeaveHall * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLeaveHall.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; return null; }; /** * Creates a SCLeaveHall message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLeaveHall * @static * @param {Object.} object Plain object * @returns {gamehall.SCLeaveHall} SCLeaveHall */ SCLeaveHall.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLeaveHall) return object; var message = new $root.gamehall.SCLeaveHall(); if (object.HallId != null) message.HallId = object.HallId | 0; return message; }; /** * Creates a plain object from a SCLeaveHall message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLeaveHall * @static * @param {gamehall.SCLeaveHall} message SCLeaveHall * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLeaveHall.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.HallId = 0; if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; return object; }; /** * Converts this SCLeaveHall to JSON. * @function toJSON * @memberof gamehall.SCLeaveHall * @instance * @returns {Object.} JSON object */ SCLeaveHall.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLeaveHall * @function getTypeUrl * @memberof gamehall.SCLeaveHall * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLeaveHall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLeaveHall"; }; return SCLeaveHall; })(); gamehall.RoomPlayerInfo = (function() { /** * Properties of a RoomPlayerInfo. * @memberof gamehall * @interface IRoomPlayerInfo * @property {number|null} [SnId] RoomPlayerInfo SnId * @property {number|null} [Head] RoomPlayerInfo Head * @property {number|null} [Sex] RoomPlayerInfo Sex * @property {string|null} [Name] RoomPlayerInfo Name * @property {number|null} [Pos] RoomPlayerInfo Pos * @property {number|null} [Flag] RoomPlayerInfo Flag * @property {number|null} [HeadOutLine] RoomPlayerInfo HeadOutLine * @property {number|null} [VIP] RoomPlayerInfo VIP */ /** * Constructs a new RoomPlayerInfo. * @memberof gamehall * @classdesc Represents a RoomPlayerInfo. * @implements IRoomPlayerInfo * @constructor * @param {gamehall.IRoomPlayerInfo=} [properties] Properties to set */ function RoomPlayerInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * RoomPlayerInfo SnId. * @member {number} SnId * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.SnId = 0; /** * RoomPlayerInfo Head. * @member {number} Head * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.Head = 0; /** * RoomPlayerInfo Sex. * @member {number} Sex * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.Sex = 0; /** * RoomPlayerInfo Name. * @member {string} Name * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.Name = ""; /** * RoomPlayerInfo Pos. * @member {number} Pos * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.Pos = 0; /** * RoomPlayerInfo Flag. * @member {number} Flag * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.Flag = 0; /** * RoomPlayerInfo HeadOutLine. * @member {number} HeadOutLine * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.HeadOutLine = 0; /** * RoomPlayerInfo VIP. * @member {number} VIP * @memberof gamehall.RoomPlayerInfo * @instance */ RoomPlayerInfo.prototype.VIP = 0; /** * Creates a new RoomPlayerInfo instance using the specified properties. * @function create * @memberof gamehall.RoomPlayerInfo * @static * @param {gamehall.IRoomPlayerInfo=} [properties] Properties to set * @returns {gamehall.RoomPlayerInfo} RoomPlayerInfo instance */ RoomPlayerInfo.create = function create(properties) { return new RoomPlayerInfo(properties); }; /** * Encodes the specified RoomPlayerInfo message. Does not implicitly {@link gamehall.RoomPlayerInfo.verify|verify} messages. * @function encode * @memberof gamehall.RoomPlayerInfo * @static * @param {gamehall.IRoomPlayerInfo} message RoomPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RoomPlayerInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.SnId != null && Object.hasOwnProperty.call(message, "SnId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.SnId); if (message.Head != null && Object.hasOwnProperty.call(message, "Head")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Head); if (message.Sex != null && Object.hasOwnProperty.call(message, "Sex")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Sex); if (message.Name != null && Object.hasOwnProperty.call(message, "Name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.Name); if (message.Pos != null && Object.hasOwnProperty.call(message, "Pos")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.Pos); if (message.Flag != null && Object.hasOwnProperty.call(message, "Flag")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.Flag); if (message.HeadOutLine != null && Object.hasOwnProperty.call(message, "HeadOutLine")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.HeadOutLine); if (message.VIP != null && Object.hasOwnProperty.call(message, "VIP")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.VIP); return writer; }; /** * Encodes the specified RoomPlayerInfo message, length delimited. Does not implicitly {@link gamehall.RoomPlayerInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.RoomPlayerInfo * @static * @param {gamehall.IRoomPlayerInfo} message RoomPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RoomPlayerInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a RoomPlayerInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.RoomPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.RoomPlayerInfo} RoomPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RoomPlayerInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.RoomPlayerInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.SnId = reader.int32(); break; } case 2: { message.Head = reader.int32(); break; } case 3: { message.Sex = reader.int32(); break; } case 4: { message.Name = reader.string(); break; } case 5: { message.Pos = reader.int32(); break; } case 6: { message.Flag = reader.int32(); break; } case 7: { message.HeadOutLine = reader.int32(); break; } case 8: { message.VIP = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a RoomPlayerInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.RoomPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.RoomPlayerInfo} RoomPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RoomPlayerInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a RoomPlayerInfo message. * @function verify * @memberof gamehall.RoomPlayerInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RoomPlayerInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.SnId != null && message.hasOwnProperty("SnId")) if (!$util.isInteger(message.SnId)) return "SnId: integer expected"; if (message.Head != null && message.hasOwnProperty("Head")) if (!$util.isInteger(message.Head)) return "Head: integer expected"; if (message.Sex != null && message.hasOwnProperty("Sex")) if (!$util.isInteger(message.Sex)) return "Sex: integer expected"; if (message.Name != null && message.hasOwnProperty("Name")) if (!$util.isString(message.Name)) return "Name: string expected"; if (message.Pos != null && message.hasOwnProperty("Pos")) if (!$util.isInteger(message.Pos)) return "Pos: integer expected"; if (message.Flag != null && message.hasOwnProperty("Flag")) if (!$util.isInteger(message.Flag)) return "Flag: integer expected"; if (message.HeadOutLine != null && message.hasOwnProperty("HeadOutLine")) if (!$util.isInteger(message.HeadOutLine)) return "HeadOutLine: integer expected"; if (message.VIP != null && message.hasOwnProperty("VIP")) if (!$util.isInteger(message.VIP)) return "VIP: integer expected"; return null; }; /** * Creates a RoomPlayerInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.RoomPlayerInfo * @static * @param {Object.} object Plain object * @returns {gamehall.RoomPlayerInfo} RoomPlayerInfo */ RoomPlayerInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.RoomPlayerInfo) return object; var message = new $root.gamehall.RoomPlayerInfo(); if (object.SnId != null) message.SnId = object.SnId | 0; if (object.Head != null) message.Head = object.Head | 0; if (object.Sex != null) message.Sex = object.Sex | 0; if (object.Name != null) message.Name = String(object.Name); if (object.Pos != null) message.Pos = object.Pos | 0; if (object.Flag != null) message.Flag = object.Flag | 0; if (object.HeadOutLine != null) message.HeadOutLine = object.HeadOutLine | 0; if (object.VIP != null) message.VIP = object.VIP | 0; return message; }; /** * Creates a plain object from a RoomPlayerInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.RoomPlayerInfo * @static * @param {gamehall.RoomPlayerInfo} message RoomPlayerInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ RoomPlayerInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.SnId = 0; object.Head = 0; object.Sex = 0; object.Name = ""; object.Pos = 0; object.Flag = 0; object.HeadOutLine = 0; object.VIP = 0; } if (message.SnId != null && message.hasOwnProperty("SnId")) object.SnId = message.SnId; if (message.Head != null && message.hasOwnProperty("Head")) object.Head = message.Head; if (message.Sex != null && message.hasOwnProperty("Sex")) object.Sex = message.Sex; if (message.Name != null && message.hasOwnProperty("Name")) object.Name = message.Name; if (message.Pos != null && message.hasOwnProperty("Pos")) object.Pos = message.Pos; if (message.Flag != null && message.hasOwnProperty("Flag")) object.Flag = message.Flag; if (message.HeadOutLine != null && message.hasOwnProperty("HeadOutLine")) object.HeadOutLine = message.HeadOutLine; if (message.VIP != null && message.hasOwnProperty("VIP")) object.VIP = message.VIP; return object; }; /** * Converts this RoomPlayerInfo to JSON. * @function toJSON * @memberof gamehall.RoomPlayerInfo * @instance * @returns {Object.} JSON object */ RoomPlayerInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for RoomPlayerInfo * @function getTypeUrl * @memberof gamehall.RoomPlayerInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ RoomPlayerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.RoomPlayerInfo"; }; return RoomPlayerInfo; })(); gamehall.RoomInfo = (function() { /** * Properties of a RoomInfo. * @memberof gamehall * @interface IRoomInfo * @property {number|null} [RoomId] RoomInfo RoomId * @property {boolean|null} [Starting] RoomInfo Starting * @property {Array.|null} [Players] RoomInfo Players */ /** * Constructs a new RoomInfo. * @memberof gamehall * @classdesc Represents a RoomInfo. * @implements IRoomInfo * @constructor * @param {gamehall.IRoomInfo=} [properties] Properties to set */ function RoomInfo(properties) { this.Players = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * RoomInfo RoomId. * @member {number} RoomId * @memberof gamehall.RoomInfo * @instance */ RoomInfo.prototype.RoomId = 0; /** * RoomInfo Starting. * @member {boolean} Starting * @memberof gamehall.RoomInfo * @instance */ RoomInfo.prototype.Starting = false; /** * RoomInfo Players. * @member {Array.} Players * @memberof gamehall.RoomInfo * @instance */ RoomInfo.prototype.Players = $util.emptyArray; /** * Creates a new RoomInfo instance using the specified properties. * @function create * @memberof gamehall.RoomInfo * @static * @param {gamehall.IRoomInfo=} [properties] Properties to set * @returns {gamehall.RoomInfo} RoomInfo instance */ RoomInfo.create = function create(properties) { return new RoomInfo(properties); }; /** * Encodes the specified RoomInfo message. Does not implicitly {@link gamehall.RoomInfo.verify|verify} messages. * @function encode * @memberof gamehall.RoomInfo * @static * @param {gamehall.IRoomInfo} message RoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RoomInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.Players != null && message.Players.length) for (var i = 0; i < message.Players.length; ++i) $root.gamehall.RoomPlayerInfo.encode(message.Players[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.Starting != null && Object.hasOwnProperty.call(message, "Starting")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.Starting); return writer; }; /** * Encodes the specified RoomInfo message, length delimited. Does not implicitly {@link gamehall.RoomInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.RoomInfo * @static * @param {gamehall.IRoomInfo} message RoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RoomInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a RoomInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.RoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.RoomInfo} RoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RoomInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.RoomInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 7: { message.Starting = reader.bool(); break; } case 5: { if (!(message.Players && message.Players.length)) message.Players = []; message.Players.push($root.gamehall.RoomPlayerInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a RoomInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.RoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.RoomInfo} RoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RoomInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a RoomInfo message. * @function verify * @memberof gamehall.RoomInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RoomInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.Starting != null && message.hasOwnProperty("Starting")) if (typeof message.Starting !== "boolean") return "Starting: boolean expected"; if (message.Players != null && message.hasOwnProperty("Players")) { if (!Array.isArray(message.Players)) return "Players: array expected"; for (var i = 0; i < message.Players.length; ++i) { var error = $root.gamehall.RoomPlayerInfo.verify(message.Players[i]); if (error) return "Players." + error; } } return null; }; /** * Creates a RoomInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.RoomInfo * @static * @param {Object.} object Plain object * @returns {gamehall.RoomInfo} RoomInfo */ RoomInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.RoomInfo) return object; var message = new $root.gamehall.RoomInfo(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.Starting != null) message.Starting = Boolean(object.Starting); if (object.Players) { if (!Array.isArray(object.Players)) throw TypeError(".gamehall.RoomInfo.Players: array expected"); message.Players = []; for (var i = 0; i < object.Players.length; ++i) { if (typeof object.Players[i] !== "object") throw TypeError(".gamehall.RoomInfo.Players: object expected"); message.Players[i] = $root.gamehall.RoomPlayerInfo.fromObject(object.Players[i]); } } return message; }; /** * Creates a plain object from a RoomInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.RoomInfo * @static * @param {gamehall.RoomInfo} message RoomInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ RoomInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Players = []; if (options.defaults) { object.RoomId = 0; object.Starting = false; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.Players && message.Players.length) { object.Players = []; for (var j = 0; j < message.Players.length; ++j) object.Players[j] = $root.gamehall.RoomPlayerInfo.toObject(message.Players[j], options); } if (message.Starting != null && message.hasOwnProperty("Starting")) object.Starting = message.Starting; return object; }; /** * Converts this RoomInfo to JSON. * @function toJSON * @memberof gamehall.RoomInfo * @instance * @returns {Object.} JSON object */ RoomInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for RoomInfo * @function getTypeUrl * @memberof gamehall.RoomInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ RoomInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.RoomInfo"; }; return RoomInfo; })(); gamehall.CSHallRoomList = (function() { /** * Properties of a CSHallRoomList. * @memberof gamehall * @interface ICSHallRoomList * @property {number|null} [HallId] CSHallRoomList HallId */ /** * Constructs a new CSHallRoomList. * @memberof gamehall * @classdesc Represents a CSHallRoomList. * @implements ICSHallRoomList * @constructor * @param {gamehall.ICSHallRoomList=} [properties] Properties to set */ function CSHallRoomList(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSHallRoomList HallId. * @member {number} HallId * @memberof gamehall.CSHallRoomList * @instance */ CSHallRoomList.prototype.HallId = 0; /** * Creates a new CSHallRoomList instance using the specified properties. * @function create * @memberof gamehall.CSHallRoomList * @static * @param {gamehall.ICSHallRoomList=} [properties] Properties to set * @returns {gamehall.CSHallRoomList} CSHallRoomList instance */ CSHallRoomList.create = function create(properties) { return new CSHallRoomList(properties); }; /** * Encodes the specified CSHallRoomList message. Does not implicitly {@link gamehall.CSHallRoomList.verify|verify} messages. * @function encode * @memberof gamehall.CSHallRoomList * @static * @param {gamehall.ICSHallRoomList} message CSHallRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHallRoomList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.HallId); return writer; }; /** * Encodes the specified CSHallRoomList message, length delimited. Does not implicitly {@link gamehall.CSHallRoomList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSHallRoomList * @static * @param {gamehall.ICSHallRoomList} message CSHallRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHallRoomList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHallRoomList message from the specified reader or buffer. * @function decode * @memberof gamehall.CSHallRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSHallRoomList} CSHallRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHallRoomList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSHallRoomList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.HallId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHallRoomList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSHallRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSHallRoomList} CSHallRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHallRoomList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHallRoomList message. * @function verify * @memberof gamehall.CSHallRoomList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHallRoomList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; return null; }; /** * Creates a CSHallRoomList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSHallRoomList * @static * @param {Object.} object Plain object * @returns {gamehall.CSHallRoomList} CSHallRoomList */ CSHallRoomList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSHallRoomList) return object; var message = new $root.gamehall.CSHallRoomList(); if (object.HallId != null) message.HallId = object.HallId | 0; return message; }; /** * Creates a plain object from a CSHallRoomList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSHallRoomList * @static * @param {gamehall.CSHallRoomList} message CSHallRoomList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHallRoomList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.HallId = 0; if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; return object; }; /** * Converts this CSHallRoomList to JSON. * @function toJSON * @memberof gamehall.CSHallRoomList * @instance * @returns {Object.} JSON object */ CSHallRoomList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHallRoomList * @function getTypeUrl * @memberof gamehall.CSHallRoomList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHallRoomList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSHallRoomList"; }; return CSHallRoomList; })(); gamehall.HallInfo = (function() { /** * Properties of a HallInfo. * @memberof gamehall * @interface IHallInfo * @property {number|null} [SceneType] HallInfo SceneType * @property {number|null} [PlayerNum] HallInfo PlayerNum */ /** * Constructs a new HallInfo. * @memberof gamehall * @classdesc Represents a HallInfo. * @implements IHallInfo * @constructor * @param {gamehall.IHallInfo=} [properties] Properties to set */ function HallInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * HallInfo SceneType. * @member {number} SceneType * @memberof gamehall.HallInfo * @instance */ HallInfo.prototype.SceneType = 0; /** * HallInfo PlayerNum. * @member {number} PlayerNum * @memberof gamehall.HallInfo * @instance */ HallInfo.prototype.PlayerNum = 0; /** * Creates a new HallInfo instance using the specified properties. * @function create * @memberof gamehall.HallInfo * @static * @param {gamehall.IHallInfo=} [properties] Properties to set * @returns {gamehall.HallInfo} HallInfo instance */ HallInfo.create = function create(properties) { return new HallInfo(properties); }; /** * Encodes the specified HallInfo message. Does not implicitly {@link gamehall.HallInfo.verify|verify} messages. * @function encode * @memberof gamehall.HallInfo * @static * @param {gamehall.IHallInfo} message HallInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HallInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.SceneType != null && Object.hasOwnProperty.call(message, "SceneType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.SceneType); if (message.PlayerNum != null && Object.hasOwnProperty.call(message, "PlayerNum")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.PlayerNum); return writer; }; /** * Encodes the specified HallInfo message, length delimited. Does not implicitly {@link gamehall.HallInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.HallInfo * @static * @param {gamehall.IHallInfo} message HallInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HallInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a HallInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.HallInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.HallInfo} HallInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HallInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.HallInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.SceneType = reader.int32(); break; } case 2: { message.PlayerNum = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a HallInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.HallInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.HallInfo} HallInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HallInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a HallInfo message. * @function verify * @memberof gamehall.HallInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ HallInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.SceneType != null && message.hasOwnProperty("SceneType")) if (!$util.isInteger(message.SceneType)) return "SceneType: integer expected"; if (message.PlayerNum != null && message.hasOwnProperty("PlayerNum")) if (!$util.isInteger(message.PlayerNum)) return "PlayerNum: integer expected"; return null; }; /** * Creates a HallInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.HallInfo * @static * @param {Object.} object Plain object * @returns {gamehall.HallInfo} HallInfo */ HallInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.HallInfo) return object; var message = new $root.gamehall.HallInfo(); if (object.SceneType != null) message.SceneType = object.SceneType | 0; if (object.PlayerNum != null) message.PlayerNum = object.PlayerNum | 0; return message; }; /** * Creates a plain object from a HallInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.HallInfo * @static * @param {gamehall.HallInfo} message HallInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ HallInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.SceneType = 0; object.PlayerNum = 0; } if (message.SceneType != null && message.hasOwnProperty("SceneType")) object.SceneType = message.SceneType; if (message.PlayerNum != null && message.hasOwnProperty("PlayerNum")) object.PlayerNum = message.PlayerNum; return object; }; /** * Converts this HallInfo to JSON. * @function toJSON * @memberof gamehall.HallInfo * @instance * @returns {Object.} JSON object */ HallInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for HallInfo * @function getTypeUrl * @memberof gamehall.HallInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ HallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.HallInfo"; }; return HallInfo; })(); gamehall.HallPlayerNum = (function() { /** * Properties of a HallPlayerNum. * @memberof gamehall * @interface IHallPlayerNum * @property {Array.|null} [HallData] HallPlayerNum HallData */ /** * Constructs a new HallPlayerNum. * @memberof gamehall * @classdesc Represents a HallPlayerNum. * @implements IHallPlayerNum * @constructor * @param {gamehall.IHallPlayerNum=} [properties] Properties to set */ function HallPlayerNum(properties) { this.HallData = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * HallPlayerNum HallData. * @member {Array.} HallData * @memberof gamehall.HallPlayerNum * @instance */ HallPlayerNum.prototype.HallData = $util.emptyArray; /** * Creates a new HallPlayerNum instance using the specified properties. * @function create * @memberof gamehall.HallPlayerNum * @static * @param {gamehall.IHallPlayerNum=} [properties] Properties to set * @returns {gamehall.HallPlayerNum} HallPlayerNum instance */ HallPlayerNum.create = function create(properties) { return new HallPlayerNum(properties); }; /** * Encodes the specified HallPlayerNum message. Does not implicitly {@link gamehall.HallPlayerNum.verify|verify} messages. * @function encode * @memberof gamehall.HallPlayerNum * @static * @param {gamehall.IHallPlayerNum} message HallPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HallPlayerNum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HallData != null && message.HallData.length) for (var i = 0; i < message.HallData.length; ++i) $root.gamehall.HallInfo.encode(message.HallData[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified HallPlayerNum message, length delimited. Does not implicitly {@link gamehall.HallPlayerNum.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.HallPlayerNum * @static * @param {gamehall.IHallPlayerNum} message HallPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HallPlayerNum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a HallPlayerNum message from the specified reader or buffer. * @function decode * @memberof gamehall.HallPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.HallPlayerNum} HallPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HallPlayerNum.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.HallPlayerNum(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.HallData && message.HallData.length)) message.HallData = []; message.HallData.push($root.gamehall.HallInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a HallPlayerNum message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.HallPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.HallPlayerNum} HallPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HallPlayerNum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a HallPlayerNum message. * @function verify * @memberof gamehall.HallPlayerNum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ HallPlayerNum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HallData != null && message.hasOwnProperty("HallData")) { if (!Array.isArray(message.HallData)) return "HallData: array expected"; for (var i = 0; i < message.HallData.length; ++i) { var error = $root.gamehall.HallInfo.verify(message.HallData[i]); if (error) return "HallData." + error; } } return null; }; /** * Creates a HallPlayerNum message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.HallPlayerNum * @static * @param {Object.} object Plain object * @returns {gamehall.HallPlayerNum} HallPlayerNum */ HallPlayerNum.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.HallPlayerNum) return object; var message = new $root.gamehall.HallPlayerNum(); if (object.HallData) { if (!Array.isArray(object.HallData)) throw TypeError(".gamehall.HallPlayerNum.HallData: array expected"); message.HallData = []; for (var i = 0; i < object.HallData.length; ++i) { if (typeof object.HallData[i] !== "object") throw TypeError(".gamehall.HallPlayerNum.HallData: object expected"); message.HallData[i] = $root.gamehall.HallInfo.fromObject(object.HallData[i]); } } return message; }; /** * Creates a plain object from a HallPlayerNum message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.HallPlayerNum * @static * @param {gamehall.HallPlayerNum} message HallPlayerNum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ HallPlayerNum.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.HallData = []; if (message.HallData && message.HallData.length) { object.HallData = []; for (var j = 0; j < message.HallData.length; ++j) object.HallData[j] = $root.gamehall.HallInfo.toObject(message.HallData[j], options); } return object; }; /** * Converts this HallPlayerNum to JSON. * @function toJSON * @memberof gamehall.HallPlayerNum * @instance * @returns {Object.} JSON object */ HallPlayerNum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for HallPlayerNum * @function getTypeUrl * @memberof gamehall.HallPlayerNum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ HallPlayerNum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.HallPlayerNum"; }; return HallPlayerNum; })(); gamehall.SCHallRoomList = (function() { /** * Properties of a SCHallRoomList. * @memberof gamehall * @interface ISCHallRoomList * @property {number|null} [HallId] SCHallRoomList HallId * @property {number|null} [GameId] SCHallRoomList GameId * @property {number|null} [GameMode] SCHallRoomList GameMode * @property {boolean|null} [IsAdd] SCHallRoomList IsAdd * @property {Array.|null} [Params] SCHallRoomList Params * @property {Array.|null} [Rooms] SCHallRoomList Rooms * @property {Array.|null} [HallData] SCHallRoomList HallData */ /** * Constructs a new SCHallRoomList. * @memberof gamehall * @classdesc Represents a SCHallRoomList. * @implements ISCHallRoomList * @constructor * @param {gamehall.ISCHallRoomList=} [properties] Properties to set */ function SCHallRoomList(properties) { this.Params = []; this.Rooms = []; this.HallData = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCHallRoomList HallId. * @member {number} HallId * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.HallId = 0; /** * SCHallRoomList GameId. * @member {number} GameId * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.GameId = 0; /** * SCHallRoomList GameMode. * @member {number} GameMode * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.GameMode = 0; /** * SCHallRoomList IsAdd. * @member {boolean} IsAdd * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.IsAdd = false; /** * SCHallRoomList Params. * @member {Array.} Params * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.Params = $util.emptyArray; /** * SCHallRoomList Rooms. * @member {Array.} Rooms * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.Rooms = $util.emptyArray; /** * SCHallRoomList HallData. * @member {Array.} HallData * @memberof gamehall.SCHallRoomList * @instance */ SCHallRoomList.prototype.HallData = $util.emptyArray; /** * Creates a new SCHallRoomList instance using the specified properties. * @function create * @memberof gamehall.SCHallRoomList * @static * @param {gamehall.ISCHallRoomList=} [properties] Properties to set * @returns {gamehall.SCHallRoomList} SCHallRoomList instance */ SCHallRoomList.create = function create(properties) { return new SCHallRoomList(properties); }; /** * Encodes the specified SCHallRoomList message. Does not implicitly {@link gamehall.SCHallRoomList.verify|verify} messages. * @function encode * @memberof gamehall.SCHallRoomList * @static * @param {gamehall.ISCHallRoomList} message SCHallRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHallRoomList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.HallId); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameId); if (message.GameMode != null && Object.hasOwnProperty.call(message, "GameMode")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.GameMode); if (message.IsAdd != null && Object.hasOwnProperty.call(message, "IsAdd")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.IsAdd); if (message.Params != null && message.Params.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } if (message.Rooms != null && message.Rooms.length) for (var i = 0; i < message.Rooms.length; ++i) $root.gamehall.RoomInfo.encode(message.Rooms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.HallData != null && message.HallData.length) for (var i = 0; i < message.HallData.length; ++i) $root.gamehall.HallInfo.encode(message.HallData[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** * Encodes the specified SCHallRoomList message, length delimited. Does not implicitly {@link gamehall.SCHallRoomList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCHallRoomList * @static * @param {gamehall.ISCHallRoomList} message SCHallRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHallRoomList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCHallRoomList message from the specified reader or buffer. * @function decode * @memberof gamehall.SCHallRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCHallRoomList} SCHallRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHallRoomList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCHallRoomList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.HallId = reader.int32(); break; } case 2: { message.GameId = reader.int32(); break; } case 3: { message.GameMode = reader.int32(); break; } case 4: { message.IsAdd = reader.bool(); break; } case 5: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } case 6: { if (!(message.Rooms && message.Rooms.length)) message.Rooms = []; message.Rooms.push($root.gamehall.RoomInfo.decode(reader, reader.uint32())); break; } case 7: { if (!(message.HallData && message.HallData.length)) message.HallData = []; message.HallData.push($root.gamehall.HallInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCHallRoomList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCHallRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCHallRoomList} SCHallRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHallRoomList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCHallRoomList message. * @function verify * @memberof gamehall.SCHallRoomList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCHallRoomList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.GameMode != null && message.hasOwnProperty("GameMode")) if (!$util.isInteger(message.GameMode)) return "GameMode: integer expected"; if (message.IsAdd != null && message.hasOwnProperty("IsAdd")) if (typeof message.IsAdd !== "boolean") return "IsAdd: boolean expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } if (message.Rooms != null && message.hasOwnProperty("Rooms")) { if (!Array.isArray(message.Rooms)) return "Rooms: array expected"; for (var i = 0; i < message.Rooms.length; ++i) { var error = $root.gamehall.RoomInfo.verify(message.Rooms[i]); if (error) return "Rooms." + error; } } if (message.HallData != null && message.hasOwnProperty("HallData")) { if (!Array.isArray(message.HallData)) return "HallData: array expected"; for (var i = 0; i < message.HallData.length; ++i) { var error = $root.gamehall.HallInfo.verify(message.HallData[i]); if (error) return "HallData." + error; } } return null; }; /** * Creates a SCHallRoomList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCHallRoomList * @static * @param {Object.} object Plain object * @returns {gamehall.SCHallRoomList} SCHallRoomList */ SCHallRoomList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCHallRoomList) return object; var message = new $root.gamehall.SCHallRoomList(); if (object.HallId != null) message.HallId = object.HallId | 0; if (object.GameId != null) message.GameId = object.GameId | 0; if (object.GameMode != null) message.GameMode = object.GameMode | 0; if (object.IsAdd != null) message.IsAdd = Boolean(object.IsAdd); if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.SCHallRoomList.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } if (object.Rooms) { if (!Array.isArray(object.Rooms)) throw TypeError(".gamehall.SCHallRoomList.Rooms: array expected"); message.Rooms = []; for (var i = 0; i < object.Rooms.length; ++i) { if (typeof object.Rooms[i] !== "object") throw TypeError(".gamehall.SCHallRoomList.Rooms: object expected"); message.Rooms[i] = $root.gamehall.RoomInfo.fromObject(object.Rooms[i]); } } if (object.HallData) { if (!Array.isArray(object.HallData)) throw TypeError(".gamehall.SCHallRoomList.HallData: array expected"); message.HallData = []; for (var i = 0; i < object.HallData.length; ++i) { if (typeof object.HallData[i] !== "object") throw TypeError(".gamehall.SCHallRoomList.HallData: object expected"); message.HallData[i] = $root.gamehall.HallInfo.fromObject(object.HallData[i]); } } return message; }; /** * Creates a plain object from a SCHallRoomList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCHallRoomList * @static * @param {gamehall.SCHallRoomList} message SCHallRoomList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCHallRoomList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.Params = []; object.Rooms = []; object.HallData = []; } if (options.defaults) { object.HallId = 0; object.GameId = 0; object.GameMode = 0; object.IsAdd = false; } if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.GameMode != null && message.hasOwnProperty("GameMode")) object.GameMode = message.GameMode; if (message.IsAdd != null && message.hasOwnProperty("IsAdd")) object.IsAdd = message.IsAdd; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } if (message.Rooms && message.Rooms.length) { object.Rooms = []; for (var j = 0; j < message.Rooms.length; ++j) object.Rooms[j] = $root.gamehall.RoomInfo.toObject(message.Rooms[j], options); } if (message.HallData && message.HallData.length) { object.HallData = []; for (var j = 0; j < message.HallData.length; ++j) object.HallData[j] = $root.gamehall.HallInfo.toObject(message.HallData[j], options); } return object; }; /** * Converts this SCHallRoomList to JSON. * @function toJSON * @memberof gamehall.SCHallRoomList * @instance * @returns {Object.} JSON object */ SCHallRoomList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCHallRoomList * @function getTypeUrl * @memberof gamehall.SCHallRoomList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCHallRoomList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCHallRoomList"; }; return SCHallRoomList; })(); gamehall.SCRoomPlayerEnter = (function() { /** * Properties of a SCRoomPlayerEnter. * @memberof gamehall * @interface ISCRoomPlayerEnter * @property {number|null} [RoomId] SCRoomPlayerEnter RoomId * @property {gamehall.IRoomPlayerInfo|null} [Player] SCRoomPlayerEnter Player */ /** * Constructs a new SCRoomPlayerEnter. * @memberof gamehall * @classdesc Represents a SCRoomPlayerEnter. * @implements ISCRoomPlayerEnter * @constructor * @param {gamehall.ISCRoomPlayerEnter=} [properties] Properties to set */ function SCRoomPlayerEnter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRoomPlayerEnter RoomId. * @member {number} RoomId * @memberof gamehall.SCRoomPlayerEnter * @instance */ SCRoomPlayerEnter.prototype.RoomId = 0; /** * SCRoomPlayerEnter Player. * @member {gamehall.IRoomPlayerInfo|null|undefined} Player * @memberof gamehall.SCRoomPlayerEnter * @instance */ SCRoomPlayerEnter.prototype.Player = null; /** * Creates a new SCRoomPlayerEnter instance using the specified properties. * @function create * @memberof gamehall.SCRoomPlayerEnter * @static * @param {gamehall.ISCRoomPlayerEnter=} [properties] Properties to set * @returns {gamehall.SCRoomPlayerEnter} SCRoomPlayerEnter instance */ SCRoomPlayerEnter.create = function create(properties) { return new SCRoomPlayerEnter(properties); }; /** * Encodes the specified SCRoomPlayerEnter message. Does not implicitly {@link gamehall.SCRoomPlayerEnter.verify|verify} messages. * @function encode * @memberof gamehall.SCRoomPlayerEnter * @static * @param {gamehall.ISCRoomPlayerEnter} message SCRoomPlayerEnter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRoomPlayerEnter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.Player != null && Object.hasOwnProperty.call(message, "Player")) $root.gamehall.RoomPlayerInfo.encode(message.Player, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCRoomPlayerEnter message, length delimited. Does not implicitly {@link gamehall.SCRoomPlayerEnter.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRoomPlayerEnter * @static * @param {gamehall.ISCRoomPlayerEnter} message SCRoomPlayerEnter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRoomPlayerEnter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRoomPlayerEnter message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRoomPlayerEnter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRoomPlayerEnter} SCRoomPlayerEnter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRoomPlayerEnter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRoomPlayerEnter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.Player = $root.gamehall.RoomPlayerInfo.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRoomPlayerEnter message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRoomPlayerEnter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRoomPlayerEnter} SCRoomPlayerEnter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRoomPlayerEnter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRoomPlayerEnter message. * @function verify * @memberof gamehall.SCRoomPlayerEnter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRoomPlayerEnter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.Player != null && message.hasOwnProperty("Player")) { var error = $root.gamehall.RoomPlayerInfo.verify(message.Player); if (error) return "Player." + error; } return null; }; /** * Creates a SCRoomPlayerEnter message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRoomPlayerEnter * @static * @param {Object.} object Plain object * @returns {gamehall.SCRoomPlayerEnter} SCRoomPlayerEnter */ SCRoomPlayerEnter.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRoomPlayerEnter) return object; var message = new $root.gamehall.SCRoomPlayerEnter(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.Player != null) { if (typeof object.Player !== "object") throw TypeError(".gamehall.SCRoomPlayerEnter.Player: object expected"); message.Player = $root.gamehall.RoomPlayerInfo.fromObject(object.Player); } return message; }; /** * Creates a plain object from a SCRoomPlayerEnter message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRoomPlayerEnter * @static * @param {gamehall.SCRoomPlayerEnter} message SCRoomPlayerEnter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRoomPlayerEnter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.Player = null; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.Player != null && message.hasOwnProperty("Player")) object.Player = $root.gamehall.RoomPlayerInfo.toObject(message.Player, options); return object; }; /** * Converts this SCRoomPlayerEnter to JSON. * @function toJSON * @memberof gamehall.SCRoomPlayerEnter * @instance * @returns {Object.} JSON object */ SCRoomPlayerEnter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRoomPlayerEnter * @function getTypeUrl * @memberof gamehall.SCRoomPlayerEnter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRoomPlayerEnter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRoomPlayerEnter"; }; return SCRoomPlayerEnter; })(); gamehall.SCRoomPlayerLeave = (function() { /** * Properties of a SCRoomPlayerLeave. * @memberof gamehall * @interface ISCRoomPlayerLeave * @property {number|null} [RoomId] SCRoomPlayerLeave RoomId * @property {number|null} [Pos] SCRoomPlayerLeave Pos */ /** * Constructs a new SCRoomPlayerLeave. * @memberof gamehall * @classdesc Represents a SCRoomPlayerLeave. * @implements ISCRoomPlayerLeave * @constructor * @param {gamehall.ISCRoomPlayerLeave=} [properties] Properties to set */ function SCRoomPlayerLeave(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRoomPlayerLeave RoomId. * @member {number} RoomId * @memberof gamehall.SCRoomPlayerLeave * @instance */ SCRoomPlayerLeave.prototype.RoomId = 0; /** * SCRoomPlayerLeave Pos. * @member {number} Pos * @memberof gamehall.SCRoomPlayerLeave * @instance */ SCRoomPlayerLeave.prototype.Pos = 0; /** * Creates a new SCRoomPlayerLeave instance using the specified properties. * @function create * @memberof gamehall.SCRoomPlayerLeave * @static * @param {gamehall.ISCRoomPlayerLeave=} [properties] Properties to set * @returns {gamehall.SCRoomPlayerLeave} SCRoomPlayerLeave instance */ SCRoomPlayerLeave.create = function create(properties) { return new SCRoomPlayerLeave(properties); }; /** * Encodes the specified SCRoomPlayerLeave message. Does not implicitly {@link gamehall.SCRoomPlayerLeave.verify|verify} messages. * @function encode * @memberof gamehall.SCRoomPlayerLeave * @static * @param {gamehall.ISCRoomPlayerLeave} message SCRoomPlayerLeave message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRoomPlayerLeave.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.Pos != null && Object.hasOwnProperty.call(message, "Pos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Pos); return writer; }; /** * Encodes the specified SCRoomPlayerLeave message, length delimited. Does not implicitly {@link gamehall.SCRoomPlayerLeave.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRoomPlayerLeave * @static * @param {gamehall.ISCRoomPlayerLeave} message SCRoomPlayerLeave message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRoomPlayerLeave.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRoomPlayerLeave message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRoomPlayerLeave * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRoomPlayerLeave} SCRoomPlayerLeave * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRoomPlayerLeave.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRoomPlayerLeave(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.Pos = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRoomPlayerLeave message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRoomPlayerLeave * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRoomPlayerLeave} SCRoomPlayerLeave * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRoomPlayerLeave.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRoomPlayerLeave message. * @function verify * @memberof gamehall.SCRoomPlayerLeave * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRoomPlayerLeave.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.Pos != null && message.hasOwnProperty("Pos")) if (!$util.isInteger(message.Pos)) return "Pos: integer expected"; return null; }; /** * Creates a SCRoomPlayerLeave message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRoomPlayerLeave * @static * @param {Object.} object Plain object * @returns {gamehall.SCRoomPlayerLeave} SCRoomPlayerLeave */ SCRoomPlayerLeave.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRoomPlayerLeave) return object; var message = new $root.gamehall.SCRoomPlayerLeave(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.Pos != null) message.Pos = object.Pos | 0; return message; }; /** * Creates a plain object from a SCRoomPlayerLeave message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRoomPlayerLeave * @static * @param {gamehall.SCRoomPlayerLeave} message SCRoomPlayerLeave * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRoomPlayerLeave.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.Pos = 0; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.Pos != null && message.hasOwnProperty("Pos")) object.Pos = message.Pos; return object; }; /** * Converts this SCRoomPlayerLeave to JSON. * @function toJSON * @memberof gamehall.SCRoomPlayerLeave * @instance * @returns {Object.} JSON object */ SCRoomPlayerLeave.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRoomPlayerLeave * @function getTypeUrl * @memberof gamehall.SCRoomPlayerLeave * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRoomPlayerLeave.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRoomPlayerLeave"; }; return SCRoomPlayerLeave; })(); gamehall.SCRoomStateChange = (function() { /** * Properties of a SCRoomStateChange. * @memberof gamehall * @interface ISCRoomStateChange * @property {number|null} [RoomId] SCRoomStateChange RoomId * @property {boolean|null} [Starting] SCRoomStateChange Starting * @property {number|null} [State] SCRoomStateChange State */ /** * Constructs a new SCRoomStateChange. * @memberof gamehall * @classdesc Represents a SCRoomStateChange. * @implements ISCRoomStateChange * @constructor * @param {gamehall.ISCRoomStateChange=} [properties] Properties to set */ function SCRoomStateChange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRoomStateChange RoomId. * @member {number} RoomId * @memberof gamehall.SCRoomStateChange * @instance */ SCRoomStateChange.prototype.RoomId = 0; /** * SCRoomStateChange Starting. * @member {boolean} Starting * @memberof gamehall.SCRoomStateChange * @instance */ SCRoomStateChange.prototype.Starting = false; /** * SCRoomStateChange State. * @member {number} State * @memberof gamehall.SCRoomStateChange * @instance */ SCRoomStateChange.prototype.State = 0; /** * Creates a new SCRoomStateChange instance using the specified properties. * @function create * @memberof gamehall.SCRoomStateChange * @static * @param {gamehall.ISCRoomStateChange=} [properties] Properties to set * @returns {gamehall.SCRoomStateChange} SCRoomStateChange instance */ SCRoomStateChange.create = function create(properties) { return new SCRoomStateChange(properties); }; /** * Encodes the specified SCRoomStateChange message. Does not implicitly {@link gamehall.SCRoomStateChange.verify|verify} messages. * @function encode * @memberof gamehall.SCRoomStateChange * @static * @param {gamehall.ISCRoomStateChange} message SCRoomStateChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRoomStateChange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.Starting != null && Object.hasOwnProperty.call(message, "Starting")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.Starting); if (message.State != null && Object.hasOwnProperty.call(message, "State")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.State); return writer; }; /** * Encodes the specified SCRoomStateChange message, length delimited. Does not implicitly {@link gamehall.SCRoomStateChange.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRoomStateChange * @static * @param {gamehall.ISCRoomStateChange} message SCRoomStateChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRoomStateChange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRoomStateChange message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRoomStateChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRoomStateChange} SCRoomStateChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRoomStateChange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRoomStateChange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.Starting = reader.bool(); break; } case 3: { message.State = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRoomStateChange message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRoomStateChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRoomStateChange} SCRoomStateChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRoomStateChange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRoomStateChange message. * @function verify * @memberof gamehall.SCRoomStateChange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRoomStateChange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.Starting != null && message.hasOwnProperty("Starting")) if (typeof message.Starting !== "boolean") return "Starting: boolean expected"; if (message.State != null && message.hasOwnProperty("State")) if (!$util.isInteger(message.State)) return "State: integer expected"; return null; }; /** * Creates a SCRoomStateChange message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRoomStateChange * @static * @param {Object.} object Plain object * @returns {gamehall.SCRoomStateChange} SCRoomStateChange */ SCRoomStateChange.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRoomStateChange) return object; var message = new $root.gamehall.SCRoomStateChange(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.Starting != null) message.Starting = Boolean(object.Starting); if (object.State != null) message.State = object.State | 0; return message; }; /** * Creates a plain object from a SCRoomStateChange message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRoomStateChange * @static * @param {gamehall.SCRoomStateChange} message SCRoomStateChange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRoomStateChange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.Starting = false; object.State = 0; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.Starting != null && message.hasOwnProperty("Starting")) object.Starting = message.Starting; if (message.State != null && message.hasOwnProperty("State")) object.State = message.State; return object; }; /** * Converts this SCRoomStateChange to JSON. * @function toJSON * @memberof gamehall.SCRoomStateChange * @instance * @returns {Object.} JSON object */ SCRoomStateChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRoomStateChange * @function getTypeUrl * @memberof gamehall.SCRoomStateChange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRoomStateChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRoomStateChange"; }; return SCRoomStateChange; })(); gamehall.CSCreateRoom = (function() { /** * Properties of a CSCreateRoom. * @memberof gamehall * @interface ICSCreateRoom * @property {number|null} [GameId] CSCreateRoom GameId * @property {number|null} [BaseCoin] CSCreateRoom BaseCoin * @property {number|null} [SceneMode] CSCreateRoom SceneMode * @property {number|null} [MaxPlayerNum] CSCreateRoom MaxPlayerNum * @property {Array.|null} [Params] CSCreateRoom Params */ /** * Constructs a new CSCreateRoom. * @memberof gamehall * @classdesc Represents a CSCreateRoom. * @implements ICSCreateRoom * @constructor * @param {gamehall.ICSCreateRoom=} [properties] Properties to set */ function CSCreateRoom(properties) { this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCreateRoom GameId. * @member {number} GameId * @memberof gamehall.CSCreateRoom * @instance */ CSCreateRoom.prototype.GameId = 0; /** * CSCreateRoom BaseCoin. * @member {number} BaseCoin * @memberof gamehall.CSCreateRoom * @instance */ CSCreateRoom.prototype.BaseCoin = 0; /** * CSCreateRoom SceneMode. * @member {number} SceneMode * @memberof gamehall.CSCreateRoom * @instance */ CSCreateRoom.prototype.SceneMode = 0; /** * CSCreateRoom MaxPlayerNum. * @member {number} MaxPlayerNum * @memberof gamehall.CSCreateRoom * @instance */ CSCreateRoom.prototype.MaxPlayerNum = 0; /** * CSCreateRoom Params. * @member {Array.} Params * @memberof gamehall.CSCreateRoom * @instance */ CSCreateRoom.prototype.Params = $util.emptyArray; /** * Creates a new CSCreateRoom instance using the specified properties. * @function create * @memberof gamehall.CSCreateRoom * @static * @param {gamehall.ICSCreateRoom=} [properties] Properties to set * @returns {gamehall.CSCreateRoom} CSCreateRoom instance */ CSCreateRoom.create = function create(properties) { return new CSCreateRoom(properties); }; /** * Encodes the specified CSCreateRoom message. Does not implicitly {@link gamehall.CSCreateRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSCreateRoom * @static * @param {gamehall.ICSCreateRoom} message CSCreateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreateRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.BaseCoin != null && Object.hasOwnProperty.call(message, "BaseCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.BaseCoin); if (message.SceneMode != null && Object.hasOwnProperty.call(message, "SceneMode")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.SceneMode); if (message.MaxPlayerNum != null && Object.hasOwnProperty.call(message, "MaxPlayerNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.MaxPlayerNum); if (message.Params != null && message.Params.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified CSCreateRoom message, length delimited. Does not implicitly {@link gamehall.CSCreateRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCreateRoom * @static * @param {gamehall.ICSCreateRoom} message CSCreateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreateRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCreateRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCreateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCreateRoom} CSCreateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreateRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCreateRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.BaseCoin = reader.int32(); break; } case 3: { message.SceneMode = reader.int32(); break; } case 4: { message.MaxPlayerNum = reader.int32(); break; } case 5: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCreateRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCreateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCreateRoom} CSCreateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreateRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCreateRoom message. * @function verify * @memberof gamehall.CSCreateRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCreateRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.BaseCoin != null && message.hasOwnProperty("BaseCoin")) if (!$util.isInteger(message.BaseCoin)) return "BaseCoin: integer expected"; if (message.SceneMode != null && message.hasOwnProperty("SceneMode")) if (!$util.isInteger(message.SceneMode)) return "SceneMode: integer expected"; if (message.MaxPlayerNum != null && message.hasOwnProperty("MaxPlayerNum")) if (!$util.isInteger(message.MaxPlayerNum)) return "MaxPlayerNum: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } return null; }; /** * Creates a CSCreateRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCreateRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSCreateRoom} CSCreateRoom */ CSCreateRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCreateRoom) return object; var message = new $root.gamehall.CSCreateRoom(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.BaseCoin != null) message.BaseCoin = object.BaseCoin | 0; if (object.SceneMode != null) message.SceneMode = object.SceneMode | 0; if (object.MaxPlayerNum != null) message.MaxPlayerNum = object.MaxPlayerNum | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.CSCreateRoom.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } return message; }; /** * Creates a plain object from a CSCreateRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCreateRoom * @static * @param {gamehall.CSCreateRoom} message CSCreateRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCreateRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Params = []; if (options.defaults) { object.GameId = 0; object.BaseCoin = 0; object.SceneMode = 0; object.MaxPlayerNum = 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.BaseCoin != null && message.hasOwnProperty("BaseCoin")) object.BaseCoin = message.BaseCoin; if (message.SceneMode != null && message.hasOwnProperty("SceneMode")) object.SceneMode = message.SceneMode; if (message.MaxPlayerNum != null && message.hasOwnProperty("MaxPlayerNum")) object.MaxPlayerNum = message.MaxPlayerNum; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } return object; }; /** * Converts this CSCreateRoom to JSON. * @function toJSON * @memberof gamehall.CSCreateRoom * @instance * @returns {Object.} JSON object */ CSCreateRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCreateRoom * @function getTypeUrl * @memberof gamehall.CSCreateRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCreateRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCreateRoom"; }; return CSCreateRoom; })(); gamehall.SCCreateRoom = (function() { /** * Properties of a SCCreateRoom. * @memberof gamehall * @interface ISCCreateRoom * @property {number|null} [GameId] SCCreateRoom GameId * @property {number|null} [BaseCoin] SCCreateRoom BaseCoin * @property {number|null} [SceneMode] SCCreateRoom SceneMode * @property {number|null} [MaxPlayerNum] SCCreateRoom MaxPlayerNum * @property {Array.|null} [Params] SCCreateRoom Params * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCCreateRoom OpRetCode */ /** * Constructs a new SCCreateRoom. * @memberof gamehall * @classdesc Represents a SCCreateRoom. * @implements ISCCreateRoom * @constructor * @param {gamehall.ISCCreateRoom=} [properties] Properties to set */ function SCCreateRoom(properties) { this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCreateRoom GameId. * @member {number} GameId * @memberof gamehall.SCCreateRoom * @instance */ SCCreateRoom.prototype.GameId = 0; /** * SCCreateRoom BaseCoin. * @member {number} BaseCoin * @memberof gamehall.SCCreateRoom * @instance */ SCCreateRoom.prototype.BaseCoin = 0; /** * SCCreateRoom SceneMode. * @member {number} SceneMode * @memberof gamehall.SCCreateRoom * @instance */ SCCreateRoom.prototype.SceneMode = 0; /** * SCCreateRoom MaxPlayerNum. * @member {number} MaxPlayerNum * @memberof gamehall.SCCreateRoom * @instance */ SCCreateRoom.prototype.MaxPlayerNum = 0; /** * SCCreateRoom Params. * @member {Array.} Params * @memberof gamehall.SCCreateRoom * @instance */ SCCreateRoom.prototype.Params = $util.emptyArray; /** * SCCreateRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCCreateRoom * @instance */ SCCreateRoom.prototype.OpRetCode = 0; /** * Creates a new SCCreateRoom instance using the specified properties. * @function create * @memberof gamehall.SCCreateRoom * @static * @param {gamehall.ISCCreateRoom=} [properties] Properties to set * @returns {gamehall.SCCreateRoom} SCCreateRoom instance */ SCCreateRoom.create = function create(properties) { return new SCCreateRoom(properties); }; /** * Encodes the specified SCCreateRoom message. Does not implicitly {@link gamehall.SCCreateRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCCreateRoom * @static * @param {gamehall.ISCCreateRoom} message SCCreateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCreateRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.BaseCoin != null && Object.hasOwnProperty.call(message, "BaseCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.BaseCoin); if (message.SceneMode != null && Object.hasOwnProperty.call(message, "SceneMode")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.SceneMode); if (message.MaxPlayerNum != null && Object.hasOwnProperty.call(message, "MaxPlayerNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.MaxPlayerNum); if (message.Params != null && message.Params.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCCreateRoom message, length delimited. Does not implicitly {@link gamehall.SCCreateRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCreateRoom * @static * @param {gamehall.ISCCreateRoom} message SCCreateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCreateRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCreateRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCreateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCreateRoom} SCCreateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCreateRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCreateRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.BaseCoin = reader.int32(); break; } case 3: { message.SceneMode = reader.int32(); break; } case 4: { message.MaxPlayerNum = reader.int32(); break; } case 5: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } case 6: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCreateRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCreateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCreateRoom} SCCreateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCreateRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCreateRoom message. * @function verify * @memberof gamehall.SCCreateRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCreateRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.BaseCoin != null && message.hasOwnProperty("BaseCoin")) if (!$util.isInteger(message.BaseCoin)) return "BaseCoin: integer expected"; if (message.SceneMode != null && message.hasOwnProperty("SceneMode")) if (!$util.isInteger(message.SceneMode)) return "SceneMode: integer expected"; if (message.MaxPlayerNum != null && message.hasOwnProperty("MaxPlayerNum")) if (!$util.isInteger(message.MaxPlayerNum)) return "MaxPlayerNum: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCCreateRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCreateRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCCreateRoom} SCCreateRoom */ SCCreateRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCreateRoom) return object; var message = new $root.gamehall.SCCreateRoom(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.BaseCoin != null) message.BaseCoin = object.BaseCoin | 0; if (object.SceneMode != null) message.SceneMode = object.SceneMode | 0; if (object.MaxPlayerNum != null) message.MaxPlayerNum = object.MaxPlayerNum | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.SCCreateRoom.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCCreateRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCreateRoom * @static * @param {gamehall.SCCreateRoom} message SCCreateRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCreateRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Params = []; if (options.defaults) { object.GameId = 0; object.BaseCoin = 0; object.SceneMode = 0; object.MaxPlayerNum = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.BaseCoin != null && message.hasOwnProperty("BaseCoin")) object.BaseCoin = message.BaseCoin; if (message.SceneMode != null && message.hasOwnProperty("SceneMode")) object.SceneMode = message.SceneMode; if (message.MaxPlayerNum != null && message.hasOwnProperty("MaxPlayerNum")) object.MaxPlayerNum = message.MaxPlayerNum; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCCreateRoom to JSON. * @function toJSON * @memberof gamehall.SCCreateRoom * @instance * @returns {Object.} JSON object */ SCCreateRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCreateRoom * @function getTypeUrl * @memberof gamehall.SCCreateRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCreateRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCreateRoom"; }; return SCCreateRoom; })(); gamehall.CSDestroyRoom = (function() { /** * Properties of a CSDestroyRoom. * @memberof gamehall * @interface ICSDestroyRoom */ /** * Constructs a new CSDestroyRoom. * @memberof gamehall * @classdesc Represents a CSDestroyRoom. * @implements ICSDestroyRoom * @constructor * @param {gamehall.ICSDestroyRoom=} [properties] Properties to set */ function CSDestroyRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSDestroyRoom instance using the specified properties. * @function create * @memberof gamehall.CSDestroyRoom * @static * @param {gamehall.ICSDestroyRoom=} [properties] Properties to set * @returns {gamehall.CSDestroyRoom} CSDestroyRoom instance */ CSDestroyRoom.create = function create(properties) { return new CSDestroyRoom(properties); }; /** * Encodes the specified CSDestroyRoom message. Does not implicitly {@link gamehall.CSDestroyRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSDestroyRoom * @static * @param {gamehall.ICSDestroyRoom} message CSDestroyRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDestroyRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSDestroyRoom message, length delimited. Does not implicitly {@link gamehall.CSDestroyRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSDestroyRoom * @static * @param {gamehall.ICSDestroyRoom} message CSDestroyRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDestroyRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSDestroyRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSDestroyRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSDestroyRoom} CSDestroyRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDestroyRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSDestroyRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSDestroyRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSDestroyRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSDestroyRoom} CSDestroyRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDestroyRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSDestroyRoom message. * @function verify * @memberof gamehall.CSDestroyRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSDestroyRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSDestroyRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSDestroyRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSDestroyRoom} CSDestroyRoom */ CSDestroyRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSDestroyRoom) return object; return new $root.gamehall.CSDestroyRoom(); }; /** * Creates a plain object from a CSDestroyRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSDestroyRoom * @static * @param {gamehall.CSDestroyRoom} message CSDestroyRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSDestroyRoom.toObject = function toObject() { return {}; }; /** * Converts this CSDestroyRoom to JSON. * @function toJSON * @memberof gamehall.CSDestroyRoom * @instance * @returns {Object.} JSON object */ CSDestroyRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSDestroyRoom * @function getTypeUrl * @memberof gamehall.CSDestroyRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSDestroyRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSDestroyRoom"; }; return CSDestroyRoom; })(); gamehall.SCDestroyRoom = (function() { /** * Properties of a SCDestroyRoom. * @memberof gamehall * @interface ISCDestroyRoom * @property {number|null} [RoomId] SCDestroyRoom RoomId * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCDestroyRoom OpRetCode * @property {number|null} [IsForce] SCDestroyRoom IsForce */ /** * Constructs a new SCDestroyRoom. * @memberof gamehall * @classdesc Represents a SCDestroyRoom. * @implements ISCDestroyRoom * @constructor * @param {gamehall.ISCDestroyRoom=} [properties] Properties to set */ function SCDestroyRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCDestroyRoom RoomId. * @member {number} RoomId * @memberof gamehall.SCDestroyRoom * @instance */ SCDestroyRoom.prototype.RoomId = 0; /** * SCDestroyRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCDestroyRoom * @instance */ SCDestroyRoom.prototype.OpRetCode = 0; /** * SCDestroyRoom IsForce. * @member {number} IsForce * @memberof gamehall.SCDestroyRoom * @instance */ SCDestroyRoom.prototype.IsForce = 0; /** * Creates a new SCDestroyRoom instance using the specified properties. * @function create * @memberof gamehall.SCDestroyRoom * @static * @param {gamehall.ISCDestroyRoom=} [properties] Properties to set * @returns {gamehall.SCDestroyRoom} SCDestroyRoom instance */ SCDestroyRoom.create = function create(properties) { return new SCDestroyRoom(properties); }; /** * Encodes the specified SCDestroyRoom message. Does not implicitly {@link gamehall.SCDestroyRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCDestroyRoom * @static * @param {gamehall.ISCDestroyRoom} message SCDestroyRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCDestroyRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpRetCode); if (message.IsForce != null && Object.hasOwnProperty.call(message, "IsForce")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.IsForce); return writer; }; /** * Encodes the specified SCDestroyRoom message, length delimited. Does not implicitly {@link gamehall.SCDestroyRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCDestroyRoom * @static * @param {gamehall.ISCDestroyRoom} message SCDestroyRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCDestroyRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCDestroyRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCDestroyRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCDestroyRoom} SCDestroyRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCDestroyRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCDestroyRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.OpRetCode = reader.int32(); break; } case 3: { message.IsForce = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCDestroyRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCDestroyRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCDestroyRoom} SCDestroyRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCDestroyRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCDestroyRoom message. * @function verify * @memberof gamehall.SCDestroyRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCDestroyRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.IsForce != null && message.hasOwnProperty("IsForce")) if (!$util.isInteger(message.IsForce)) return "IsForce: integer expected"; return null; }; /** * Creates a SCDestroyRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCDestroyRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCDestroyRoom} SCDestroyRoom */ SCDestroyRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCDestroyRoom) return object; var message = new $root.gamehall.SCDestroyRoom(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.IsForce != null) message.IsForce = object.IsForce | 0; return message; }; /** * Creates a plain object from a SCDestroyRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCDestroyRoom * @static * @param {gamehall.SCDestroyRoom} message SCDestroyRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCDestroyRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.IsForce = 0; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.IsForce != null && message.hasOwnProperty("IsForce")) object.IsForce = message.IsForce; return object; }; /** * Converts this SCDestroyRoom to JSON. * @function toJSON * @memberof gamehall.SCDestroyRoom * @instance * @returns {Object.} JSON object */ SCDestroyRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCDestroyRoom * @function getTypeUrl * @memberof gamehall.SCDestroyRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCDestroyRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCDestroyRoom"; }; return SCDestroyRoom; })(); gamehall.CSEnterRoom = (function() { /** * Properties of a CSEnterRoom. * @memberof gamehall * @interface ICSEnterRoom * @property {number|null} [RoomId] CSEnterRoom RoomId * @property {number|null} [GameId] CSEnterRoom GameId */ /** * Constructs a new CSEnterRoom. * @memberof gamehall * @classdesc Represents a CSEnterRoom. * @implements ICSEnterRoom * @constructor * @param {gamehall.ICSEnterRoom=} [properties] Properties to set */ function CSEnterRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSEnterRoom RoomId. * @member {number} RoomId * @memberof gamehall.CSEnterRoom * @instance */ CSEnterRoom.prototype.RoomId = 0; /** * CSEnterRoom GameId. * @member {number} GameId * @memberof gamehall.CSEnterRoom * @instance */ CSEnterRoom.prototype.GameId = 0; /** * Creates a new CSEnterRoom instance using the specified properties. * @function create * @memberof gamehall.CSEnterRoom * @static * @param {gamehall.ICSEnterRoom=} [properties] Properties to set * @returns {gamehall.CSEnterRoom} CSEnterRoom instance */ CSEnterRoom.create = function create(properties) { return new CSEnterRoom(properties); }; /** * Encodes the specified CSEnterRoom message. Does not implicitly {@link gamehall.CSEnterRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSEnterRoom * @static * @param {gamehall.ICSEnterRoom} message CSEnterRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameId); return writer; }; /** * Encodes the specified CSEnterRoom message, length delimited. Does not implicitly {@link gamehall.CSEnterRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSEnterRoom * @static * @param {gamehall.ICSEnterRoom} message CSEnterRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSEnterRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSEnterRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSEnterRoom} CSEnterRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSEnterRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.GameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSEnterRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSEnterRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSEnterRoom} CSEnterRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSEnterRoom message. * @function verify * @memberof gamehall.CSEnterRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSEnterRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; return null; }; /** * Creates a CSEnterRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSEnterRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSEnterRoom} CSEnterRoom */ CSEnterRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSEnterRoom) return object; var message = new $root.gamehall.CSEnterRoom(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.GameId != null) message.GameId = object.GameId | 0; return message; }; /** * Creates a plain object from a CSEnterRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSEnterRoom * @static * @param {gamehall.CSEnterRoom} message CSEnterRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSEnterRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.GameId = 0; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; return object; }; /** * Converts this CSEnterRoom to JSON. * @function toJSON * @memberof gamehall.CSEnterRoom * @instance * @returns {Object.} JSON object */ CSEnterRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSEnterRoom * @function getTypeUrl * @memberof gamehall.CSEnterRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSEnterRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSEnterRoom"; }; return CSEnterRoom; })(); gamehall.SCEnterRoom = (function() { /** * Properties of a SCEnterRoom. * @memberof gamehall * @interface ISCEnterRoom * @property {number|null} [GameId] SCEnterRoom GameId * @property {number|null} [ModeType] SCEnterRoom ModeType * @property {Array.|null} [Params] SCEnterRoom Params * @property {number|null} [RoomId] SCEnterRoom RoomId * @property {number|null} [HallId] SCEnterRoom HallId * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCEnterRoom OpRetCode * @property {number|null} [ClubId] SCEnterRoom ClubId */ /** * Constructs a new SCEnterRoom. * @memberof gamehall * @classdesc Represents a SCEnterRoom. * @implements ISCEnterRoom * @constructor * @param {gamehall.ISCEnterRoom=} [properties] Properties to set */ function SCEnterRoom(properties) { this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCEnterRoom GameId. * @member {number} GameId * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.GameId = 0; /** * SCEnterRoom ModeType. * @member {number} ModeType * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.ModeType = 0; /** * SCEnterRoom Params. * @member {Array.} Params * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.Params = $util.emptyArray; /** * SCEnterRoom RoomId. * @member {number} RoomId * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.RoomId = 0; /** * SCEnterRoom HallId. * @member {number} HallId * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.HallId = 0; /** * SCEnterRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.OpRetCode = 0; /** * SCEnterRoom ClubId. * @member {number} ClubId * @memberof gamehall.SCEnterRoom * @instance */ SCEnterRoom.prototype.ClubId = 0; /** * Creates a new SCEnterRoom instance using the specified properties. * @function create * @memberof gamehall.SCEnterRoom * @static * @param {gamehall.ISCEnterRoom=} [properties] Properties to set * @returns {gamehall.SCEnterRoom} SCEnterRoom instance */ SCEnterRoom.create = function create(properties) { return new SCEnterRoom(properties); }; /** * Encodes the specified SCEnterRoom message. Does not implicitly {@link gamehall.SCEnterRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCEnterRoom * @static * @param {gamehall.ISCEnterRoom} message SCEnterRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.ModeType != null && Object.hasOwnProperty.call(message, "ModeType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ModeType); if (message.Params != null && message.Params.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.RoomId); if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.HallId); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.OpRetCode); if (message.ClubId != null && Object.hasOwnProperty.call(message, "ClubId")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.ClubId); return writer; }; /** * Encodes the specified SCEnterRoom message, length delimited. Does not implicitly {@link gamehall.SCEnterRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCEnterRoom * @static * @param {gamehall.ISCEnterRoom} message SCEnterRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCEnterRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCEnterRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCEnterRoom} SCEnterRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCEnterRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.ModeType = reader.int32(); break; } case 3: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } case 4: { message.RoomId = reader.int32(); break; } case 5: { message.HallId = reader.int32(); break; } case 6: { message.OpRetCode = reader.int32(); break; } case 7: { message.ClubId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCEnterRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCEnterRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCEnterRoom} SCEnterRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCEnterRoom message. * @function verify * @memberof gamehall.SCEnterRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCEnterRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.ModeType != null && message.hasOwnProperty("ModeType")) if (!$util.isInteger(message.ModeType)) return "ModeType: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.ClubId != null && message.hasOwnProperty("ClubId")) if (!$util.isInteger(message.ClubId)) return "ClubId: integer expected"; return null; }; /** * Creates a SCEnterRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCEnterRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCEnterRoom} SCEnterRoom */ SCEnterRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCEnterRoom) return object; var message = new $root.gamehall.SCEnterRoom(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.ModeType != null) message.ModeType = object.ModeType | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.SCEnterRoom.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.HallId != null) message.HallId = object.HallId | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.ClubId != null) message.ClubId = object.ClubId | 0; return message; }; /** * Creates a plain object from a SCEnterRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCEnterRoom * @static * @param {gamehall.SCEnterRoom} message SCEnterRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCEnterRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Params = []; if (options.defaults) { object.GameId = 0; object.ModeType = 0; object.RoomId = 0; object.HallId = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.ClubId = 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.ModeType != null && message.hasOwnProperty("ModeType")) object.ModeType = message.ModeType; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.ClubId != null && message.hasOwnProperty("ClubId")) object.ClubId = message.ClubId; return object; }; /** * Converts this SCEnterRoom to JSON. * @function toJSON * @memberof gamehall.SCEnterRoom * @instance * @returns {Object.} JSON object */ SCEnterRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCEnterRoom * @function getTypeUrl * @memberof gamehall.SCEnterRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCEnterRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCEnterRoom"; }; return SCEnterRoom; })(); gamehall.CSLeaveRoom = (function() { /** * Properties of a CSLeaveRoom. * @memberof gamehall * @interface ICSLeaveRoom * @property {number|null} [Mode] CSLeaveRoom Mode */ /** * Constructs a new CSLeaveRoom. * @memberof gamehall * @classdesc Represents a CSLeaveRoom. * @implements ICSLeaveRoom * @constructor * @param {gamehall.ICSLeaveRoom=} [properties] Properties to set */ function CSLeaveRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSLeaveRoom Mode. * @member {number} Mode * @memberof gamehall.CSLeaveRoom * @instance */ CSLeaveRoom.prototype.Mode = 0; /** * Creates a new CSLeaveRoom instance using the specified properties. * @function create * @memberof gamehall.CSLeaveRoom * @static * @param {gamehall.ICSLeaveRoom=} [properties] Properties to set * @returns {gamehall.CSLeaveRoom} CSLeaveRoom instance */ CSLeaveRoom.create = function create(properties) { return new CSLeaveRoom(properties); }; /** * Encodes the specified CSLeaveRoom message. Does not implicitly {@link gamehall.CSLeaveRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSLeaveRoom * @static * @param {gamehall.ICSLeaveRoom} message CSLeaveRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Mode != null && Object.hasOwnProperty.call(message, "Mode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Mode); return writer; }; /** * Encodes the specified CSLeaveRoom message, length delimited. Does not implicitly {@link gamehall.CSLeaveRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSLeaveRoom * @static * @param {gamehall.ICSLeaveRoom} message CSLeaveRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLeaveRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSLeaveRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSLeaveRoom} CSLeaveRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSLeaveRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Mode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLeaveRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSLeaveRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSLeaveRoom} CSLeaveRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLeaveRoom message. * @function verify * @memberof gamehall.CSLeaveRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLeaveRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Mode != null && message.hasOwnProperty("Mode")) if (!$util.isInteger(message.Mode)) return "Mode: integer expected"; return null; }; /** * Creates a CSLeaveRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSLeaveRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSLeaveRoom} CSLeaveRoom */ CSLeaveRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSLeaveRoom) return object; var message = new $root.gamehall.CSLeaveRoom(); if (object.Mode != null) message.Mode = object.Mode | 0; return message; }; /** * Creates a plain object from a CSLeaveRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSLeaveRoom * @static * @param {gamehall.CSLeaveRoom} message CSLeaveRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLeaveRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.Mode = 0; if (message.Mode != null && message.hasOwnProperty("Mode")) object.Mode = message.Mode; return object; }; /** * Converts this CSLeaveRoom to JSON. * @function toJSON * @memberof gamehall.CSLeaveRoom * @instance * @returns {Object.} JSON object */ CSLeaveRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLeaveRoom * @function getTypeUrl * @memberof gamehall.CSLeaveRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLeaveRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSLeaveRoom"; }; return CSLeaveRoom; })(); gamehall.SCLeaveRoom = (function() { /** * Properties of a SCLeaveRoom. * @memberof gamehall * @interface ISCLeaveRoom * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCLeaveRoom OpRetCode * @property {number|null} [Reason] SCLeaveRoom Reason * @property {number|null} [RoomId] SCLeaveRoom RoomId * @property {number|null} [Mode] SCLeaveRoom Mode */ /** * Constructs a new SCLeaveRoom. * @memberof gamehall * @classdesc Represents a SCLeaveRoom. * @implements ISCLeaveRoom * @constructor * @param {gamehall.ISCLeaveRoom=} [properties] Properties to set */ function SCLeaveRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLeaveRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCLeaveRoom * @instance */ SCLeaveRoom.prototype.OpRetCode = 0; /** * SCLeaveRoom Reason. * @member {number} Reason * @memberof gamehall.SCLeaveRoom * @instance */ SCLeaveRoom.prototype.Reason = 0; /** * SCLeaveRoom RoomId. * @member {number} RoomId * @memberof gamehall.SCLeaveRoom * @instance */ SCLeaveRoom.prototype.RoomId = 0; /** * SCLeaveRoom Mode. * @member {number} Mode * @memberof gamehall.SCLeaveRoom * @instance */ SCLeaveRoom.prototype.Mode = 0; /** * Creates a new SCLeaveRoom instance using the specified properties. * @function create * @memberof gamehall.SCLeaveRoom * @static * @param {gamehall.ISCLeaveRoom=} [properties] Properties to set * @returns {gamehall.SCLeaveRoom} SCLeaveRoom instance */ SCLeaveRoom.create = function create(properties) { return new SCLeaveRoom(properties); }; /** * Encodes the specified SCLeaveRoom message. Does not implicitly {@link gamehall.SCLeaveRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCLeaveRoom * @static * @param {gamehall.ISCLeaveRoom} message SCLeaveRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.Reason != null && Object.hasOwnProperty.call(message, "Reason")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Reason); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.RoomId); if (message.Mode != null && Object.hasOwnProperty.call(message, "Mode")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.Mode); return writer; }; /** * Encodes the specified SCLeaveRoom message, length delimited. Does not implicitly {@link gamehall.SCLeaveRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLeaveRoom * @static * @param {gamehall.ISCLeaveRoom} message SCLeaveRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLeaveRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLeaveRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLeaveRoom} SCLeaveRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLeaveRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.Reason = reader.int32(); break; } case 3: { message.RoomId = reader.int32(); break; } case 4: { message.Mode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLeaveRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLeaveRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLeaveRoom} SCLeaveRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLeaveRoom message. * @function verify * @memberof gamehall.SCLeaveRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLeaveRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.Reason != null && message.hasOwnProperty("Reason")) if (!$util.isInteger(message.Reason)) return "Reason: integer expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.Mode != null && message.hasOwnProperty("Mode")) if (!$util.isInteger(message.Mode)) return "Mode: integer expected"; return null; }; /** * Creates a SCLeaveRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLeaveRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCLeaveRoom} SCLeaveRoom */ SCLeaveRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLeaveRoom) return object; var message = new $root.gamehall.SCLeaveRoom(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.Reason != null) message.Reason = object.Reason | 0; if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.Mode != null) message.Mode = object.Mode | 0; return message; }; /** * Creates a plain object from a SCLeaveRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLeaveRoom * @static * @param {gamehall.SCLeaveRoom} message SCLeaveRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLeaveRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.Reason = 0; object.RoomId = 0; object.Mode = 0; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.Reason != null && message.hasOwnProperty("Reason")) object.Reason = message.Reason; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.Mode != null && message.hasOwnProperty("Mode")) object.Mode = message.Mode; return object; }; /** * Converts this SCLeaveRoom to JSON. * @function toJSON * @memberof gamehall.SCLeaveRoom * @instance * @returns {Object.} JSON object */ SCLeaveRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLeaveRoom * @function getTypeUrl * @memberof gamehall.SCLeaveRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLeaveRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLeaveRoom"; }; return SCLeaveRoom; })(); gamehall.CSReturnRoom = (function() { /** * Properties of a CSReturnRoom. * @memberof gamehall * @interface ICSReturnRoom * @property {number|null} [ApkVer] CSReturnRoom ApkVer * @property {number|null} [ResVer] CSReturnRoom ResVer * @property {boolean|null} [IsLoaded] CSReturnRoom IsLoaded * @property {number|null} [RoomId] CSReturnRoom RoomId */ /** * Constructs a new CSReturnRoom. * @memberof gamehall * @classdesc Represents a CSReturnRoom. * @implements ICSReturnRoom * @constructor * @param {gamehall.ICSReturnRoom=} [properties] Properties to set */ function CSReturnRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSReturnRoom ApkVer. * @member {number} ApkVer * @memberof gamehall.CSReturnRoom * @instance */ CSReturnRoom.prototype.ApkVer = 0; /** * CSReturnRoom ResVer. * @member {number} ResVer * @memberof gamehall.CSReturnRoom * @instance */ CSReturnRoom.prototype.ResVer = 0; /** * CSReturnRoom IsLoaded. * @member {boolean} IsLoaded * @memberof gamehall.CSReturnRoom * @instance */ CSReturnRoom.prototype.IsLoaded = false; /** * CSReturnRoom RoomId. * @member {number} RoomId * @memberof gamehall.CSReturnRoom * @instance */ CSReturnRoom.prototype.RoomId = 0; /** * Creates a new CSReturnRoom instance using the specified properties. * @function create * @memberof gamehall.CSReturnRoom * @static * @param {gamehall.ICSReturnRoom=} [properties] Properties to set * @returns {gamehall.CSReturnRoom} CSReturnRoom instance */ CSReturnRoom.create = function create(properties) { return new CSReturnRoom(properties); }; /** * Encodes the specified CSReturnRoom message. Does not implicitly {@link gamehall.CSReturnRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSReturnRoom * @static * @param {gamehall.ICSReturnRoom} message CSReturnRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReturnRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ApkVer != null && Object.hasOwnProperty.call(message, "ApkVer")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ApkVer); if (message.ResVer != null && Object.hasOwnProperty.call(message, "ResVer")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ResVer); if (message.IsLoaded != null && Object.hasOwnProperty.call(message, "IsLoaded")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.IsLoaded); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.RoomId); return writer; }; /** * Encodes the specified CSReturnRoom message, length delimited. Does not implicitly {@link gamehall.CSReturnRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSReturnRoom * @static * @param {gamehall.ICSReturnRoom} message CSReturnRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReturnRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSReturnRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSReturnRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSReturnRoom} CSReturnRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReturnRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSReturnRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ApkVer = reader.int32(); break; } case 2: { message.ResVer = reader.int32(); break; } case 3: { message.IsLoaded = reader.bool(); break; } case 4: { message.RoomId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSReturnRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSReturnRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSReturnRoom} CSReturnRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReturnRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSReturnRoom message. * @function verify * @memberof gamehall.CSReturnRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSReturnRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ApkVer != null && message.hasOwnProperty("ApkVer")) if (!$util.isInteger(message.ApkVer)) return "ApkVer: integer expected"; if (message.ResVer != null && message.hasOwnProperty("ResVer")) if (!$util.isInteger(message.ResVer)) return "ResVer: integer expected"; if (message.IsLoaded != null && message.hasOwnProperty("IsLoaded")) if (typeof message.IsLoaded !== "boolean") return "IsLoaded: boolean expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; return null; }; /** * Creates a CSReturnRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSReturnRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSReturnRoom} CSReturnRoom */ CSReturnRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSReturnRoom) return object; var message = new $root.gamehall.CSReturnRoom(); if (object.ApkVer != null) message.ApkVer = object.ApkVer | 0; if (object.ResVer != null) message.ResVer = object.ResVer | 0; if (object.IsLoaded != null) message.IsLoaded = Boolean(object.IsLoaded); if (object.RoomId != null) message.RoomId = object.RoomId | 0; return message; }; /** * Creates a plain object from a CSReturnRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSReturnRoom * @static * @param {gamehall.CSReturnRoom} message CSReturnRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSReturnRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ApkVer = 0; object.ResVer = 0; object.IsLoaded = false; object.RoomId = 0; } if (message.ApkVer != null && message.hasOwnProperty("ApkVer")) object.ApkVer = message.ApkVer; if (message.ResVer != null && message.hasOwnProperty("ResVer")) object.ResVer = message.ResVer; if (message.IsLoaded != null && message.hasOwnProperty("IsLoaded")) object.IsLoaded = message.IsLoaded; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; return object; }; /** * Converts this CSReturnRoom to JSON. * @function toJSON * @memberof gamehall.CSReturnRoom * @instance * @returns {Object.} JSON object */ CSReturnRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSReturnRoom * @function getTypeUrl * @memberof gamehall.CSReturnRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSReturnRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSReturnRoom"; }; return CSReturnRoom; })(); gamehall.SCReturnRoom = (function() { /** * Properties of a SCReturnRoom. * @memberof gamehall * @interface ISCReturnRoom * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCReturnRoom OpRetCode * @property {number|null} [RoomId] SCReturnRoom RoomId * @property {number|null} [GameId] SCReturnRoom GameId * @property {number|null} [ModeType] SCReturnRoom ModeType * @property {Array.|null} [Params] SCReturnRoom Params * @property {number|null} [HallId] SCReturnRoom HallId * @property {number|null} [MinApkVer] SCReturnRoom MinApkVer * @property {number|null} [LatestApkVer] SCReturnRoom LatestApkVer * @property {number|null} [MinResVer] SCReturnRoom MinResVer * @property {number|null} [LatestResVer] SCReturnRoom LatestResVer * @property {boolean|null} [IsLoaded] SCReturnRoom IsLoaded * @property {number|null} [ClubId] SCReturnRoom ClubId */ /** * Constructs a new SCReturnRoom. * @memberof gamehall * @classdesc Represents a SCReturnRoom. * @implements ISCReturnRoom * @constructor * @param {gamehall.ISCReturnRoom=} [properties] Properties to set */ function SCReturnRoom(properties) { this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCReturnRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.OpRetCode = 0; /** * SCReturnRoom RoomId. * @member {number} RoomId * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.RoomId = 0; /** * SCReturnRoom GameId. * @member {number} GameId * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.GameId = 0; /** * SCReturnRoom ModeType. * @member {number} ModeType * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.ModeType = 0; /** * SCReturnRoom Params. * @member {Array.} Params * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.Params = $util.emptyArray; /** * SCReturnRoom HallId. * @member {number} HallId * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.HallId = 0; /** * SCReturnRoom MinApkVer. * @member {number} MinApkVer * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.MinApkVer = 0; /** * SCReturnRoom LatestApkVer. * @member {number} LatestApkVer * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.LatestApkVer = 0; /** * SCReturnRoom MinResVer. * @member {number} MinResVer * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.MinResVer = 0; /** * SCReturnRoom LatestResVer. * @member {number} LatestResVer * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.LatestResVer = 0; /** * SCReturnRoom IsLoaded. * @member {boolean} IsLoaded * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.IsLoaded = false; /** * SCReturnRoom ClubId. * @member {number} ClubId * @memberof gamehall.SCReturnRoom * @instance */ SCReturnRoom.prototype.ClubId = 0; /** * Creates a new SCReturnRoom instance using the specified properties. * @function create * @memberof gamehall.SCReturnRoom * @static * @param {gamehall.ISCReturnRoom=} [properties] Properties to set * @returns {gamehall.SCReturnRoom} SCReturnRoom instance */ SCReturnRoom.create = function create(properties) { return new SCReturnRoom(properties); }; /** * Encodes the specified SCReturnRoom message. Does not implicitly {@link gamehall.SCReturnRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCReturnRoom * @static * @param {gamehall.ISCReturnRoom} message SCReturnRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReturnRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.RoomId); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.GameId); if (message.ModeType != null && Object.hasOwnProperty.call(message, "ModeType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.ModeType); if (message.Params != null && message.Params.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } if (message.HallId != null && Object.hasOwnProperty.call(message, "HallId")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.HallId); if (message.MinApkVer != null && Object.hasOwnProperty.call(message, "MinApkVer")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.MinApkVer); if (message.LatestApkVer != null && Object.hasOwnProperty.call(message, "LatestApkVer")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.LatestApkVer); if (message.MinResVer != null && Object.hasOwnProperty.call(message, "MinResVer")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.MinResVer); if (message.LatestResVer != null && Object.hasOwnProperty.call(message, "LatestResVer")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.LatestResVer); if (message.IsLoaded != null && Object.hasOwnProperty.call(message, "IsLoaded")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.IsLoaded); if (message.ClubId != null && Object.hasOwnProperty.call(message, "ClubId")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.ClubId); return writer; }; /** * Encodes the specified SCReturnRoom message, length delimited. Does not implicitly {@link gamehall.SCReturnRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCReturnRoom * @static * @param {gamehall.ISCReturnRoom} message SCReturnRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReturnRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCReturnRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCReturnRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCReturnRoom} SCReturnRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReturnRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCReturnRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.RoomId = reader.int32(); break; } case 3: { message.GameId = reader.int32(); break; } case 4: { message.ModeType = reader.int32(); break; } case 5: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } case 6: { message.HallId = reader.int32(); break; } case 7: { message.MinApkVer = reader.int32(); break; } case 8: { message.LatestApkVer = reader.int32(); break; } case 9: { message.MinResVer = reader.int32(); break; } case 10: { message.LatestResVer = reader.int32(); break; } case 11: { message.IsLoaded = reader.bool(); break; } case 12: { message.ClubId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCReturnRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCReturnRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCReturnRoom} SCReturnRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReturnRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCReturnRoom message. * @function verify * @memberof gamehall.SCReturnRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCReturnRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.ModeType != null && message.hasOwnProperty("ModeType")) if (!$util.isInteger(message.ModeType)) return "ModeType: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } if (message.HallId != null && message.hasOwnProperty("HallId")) if (!$util.isInteger(message.HallId)) return "HallId: integer expected"; if (message.MinApkVer != null && message.hasOwnProperty("MinApkVer")) if (!$util.isInteger(message.MinApkVer)) return "MinApkVer: integer expected"; if (message.LatestApkVer != null && message.hasOwnProperty("LatestApkVer")) if (!$util.isInteger(message.LatestApkVer)) return "LatestApkVer: integer expected"; if (message.MinResVer != null && message.hasOwnProperty("MinResVer")) if (!$util.isInteger(message.MinResVer)) return "MinResVer: integer expected"; if (message.LatestResVer != null && message.hasOwnProperty("LatestResVer")) if (!$util.isInteger(message.LatestResVer)) return "LatestResVer: integer expected"; if (message.IsLoaded != null && message.hasOwnProperty("IsLoaded")) if (typeof message.IsLoaded !== "boolean") return "IsLoaded: boolean expected"; if (message.ClubId != null && message.hasOwnProperty("ClubId")) if (!$util.isInteger(message.ClubId)) return "ClubId: integer expected"; return null; }; /** * Creates a SCReturnRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCReturnRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCReturnRoom} SCReturnRoom */ SCReturnRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCReturnRoom) return object; var message = new $root.gamehall.SCReturnRoom(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.GameId != null) message.GameId = object.GameId | 0; if (object.ModeType != null) message.ModeType = object.ModeType | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.SCReturnRoom.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } if (object.HallId != null) message.HallId = object.HallId | 0; if (object.MinApkVer != null) message.MinApkVer = object.MinApkVer | 0; if (object.LatestApkVer != null) message.LatestApkVer = object.LatestApkVer | 0; if (object.MinResVer != null) message.MinResVer = object.MinResVer | 0; if (object.LatestResVer != null) message.LatestResVer = object.LatestResVer | 0; if (object.IsLoaded != null) message.IsLoaded = Boolean(object.IsLoaded); if (object.ClubId != null) message.ClubId = object.ClubId | 0; return message; }; /** * Creates a plain object from a SCReturnRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCReturnRoom * @static * @param {gamehall.SCReturnRoom} message SCReturnRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCReturnRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Params = []; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.RoomId = 0; object.GameId = 0; object.ModeType = 0; object.HallId = 0; object.MinApkVer = 0; object.LatestApkVer = 0; object.MinResVer = 0; object.LatestResVer = 0; object.IsLoaded = false; object.ClubId = 0; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.ModeType != null && message.hasOwnProperty("ModeType")) object.ModeType = message.ModeType; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } if (message.HallId != null && message.hasOwnProperty("HallId")) object.HallId = message.HallId; if (message.MinApkVer != null && message.hasOwnProperty("MinApkVer")) object.MinApkVer = message.MinApkVer; if (message.LatestApkVer != null && message.hasOwnProperty("LatestApkVer")) object.LatestApkVer = message.LatestApkVer; if (message.MinResVer != null && message.hasOwnProperty("MinResVer")) object.MinResVer = message.MinResVer; if (message.LatestResVer != null && message.hasOwnProperty("LatestResVer")) object.LatestResVer = message.LatestResVer; if (message.IsLoaded != null && message.hasOwnProperty("IsLoaded")) object.IsLoaded = message.IsLoaded; if (message.ClubId != null && message.hasOwnProperty("ClubId")) object.ClubId = message.ClubId; return object; }; /** * Converts this SCReturnRoom to JSON. * @function toJSON * @memberof gamehall.SCReturnRoom * @instance * @returns {Object.} JSON object */ SCReturnRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCReturnRoom * @function getTypeUrl * @memberof gamehall.SCReturnRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCReturnRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCReturnRoom"; }; return SCReturnRoom; })(); gamehall.CSGetGameRec = (function() { /** * Properties of a CSGetGameRec. * @memberof gamehall * @interface ICSGetGameRec * @property {number|null} [Ver] CSGetGameRec Ver * @property {number|null} [GameId] CSGetGameRec GameId */ /** * Constructs a new CSGetGameRec. * @memberof gamehall * @classdesc Represents a CSGetGameRec. * @implements ICSGetGameRec * @constructor * @param {gamehall.ICSGetGameRec=} [properties] Properties to set */ function CSGetGameRec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSGetGameRec Ver. * @member {number} Ver * @memberof gamehall.CSGetGameRec * @instance */ CSGetGameRec.prototype.Ver = 0; /** * CSGetGameRec GameId. * @member {number} GameId * @memberof gamehall.CSGetGameRec * @instance */ CSGetGameRec.prototype.GameId = 0; /** * Creates a new CSGetGameRec instance using the specified properties. * @function create * @memberof gamehall.CSGetGameRec * @static * @param {gamehall.ICSGetGameRec=} [properties] Properties to set * @returns {gamehall.CSGetGameRec} CSGetGameRec instance */ CSGetGameRec.create = function create(properties) { return new CSGetGameRec(properties); }; /** * Encodes the specified CSGetGameRec message. Does not implicitly {@link gamehall.CSGetGameRec.verify|verify} messages. * @function encode * @memberof gamehall.CSGetGameRec * @static * @param {gamehall.ICSGetGameRec} message CSGetGameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGameRec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Ver != null && Object.hasOwnProperty.call(message, "Ver")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Ver); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameId); return writer; }; /** * Encodes the specified CSGetGameRec message, length delimited. Does not implicitly {@link gamehall.CSGetGameRec.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGetGameRec * @static * @param {gamehall.ICSGetGameRec} message CSGetGameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGameRec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetGameRec message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGetGameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGetGameRec} CSGetGameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGameRec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGetGameRec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Ver = reader.int32(); break; } case 2: { message.GameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetGameRec message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGetGameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGetGameRec} CSGetGameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGameRec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetGameRec message. * @function verify * @memberof gamehall.CSGetGameRec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetGameRec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Ver != null && message.hasOwnProperty("Ver")) if (!$util.isInteger(message.Ver)) return "Ver: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; return null; }; /** * Creates a CSGetGameRec message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGetGameRec * @static * @param {Object.} object Plain object * @returns {gamehall.CSGetGameRec} CSGetGameRec */ CSGetGameRec.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGetGameRec) return object; var message = new $root.gamehall.CSGetGameRec(); if (object.Ver != null) message.Ver = object.Ver | 0; if (object.GameId != null) message.GameId = object.GameId | 0; return message; }; /** * Creates a plain object from a CSGetGameRec message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGetGameRec * @static * @param {gamehall.CSGetGameRec} message CSGetGameRec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetGameRec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Ver = 0; object.GameId = 0; } if (message.Ver != null && message.hasOwnProperty("Ver")) object.Ver = message.Ver; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; return object; }; /** * Converts this CSGetGameRec to JSON. * @function toJSON * @memberof gamehall.CSGetGameRec * @instance * @returns {Object.} JSON object */ CSGetGameRec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetGameRec * @function getTypeUrl * @memberof gamehall.CSGetGameRec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetGameRec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGetGameRec"; }; return CSGetGameRec; })(); gamehall.PlayerGameRec = (function() { /** * Properties of a PlayerGameRec. * @memberof gamehall * @interface IPlayerGameRec * @property {number|null} [Id] PlayerGameRec Id * @property {string|null} [Name] PlayerGameRec Name * @property {number|null} [Head] PlayerGameRec Head * @property {number|Long|null} [Coin] PlayerGameRec Coin * @property {number|null} [Pos] PlayerGameRec Pos * @property {Array.|null} [OtherParams] PlayerGameRec OtherParams */ /** * Constructs a new PlayerGameRec. * @memberof gamehall * @classdesc Represents a PlayerGameRec. * @implements IPlayerGameRec * @constructor * @param {gamehall.IPlayerGameRec=} [properties] Properties to set */ function PlayerGameRec(properties) { this.OtherParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * PlayerGameRec Id. * @member {number} Id * @memberof gamehall.PlayerGameRec * @instance */ PlayerGameRec.prototype.Id = 0; /** * PlayerGameRec Name. * @member {string} Name * @memberof gamehall.PlayerGameRec * @instance */ PlayerGameRec.prototype.Name = ""; /** * PlayerGameRec Head. * @member {number} Head * @memberof gamehall.PlayerGameRec * @instance */ PlayerGameRec.prototype.Head = 0; /** * PlayerGameRec Coin. * @member {number|Long} Coin * @memberof gamehall.PlayerGameRec * @instance */ PlayerGameRec.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerGameRec Pos. * @member {number} Pos * @memberof gamehall.PlayerGameRec * @instance */ PlayerGameRec.prototype.Pos = 0; /** * PlayerGameRec OtherParams. * @member {Array.} OtherParams * @memberof gamehall.PlayerGameRec * @instance */ PlayerGameRec.prototype.OtherParams = $util.emptyArray; /** * Creates a new PlayerGameRec instance using the specified properties. * @function create * @memberof gamehall.PlayerGameRec * @static * @param {gamehall.IPlayerGameRec=} [properties] Properties to set * @returns {gamehall.PlayerGameRec} PlayerGameRec instance */ PlayerGameRec.create = function create(properties) { return new PlayerGameRec(properties); }; /** * Encodes the specified PlayerGameRec message. Does not implicitly {@link gamehall.PlayerGameRec.verify|verify} messages. * @function encode * @memberof gamehall.PlayerGameRec * @static * @param {gamehall.IPlayerGameRec} message PlayerGameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PlayerGameRec.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).int32(message.Id); if (message.Name != null && Object.hasOwnProperty.call(message, "Name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.Name); if (message.Head != null && Object.hasOwnProperty.call(message, "Head")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Head); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.Coin); if (message.Pos != null && Object.hasOwnProperty.call(message, "Pos")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.Pos); if (message.OtherParams != null && message.OtherParams.length) { writer.uint32(/* id 6, wireType 2 =*/50).fork(); for (var i = 0; i < message.OtherParams.length; ++i) writer.int32(message.OtherParams[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified PlayerGameRec message, length delimited. Does not implicitly {@link gamehall.PlayerGameRec.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.PlayerGameRec * @static * @param {gamehall.IPlayerGameRec} message PlayerGameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PlayerGameRec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PlayerGameRec message from the specified reader or buffer. * @function decode * @memberof gamehall.PlayerGameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.PlayerGameRec} PlayerGameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PlayerGameRec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.PlayerGameRec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.Name = reader.string(); break; } case 3: { message.Head = reader.int32(); break; } case 4: { message.Coin = reader.int64(); break; } case 5: { message.Pos = reader.int32(); break; } case 6: { if (!(message.OtherParams && message.OtherParams.length)) message.OtherParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OtherParams.push(reader.int32()); } else message.OtherParams.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PlayerGameRec message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.PlayerGameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.PlayerGameRec} PlayerGameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PlayerGameRec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PlayerGameRec message. * @function verify * @memberof gamehall.PlayerGameRec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PlayerGameRec.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)) return "Id: integer expected"; if (message.Name != null && message.hasOwnProperty("Name")) if (!$util.isString(message.Name)) return "Name: string expected"; if (message.Head != null && message.hasOwnProperty("Head")) if (!$util.isInteger(message.Head)) return "Head: integer expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; if (message.Pos != null && message.hasOwnProperty("Pos")) if (!$util.isInteger(message.Pos)) return "Pos: integer expected"; if (message.OtherParams != null && message.hasOwnProperty("OtherParams")) { if (!Array.isArray(message.OtherParams)) return "OtherParams: array expected"; for (var i = 0; i < message.OtherParams.length; ++i) if (!$util.isInteger(message.OtherParams[i])) return "OtherParams: integer[] expected"; } return null; }; /** * Creates a PlayerGameRec message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.PlayerGameRec * @static * @param {Object.} object Plain object * @returns {gamehall.PlayerGameRec} PlayerGameRec */ PlayerGameRec.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.PlayerGameRec) return object; var message = new $root.gamehall.PlayerGameRec(); if (object.Id != null) message.Id = object.Id | 0; if (object.Name != null) message.Name = String(object.Name); if (object.Head != null) message.Head = object.Head | 0; if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); if (object.Pos != null) message.Pos = object.Pos | 0; if (object.OtherParams) { if (!Array.isArray(object.OtherParams)) throw TypeError(".gamehall.PlayerGameRec.OtherParams: array expected"); message.OtherParams = []; for (var i = 0; i < object.OtherParams.length; ++i) message.OtherParams[i] = object.OtherParams[i] | 0; } return message; }; /** * Creates a plain object from a PlayerGameRec message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.PlayerGameRec * @static * @param {gamehall.PlayerGameRec} message PlayerGameRec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PlayerGameRec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OtherParams = []; if (options.defaults) { object.Id = 0; object.Name = ""; object.Head = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; object.Pos = 0; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.Name != null && message.hasOwnProperty("Name")) object.Name = message.Name; if (message.Head != null && message.hasOwnProperty("Head")) object.Head = message.Head; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; if (message.Pos != null && message.hasOwnProperty("Pos")) object.Pos = message.Pos; if (message.OtherParams && message.OtherParams.length) { object.OtherParams = []; for (var j = 0; j < message.OtherParams.length; ++j) object.OtherParams[j] = message.OtherParams[j]; } return object; }; /** * Converts this PlayerGameRec to JSON. * @function toJSON * @memberof gamehall.PlayerGameRec * @instance * @returns {Object.} JSON object */ PlayerGameRec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PlayerGameRec * @function getTypeUrl * @memberof gamehall.PlayerGameRec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PlayerGameRec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.PlayerGameRec"; }; return PlayerGameRec; })(); gamehall.GameRec = (function() { /** * Properties of a GameRec. * @memberof gamehall * @interface IGameRec * @property {number|null} [RecId] GameRec RecId * @property {Array.|null} [Datas] GameRec Datas * @property {number|Long|null} [Ts] GameRec Ts * @property {number|null} [RoomId] GameRec RoomId * @property {number|null} [GameMode] GameRec GameMode * @property {number|null} [SceneType] GameRec SceneType * @property {number|null} [GameId] GameRec GameId * @property {number|null} [TotalOfGames] GameRec TotalOfGames * @property {number|null} [NumOfGames] GameRec NumOfGames * @property {number|null} [RoomFeeMode] GameRec RoomFeeMode * @property {number|null} [RoomCardCnt] GameRec RoomCardCnt * @property {Array.|null} [Params] GameRec Params * @property {number|null} [GameTime] GameRec GameTime */ /** * Constructs a new GameRec. * @memberof gamehall * @classdesc Represents a GameRec. * @implements IGameRec * @constructor * @param {gamehall.IGameRec=} [properties] Properties to set */ function GameRec(properties) { this.Datas = []; this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GameRec RecId. * @member {number} RecId * @memberof gamehall.GameRec * @instance */ GameRec.prototype.RecId = 0; /** * GameRec Datas. * @member {Array.} Datas * @memberof gamehall.GameRec * @instance */ GameRec.prototype.Datas = $util.emptyArray; /** * GameRec Ts. * @member {number|Long} Ts * @memberof gamehall.GameRec * @instance */ GameRec.prototype.Ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * GameRec RoomId. * @member {number} RoomId * @memberof gamehall.GameRec * @instance */ GameRec.prototype.RoomId = 0; /** * GameRec GameMode. * @member {number} GameMode * @memberof gamehall.GameRec * @instance */ GameRec.prototype.GameMode = 0; /** * GameRec SceneType. * @member {number} SceneType * @memberof gamehall.GameRec * @instance */ GameRec.prototype.SceneType = 0; /** * GameRec GameId. * @member {number} GameId * @memberof gamehall.GameRec * @instance */ GameRec.prototype.GameId = 0; /** * GameRec TotalOfGames. * @member {number} TotalOfGames * @memberof gamehall.GameRec * @instance */ GameRec.prototype.TotalOfGames = 0; /** * GameRec NumOfGames. * @member {number} NumOfGames * @memberof gamehall.GameRec * @instance */ GameRec.prototype.NumOfGames = 0; /** * GameRec RoomFeeMode. * @member {number} RoomFeeMode * @memberof gamehall.GameRec * @instance */ GameRec.prototype.RoomFeeMode = 0; /** * GameRec RoomCardCnt. * @member {number} RoomCardCnt * @memberof gamehall.GameRec * @instance */ GameRec.prototype.RoomCardCnt = 0; /** * GameRec Params. * @member {Array.} Params * @memberof gamehall.GameRec * @instance */ GameRec.prototype.Params = $util.emptyArray; /** * GameRec GameTime. * @member {number} GameTime * @memberof gamehall.GameRec * @instance */ GameRec.prototype.GameTime = 0; /** * Creates a new GameRec instance using the specified properties. * @function create * @memberof gamehall.GameRec * @static * @param {gamehall.IGameRec=} [properties] Properties to set * @returns {gamehall.GameRec} GameRec instance */ GameRec.create = function create(properties) { return new GameRec(properties); }; /** * Encodes the specified GameRec message. Does not implicitly {@link gamehall.GameRec.verify|verify} messages. * @function encode * @memberof gamehall.GameRec * @static * @param {gamehall.IGameRec} message GameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameRec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RecId != null && Object.hasOwnProperty.call(message, "RecId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RecId); if (message.Datas != null && message.Datas.length) for (var i = 0; i < message.Datas.length; ++i) $root.gamehall.PlayerGameRec.encode(message.Datas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.Ts); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.RoomId); if (message.GameMode != null && Object.hasOwnProperty.call(message, "GameMode")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.GameMode); if (message.SceneType != null && Object.hasOwnProperty.call(message, "SceneType")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.SceneType); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.GameId); if (message.TotalOfGames != null && Object.hasOwnProperty.call(message, "TotalOfGames")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.TotalOfGames); if (message.NumOfGames != null && Object.hasOwnProperty.call(message, "NumOfGames")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.NumOfGames); if (message.RoomFeeMode != null && Object.hasOwnProperty.call(message, "RoomFeeMode")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.RoomFeeMode); if (message.RoomCardCnt != null && Object.hasOwnProperty.call(message, "RoomCardCnt")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.RoomCardCnt); if (message.Params != null && message.Params.length) { writer.uint32(/* id 12, wireType 2 =*/98).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } if (message.GameTime != null && Object.hasOwnProperty.call(message, "GameTime")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.GameTime); return writer; }; /** * Encodes the specified GameRec message, length delimited. Does not implicitly {@link gamehall.GameRec.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.GameRec * @static * @param {gamehall.IGameRec} message GameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameRec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GameRec message from the specified reader or buffer. * @function decode * @memberof gamehall.GameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.GameRec} GameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameRec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.GameRec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RecId = reader.int32(); break; } case 2: { if (!(message.Datas && message.Datas.length)) message.Datas = []; message.Datas.push($root.gamehall.PlayerGameRec.decode(reader, reader.uint32())); break; } case 3: { message.Ts = reader.int64(); break; } case 4: { message.RoomId = reader.int32(); break; } case 5: { message.GameMode = reader.int32(); break; } case 6: { message.SceneType = reader.int32(); break; } case 7: { message.GameId = reader.int32(); break; } case 8: { message.TotalOfGames = reader.int32(); break; } case 9: { message.NumOfGames = reader.int32(); break; } case 10: { message.RoomFeeMode = reader.int32(); break; } case 11: { message.RoomCardCnt = reader.int32(); break; } case 12: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } case 13: { message.GameTime = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GameRec message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.GameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.GameRec} GameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameRec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GameRec message. * @function verify * @memberof gamehall.GameRec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GameRec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RecId != null && message.hasOwnProperty("RecId")) if (!$util.isInteger(message.RecId)) return "RecId: integer expected"; if (message.Datas != null && message.hasOwnProperty("Datas")) { if (!Array.isArray(message.Datas)) return "Datas: array expected"; for (var i = 0; i < message.Datas.length; ++i) { var error = $root.gamehall.PlayerGameRec.verify(message.Datas[i]); if (error) return "Datas." + error; } } if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts) && !(message.Ts && $util.isInteger(message.Ts.low) && $util.isInteger(message.Ts.high))) return "Ts: integer|Long expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.GameMode != null && message.hasOwnProperty("GameMode")) if (!$util.isInteger(message.GameMode)) return "GameMode: integer expected"; if (message.SceneType != null && message.hasOwnProperty("SceneType")) if (!$util.isInteger(message.SceneType)) return "SceneType: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.TotalOfGames != null && message.hasOwnProperty("TotalOfGames")) if (!$util.isInteger(message.TotalOfGames)) return "TotalOfGames: integer expected"; if (message.NumOfGames != null && message.hasOwnProperty("NumOfGames")) if (!$util.isInteger(message.NumOfGames)) return "NumOfGames: integer expected"; if (message.RoomFeeMode != null && message.hasOwnProperty("RoomFeeMode")) if (!$util.isInteger(message.RoomFeeMode)) return "RoomFeeMode: integer expected"; if (message.RoomCardCnt != null && message.hasOwnProperty("RoomCardCnt")) if (!$util.isInteger(message.RoomCardCnt)) return "RoomCardCnt: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } if (message.GameTime != null && message.hasOwnProperty("GameTime")) if (!$util.isInteger(message.GameTime)) return "GameTime: integer expected"; return null; }; /** * Creates a GameRec message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.GameRec * @static * @param {Object.} object Plain object * @returns {gamehall.GameRec} GameRec */ GameRec.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.GameRec) return object; var message = new $root.gamehall.GameRec(); if (object.RecId != null) message.RecId = object.RecId | 0; if (object.Datas) { if (!Array.isArray(object.Datas)) throw TypeError(".gamehall.GameRec.Datas: array expected"); message.Datas = []; for (var i = 0; i < object.Datas.length; ++i) { if (typeof object.Datas[i] !== "object") throw TypeError(".gamehall.GameRec.Datas: object expected"); message.Datas[i] = $root.gamehall.PlayerGameRec.fromObject(object.Datas[i]); } } if (object.Ts != null) if ($util.Long) (message.Ts = $util.Long.fromValue(object.Ts)).unsigned = false; else if (typeof object.Ts === "string") message.Ts = parseInt(object.Ts, 10); else if (typeof object.Ts === "number") message.Ts = object.Ts; else if (typeof object.Ts === "object") message.Ts = new $util.LongBits(object.Ts.low >>> 0, object.Ts.high >>> 0).toNumber(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.GameMode != null) message.GameMode = object.GameMode | 0; if (object.SceneType != null) message.SceneType = object.SceneType | 0; if (object.GameId != null) message.GameId = object.GameId | 0; if (object.TotalOfGames != null) message.TotalOfGames = object.TotalOfGames | 0; if (object.NumOfGames != null) message.NumOfGames = object.NumOfGames | 0; if (object.RoomFeeMode != null) message.RoomFeeMode = object.RoomFeeMode | 0; if (object.RoomCardCnt != null) message.RoomCardCnt = object.RoomCardCnt | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.GameRec.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } if (object.GameTime != null) message.GameTime = object.GameTime | 0; return message; }; /** * Creates a plain object from a GameRec message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.GameRec * @static * @param {gamehall.GameRec} message GameRec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GameRec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.Datas = []; object.Params = []; } if (options.defaults) { object.RecId = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Ts = options.longs === String ? "0" : 0; object.RoomId = 0; object.GameMode = 0; object.SceneType = 0; object.GameId = 0; object.TotalOfGames = 0; object.NumOfGames = 0; object.RoomFeeMode = 0; object.RoomCardCnt = 0; object.GameTime = 0; } if (message.RecId != null && message.hasOwnProperty("RecId")) object.RecId = message.RecId; if (message.Datas && message.Datas.length) { object.Datas = []; for (var j = 0; j < message.Datas.length; ++j) object.Datas[j] = $root.gamehall.PlayerGameRec.toObject(message.Datas[j], options); } if (message.Ts != null && message.hasOwnProperty("Ts")) if (typeof message.Ts === "number") object.Ts = options.longs === String ? String(message.Ts) : message.Ts; else object.Ts = options.longs === String ? $util.Long.prototype.toString.call(message.Ts) : options.longs === Number ? new $util.LongBits(message.Ts.low >>> 0, message.Ts.high >>> 0).toNumber() : message.Ts; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.GameMode != null && message.hasOwnProperty("GameMode")) object.GameMode = message.GameMode; if (message.SceneType != null && message.hasOwnProperty("SceneType")) object.SceneType = message.SceneType; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.TotalOfGames != null && message.hasOwnProperty("TotalOfGames")) object.TotalOfGames = message.TotalOfGames; if (message.NumOfGames != null && message.hasOwnProperty("NumOfGames")) object.NumOfGames = message.NumOfGames; if (message.RoomFeeMode != null && message.hasOwnProperty("RoomFeeMode")) object.RoomFeeMode = message.RoomFeeMode; if (message.RoomCardCnt != null && message.hasOwnProperty("RoomCardCnt")) object.RoomCardCnt = message.RoomCardCnt; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } if (message.GameTime != null && message.hasOwnProperty("GameTime")) object.GameTime = message.GameTime; return object; }; /** * Converts this GameRec to JSON. * @function toJSON * @memberof gamehall.GameRec * @instance * @returns {Object.} JSON object */ GameRec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GameRec * @function getTypeUrl * @memberof gamehall.GameRec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GameRec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.GameRec"; }; return GameRec; })(); gamehall.SCGetGameRec = (function() { /** * Properties of a SCGetGameRec. * @memberof gamehall * @interface ISCGetGameRec * @property {Array.|null} [Recs] SCGetGameRec Recs * @property {number|null} [Ver] SCGetGameRec Ver * @property {number|null} [GameId] SCGetGameRec GameId */ /** * Constructs a new SCGetGameRec. * @memberof gamehall * @classdesc Represents a SCGetGameRec. * @implements ISCGetGameRec * @constructor * @param {gamehall.ISCGetGameRec=} [properties] Properties to set */ function SCGetGameRec(properties) { this.Recs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGetGameRec Recs. * @member {Array.} Recs * @memberof gamehall.SCGetGameRec * @instance */ SCGetGameRec.prototype.Recs = $util.emptyArray; /** * SCGetGameRec Ver. * @member {number} Ver * @memberof gamehall.SCGetGameRec * @instance */ SCGetGameRec.prototype.Ver = 0; /** * SCGetGameRec GameId. * @member {number} GameId * @memberof gamehall.SCGetGameRec * @instance */ SCGetGameRec.prototype.GameId = 0; /** * Creates a new SCGetGameRec instance using the specified properties. * @function create * @memberof gamehall.SCGetGameRec * @static * @param {gamehall.ISCGetGameRec=} [properties] Properties to set * @returns {gamehall.SCGetGameRec} SCGetGameRec instance */ SCGetGameRec.create = function create(properties) { return new SCGetGameRec(properties); }; /** * Encodes the specified SCGetGameRec message. Does not implicitly {@link gamehall.SCGetGameRec.verify|verify} messages. * @function encode * @memberof gamehall.SCGetGameRec * @static * @param {gamehall.ISCGetGameRec} message SCGetGameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetGameRec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Recs != null && message.Recs.length) for (var i = 0; i < message.Recs.length; ++i) $root.gamehall.GameRec.encode(message.Recs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.Ver != null && Object.hasOwnProperty.call(message, "Ver")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Ver); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.GameId); return writer; }; /** * Encodes the specified SCGetGameRec message, length delimited. Does not implicitly {@link gamehall.SCGetGameRec.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGetGameRec * @static * @param {gamehall.ISCGetGameRec} message SCGetGameRec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetGameRec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGetGameRec message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGetGameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGetGameRec} SCGetGameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetGameRec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGetGameRec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.Recs && message.Recs.length)) message.Recs = []; message.Recs.push($root.gamehall.GameRec.decode(reader, reader.uint32())); break; } case 2: { message.Ver = reader.int32(); break; } case 3: { message.GameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGetGameRec message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGetGameRec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGetGameRec} SCGetGameRec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetGameRec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGetGameRec message. * @function verify * @memberof gamehall.SCGetGameRec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGetGameRec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Recs != null && message.hasOwnProperty("Recs")) { if (!Array.isArray(message.Recs)) return "Recs: array expected"; for (var i = 0; i < message.Recs.length; ++i) { var error = $root.gamehall.GameRec.verify(message.Recs[i]); if (error) return "Recs." + error; } } if (message.Ver != null && message.hasOwnProperty("Ver")) if (!$util.isInteger(message.Ver)) return "Ver: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; return null; }; /** * Creates a SCGetGameRec message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGetGameRec * @static * @param {Object.} object Plain object * @returns {gamehall.SCGetGameRec} SCGetGameRec */ SCGetGameRec.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGetGameRec) return object; var message = new $root.gamehall.SCGetGameRec(); if (object.Recs) { if (!Array.isArray(object.Recs)) throw TypeError(".gamehall.SCGetGameRec.Recs: array expected"); message.Recs = []; for (var i = 0; i < object.Recs.length; ++i) { if (typeof object.Recs[i] !== "object") throw TypeError(".gamehall.SCGetGameRec.Recs: object expected"); message.Recs[i] = $root.gamehall.GameRec.fromObject(object.Recs[i]); } } if (object.Ver != null) message.Ver = object.Ver | 0; if (object.GameId != null) message.GameId = object.GameId | 0; return message; }; /** * Creates a plain object from a SCGetGameRec message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGetGameRec * @static * @param {gamehall.SCGetGameRec} message SCGetGameRec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGetGameRec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Recs = []; if (options.defaults) { object.Ver = 0; object.GameId = 0; } if (message.Recs && message.Recs.length) { object.Recs = []; for (var j = 0; j < message.Recs.length; ++j) object.Recs[j] = $root.gamehall.GameRec.toObject(message.Recs[j], options); } if (message.Ver != null && message.hasOwnProperty("Ver")) object.Ver = message.Ver; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; return object; }; /** * Converts this SCGetGameRec to JSON. * @function toJSON * @memberof gamehall.SCGetGameRec * @instance * @returns {Object.} JSON object */ SCGetGameRec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGetGameRec * @function getTypeUrl * @memberof gamehall.SCGetGameRec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGetGameRec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGetGameRec"; }; return SCGetGameRec; })(); gamehall.CSShareSuc = (function() { /** * Properties of a CSShareSuc. * @memberof gamehall * @interface ICSShareSuc * @property {number|null} [ShareType] CSShareSuc ShareType */ /** * Constructs a new CSShareSuc. * @memberof gamehall * @classdesc Represents a CSShareSuc. * @implements ICSShareSuc * @constructor * @param {gamehall.ICSShareSuc=} [properties] Properties to set */ function CSShareSuc(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSShareSuc ShareType. * @member {number} ShareType * @memberof gamehall.CSShareSuc * @instance */ CSShareSuc.prototype.ShareType = 0; /** * Creates a new CSShareSuc instance using the specified properties. * @function create * @memberof gamehall.CSShareSuc * @static * @param {gamehall.ICSShareSuc=} [properties] Properties to set * @returns {gamehall.CSShareSuc} CSShareSuc instance */ CSShareSuc.create = function create(properties) { return new CSShareSuc(properties); }; /** * Encodes the specified CSShareSuc message. Does not implicitly {@link gamehall.CSShareSuc.verify|verify} messages. * @function encode * @memberof gamehall.CSShareSuc * @static * @param {gamehall.ICSShareSuc} message CSShareSuc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSShareSuc.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShareType != null && Object.hasOwnProperty.call(message, "ShareType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShareType); return writer; }; /** * Encodes the specified CSShareSuc message, length delimited. Does not implicitly {@link gamehall.CSShareSuc.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSShareSuc * @static * @param {gamehall.ICSShareSuc} message CSShareSuc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSShareSuc.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSShareSuc message from the specified reader or buffer. * @function decode * @memberof gamehall.CSShareSuc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSShareSuc} CSShareSuc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSShareSuc.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSShareSuc(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShareType = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSShareSuc message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSShareSuc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSShareSuc} CSShareSuc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSShareSuc.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSShareSuc message. * @function verify * @memberof gamehall.CSShareSuc * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSShareSuc.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShareType != null && message.hasOwnProperty("ShareType")) if (!$util.isInteger(message.ShareType)) return "ShareType: integer expected"; return null; }; /** * Creates a CSShareSuc message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSShareSuc * @static * @param {Object.} object Plain object * @returns {gamehall.CSShareSuc} CSShareSuc */ CSShareSuc.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSShareSuc) return object; var message = new $root.gamehall.CSShareSuc(); if (object.ShareType != null) message.ShareType = object.ShareType | 0; return message; }; /** * Creates a plain object from a CSShareSuc message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSShareSuc * @static * @param {gamehall.CSShareSuc} message CSShareSuc * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSShareSuc.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.ShareType = 0; if (message.ShareType != null && message.hasOwnProperty("ShareType")) object.ShareType = message.ShareType; return object; }; /** * Converts this CSShareSuc to JSON. * @function toJSON * @memberof gamehall.CSShareSuc * @instance * @returns {Object.} JSON object */ CSShareSuc.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSShareSuc * @function getTypeUrl * @memberof gamehall.CSShareSuc * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSShareSuc.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSShareSuc"; }; return CSShareSuc; })(); gamehall.SCShareSuc = (function() { /** * Properties of a SCShareSuc. * @memberof gamehall * @interface ISCShareSuc * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCShareSuc OpRetCode */ /** * Constructs a new SCShareSuc. * @memberof gamehall * @classdesc Represents a SCShareSuc. * @implements ISCShareSuc * @constructor * @param {gamehall.ISCShareSuc=} [properties] Properties to set */ function SCShareSuc(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCShareSuc OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCShareSuc * @instance */ SCShareSuc.prototype.OpRetCode = 0; /** * Creates a new SCShareSuc instance using the specified properties. * @function create * @memberof gamehall.SCShareSuc * @static * @param {gamehall.ISCShareSuc=} [properties] Properties to set * @returns {gamehall.SCShareSuc} SCShareSuc instance */ SCShareSuc.create = function create(properties) { return new SCShareSuc(properties); }; /** * Encodes the specified SCShareSuc message. Does not implicitly {@link gamehall.SCShareSuc.verify|verify} messages. * @function encode * @memberof gamehall.SCShareSuc * @static * @param {gamehall.ISCShareSuc} message SCShareSuc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCShareSuc.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCShareSuc message, length delimited. Does not implicitly {@link gamehall.SCShareSuc.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCShareSuc * @static * @param {gamehall.ISCShareSuc} message SCShareSuc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCShareSuc.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCShareSuc message from the specified reader or buffer. * @function decode * @memberof gamehall.SCShareSuc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCShareSuc} SCShareSuc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCShareSuc.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCShareSuc(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCShareSuc message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCShareSuc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCShareSuc} SCShareSuc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCShareSuc.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCShareSuc message. * @function verify * @memberof gamehall.SCShareSuc * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCShareSuc.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCShareSuc message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCShareSuc * @static * @param {Object.} object Plain object * @returns {gamehall.SCShareSuc} SCShareSuc */ SCShareSuc.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCShareSuc) return object; var message = new $root.gamehall.SCShareSuc(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCShareSuc message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCShareSuc * @static * @param {gamehall.SCShareSuc} message SCShareSuc * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCShareSuc.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCShareSuc to JSON. * @function toJSON * @memberof gamehall.SCShareSuc * @instance * @returns {Object.} JSON object */ SCShareSuc.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCShareSuc * @function getTypeUrl * @memberof gamehall.SCShareSuc * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCShareSuc.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCShareSuc"; }; return SCShareSuc; })(); gamehall.CSForceStart = (function() { /** * Properties of a CSForceStart. * @memberof gamehall * @interface ICSForceStart */ /** * Constructs a new CSForceStart. * @memberof gamehall * @classdesc Represents a CSForceStart. * @implements ICSForceStart * @constructor * @param {gamehall.ICSForceStart=} [properties] Properties to set */ function CSForceStart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSForceStart instance using the specified properties. * @function create * @memberof gamehall.CSForceStart * @static * @param {gamehall.ICSForceStart=} [properties] Properties to set * @returns {gamehall.CSForceStart} CSForceStart instance */ CSForceStart.create = function create(properties) { return new CSForceStart(properties); }; /** * Encodes the specified CSForceStart message. Does not implicitly {@link gamehall.CSForceStart.verify|verify} messages. * @function encode * @memberof gamehall.CSForceStart * @static * @param {gamehall.ICSForceStart} message CSForceStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSForceStart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSForceStart message, length delimited. Does not implicitly {@link gamehall.CSForceStart.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSForceStart * @static * @param {gamehall.ICSForceStart} message CSForceStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSForceStart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSForceStart message from the specified reader or buffer. * @function decode * @memberof gamehall.CSForceStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSForceStart} CSForceStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSForceStart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSForceStart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSForceStart message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSForceStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSForceStart} CSForceStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSForceStart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSForceStart message. * @function verify * @memberof gamehall.CSForceStart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSForceStart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSForceStart message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSForceStart * @static * @param {Object.} object Plain object * @returns {gamehall.CSForceStart} CSForceStart */ CSForceStart.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSForceStart) return object; return new $root.gamehall.CSForceStart(); }; /** * Creates a plain object from a CSForceStart message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSForceStart * @static * @param {gamehall.CSForceStart} message CSForceStart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSForceStart.toObject = function toObject() { return {}; }; /** * Converts this CSForceStart to JSON. * @function toJSON * @memberof gamehall.CSForceStart * @instance * @returns {Object.} JSON object */ CSForceStart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSForceStart * @function getTypeUrl * @memberof gamehall.CSForceStart * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSForceStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSForceStart"; }; return CSForceStart; })(); gamehall.SCForceStart = (function() { /** * Properties of a SCForceStart. * @memberof gamehall * @interface ISCForceStart * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCForceStart OpRetCode */ /** * Constructs a new SCForceStart. * @memberof gamehall * @classdesc Represents a SCForceStart. * @implements ISCForceStart * @constructor * @param {gamehall.ISCForceStart=} [properties] Properties to set */ function SCForceStart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCForceStart OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCForceStart * @instance */ SCForceStart.prototype.OpRetCode = 0; /** * Creates a new SCForceStart instance using the specified properties. * @function create * @memberof gamehall.SCForceStart * @static * @param {gamehall.ISCForceStart=} [properties] Properties to set * @returns {gamehall.SCForceStart} SCForceStart instance */ SCForceStart.create = function create(properties) { return new SCForceStart(properties); }; /** * Encodes the specified SCForceStart message. Does not implicitly {@link gamehall.SCForceStart.verify|verify} messages. * @function encode * @memberof gamehall.SCForceStart * @static * @param {gamehall.ISCForceStart} message SCForceStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCForceStart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCForceStart message, length delimited. Does not implicitly {@link gamehall.SCForceStart.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCForceStart * @static * @param {gamehall.ISCForceStart} message SCForceStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCForceStart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCForceStart message from the specified reader or buffer. * @function decode * @memberof gamehall.SCForceStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCForceStart} SCForceStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCForceStart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCForceStart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCForceStart message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCForceStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCForceStart} SCForceStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCForceStart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCForceStart message. * @function verify * @memberof gamehall.SCForceStart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCForceStart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCForceStart message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCForceStart * @static * @param {Object.} object Plain object * @returns {gamehall.SCForceStart} SCForceStart */ SCForceStart.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCForceStart) return object; var message = new $root.gamehall.SCForceStart(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCForceStart message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCForceStart * @static * @param {gamehall.SCForceStart} message SCForceStart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCForceStart.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCForceStart to JSON. * @function toJSON * @memberof gamehall.SCForceStart * @instance * @returns {Object.} JSON object */ SCForceStart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCForceStart * @function getTypeUrl * @memberof gamehall.SCForceStart * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCForceStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCForceStart"; }; return SCForceStart; })(); gamehall.CSInviteRobot = (function() { /** * Properties of a CSInviteRobot. * @memberof gamehall * @interface ICSInviteRobot * @property {number|null} [GameId] CSInviteRobot GameId * @property {boolean|null} [IsAgent] CSInviteRobot IsAgent */ /** * Constructs a new CSInviteRobot. * @memberof gamehall * @classdesc Represents a CSInviteRobot. * @implements ICSInviteRobot * @constructor * @param {gamehall.ICSInviteRobot=} [properties] Properties to set */ function CSInviteRobot(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSInviteRobot GameId. * @member {number} GameId * @memberof gamehall.CSInviteRobot * @instance */ CSInviteRobot.prototype.GameId = 0; /** * CSInviteRobot IsAgent. * @member {boolean} IsAgent * @memberof gamehall.CSInviteRobot * @instance */ CSInviteRobot.prototype.IsAgent = false; /** * Creates a new CSInviteRobot instance using the specified properties. * @function create * @memberof gamehall.CSInviteRobot * @static * @param {gamehall.ICSInviteRobot=} [properties] Properties to set * @returns {gamehall.CSInviteRobot} CSInviteRobot instance */ CSInviteRobot.create = function create(properties) { return new CSInviteRobot(properties); }; /** * Encodes the specified CSInviteRobot message. Does not implicitly {@link gamehall.CSInviteRobot.verify|verify} messages. * @function encode * @memberof gamehall.CSInviteRobot * @static * @param {gamehall.ICSInviteRobot} message CSInviteRobot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSInviteRobot.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.IsAgent != null && Object.hasOwnProperty.call(message, "IsAgent")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.IsAgent); return writer; }; /** * Encodes the specified CSInviteRobot message, length delimited. Does not implicitly {@link gamehall.CSInviteRobot.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSInviteRobot * @static * @param {gamehall.ICSInviteRobot} message CSInviteRobot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSInviteRobot.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSInviteRobot message from the specified reader or buffer. * @function decode * @memberof gamehall.CSInviteRobot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSInviteRobot} CSInviteRobot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSInviteRobot.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSInviteRobot(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.IsAgent = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSInviteRobot message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSInviteRobot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSInviteRobot} CSInviteRobot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSInviteRobot.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSInviteRobot message. * @function verify * @memberof gamehall.CSInviteRobot * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSInviteRobot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.IsAgent != null && message.hasOwnProperty("IsAgent")) if (typeof message.IsAgent !== "boolean") return "IsAgent: boolean expected"; return null; }; /** * Creates a CSInviteRobot message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSInviteRobot * @static * @param {Object.} object Plain object * @returns {gamehall.CSInviteRobot} CSInviteRobot */ CSInviteRobot.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSInviteRobot) return object; var message = new $root.gamehall.CSInviteRobot(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.IsAgent != null) message.IsAgent = Boolean(object.IsAgent); return message; }; /** * Creates a plain object from a CSInviteRobot message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSInviteRobot * @static * @param {gamehall.CSInviteRobot} message CSInviteRobot * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSInviteRobot.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameId = 0; object.IsAgent = false; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.IsAgent != null && message.hasOwnProperty("IsAgent")) object.IsAgent = message.IsAgent; return object; }; /** * Converts this CSInviteRobot to JSON. * @function toJSON * @memberof gamehall.CSInviteRobot * @instance * @returns {Object.} JSON object */ CSInviteRobot.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSInviteRobot * @function getTypeUrl * @memberof gamehall.CSInviteRobot * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSInviteRobot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSInviteRobot"; }; return CSInviteRobot; })(); gamehall.CSPlayerSwithFlag = (function() { /** * Properties of a CSPlayerSwithFlag. * @memberof gamehall * @interface ICSPlayerSwithFlag * @property {number|null} [Flag] CSPlayerSwithFlag Flag * @property {number|null} [Mark] CSPlayerSwithFlag Mark */ /** * Constructs a new CSPlayerSwithFlag. * @memberof gamehall * @classdesc Represents a CSPlayerSwithFlag. * @implements ICSPlayerSwithFlag * @constructor * @param {gamehall.ICSPlayerSwithFlag=} [properties] Properties to set */ function CSPlayerSwithFlag(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSPlayerSwithFlag Flag. * @member {number} Flag * @memberof gamehall.CSPlayerSwithFlag * @instance */ CSPlayerSwithFlag.prototype.Flag = 0; /** * CSPlayerSwithFlag Mark. * @member {number} Mark * @memberof gamehall.CSPlayerSwithFlag * @instance */ CSPlayerSwithFlag.prototype.Mark = 0; /** * Creates a new CSPlayerSwithFlag instance using the specified properties. * @function create * @memberof gamehall.CSPlayerSwithFlag * @static * @param {gamehall.ICSPlayerSwithFlag=} [properties] Properties to set * @returns {gamehall.CSPlayerSwithFlag} CSPlayerSwithFlag instance */ CSPlayerSwithFlag.create = function create(properties) { return new CSPlayerSwithFlag(properties); }; /** * Encodes the specified CSPlayerSwithFlag message. Does not implicitly {@link gamehall.CSPlayerSwithFlag.verify|verify} messages. * @function encode * @memberof gamehall.CSPlayerSwithFlag * @static * @param {gamehall.ICSPlayerSwithFlag} message CSPlayerSwithFlag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSPlayerSwithFlag.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Flag != null && Object.hasOwnProperty.call(message, "Flag")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Flag); if (message.Mark != null && Object.hasOwnProperty.call(message, "Mark")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Mark); return writer; }; /** * Encodes the specified CSPlayerSwithFlag message, length delimited. Does not implicitly {@link gamehall.CSPlayerSwithFlag.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSPlayerSwithFlag * @static * @param {gamehall.ICSPlayerSwithFlag} message CSPlayerSwithFlag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSPlayerSwithFlag.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSPlayerSwithFlag message from the specified reader or buffer. * @function decode * @memberof gamehall.CSPlayerSwithFlag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSPlayerSwithFlag} CSPlayerSwithFlag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSPlayerSwithFlag.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSPlayerSwithFlag(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Flag = reader.int32(); break; } case 2: { message.Mark = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSPlayerSwithFlag message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSPlayerSwithFlag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSPlayerSwithFlag} CSPlayerSwithFlag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSPlayerSwithFlag.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSPlayerSwithFlag message. * @function verify * @memberof gamehall.CSPlayerSwithFlag * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSPlayerSwithFlag.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Flag != null && message.hasOwnProperty("Flag")) if (!$util.isInteger(message.Flag)) return "Flag: integer expected"; if (message.Mark != null && message.hasOwnProperty("Mark")) if (!$util.isInteger(message.Mark)) return "Mark: integer expected"; return null; }; /** * Creates a CSPlayerSwithFlag message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSPlayerSwithFlag * @static * @param {Object.} object Plain object * @returns {gamehall.CSPlayerSwithFlag} CSPlayerSwithFlag */ CSPlayerSwithFlag.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSPlayerSwithFlag) return object; var message = new $root.gamehall.CSPlayerSwithFlag(); if (object.Flag != null) message.Flag = object.Flag | 0; if (object.Mark != null) message.Mark = object.Mark | 0; return message; }; /** * Creates a plain object from a CSPlayerSwithFlag message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSPlayerSwithFlag * @static * @param {gamehall.CSPlayerSwithFlag} message CSPlayerSwithFlag * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSPlayerSwithFlag.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Flag = 0; object.Mark = 0; } if (message.Flag != null && message.hasOwnProperty("Flag")) object.Flag = message.Flag; if (message.Mark != null && message.hasOwnProperty("Mark")) object.Mark = message.Mark; return object; }; /** * Converts this CSPlayerSwithFlag to JSON. * @function toJSON * @memberof gamehall.CSPlayerSwithFlag * @instance * @returns {Object.} JSON object */ CSPlayerSwithFlag.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSPlayerSwithFlag * @function getTypeUrl * @memberof gamehall.CSPlayerSwithFlag * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSPlayerSwithFlag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSPlayerSwithFlag"; }; return CSPlayerSwithFlag; })(); gamehall.CSShopBuy = (function() { /** * Properties of a CSShopBuy. * @memberof gamehall * @interface ICSShopBuy * @property {number|null} [Id] CSShopBuy Id * @property {number|null} [Count] CSShopBuy Count */ /** * Constructs a new CSShopBuy. * @memberof gamehall * @classdesc Represents a CSShopBuy. * @implements ICSShopBuy * @constructor * @param {gamehall.ICSShopBuy=} [properties] Properties to set */ function CSShopBuy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSShopBuy Id. * @member {number} Id * @memberof gamehall.CSShopBuy * @instance */ CSShopBuy.prototype.Id = 0; /** * CSShopBuy Count. * @member {number} Count * @memberof gamehall.CSShopBuy * @instance */ CSShopBuy.prototype.Count = 0; /** * Creates a new CSShopBuy instance using the specified properties. * @function create * @memberof gamehall.CSShopBuy * @static * @param {gamehall.ICSShopBuy=} [properties] Properties to set * @returns {gamehall.CSShopBuy} CSShopBuy instance */ CSShopBuy.create = function create(properties) { return new CSShopBuy(properties); }; /** * Encodes the specified CSShopBuy message. Does not implicitly {@link gamehall.CSShopBuy.verify|verify} messages. * @function encode * @memberof gamehall.CSShopBuy * @static * @param {gamehall.ICSShopBuy} message CSShopBuy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSShopBuy.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).int32(message.Id); if (message.Count != null && Object.hasOwnProperty.call(message, "Count")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Count); return writer; }; /** * Encodes the specified CSShopBuy message, length delimited. Does not implicitly {@link gamehall.CSShopBuy.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSShopBuy * @static * @param {gamehall.ICSShopBuy} message CSShopBuy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSShopBuy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSShopBuy message from the specified reader or buffer. * @function decode * @memberof gamehall.CSShopBuy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSShopBuy} CSShopBuy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSShopBuy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSShopBuy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.Count = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSShopBuy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSShopBuy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSShopBuy} CSShopBuy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSShopBuy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSShopBuy message. * @function verify * @memberof gamehall.CSShopBuy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSShopBuy.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)) return "Id: integer expected"; if (message.Count != null && message.hasOwnProperty("Count")) if (!$util.isInteger(message.Count)) return "Count: integer expected"; return null; }; /** * Creates a CSShopBuy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSShopBuy * @static * @param {Object.} object Plain object * @returns {gamehall.CSShopBuy} CSShopBuy */ CSShopBuy.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSShopBuy) return object; var message = new $root.gamehall.CSShopBuy(); if (object.Id != null) message.Id = object.Id | 0; if (object.Count != null) message.Count = object.Count | 0; return message; }; /** * Creates a plain object from a CSShopBuy message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSShopBuy * @static * @param {gamehall.CSShopBuy} message CSShopBuy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSShopBuy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Id = 0; object.Count = 0; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.Count != null && message.hasOwnProperty("Count")) object.Count = message.Count; return object; }; /** * Converts this CSShopBuy to JSON. * @function toJSON * @memberof gamehall.CSShopBuy * @instance * @returns {Object.} JSON object */ CSShopBuy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSShopBuy * @function getTypeUrl * @memberof gamehall.CSShopBuy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSShopBuy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSShopBuy"; }; return CSShopBuy; })(); gamehall.SCShopBuy = (function() { /** * Properties of a SCShopBuy. * @memberof gamehall * @interface ISCShopBuy * @property {number|null} [Id] SCShopBuy Id * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCShopBuy OpRetCode * @property {number|null} [CostType] SCShopBuy CostType * @property {number|null} [CostNum] SCShopBuy CostNum * @property {number|null} [GainType] SCShopBuy GainType * @property {number|null} [GainNum] SCShopBuy GainNum */ /** * Constructs a new SCShopBuy. * @memberof gamehall * @classdesc Represents a SCShopBuy. * @implements ISCShopBuy * @constructor * @param {gamehall.ISCShopBuy=} [properties] Properties to set */ function SCShopBuy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCShopBuy Id. * @member {number} Id * @memberof gamehall.SCShopBuy * @instance */ SCShopBuy.prototype.Id = 0; /** * SCShopBuy OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCShopBuy * @instance */ SCShopBuy.prototype.OpRetCode = 0; /** * SCShopBuy CostType. * @member {number} CostType * @memberof gamehall.SCShopBuy * @instance */ SCShopBuy.prototype.CostType = 0; /** * SCShopBuy CostNum. * @member {number} CostNum * @memberof gamehall.SCShopBuy * @instance */ SCShopBuy.prototype.CostNum = 0; /** * SCShopBuy GainType. * @member {number} GainType * @memberof gamehall.SCShopBuy * @instance */ SCShopBuy.prototype.GainType = 0; /** * SCShopBuy GainNum. * @member {number} GainNum * @memberof gamehall.SCShopBuy * @instance */ SCShopBuy.prototype.GainNum = 0; /** * Creates a new SCShopBuy instance using the specified properties. * @function create * @memberof gamehall.SCShopBuy * @static * @param {gamehall.ISCShopBuy=} [properties] Properties to set * @returns {gamehall.SCShopBuy} SCShopBuy instance */ SCShopBuy.create = function create(properties) { return new SCShopBuy(properties); }; /** * Encodes the specified SCShopBuy message. Does not implicitly {@link gamehall.SCShopBuy.verify|verify} messages. * @function encode * @memberof gamehall.SCShopBuy * @static * @param {gamehall.ISCShopBuy} message SCShopBuy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCShopBuy.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).int32(message.Id); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpRetCode); if (message.CostType != null && Object.hasOwnProperty.call(message, "CostType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.CostType); if (message.CostNum != null && Object.hasOwnProperty.call(message, "CostNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.CostNum); if (message.GainType != null && Object.hasOwnProperty.call(message, "GainType")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.GainType); if (message.GainNum != null && Object.hasOwnProperty.call(message, "GainNum")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.GainNum); return writer; }; /** * Encodes the specified SCShopBuy message, length delimited. Does not implicitly {@link gamehall.SCShopBuy.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCShopBuy * @static * @param {gamehall.ISCShopBuy} message SCShopBuy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCShopBuy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCShopBuy message from the specified reader or buffer. * @function decode * @memberof gamehall.SCShopBuy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCShopBuy} SCShopBuy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCShopBuy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCShopBuy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.OpRetCode = reader.int32(); break; } case 3: { message.CostType = reader.int32(); break; } case 4: { message.CostNum = reader.int32(); break; } case 5: { message.GainType = reader.int32(); break; } case 6: { message.GainNum = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCShopBuy message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCShopBuy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCShopBuy} SCShopBuy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCShopBuy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCShopBuy message. * @function verify * @memberof gamehall.SCShopBuy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCShopBuy.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)) return "Id: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.CostType != null && message.hasOwnProperty("CostType")) if (!$util.isInteger(message.CostType)) return "CostType: integer expected"; if (message.CostNum != null && message.hasOwnProperty("CostNum")) if (!$util.isInteger(message.CostNum)) return "CostNum: integer expected"; if (message.GainType != null && message.hasOwnProperty("GainType")) if (!$util.isInteger(message.GainType)) return "GainType: integer expected"; if (message.GainNum != null && message.hasOwnProperty("GainNum")) if (!$util.isInteger(message.GainNum)) return "GainNum: integer expected"; return null; }; /** * Creates a SCShopBuy message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCShopBuy * @static * @param {Object.} object Plain object * @returns {gamehall.SCShopBuy} SCShopBuy */ SCShopBuy.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCShopBuy) return object; var message = new $root.gamehall.SCShopBuy(); if (object.Id != null) message.Id = object.Id | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.CostType != null) message.CostType = object.CostType | 0; if (object.CostNum != null) message.CostNum = object.CostNum | 0; if (object.GainType != null) message.GainType = object.GainType | 0; if (object.GainNum != null) message.GainNum = object.GainNum | 0; return message; }; /** * Creates a plain object from a SCShopBuy message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCShopBuy * @static * @param {gamehall.SCShopBuy} message SCShopBuy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCShopBuy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Id = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.CostType = 0; object.CostNum = 0; object.GainType = 0; object.GainNum = 0; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.CostType != null && message.hasOwnProperty("CostType")) object.CostType = message.CostType; if (message.CostNum != null && message.hasOwnProperty("CostNum")) object.CostNum = message.CostNum; if (message.GainType != null && message.hasOwnProperty("GainType")) object.GainType = message.GainType; if (message.GainNum != null && message.hasOwnProperty("GainNum")) object.GainNum = message.GainNum; return object; }; /** * Converts this SCShopBuy to JSON. * @function toJSON * @memberof gamehall.SCShopBuy * @instance * @returns {Object.} JSON object */ SCShopBuy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCShopBuy * @function getTypeUrl * @memberof gamehall.SCShopBuy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCShopBuy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCShopBuy"; }; return SCShopBuy; })(); gamehall.CSJoinGame = (function() { /** * Properties of a CSJoinGame. * @memberof gamehall * @interface ICSJoinGame * @property {number|null} [MsgType] CSJoinGame MsgType * @property {number|null} [SnId] CSJoinGame SnId * @property {number|null} [Pos] CSJoinGame Pos * @property {boolean|null} [Agree] CSJoinGame Agree */ /** * Constructs a new CSJoinGame. * @memberof gamehall * @classdesc Represents a CSJoinGame. * @implements ICSJoinGame * @constructor * @param {gamehall.ICSJoinGame=} [properties] Properties to set */ function CSJoinGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSJoinGame MsgType. * @member {number} MsgType * @memberof gamehall.CSJoinGame * @instance */ CSJoinGame.prototype.MsgType = 0; /** * CSJoinGame SnId. * @member {number} SnId * @memberof gamehall.CSJoinGame * @instance */ CSJoinGame.prototype.SnId = 0; /** * CSJoinGame Pos. * @member {number} Pos * @memberof gamehall.CSJoinGame * @instance */ CSJoinGame.prototype.Pos = 0; /** * CSJoinGame Agree. * @member {boolean} Agree * @memberof gamehall.CSJoinGame * @instance */ CSJoinGame.prototype.Agree = false; /** * Creates a new CSJoinGame instance using the specified properties. * @function create * @memberof gamehall.CSJoinGame * @static * @param {gamehall.ICSJoinGame=} [properties] Properties to set * @returns {gamehall.CSJoinGame} CSJoinGame instance */ CSJoinGame.create = function create(properties) { return new CSJoinGame(properties); }; /** * Encodes the specified CSJoinGame message. Does not implicitly {@link gamehall.CSJoinGame.verify|verify} messages. * @function encode * @memberof gamehall.CSJoinGame * @static * @param {gamehall.ICSJoinGame} message CSJoinGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSJoinGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.MsgType != null && Object.hasOwnProperty.call(message, "MsgType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.MsgType); if (message.SnId != null && Object.hasOwnProperty.call(message, "SnId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.SnId); if (message.Pos != null && Object.hasOwnProperty.call(message, "Pos")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Pos); if (message.Agree != null && Object.hasOwnProperty.call(message, "Agree")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.Agree); return writer; }; /** * Encodes the specified CSJoinGame message, length delimited. Does not implicitly {@link gamehall.CSJoinGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSJoinGame * @static * @param {gamehall.ICSJoinGame} message CSJoinGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSJoinGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSJoinGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSJoinGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSJoinGame} CSJoinGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSJoinGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSJoinGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.MsgType = reader.int32(); break; } case 2: { message.SnId = reader.int32(); break; } case 3: { message.Pos = reader.int32(); break; } case 4: { message.Agree = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSJoinGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSJoinGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSJoinGame} CSJoinGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSJoinGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSJoinGame message. * @function verify * @memberof gamehall.CSJoinGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSJoinGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.MsgType != null && message.hasOwnProperty("MsgType")) if (!$util.isInteger(message.MsgType)) return "MsgType: integer expected"; if (message.SnId != null && message.hasOwnProperty("SnId")) if (!$util.isInteger(message.SnId)) return "SnId: integer expected"; if (message.Pos != null && message.hasOwnProperty("Pos")) if (!$util.isInteger(message.Pos)) return "Pos: integer expected"; if (message.Agree != null && message.hasOwnProperty("Agree")) if (typeof message.Agree !== "boolean") return "Agree: boolean expected"; return null; }; /** * Creates a CSJoinGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSJoinGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSJoinGame} CSJoinGame */ CSJoinGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSJoinGame) return object; var message = new $root.gamehall.CSJoinGame(); if (object.MsgType != null) message.MsgType = object.MsgType | 0; if (object.SnId != null) message.SnId = object.SnId | 0; if (object.Pos != null) message.Pos = object.Pos | 0; if (object.Agree != null) message.Agree = Boolean(object.Agree); return message; }; /** * Creates a plain object from a CSJoinGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSJoinGame * @static * @param {gamehall.CSJoinGame} message CSJoinGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSJoinGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.MsgType = 0; object.SnId = 0; object.Pos = 0; object.Agree = false; } if (message.MsgType != null && message.hasOwnProperty("MsgType")) object.MsgType = message.MsgType; if (message.SnId != null && message.hasOwnProperty("SnId")) object.SnId = message.SnId; if (message.Pos != null && message.hasOwnProperty("Pos")) object.Pos = message.Pos; if (message.Agree != null && message.hasOwnProperty("Agree")) object.Agree = message.Agree; return object; }; /** * Converts this CSJoinGame to JSON. * @function toJSON * @memberof gamehall.CSJoinGame * @instance * @returns {Object.} JSON object */ CSJoinGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSJoinGame * @function getTypeUrl * @memberof gamehall.CSJoinGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSJoinGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSJoinGame"; }; return CSJoinGame; })(); gamehall.SCJoinGame = (function() { /** * Properties of a SCJoinGame. * @memberof gamehall * @interface ISCJoinGame * @property {number|null} [MsgType] SCJoinGame MsgType * @property {string|null} [Name] SCJoinGame Name * @property {number|null} [SnId] SCJoinGame SnId * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCJoinGame OpRetCode */ /** * Constructs a new SCJoinGame. * @memberof gamehall * @classdesc Represents a SCJoinGame. * @implements ISCJoinGame * @constructor * @param {gamehall.ISCJoinGame=} [properties] Properties to set */ function SCJoinGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCJoinGame MsgType. * @member {number} MsgType * @memberof gamehall.SCJoinGame * @instance */ SCJoinGame.prototype.MsgType = 0; /** * SCJoinGame Name. * @member {string} Name * @memberof gamehall.SCJoinGame * @instance */ SCJoinGame.prototype.Name = ""; /** * SCJoinGame SnId. * @member {number} SnId * @memberof gamehall.SCJoinGame * @instance */ SCJoinGame.prototype.SnId = 0; /** * SCJoinGame OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCJoinGame * @instance */ SCJoinGame.prototype.OpRetCode = 0; /** * Creates a new SCJoinGame instance using the specified properties. * @function create * @memberof gamehall.SCJoinGame * @static * @param {gamehall.ISCJoinGame=} [properties] Properties to set * @returns {gamehall.SCJoinGame} SCJoinGame instance */ SCJoinGame.create = function create(properties) { return new SCJoinGame(properties); }; /** * Encodes the specified SCJoinGame message. Does not implicitly {@link gamehall.SCJoinGame.verify|verify} messages. * @function encode * @memberof gamehall.SCJoinGame * @static * @param {gamehall.ISCJoinGame} message SCJoinGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCJoinGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.MsgType != null && Object.hasOwnProperty.call(message, "MsgType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.MsgType); if (message.Name != null && Object.hasOwnProperty.call(message, "Name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.Name); if (message.SnId != null && Object.hasOwnProperty.call(message, "SnId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.SnId); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCJoinGame message, length delimited. Does not implicitly {@link gamehall.SCJoinGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCJoinGame * @static * @param {gamehall.ISCJoinGame} message SCJoinGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCJoinGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCJoinGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCJoinGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCJoinGame} SCJoinGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCJoinGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCJoinGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.MsgType = reader.int32(); break; } case 2: { message.Name = reader.string(); break; } case 3: { message.SnId = reader.int32(); break; } case 4: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCJoinGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCJoinGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCJoinGame} SCJoinGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCJoinGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCJoinGame message. * @function verify * @memberof gamehall.SCJoinGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCJoinGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.MsgType != null && message.hasOwnProperty("MsgType")) if (!$util.isInteger(message.MsgType)) return "MsgType: integer expected"; if (message.Name != null && message.hasOwnProperty("Name")) if (!$util.isString(message.Name)) return "Name: string expected"; if (message.SnId != null && message.hasOwnProperty("SnId")) if (!$util.isInteger(message.SnId)) return "SnId: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCJoinGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCJoinGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCJoinGame} SCJoinGame */ SCJoinGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCJoinGame) return object; var message = new $root.gamehall.SCJoinGame(); if (object.MsgType != null) message.MsgType = object.MsgType | 0; if (object.Name != null) message.Name = String(object.Name); if (object.SnId != null) message.SnId = object.SnId | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCJoinGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCJoinGame * @static * @param {gamehall.SCJoinGame} message SCJoinGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCJoinGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.MsgType = 0; object.Name = ""; object.SnId = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; } if (message.MsgType != null && message.hasOwnProperty("MsgType")) object.MsgType = message.MsgType; if (message.Name != null && message.hasOwnProperty("Name")) object.Name = message.Name; if (message.SnId != null && message.hasOwnProperty("SnId")) object.SnId = message.SnId; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCJoinGame to JSON. * @function toJSON * @memberof gamehall.SCJoinGame * @instance * @returns {Object.} JSON object */ SCJoinGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCJoinGame * @function getTypeUrl * @memberof gamehall.SCJoinGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCJoinGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCJoinGame"; }; return SCJoinGame; })(); gamehall.CSEnterDgGame = (function() { /** * Properties of a CSEnterDgGame. * @memberof gamehall * @interface ICSEnterDgGame * @property {number|null} [LoginType] CSEnterDgGame LoginType * @property {number|null} [DgGameId] CSEnterDgGame DgGameId * @property {string|null} [Domains] CSEnterDgGame Domains */ /** * Constructs a new CSEnterDgGame. * @memberof gamehall * @classdesc Represents a CSEnterDgGame. * @implements ICSEnterDgGame * @constructor * @param {gamehall.ICSEnterDgGame=} [properties] Properties to set */ function CSEnterDgGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSEnterDgGame LoginType. * @member {number} LoginType * @memberof gamehall.CSEnterDgGame * @instance */ CSEnterDgGame.prototype.LoginType = 0; /** * CSEnterDgGame DgGameId. * @member {number} DgGameId * @memberof gamehall.CSEnterDgGame * @instance */ CSEnterDgGame.prototype.DgGameId = 0; /** * CSEnterDgGame Domains. * @member {string} Domains * @memberof gamehall.CSEnterDgGame * @instance */ CSEnterDgGame.prototype.Domains = ""; /** * Creates a new CSEnterDgGame instance using the specified properties. * @function create * @memberof gamehall.CSEnterDgGame * @static * @param {gamehall.ICSEnterDgGame=} [properties] Properties to set * @returns {gamehall.CSEnterDgGame} CSEnterDgGame instance */ CSEnterDgGame.create = function create(properties) { return new CSEnterDgGame(properties); }; /** * Encodes the specified CSEnterDgGame message. Does not implicitly {@link gamehall.CSEnterDgGame.verify|verify} messages. * @function encode * @memberof gamehall.CSEnterDgGame * @static * @param {gamehall.ICSEnterDgGame} message CSEnterDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterDgGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.LoginType != null && Object.hasOwnProperty.call(message, "LoginType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.LoginType); if (message.DgGameId != null && Object.hasOwnProperty.call(message, "DgGameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.DgGameId); if (message.Domains != null && Object.hasOwnProperty.call(message, "Domains")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Domains); return writer; }; /** * Encodes the specified CSEnterDgGame message, length delimited. Does not implicitly {@link gamehall.CSEnterDgGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSEnterDgGame * @static * @param {gamehall.ICSEnterDgGame} message CSEnterDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterDgGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSEnterDgGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSEnterDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSEnterDgGame} CSEnterDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterDgGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSEnterDgGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.LoginType = reader.int32(); break; } case 2: { message.DgGameId = reader.int32(); break; } case 3: { message.Domains = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSEnterDgGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSEnterDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSEnterDgGame} CSEnterDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterDgGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSEnterDgGame message. * @function verify * @memberof gamehall.CSEnterDgGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSEnterDgGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.LoginType != null && message.hasOwnProperty("LoginType")) if (!$util.isInteger(message.LoginType)) return "LoginType: integer expected"; if (message.DgGameId != null && message.hasOwnProperty("DgGameId")) if (!$util.isInteger(message.DgGameId)) return "DgGameId: integer expected"; if (message.Domains != null && message.hasOwnProperty("Domains")) if (!$util.isString(message.Domains)) return "Domains: string expected"; return null; }; /** * Creates a CSEnterDgGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSEnterDgGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSEnterDgGame} CSEnterDgGame */ CSEnterDgGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSEnterDgGame) return object; var message = new $root.gamehall.CSEnterDgGame(); if (object.LoginType != null) message.LoginType = object.LoginType | 0; if (object.DgGameId != null) message.DgGameId = object.DgGameId | 0; if (object.Domains != null) message.Domains = String(object.Domains); return message; }; /** * Creates a plain object from a CSEnterDgGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSEnterDgGame * @static * @param {gamehall.CSEnterDgGame} message CSEnterDgGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSEnterDgGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.LoginType = 0; object.DgGameId = 0; object.Domains = ""; } if (message.LoginType != null && message.hasOwnProperty("LoginType")) object.LoginType = message.LoginType; if (message.DgGameId != null && message.hasOwnProperty("DgGameId")) object.DgGameId = message.DgGameId; if (message.Domains != null && message.hasOwnProperty("Domains")) object.Domains = message.Domains; return object; }; /** * Converts this CSEnterDgGame to JSON. * @function toJSON * @memberof gamehall.CSEnterDgGame * @instance * @returns {Object.} JSON object */ CSEnterDgGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSEnterDgGame * @function getTypeUrl * @memberof gamehall.CSEnterDgGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSEnterDgGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSEnterDgGame"; }; return CSEnterDgGame; })(); gamehall.SCEnterDgGame = (function() { /** * Properties of a SCEnterDgGame. * @memberof gamehall * @interface ISCEnterDgGame * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCEnterDgGame OpRetCode * @property {string|null} [LoginUrl] SCEnterDgGame LoginUrl * @property {string|null} [Token] SCEnterDgGame Token * @property {number|null} [DgGameId] SCEnterDgGame DgGameId * @property {number|null} [CodeId] SCEnterDgGame CodeId * @property {string|null} [Domains] SCEnterDgGame Domains * @property {Array.|null} [List] SCEnterDgGame List */ /** * Constructs a new SCEnterDgGame. * @memberof gamehall * @classdesc Represents a SCEnterDgGame. * @implements ISCEnterDgGame * @constructor * @param {gamehall.ISCEnterDgGame=} [properties] Properties to set */ function SCEnterDgGame(properties) { this.List = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCEnterDgGame OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.OpRetCode = 0; /** * SCEnterDgGame LoginUrl. * @member {string} LoginUrl * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.LoginUrl = ""; /** * SCEnterDgGame Token. * @member {string} Token * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.Token = ""; /** * SCEnterDgGame DgGameId. * @member {number} DgGameId * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.DgGameId = 0; /** * SCEnterDgGame CodeId. * @member {number} CodeId * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.CodeId = 0; /** * SCEnterDgGame Domains. * @member {string} Domains * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.Domains = ""; /** * SCEnterDgGame List. * @member {Array.} List * @memberof gamehall.SCEnterDgGame * @instance */ SCEnterDgGame.prototype.List = $util.emptyArray; /** * Creates a new SCEnterDgGame instance using the specified properties. * @function create * @memberof gamehall.SCEnterDgGame * @static * @param {gamehall.ISCEnterDgGame=} [properties] Properties to set * @returns {gamehall.SCEnterDgGame} SCEnterDgGame instance */ SCEnterDgGame.create = function create(properties) { return new SCEnterDgGame(properties); }; /** * Encodes the specified SCEnterDgGame message. Does not implicitly {@link gamehall.SCEnterDgGame.verify|verify} messages. * @function encode * @memberof gamehall.SCEnterDgGame * @static * @param {gamehall.ISCEnterDgGame} message SCEnterDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterDgGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.LoginUrl != null && Object.hasOwnProperty.call(message, "LoginUrl")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.LoginUrl); if (message.Token != null && Object.hasOwnProperty.call(message, "Token")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Token); if (message.DgGameId != null && Object.hasOwnProperty.call(message, "DgGameId")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.DgGameId); if (message.CodeId != null && Object.hasOwnProperty.call(message, "CodeId")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.CodeId); if (message.Domains != null && Object.hasOwnProperty.call(message, "Domains")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.Domains); if (message.List != null && message.List.length) for (var i = 0; i < message.List.length; ++i) writer.uint32(/* id 7, wireType 2 =*/58).string(message.List[i]); return writer; }; /** * Encodes the specified SCEnterDgGame message, length delimited. Does not implicitly {@link gamehall.SCEnterDgGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCEnterDgGame * @static * @param {gamehall.ISCEnterDgGame} message SCEnterDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterDgGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCEnterDgGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCEnterDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCEnterDgGame} SCEnterDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterDgGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCEnterDgGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.LoginUrl = reader.string(); break; } case 3: { message.Token = reader.string(); break; } case 4: { message.DgGameId = reader.int32(); break; } case 5: { message.CodeId = reader.int32(); break; } case 6: { message.Domains = reader.string(); break; } case 7: { if (!(message.List && message.List.length)) message.List = []; message.List.push(reader.string()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCEnterDgGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCEnterDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCEnterDgGame} SCEnterDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterDgGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCEnterDgGame message. * @function verify * @memberof gamehall.SCEnterDgGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCEnterDgGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.LoginUrl != null && message.hasOwnProperty("LoginUrl")) if (!$util.isString(message.LoginUrl)) return "LoginUrl: string expected"; if (message.Token != null && message.hasOwnProperty("Token")) if (!$util.isString(message.Token)) return "Token: string expected"; if (message.DgGameId != null && message.hasOwnProperty("DgGameId")) if (!$util.isInteger(message.DgGameId)) return "DgGameId: integer expected"; if (message.CodeId != null && message.hasOwnProperty("CodeId")) if (!$util.isInteger(message.CodeId)) return "CodeId: integer expected"; if (message.Domains != null && message.hasOwnProperty("Domains")) if (!$util.isString(message.Domains)) return "Domains: string expected"; if (message.List != null && message.hasOwnProperty("List")) { if (!Array.isArray(message.List)) return "List: array expected"; for (var i = 0; i < message.List.length; ++i) if (!$util.isString(message.List[i])) return "List: string[] expected"; } return null; }; /** * Creates a SCEnterDgGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCEnterDgGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCEnterDgGame} SCEnterDgGame */ SCEnterDgGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCEnterDgGame) return object; var message = new $root.gamehall.SCEnterDgGame(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.LoginUrl != null) message.LoginUrl = String(object.LoginUrl); if (object.Token != null) message.Token = String(object.Token); if (object.DgGameId != null) message.DgGameId = object.DgGameId | 0; if (object.CodeId != null) message.CodeId = object.CodeId | 0; if (object.Domains != null) message.Domains = String(object.Domains); if (object.List) { if (!Array.isArray(object.List)) throw TypeError(".gamehall.SCEnterDgGame.List: array expected"); message.List = []; for (var i = 0; i < object.List.length; ++i) message.List[i] = String(object.List[i]); } return message; }; /** * Creates a plain object from a SCEnterDgGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCEnterDgGame * @static * @param {gamehall.SCEnterDgGame} message SCEnterDgGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCEnterDgGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.List = []; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.LoginUrl = ""; object.Token = ""; object.DgGameId = 0; object.CodeId = 0; object.Domains = ""; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.LoginUrl != null && message.hasOwnProperty("LoginUrl")) object.LoginUrl = message.LoginUrl; if (message.Token != null && message.hasOwnProperty("Token")) object.Token = message.Token; if (message.DgGameId != null && message.hasOwnProperty("DgGameId")) object.DgGameId = message.DgGameId; if (message.CodeId != null && message.hasOwnProperty("CodeId")) object.CodeId = message.CodeId; if (message.Domains != null && message.hasOwnProperty("Domains")) object.Domains = message.Domains; if (message.List && message.List.length) { object.List = []; for (var j = 0; j < message.List.length; ++j) object.List[j] = message.List[j]; } return object; }; /** * Converts this SCEnterDgGame to JSON. * @function toJSON * @memberof gamehall.SCEnterDgGame * @instance * @returns {Object.} JSON object */ SCEnterDgGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCEnterDgGame * @function getTypeUrl * @memberof gamehall.SCEnterDgGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCEnterDgGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCEnterDgGame"; }; return SCEnterDgGame; })(); gamehall.CSLeaveDgGame = (function() { /** * Properties of a CSLeaveDgGame. * @memberof gamehall * @interface ICSLeaveDgGame */ /** * Constructs a new CSLeaveDgGame. * @memberof gamehall * @classdesc Represents a CSLeaveDgGame. * @implements ICSLeaveDgGame * @constructor * @param {gamehall.ICSLeaveDgGame=} [properties] Properties to set */ function CSLeaveDgGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSLeaveDgGame instance using the specified properties. * @function create * @memberof gamehall.CSLeaveDgGame * @static * @param {gamehall.ICSLeaveDgGame=} [properties] Properties to set * @returns {gamehall.CSLeaveDgGame} CSLeaveDgGame instance */ CSLeaveDgGame.create = function create(properties) { return new CSLeaveDgGame(properties); }; /** * Encodes the specified CSLeaveDgGame message. Does not implicitly {@link gamehall.CSLeaveDgGame.verify|verify} messages. * @function encode * @memberof gamehall.CSLeaveDgGame * @static * @param {gamehall.ICSLeaveDgGame} message CSLeaveDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveDgGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSLeaveDgGame message, length delimited. Does not implicitly {@link gamehall.CSLeaveDgGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSLeaveDgGame * @static * @param {gamehall.ICSLeaveDgGame} message CSLeaveDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveDgGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLeaveDgGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSLeaveDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSLeaveDgGame} CSLeaveDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveDgGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSLeaveDgGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLeaveDgGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSLeaveDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSLeaveDgGame} CSLeaveDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveDgGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLeaveDgGame message. * @function verify * @memberof gamehall.CSLeaveDgGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLeaveDgGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSLeaveDgGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSLeaveDgGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSLeaveDgGame} CSLeaveDgGame */ CSLeaveDgGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSLeaveDgGame) return object; return new $root.gamehall.CSLeaveDgGame(); }; /** * Creates a plain object from a CSLeaveDgGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSLeaveDgGame * @static * @param {gamehall.CSLeaveDgGame} message CSLeaveDgGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLeaveDgGame.toObject = function toObject() { return {}; }; /** * Converts this CSLeaveDgGame to JSON. * @function toJSON * @memberof gamehall.CSLeaveDgGame * @instance * @returns {Object.} JSON object */ CSLeaveDgGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLeaveDgGame * @function getTypeUrl * @memberof gamehall.CSLeaveDgGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLeaveDgGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSLeaveDgGame"; }; return CSLeaveDgGame; })(); gamehall.SCLeaveDgGame = (function() { /** * Properties of a SCLeaveDgGame. * @memberof gamehall * @interface ISCLeaveDgGame * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCLeaveDgGame OpRetCode */ /** * Constructs a new SCLeaveDgGame. * @memberof gamehall * @classdesc Represents a SCLeaveDgGame. * @implements ISCLeaveDgGame * @constructor * @param {gamehall.ISCLeaveDgGame=} [properties] Properties to set */ function SCLeaveDgGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLeaveDgGame OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCLeaveDgGame * @instance */ SCLeaveDgGame.prototype.OpRetCode = 0; /** * Creates a new SCLeaveDgGame instance using the specified properties. * @function create * @memberof gamehall.SCLeaveDgGame * @static * @param {gamehall.ISCLeaveDgGame=} [properties] Properties to set * @returns {gamehall.SCLeaveDgGame} SCLeaveDgGame instance */ SCLeaveDgGame.create = function create(properties) { return new SCLeaveDgGame(properties); }; /** * Encodes the specified SCLeaveDgGame message. Does not implicitly {@link gamehall.SCLeaveDgGame.verify|verify} messages. * @function encode * @memberof gamehall.SCLeaveDgGame * @static * @param {gamehall.ISCLeaveDgGame} message SCLeaveDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveDgGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCLeaveDgGame message, length delimited. Does not implicitly {@link gamehall.SCLeaveDgGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLeaveDgGame * @static * @param {gamehall.ISCLeaveDgGame} message SCLeaveDgGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveDgGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLeaveDgGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLeaveDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLeaveDgGame} SCLeaveDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveDgGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLeaveDgGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLeaveDgGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLeaveDgGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLeaveDgGame} SCLeaveDgGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveDgGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLeaveDgGame message. * @function verify * @memberof gamehall.SCLeaveDgGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLeaveDgGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCLeaveDgGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLeaveDgGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCLeaveDgGame} SCLeaveDgGame */ SCLeaveDgGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLeaveDgGame) return object; var message = new $root.gamehall.SCLeaveDgGame(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCLeaveDgGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLeaveDgGame * @static * @param {gamehall.SCLeaveDgGame} message SCLeaveDgGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLeaveDgGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCLeaveDgGame to JSON. * @function toJSON * @memberof gamehall.SCLeaveDgGame * @instance * @returns {Object.} JSON object */ SCLeaveDgGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLeaveDgGame * @function getTypeUrl * @memberof gamehall.SCLeaveDgGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLeaveDgGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLeaveDgGame"; }; return SCLeaveDgGame; })(); gamehall.CSThridAccountStatistic = (function() { /** * Properties of a CSThridAccountStatistic. * @memberof gamehall * @interface ICSThridAccountStatistic * @property {number|null} [ReqId] CSThridAccountStatistic ReqId */ /** * Constructs a new CSThridAccountStatistic. * @memberof gamehall * @classdesc Represents a CSThridAccountStatistic. * @implements ICSThridAccountStatistic * @constructor * @param {gamehall.ICSThridAccountStatistic=} [properties] Properties to set */ function CSThridAccountStatistic(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSThridAccountStatistic ReqId. * @member {number} ReqId * @memberof gamehall.CSThridAccountStatistic * @instance */ CSThridAccountStatistic.prototype.ReqId = 0; /** * Creates a new CSThridAccountStatistic instance using the specified properties. * @function create * @memberof gamehall.CSThridAccountStatistic * @static * @param {gamehall.ICSThridAccountStatistic=} [properties] Properties to set * @returns {gamehall.CSThridAccountStatistic} CSThridAccountStatistic instance */ CSThridAccountStatistic.create = function create(properties) { return new CSThridAccountStatistic(properties); }; /** * Encodes the specified CSThridAccountStatistic message. Does not implicitly {@link gamehall.CSThridAccountStatistic.verify|verify} messages. * @function encode * @memberof gamehall.CSThridAccountStatistic * @static * @param {gamehall.ICSThridAccountStatistic} message CSThridAccountStatistic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridAccountStatistic.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ReqId != null && Object.hasOwnProperty.call(message, "ReqId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ReqId); return writer; }; /** * Encodes the specified CSThridAccountStatistic message, length delimited. Does not implicitly {@link gamehall.CSThridAccountStatistic.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSThridAccountStatistic * @static * @param {gamehall.ICSThridAccountStatistic} message CSThridAccountStatistic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridAccountStatistic.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSThridAccountStatistic message from the specified reader or buffer. * @function decode * @memberof gamehall.CSThridAccountStatistic * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSThridAccountStatistic} CSThridAccountStatistic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridAccountStatistic.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSThridAccountStatistic(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ReqId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSThridAccountStatistic message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSThridAccountStatistic * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSThridAccountStatistic} CSThridAccountStatistic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridAccountStatistic.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSThridAccountStatistic message. * @function verify * @memberof gamehall.CSThridAccountStatistic * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSThridAccountStatistic.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ReqId != null && message.hasOwnProperty("ReqId")) if (!$util.isInteger(message.ReqId)) return "ReqId: integer expected"; return null; }; /** * Creates a CSThridAccountStatistic message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSThridAccountStatistic * @static * @param {Object.} object Plain object * @returns {gamehall.CSThridAccountStatistic} CSThridAccountStatistic */ CSThridAccountStatistic.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSThridAccountStatistic) return object; var message = new $root.gamehall.CSThridAccountStatistic(); if (object.ReqId != null) message.ReqId = object.ReqId | 0; return message; }; /** * Creates a plain object from a CSThridAccountStatistic message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSThridAccountStatistic * @static * @param {gamehall.CSThridAccountStatistic} message CSThridAccountStatistic * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSThridAccountStatistic.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.ReqId = 0; if (message.ReqId != null && message.hasOwnProperty("ReqId")) object.ReqId = message.ReqId; return object; }; /** * Converts this CSThridAccountStatistic to JSON. * @function toJSON * @memberof gamehall.CSThridAccountStatistic * @instance * @returns {Object.} JSON object */ CSThridAccountStatistic.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSThridAccountStatistic * @function getTypeUrl * @memberof gamehall.CSThridAccountStatistic * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSThridAccountStatistic.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSThridAccountStatistic"; }; return CSThridAccountStatistic; })(); gamehall.ThridAccount = (function() { /** * Properties of a ThridAccount. * @memberof gamehall * @interface IThridAccount * @property {number|null} [ThridPlatformId] ThridAccount ThridPlatformId * @property {string|null} [Name] ThridAccount Name * @property {number|null} [Status] ThridAccount Status * @property {number|Long|null} [Balance] ThridAccount Balance */ /** * Constructs a new ThridAccount. * @memberof gamehall * @classdesc Represents a ThridAccount. * @implements IThridAccount * @constructor * @param {gamehall.IThridAccount=} [properties] Properties to set */ function ThridAccount(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ThridAccount ThridPlatformId. * @member {number} ThridPlatformId * @memberof gamehall.ThridAccount * @instance */ ThridAccount.prototype.ThridPlatformId = 0; /** * ThridAccount Name. * @member {string} Name * @memberof gamehall.ThridAccount * @instance */ ThridAccount.prototype.Name = ""; /** * ThridAccount Status. * @member {number} Status * @memberof gamehall.ThridAccount * @instance */ ThridAccount.prototype.Status = 0; /** * ThridAccount Balance. * @member {number|Long} Balance * @memberof gamehall.ThridAccount * @instance */ ThridAccount.prototype.Balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new ThridAccount instance using the specified properties. * @function create * @memberof gamehall.ThridAccount * @static * @param {gamehall.IThridAccount=} [properties] Properties to set * @returns {gamehall.ThridAccount} ThridAccount instance */ ThridAccount.create = function create(properties) { return new ThridAccount(properties); }; /** * Encodes the specified ThridAccount message. Does not implicitly {@link gamehall.ThridAccount.verify|verify} messages. * @function encode * @memberof gamehall.ThridAccount * @static * @param {gamehall.IThridAccount} message ThridAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ThridAccount.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ThridPlatformId != null && Object.hasOwnProperty.call(message, "ThridPlatformId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ThridPlatformId); if (message.Name != null && Object.hasOwnProperty.call(message, "Name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.Name); if (message.Status != null && Object.hasOwnProperty.call(message, "Status")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Status); if (message.Balance != null && Object.hasOwnProperty.call(message, "Balance")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.Balance); return writer; }; /** * Encodes the specified ThridAccount message, length delimited. Does not implicitly {@link gamehall.ThridAccount.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.ThridAccount * @static * @param {gamehall.IThridAccount} message ThridAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ThridAccount.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ThridAccount message from the specified reader or buffer. * @function decode * @memberof gamehall.ThridAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.ThridAccount} ThridAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ThridAccount.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.ThridAccount(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ThridPlatformId = reader.int32(); break; } case 2: { message.Name = reader.string(); break; } case 3: { message.Status = reader.int32(); break; } case 4: { message.Balance = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ThridAccount message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.ThridAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.ThridAccount} ThridAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ThridAccount.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ThridAccount message. * @function verify * @memberof gamehall.ThridAccount * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ThridAccount.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ThridPlatformId != null && message.hasOwnProperty("ThridPlatformId")) if (!$util.isInteger(message.ThridPlatformId)) return "ThridPlatformId: integer expected"; if (message.Name != null && message.hasOwnProperty("Name")) if (!$util.isString(message.Name)) return "Name: string expected"; if (message.Status != null && message.hasOwnProperty("Status")) if (!$util.isInteger(message.Status)) return "Status: integer expected"; if (message.Balance != null && message.hasOwnProperty("Balance")) if (!$util.isInteger(message.Balance) && !(message.Balance && $util.isInteger(message.Balance.low) && $util.isInteger(message.Balance.high))) return "Balance: integer|Long expected"; return null; }; /** * Creates a ThridAccount message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.ThridAccount * @static * @param {Object.} object Plain object * @returns {gamehall.ThridAccount} ThridAccount */ ThridAccount.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.ThridAccount) return object; var message = new $root.gamehall.ThridAccount(); if (object.ThridPlatformId != null) message.ThridPlatformId = object.ThridPlatformId | 0; if (object.Name != null) message.Name = String(object.Name); if (object.Status != null) message.Status = object.Status | 0; if (object.Balance != null) if ($util.Long) (message.Balance = $util.Long.fromValue(object.Balance)).unsigned = false; else if (typeof object.Balance === "string") message.Balance = parseInt(object.Balance, 10); else if (typeof object.Balance === "number") message.Balance = object.Balance; else if (typeof object.Balance === "object") message.Balance = new $util.LongBits(object.Balance.low >>> 0, object.Balance.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a ThridAccount message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.ThridAccount * @static * @param {gamehall.ThridAccount} message ThridAccount * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ThridAccount.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ThridPlatformId = 0; object.Name = ""; object.Status = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Balance = options.longs === String ? "0" : 0; } if (message.ThridPlatformId != null && message.hasOwnProperty("ThridPlatformId")) object.ThridPlatformId = message.ThridPlatformId; if (message.Name != null && message.hasOwnProperty("Name")) object.Name = message.Name; if (message.Status != null && message.hasOwnProperty("Status")) object.Status = message.Status; if (message.Balance != null && message.hasOwnProperty("Balance")) if (typeof message.Balance === "number") object.Balance = options.longs === String ? String(message.Balance) : message.Balance; else object.Balance = options.longs === String ? $util.Long.prototype.toString.call(message.Balance) : options.longs === Number ? new $util.LongBits(message.Balance.low >>> 0, message.Balance.high >>> 0).toNumber() : message.Balance; return object; }; /** * Converts this ThridAccount to JSON. * @function toJSON * @memberof gamehall.ThridAccount * @instance * @returns {Object.} JSON object */ ThridAccount.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ThridAccount * @function getTypeUrl * @memberof gamehall.ThridAccount * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ThridAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.ThridAccount"; }; return ThridAccount; })(); gamehall.SCThridAccountStatistic = (function() { /** * Properties of a SCThridAccountStatistic. * @memberof gamehall * @interface ISCThridAccountStatistic * @property {number|null} [ReqId] SCThridAccountStatistic ReqId * @property {Array.|null} [Accounts] SCThridAccountStatistic Accounts */ /** * Constructs a new SCThridAccountStatistic. * @memberof gamehall * @classdesc Represents a SCThridAccountStatistic. * @implements ISCThridAccountStatistic * @constructor * @param {gamehall.ISCThridAccountStatistic=} [properties] Properties to set */ function SCThridAccountStatistic(properties) { this.Accounts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCThridAccountStatistic ReqId. * @member {number} ReqId * @memberof gamehall.SCThridAccountStatistic * @instance */ SCThridAccountStatistic.prototype.ReqId = 0; /** * SCThridAccountStatistic Accounts. * @member {Array.} Accounts * @memberof gamehall.SCThridAccountStatistic * @instance */ SCThridAccountStatistic.prototype.Accounts = $util.emptyArray; /** * Creates a new SCThridAccountStatistic instance using the specified properties. * @function create * @memberof gamehall.SCThridAccountStatistic * @static * @param {gamehall.ISCThridAccountStatistic=} [properties] Properties to set * @returns {gamehall.SCThridAccountStatistic} SCThridAccountStatistic instance */ SCThridAccountStatistic.create = function create(properties) { return new SCThridAccountStatistic(properties); }; /** * Encodes the specified SCThridAccountStatistic message. Does not implicitly {@link gamehall.SCThridAccountStatistic.verify|verify} messages. * @function encode * @memberof gamehall.SCThridAccountStatistic * @static * @param {gamehall.ISCThridAccountStatistic} message SCThridAccountStatistic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridAccountStatistic.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ReqId != null && Object.hasOwnProperty.call(message, "ReqId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ReqId); if (message.Accounts != null && message.Accounts.length) for (var i = 0; i < message.Accounts.length; ++i) $root.gamehall.ThridAccount.encode(message.Accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCThridAccountStatistic message, length delimited. Does not implicitly {@link gamehall.SCThridAccountStatistic.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCThridAccountStatistic * @static * @param {gamehall.ISCThridAccountStatistic} message SCThridAccountStatistic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridAccountStatistic.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCThridAccountStatistic message from the specified reader or buffer. * @function decode * @memberof gamehall.SCThridAccountStatistic * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCThridAccountStatistic} SCThridAccountStatistic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridAccountStatistic.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCThridAccountStatistic(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ReqId = reader.int32(); break; } case 2: { if (!(message.Accounts && message.Accounts.length)) message.Accounts = []; message.Accounts.push($root.gamehall.ThridAccount.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCThridAccountStatistic message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCThridAccountStatistic * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCThridAccountStatistic} SCThridAccountStatistic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridAccountStatistic.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCThridAccountStatistic message. * @function verify * @memberof gamehall.SCThridAccountStatistic * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCThridAccountStatistic.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ReqId != null && message.hasOwnProperty("ReqId")) if (!$util.isInteger(message.ReqId)) return "ReqId: integer expected"; if (message.Accounts != null && message.hasOwnProperty("Accounts")) { if (!Array.isArray(message.Accounts)) return "Accounts: array expected"; for (var i = 0; i < message.Accounts.length; ++i) { var error = $root.gamehall.ThridAccount.verify(message.Accounts[i]); if (error) return "Accounts." + error; } } return null; }; /** * Creates a SCThridAccountStatistic message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCThridAccountStatistic * @static * @param {Object.} object Plain object * @returns {gamehall.SCThridAccountStatistic} SCThridAccountStatistic */ SCThridAccountStatistic.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCThridAccountStatistic) return object; var message = new $root.gamehall.SCThridAccountStatistic(); if (object.ReqId != null) message.ReqId = object.ReqId | 0; if (object.Accounts) { if (!Array.isArray(object.Accounts)) throw TypeError(".gamehall.SCThridAccountStatistic.Accounts: array expected"); message.Accounts = []; for (var i = 0; i < object.Accounts.length; ++i) { if (typeof object.Accounts[i] !== "object") throw TypeError(".gamehall.SCThridAccountStatistic.Accounts: object expected"); message.Accounts[i] = $root.gamehall.ThridAccount.fromObject(object.Accounts[i]); } } return message; }; /** * Creates a plain object from a SCThridAccountStatistic message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCThridAccountStatistic * @static * @param {gamehall.SCThridAccountStatistic} message SCThridAccountStatistic * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCThridAccountStatistic.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Accounts = []; if (options.defaults) object.ReqId = 0; if (message.ReqId != null && message.hasOwnProperty("ReqId")) object.ReqId = message.ReqId; if (message.Accounts && message.Accounts.length) { object.Accounts = []; for (var j = 0; j < message.Accounts.length; ++j) object.Accounts[j] = $root.gamehall.ThridAccount.toObject(message.Accounts[j], options); } return object; }; /** * Converts this SCThridAccountStatistic to JSON. * @function toJSON * @memberof gamehall.SCThridAccountStatistic * @instance * @returns {Object.} JSON object */ SCThridAccountStatistic.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCThridAccountStatistic * @function getTypeUrl * @memberof gamehall.SCThridAccountStatistic * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCThridAccountStatistic.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCThridAccountStatistic"; }; return SCThridAccountStatistic; })(); gamehall.CSThridAccountTransfer = (function() { /** * Properties of a CSThridAccountTransfer. * @memberof gamehall * @interface ICSThridAccountTransfer * @property {number|null} [FromId] CSThridAccountTransfer FromId * @property {number|null} [ToId] CSThridAccountTransfer ToId * @property {number|Long|null} [Amount] CSThridAccountTransfer Amount */ /** * Constructs a new CSThridAccountTransfer. * @memberof gamehall * @classdesc Represents a CSThridAccountTransfer. * @implements ICSThridAccountTransfer * @constructor * @param {gamehall.ICSThridAccountTransfer=} [properties] Properties to set */ function CSThridAccountTransfer(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSThridAccountTransfer FromId. * @member {number} FromId * @memberof gamehall.CSThridAccountTransfer * @instance */ CSThridAccountTransfer.prototype.FromId = 0; /** * CSThridAccountTransfer ToId. * @member {number} ToId * @memberof gamehall.CSThridAccountTransfer * @instance */ CSThridAccountTransfer.prototype.ToId = 0; /** * CSThridAccountTransfer Amount. * @member {number|Long} Amount * @memberof gamehall.CSThridAccountTransfer * @instance */ CSThridAccountTransfer.prototype.Amount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSThridAccountTransfer instance using the specified properties. * @function create * @memberof gamehall.CSThridAccountTransfer * @static * @param {gamehall.ICSThridAccountTransfer=} [properties] Properties to set * @returns {gamehall.CSThridAccountTransfer} CSThridAccountTransfer instance */ CSThridAccountTransfer.create = function create(properties) { return new CSThridAccountTransfer(properties); }; /** * Encodes the specified CSThridAccountTransfer message. Does not implicitly {@link gamehall.CSThridAccountTransfer.verify|verify} messages. * @function encode * @memberof gamehall.CSThridAccountTransfer * @static * @param {gamehall.ICSThridAccountTransfer} message CSThridAccountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridAccountTransfer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.FromId != null && Object.hasOwnProperty.call(message, "FromId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.FromId); if (message.ToId != null && Object.hasOwnProperty.call(message, "ToId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ToId); if (message.Amount != null && Object.hasOwnProperty.call(message, "Amount")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.Amount); return writer; }; /** * Encodes the specified CSThridAccountTransfer message, length delimited. Does not implicitly {@link gamehall.CSThridAccountTransfer.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSThridAccountTransfer * @static * @param {gamehall.ICSThridAccountTransfer} message CSThridAccountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridAccountTransfer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSThridAccountTransfer message from the specified reader or buffer. * @function decode * @memberof gamehall.CSThridAccountTransfer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSThridAccountTransfer} CSThridAccountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridAccountTransfer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSThridAccountTransfer(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.FromId = reader.int32(); break; } case 2: { message.ToId = reader.int32(); break; } case 3: { message.Amount = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSThridAccountTransfer message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSThridAccountTransfer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSThridAccountTransfer} CSThridAccountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridAccountTransfer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSThridAccountTransfer message. * @function verify * @memberof gamehall.CSThridAccountTransfer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSThridAccountTransfer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.FromId != null && message.hasOwnProperty("FromId")) if (!$util.isInteger(message.FromId)) return "FromId: integer expected"; if (message.ToId != null && message.hasOwnProperty("ToId")) if (!$util.isInteger(message.ToId)) return "ToId: integer expected"; if (message.Amount != null && message.hasOwnProperty("Amount")) if (!$util.isInteger(message.Amount) && !(message.Amount && $util.isInteger(message.Amount.low) && $util.isInteger(message.Amount.high))) return "Amount: integer|Long expected"; return null; }; /** * Creates a CSThridAccountTransfer message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSThridAccountTransfer * @static * @param {Object.} object Plain object * @returns {gamehall.CSThridAccountTransfer} CSThridAccountTransfer */ CSThridAccountTransfer.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSThridAccountTransfer) return object; var message = new $root.gamehall.CSThridAccountTransfer(); if (object.FromId != null) message.FromId = object.FromId | 0; if (object.ToId != null) message.ToId = object.ToId | 0; if (object.Amount != null) if ($util.Long) (message.Amount = $util.Long.fromValue(object.Amount)).unsigned = false; else if (typeof object.Amount === "string") message.Amount = parseInt(object.Amount, 10); else if (typeof object.Amount === "number") message.Amount = object.Amount; else if (typeof object.Amount === "object") message.Amount = new $util.LongBits(object.Amount.low >>> 0, object.Amount.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CSThridAccountTransfer message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSThridAccountTransfer * @static * @param {gamehall.CSThridAccountTransfer} message CSThridAccountTransfer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSThridAccountTransfer.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.FromId = 0; object.ToId = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Amount = options.longs === String ? "0" : 0; } if (message.FromId != null && message.hasOwnProperty("FromId")) object.FromId = message.FromId; if (message.ToId != null && message.hasOwnProperty("ToId")) object.ToId = message.ToId; if (message.Amount != null && message.hasOwnProperty("Amount")) if (typeof message.Amount === "number") object.Amount = options.longs === String ? String(message.Amount) : message.Amount; else object.Amount = options.longs === String ? $util.Long.prototype.toString.call(message.Amount) : options.longs === Number ? new $util.LongBits(message.Amount.low >>> 0, message.Amount.high >>> 0).toNumber() : message.Amount; return object; }; /** * Converts this CSThridAccountTransfer to JSON. * @function toJSON * @memberof gamehall.CSThridAccountTransfer * @instance * @returns {Object.} JSON object */ CSThridAccountTransfer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSThridAccountTransfer * @function getTypeUrl * @memberof gamehall.CSThridAccountTransfer * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSThridAccountTransfer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSThridAccountTransfer"; }; return CSThridAccountTransfer; })(); gamehall.SCThridAccountTransfer = (function() { /** * Properties of a SCThridAccountTransfer. * @memberof gamehall * @interface ISCThridAccountTransfer * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCThridAccountTransfer OpRetCode * @property {Array.|null} [Accounts] SCThridAccountTransfer Accounts */ /** * Constructs a new SCThridAccountTransfer. * @memberof gamehall * @classdesc Represents a SCThridAccountTransfer. * @implements ISCThridAccountTransfer * @constructor * @param {gamehall.ISCThridAccountTransfer=} [properties] Properties to set */ function SCThridAccountTransfer(properties) { this.Accounts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCThridAccountTransfer OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCThridAccountTransfer * @instance */ SCThridAccountTransfer.prototype.OpRetCode = 0; /** * SCThridAccountTransfer Accounts. * @member {Array.} Accounts * @memberof gamehall.SCThridAccountTransfer * @instance */ SCThridAccountTransfer.prototype.Accounts = $util.emptyArray; /** * Creates a new SCThridAccountTransfer instance using the specified properties. * @function create * @memberof gamehall.SCThridAccountTransfer * @static * @param {gamehall.ISCThridAccountTransfer=} [properties] Properties to set * @returns {gamehall.SCThridAccountTransfer} SCThridAccountTransfer instance */ SCThridAccountTransfer.create = function create(properties) { return new SCThridAccountTransfer(properties); }; /** * Encodes the specified SCThridAccountTransfer message. Does not implicitly {@link gamehall.SCThridAccountTransfer.verify|verify} messages. * @function encode * @memberof gamehall.SCThridAccountTransfer * @static * @param {gamehall.ISCThridAccountTransfer} message SCThridAccountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridAccountTransfer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.Accounts != null && message.Accounts.length) for (var i = 0; i < message.Accounts.length; ++i) $root.gamehall.ThridAccount.encode(message.Accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCThridAccountTransfer message, length delimited. Does not implicitly {@link gamehall.SCThridAccountTransfer.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCThridAccountTransfer * @static * @param {gamehall.ISCThridAccountTransfer} message SCThridAccountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridAccountTransfer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCThridAccountTransfer message from the specified reader or buffer. * @function decode * @memberof gamehall.SCThridAccountTransfer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCThridAccountTransfer} SCThridAccountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridAccountTransfer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCThridAccountTransfer(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { if (!(message.Accounts && message.Accounts.length)) message.Accounts = []; message.Accounts.push($root.gamehall.ThridAccount.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCThridAccountTransfer message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCThridAccountTransfer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCThridAccountTransfer} SCThridAccountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridAccountTransfer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCThridAccountTransfer message. * @function verify * @memberof gamehall.SCThridAccountTransfer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCThridAccountTransfer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.Accounts != null && message.hasOwnProperty("Accounts")) { if (!Array.isArray(message.Accounts)) return "Accounts: array expected"; for (var i = 0; i < message.Accounts.length; ++i) { var error = $root.gamehall.ThridAccount.verify(message.Accounts[i]); if (error) return "Accounts." + error; } } return null; }; /** * Creates a SCThridAccountTransfer message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCThridAccountTransfer * @static * @param {Object.} object Plain object * @returns {gamehall.SCThridAccountTransfer} SCThridAccountTransfer */ SCThridAccountTransfer.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCThridAccountTransfer) return object; var message = new $root.gamehall.SCThridAccountTransfer(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.Accounts) { if (!Array.isArray(object.Accounts)) throw TypeError(".gamehall.SCThridAccountTransfer.Accounts: array expected"); message.Accounts = []; for (var i = 0; i < object.Accounts.length; ++i) { if (typeof object.Accounts[i] !== "object") throw TypeError(".gamehall.SCThridAccountTransfer.Accounts: object expected"); message.Accounts[i] = $root.gamehall.ThridAccount.fromObject(object.Accounts[i]); } } return message; }; /** * Creates a plain object from a SCThridAccountTransfer message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCThridAccountTransfer * @static * @param {gamehall.SCThridAccountTransfer} message SCThridAccountTransfer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCThridAccountTransfer.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Accounts = []; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.Accounts && message.Accounts.length) { object.Accounts = []; for (var j = 0; j < message.Accounts.length; ++j) object.Accounts[j] = $root.gamehall.ThridAccount.toObject(message.Accounts[j], options); } return object; }; /** * Converts this SCThridAccountTransfer to JSON. * @function toJSON * @memberof gamehall.SCThridAccountTransfer * @instance * @returns {Object.} JSON object */ SCThridAccountTransfer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCThridAccountTransfer * @function getTypeUrl * @memberof gamehall.SCThridAccountTransfer * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCThridAccountTransfer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCThridAccountTransfer"; }; return SCThridAccountTransfer; })(); gamehall.CSEnterThridGame = (function() { /** * Properties of a CSEnterThridGame. * @memberof gamehall * @interface ICSEnterThridGame * @property {number|null} [ThridGameId] CSEnterThridGame ThridGameId */ /** * Constructs a new CSEnterThridGame. * @memberof gamehall * @classdesc Represents a CSEnterThridGame. * @implements ICSEnterThridGame * @constructor * @param {gamehall.ICSEnterThridGame=} [properties] Properties to set */ function CSEnterThridGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSEnterThridGame ThridGameId. * @member {number} ThridGameId * @memberof gamehall.CSEnterThridGame * @instance */ CSEnterThridGame.prototype.ThridGameId = 0; /** * Creates a new CSEnterThridGame instance using the specified properties. * @function create * @memberof gamehall.CSEnterThridGame * @static * @param {gamehall.ICSEnterThridGame=} [properties] Properties to set * @returns {gamehall.CSEnterThridGame} CSEnterThridGame instance */ CSEnterThridGame.create = function create(properties) { return new CSEnterThridGame(properties); }; /** * Encodes the specified CSEnterThridGame message. Does not implicitly {@link gamehall.CSEnterThridGame.verify|verify} messages. * @function encode * @memberof gamehall.CSEnterThridGame * @static * @param {gamehall.ICSEnterThridGame} message CSEnterThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterThridGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ThridGameId != null && Object.hasOwnProperty.call(message, "ThridGameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ThridGameId); return writer; }; /** * Encodes the specified CSEnterThridGame message, length delimited. Does not implicitly {@link gamehall.CSEnterThridGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSEnterThridGame * @static * @param {gamehall.ICSEnterThridGame} message CSEnterThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterThridGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSEnterThridGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSEnterThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSEnterThridGame} CSEnterThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterThridGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSEnterThridGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { message.ThridGameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSEnterThridGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSEnterThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSEnterThridGame} CSEnterThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterThridGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSEnterThridGame message. * @function verify * @memberof gamehall.CSEnterThridGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSEnterThridGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ThridGameId != null && message.hasOwnProperty("ThridGameId")) if (!$util.isInteger(message.ThridGameId)) return "ThridGameId: integer expected"; return null; }; /** * Creates a CSEnterThridGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSEnterThridGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSEnterThridGame} CSEnterThridGame */ CSEnterThridGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSEnterThridGame) return object; var message = new $root.gamehall.CSEnterThridGame(); if (object.ThridGameId != null) message.ThridGameId = object.ThridGameId | 0; return message; }; /** * Creates a plain object from a CSEnterThridGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSEnterThridGame * @static * @param {gamehall.CSEnterThridGame} message CSEnterThridGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSEnterThridGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.ThridGameId = 0; if (message.ThridGameId != null && message.hasOwnProperty("ThridGameId")) object.ThridGameId = message.ThridGameId; return object; }; /** * Converts this CSEnterThridGame to JSON. * @function toJSON * @memberof gamehall.CSEnterThridGame * @instance * @returns {Object.} JSON object */ CSEnterThridGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSEnterThridGame * @function getTypeUrl * @memberof gamehall.CSEnterThridGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSEnterThridGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSEnterThridGame"; }; return CSEnterThridGame; })(); gamehall.SCEnterThridGame = (function() { /** * Properties of a SCEnterThridGame. * @memberof gamehall * @interface ISCEnterThridGame * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCEnterThridGame OpRetCode * @property {string|null} [EnterUrl] SCEnterThridGame EnterUrl * @property {number|null} [ScreenOrientationType] SCEnterThridGame ScreenOrientationType * @property {number|null} [ThridGameId] SCEnterThridGame ThridGameId */ /** * Constructs a new SCEnterThridGame. * @memberof gamehall * @classdesc Represents a SCEnterThridGame. * @implements ISCEnterThridGame * @constructor * @param {gamehall.ISCEnterThridGame=} [properties] Properties to set */ function SCEnterThridGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCEnterThridGame OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCEnterThridGame * @instance */ SCEnterThridGame.prototype.OpRetCode = 0; /** * SCEnterThridGame EnterUrl. * @member {string} EnterUrl * @memberof gamehall.SCEnterThridGame * @instance */ SCEnterThridGame.prototype.EnterUrl = ""; /** * SCEnterThridGame ScreenOrientationType. * @member {number} ScreenOrientationType * @memberof gamehall.SCEnterThridGame * @instance */ SCEnterThridGame.prototype.ScreenOrientationType = 0; /** * SCEnterThridGame ThridGameId. * @member {number} ThridGameId * @memberof gamehall.SCEnterThridGame * @instance */ SCEnterThridGame.prototype.ThridGameId = 0; /** * Creates a new SCEnterThridGame instance using the specified properties. * @function create * @memberof gamehall.SCEnterThridGame * @static * @param {gamehall.ISCEnterThridGame=} [properties] Properties to set * @returns {gamehall.SCEnterThridGame} SCEnterThridGame instance */ SCEnterThridGame.create = function create(properties) { return new SCEnterThridGame(properties); }; /** * Encodes the specified SCEnterThridGame message. Does not implicitly {@link gamehall.SCEnterThridGame.verify|verify} messages. * @function encode * @memberof gamehall.SCEnterThridGame * @static * @param {gamehall.ISCEnterThridGame} message SCEnterThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterThridGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.EnterUrl != null && Object.hasOwnProperty.call(message, "EnterUrl")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.EnterUrl); if (message.ScreenOrientationType != null && Object.hasOwnProperty.call(message, "ScreenOrientationType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ScreenOrientationType); if (message.ThridGameId != null && Object.hasOwnProperty.call(message, "ThridGameId")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.ThridGameId); return writer; }; /** * Encodes the specified SCEnterThridGame message, length delimited. Does not implicitly {@link gamehall.SCEnterThridGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCEnterThridGame * @static * @param {gamehall.ISCEnterThridGame} message SCEnterThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterThridGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCEnterThridGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCEnterThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCEnterThridGame} SCEnterThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterThridGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCEnterThridGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.EnterUrl = reader.string(); break; } case 3: { message.ScreenOrientationType = reader.int32(); break; } case 4: { message.ThridGameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCEnterThridGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCEnterThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCEnterThridGame} SCEnterThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterThridGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCEnterThridGame message. * @function verify * @memberof gamehall.SCEnterThridGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCEnterThridGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.EnterUrl != null && message.hasOwnProperty("EnterUrl")) if (!$util.isString(message.EnterUrl)) return "EnterUrl: string expected"; if (message.ScreenOrientationType != null && message.hasOwnProperty("ScreenOrientationType")) if (!$util.isInteger(message.ScreenOrientationType)) return "ScreenOrientationType: integer expected"; if (message.ThridGameId != null && message.hasOwnProperty("ThridGameId")) if (!$util.isInteger(message.ThridGameId)) return "ThridGameId: integer expected"; return null; }; /** * Creates a SCEnterThridGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCEnterThridGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCEnterThridGame} SCEnterThridGame */ SCEnterThridGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCEnterThridGame) return object; var message = new $root.gamehall.SCEnterThridGame(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.EnterUrl != null) message.EnterUrl = String(object.EnterUrl); if (object.ScreenOrientationType != null) message.ScreenOrientationType = object.ScreenOrientationType | 0; if (object.ThridGameId != null) message.ThridGameId = object.ThridGameId | 0; return message; }; /** * Creates a plain object from a SCEnterThridGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCEnterThridGame * @static * @param {gamehall.SCEnterThridGame} message SCEnterThridGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCEnterThridGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.EnterUrl = ""; object.ScreenOrientationType = 0; object.ThridGameId = 0; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.EnterUrl != null && message.hasOwnProperty("EnterUrl")) object.EnterUrl = message.EnterUrl; if (message.ScreenOrientationType != null && message.hasOwnProperty("ScreenOrientationType")) object.ScreenOrientationType = message.ScreenOrientationType; if (message.ThridGameId != null && message.hasOwnProperty("ThridGameId")) object.ThridGameId = message.ThridGameId; return object; }; /** * Converts this SCEnterThridGame to JSON. * @function toJSON * @memberof gamehall.SCEnterThridGame * @instance * @returns {Object.} JSON object */ SCEnterThridGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCEnterThridGame * @function getTypeUrl * @memberof gamehall.SCEnterThridGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCEnterThridGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCEnterThridGame"; }; return SCEnterThridGame; })(); gamehall.CSLeaveThridGame = (function() { /** * Properties of a CSLeaveThridGame. * @memberof gamehall * @interface ICSLeaveThridGame */ /** * Constructs a new CSLeaveThridGame. * @memberof gamehall * @classdesc Represents a CSLeaveThridGame. * @implements ICSLeaveThridGame * @constructor * @param {gamehall.ICSLeaveThridGame=} [properties] Properties to set */ function CSLeaveThridGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSLeaveThridGame instance using the specified properties. * @function create * @memberof gamehall.CSLeaveThridGame * @static * @param {gamehall.ICSLeaveThridGame=} [properties] Properties to set * @returns {gamehall.CSLeaveThridGame} CSLeaveThridGame instance */ CSLeaveThridGame.create = function create(properties) { return new CSLeaveThridGame(properties); }; /** * Encodes the specified CSLeaveThridGame message. Does not implicitly {@link gamehall.CSLeaveThridGame.verify|verify} messages. * @function encode * @memberof gamehall.CSLeaveThridGame * @static * @param {gamehall.ICSLeaveThridGame} message CSLeaveThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveThridGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSLeaveThridGame message, length delimited. Does not implicitly {@link gamehall.CSLeaveThridGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSLeaveThridGame * @static * @param {gamehall.ICSLeaveThridGame} message CSLeaveThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLeaveThridGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLeaveThridGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSLeaveThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSLeaveThridGame} CSLeaveThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveThridGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSLeaveThridGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLeaveThridGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSLeaveThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSLeaveThridGame} CSLeaveThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLeaveThridGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLeaveThridGame message. * @function verify * @memberof gamehall.CSLeaveThridGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLeaveThridGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSLeaveThridGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSLeaveThridGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSLeaveThridGame} CSLeaveThridGame */ CSLeaveThridGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSLeaveThridGame) return object; return new $root.gamehall.CSLeaveThridGame(); }; /** * Creates a plain object from a CSLeaveThridGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSLeaveThridGame * @static * @param {gamehall.CSLeaveThridGame} message CSLeaveThridGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLeaveThridGame.toObject = function toObject() { return {}; }; /** * Converts this CSLeaveThridGame to JSON. * @function toJSON * @memberof gamehall.CSLeaveThridGame * @instance * @returns {Object.} JSON object */ CSLeaveThridGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLeaveThridGame * @function getTypeUrl * @memberof gamehall.CSLeaveThridGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLeaveThridGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSLeaveThridGame"; }; return CSLeaveThridGame; })(); gamehall.SCLeaveThridGame = (function() { /** * Properties of a SCLeaveThridGame. * @memberof gamehall * @interface ISCLeaveThridGame * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCLeaveThridGame OpRetCode */ /** * Constructs a new SCLeaveThridGame. * @memberof gamehall * @classdesc Represents a SCLeaveThridGame. * @implements ISCLeaveThridGame * @constructor * @param {gamehall.ISCLeaveThridGame=} [properties] Properties to set */ function SCLeaveThridGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLeaveThridGame OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCLeaveThridGame * @instance */ SCLeaveThridGame.prototype.OpRetCode = 0; /** * Creates a new SCLeaveThridGame instance using the specified properties. * @function create * @memberof gamehall.SCLeaveThridGame * @static * @param {gamehall.ISCLeaveThridGame=} [properties] Properties to set * @returns {gamehall.SCLeaveThridGame} SCLeaveThridGame instance */ SCLeaveThridGame.create = function create(properties) { return new SCLeaveThridGame(properties); }; /** * Encodes the specified SCLeaveThridGame message. Does not implicitly {@link gamehall.SCLeaveThridGame.verify|verify} messages. * @function encode * @memberof gamehall.SCLeaveThridGame * @static * @param {gamehall.ISCLeaveThridGame} message SCLeaveThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveThridGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCLeaveThridGame message, length delimited. Does not implicitly {@link gamehall.SCLeaveThridGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLeaveThridGame * @static * @param {gamehall.ISCLeaveThridGame} message SCLeaveThridGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLeaveThridGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLeaveThridGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLeaveThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLeaveThridGame} SCLeaveThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveThridGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLeaveThridGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLeaveThridGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLeaveThridGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLeaveThridGame} SCLeaveThridGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLeaveThridGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLeaveThridGame message. * @function verify * @memberof gamehall.SCLeaveThridGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLeaveThridGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCLeaveThridGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLeaveThridGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCLeaveThridGame} SCLeaveThridGame */ SCLeaveThridGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLeaveThridGame) return object; var message = new $root.gamehall.SCLeaveThridGame(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCLeaveThridGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLeaveThridGame * @static * @param {gamehall.SCLeaveThridGame} message SCLeaveThridGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLeaveThridGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCLeaveThridGame to JSON. * @function toJSON * @memberof gamehall.SCLeaveThridGame * @instance * @returns {Object.} JSON object */ SCLeaveThridGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLeaveThridGame * @function getTypeUrl * @memberof gamehall.SCLeaveThridGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLeaveThridGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLeaveThridGame"; }; return SCLeaveThridGame; })(); gamehall.CSThridGameList = (function() { /** * Properties of a CSThridGameList. * @memberof gamehall * @interface ICSThridGameList */ /** * Constructs a new CSThridGameList. * @memberof gamehall * @classdesc Represents a CSThridGameList. * @implements ICSThridGameList * @constructor * @param {gamehall.ICSThridGameList=} [properties] Properties to set */ function CSThridGameList(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSThridGameList instance using the specified properties. * @function create * @memberof gamehall.CSThridGameList * @static * @param {gamehall.ICSThridGameList=} [properties] Properties to set * @returns {gamehall.CSThridGameList} CSThridGameList instance */ CSThridGameList.create = function create(properties) { return new CSThridGameList(properties); }; /** * Encodes the specified CSThridGameList message. Does not implicitly {@link gamehall.CSThridGameList.verify|verify} messages. * @function encode * @memberof gamehall.CSThridGameList * @static * @param {gamehall.ICSThridGameList} message CSThridGameList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridGameList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSThridGameList message, length delimited. Does not implicitly {@link gamehall.CSThridGameList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSThridGameList * @static * @param {gamehall.ICSThridGameList} message CSThridGameList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridGameList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSThridGameList message from the specified reader or buffer. * @function decode * @memberof gamehall.CSThridGameList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSThridGameList} CSThridGameList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridGameList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSThridGameList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSThridGameList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSThridGameList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSThridGameList} CSThridGameList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridGameList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSThridGameList message. * @function verify * @memberof gamehall.CSThridGameList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSThridGameList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSThridGameList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSThridGameList * @static * @param {Object.} object Plain object * @returns {gamehall.CSThridGameList} CSThridGameList */ CSThridGameList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSThridGameList) return object; return new $root.gamehall.CSThridGameList(); }; /** * Creates a plain object from a CSThridGameList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSThridGameList * @static * @param {gamehall.CSThridGameList} message CSThridGameList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSThridGameList.toObject = function toObject() { return {}; }; /** * Converts this CSThridGameList to JSON. * @function toJSON * @memberof gamehall.CSThridGameList * @instance * @returns {Object.} JSON object */ CSThridGameList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSThridGameList * @function getTypeUrl * @memberof gamehall.CSThridGameList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSThridGameList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSThridGameList"; }; return CSThridGameList; })(); gamehall.ThridGameDatas = (function() { /** * Properties of a ThridGameDatas. * @memberof gamehall * @interface IThridGameDatas * @property {string|null} [ThridGameId] ThridGameDatas ThridGameId * @property {string|null} [ThridGameName] ThridGameDatas ThridGameName */ /** * Constructs a new ThridGameDatas. * @memberof gamehall * @classdesc Represents a ThridGameDatas. * @implements IThridGameDatas * @constructor * @param {gamehall.IThridGameDatas=} [properties] Properties to set */ function ThridGameDatas(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ThridGameDatas ThridGameId. * @member {string} ThridGameId * @memberof gamehall.ThridGameDatas * @instance */ ThridGameDatas.prototype.ThridGameId = ""; /** * ThridGameDatas ThridGameName. * @member {string} ThridGameName * @memberof gamehall.ThridGameDatas * @instance */ ThridGameDatas.prototype.ThridGameName = ""; /** * Creates a new ThridGameDatas instance using the specified properties. * @function create * @memberof gamehall.ThridGameDatas * @static * @param {gamehall.IThridGameDatas=} [properties] Properties to set * @returns {gamehall.ThridGameDatas} ThridGameDatas instance */ ThridGameDatas.create = function create(properties) { return new ThridGameDatas(properties); }; /** * Encodes the specified ThridGameDatas message. Does not implicitly {@link gamehall.ThridGameDatas.verify|verify} messages. * @function encode * @memberof gamehall.ThridGameDatas * @static * @param {gamehall.IThridGameDatas} message ThridGameDatas message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ThridGameDatas.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ThridGameId != null && Object.hasOwnProperty.call(message, "ThridGameId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.ThridGameId); if (message.ThridGameName != null && Object.hasOwnProperty.call(message, "ThridGameName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.ThridGameName); return writer; }; /** * Encodes the specified ThridGameDatas message, length delimited. Does not implicitly {@link gamehall.ThridGameDatas.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.ThridGameDatas * @static * @param {gamehall.IThridGameDatas} message ThridGameDatas message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ThridGameDatas.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ThridGameDatas message from the specified reader or buffer. * @function decode * @memberof gamehall.ThridGameDatas * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.ThridGameDatas} ThridGameDatas * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ThridGameDatas.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.ThridGameDatas(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ThridGameId = reader.string(); break; } case 2: { message.ThridGameName = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ThridGameDatas message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.ThridGameDatas * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.ThridGameDatas} ThridGameDatas * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ThridGameDatas.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ThridGameDatas message. * @function verify * @memberof gamehall.ThridGameDatas * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ThridGameDatas.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ThridGameId != null && message.hasOwnProperty("ThridGameId")) if (!$util.isString(message.ThridGameId)) return "ThridGameId: string expected"; if (message.ThridGameName != null && message.hasOwnProperty("ThridGameName")) if (!$util.isString(message.ThridGameName)) return "ThridGameName: string expected"; return null; }; /** * Creates a ThridGameDatas message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.ThridGameDatas * @static * @param {Object.} object Plain object * @returns {gamehall.ThridGameDatas} ThridGameDatas */ ThridGameDatas.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.ThridGameDatas) return object; var message = new $root.gamehall.ThridGameDatas(); if (object.ThridGameId != null) message.ThridGameId = String(object.ThridGameId); if (object.ThridGameName != null) message.ThridGameName = String(object.ThridGameName); return message; }; /** * Creates a plain object from a ThridGameDatas message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.ThridGameDatas * @static * @param {gamehall.ThridGameDatas} message ThridGameDatas * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ThridGameDatas.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ThridGameId = ""; object.ThridGameName = ""; } if (message.ThridGameId != null && message.hasOwnProperty("ThridGameId")) object.ThridGameId = message.ThridGameId; if (message.ThridGameName != null && message.hasOwnProperty("ThridGameName")) object.ThridGameName = message.ThridGameName; return object; }; /** * Converts this ThridGameDatas to JSON. * @function toJSON * @memberof gamehall.ThridGameDatas * @instance * @returns {Object.} JSON object */ ThridGameDatas.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ThridGameDatas * @function getTypeUrl * @memberof gamehall.ThridGameDatas * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ThridGameDatas.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.ThridGameDatas"; }; return ThridGameDatas; })(); gamehall.ThridGamePlatforms = (function() { /** * Properties of a ThridGamePlatforms. * @memberof gamehall * @interface IThridGamePlatforms * @property {number|null} [ThridPlatformId] ThridGamePlatforms ThridPlatformId * @property {string|null} [ThridPlatformName] ThridGamePlatforms ThridPlatformName * @property {Array.|null} [GameDatas] ThridGamePlatforms GameDatas */ /** * Constructs a new ThridGamePlatforms. * @memberof gamehall * @classdesc Represents a ThridGamePlatforms. * @implements IThridGamePlatforms * @constructor * @param {gamehall.IThridGamePlatforms=} [properties] Properties to set */ function ThridGamePlatforms(properties) { this.GameDatas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ThridGamePlatforms ThridPlatformId. * @member {number} ThridPlatformId * @memberof gamehall.ThridGamePlatforms * @instance */ ThridGamePlatforms.prototype.ThridPlatformId = 0; /** * ThridGamePlatforms ThridPlatformName. * @member {string} ThridPlatformName * @memberof gamehall.ThridGamePlatforms * @instance */ ThridGamePlatforms.prototype.ThridPlatformName = ""; /** * ThridGamePlatforms GameDatas. * @member {Array.} GameDatas * @memberof gamehall.ThridGamePlatforms * @instance */ ThridGamePlatforms.prototype.GameDatas = $util.emptyArray; /** * Creates a new ThridGamePlatforms instance using the specified properties. * @function create * @memberof gamehall.ThridGamePlatforms * @static * @param {gamehall.IThridGamePlatforms=} [properties] Properties to set * @returns {gamehall.ThridGamePlatforms} ThridGamePlatforms instance */ ThridGamePlatforms.create = function create(properties) { return new ThridGamePlatforms(properties); }; /** * Encodes the specified ThridGamePlatforms message. Does not implicitly {@link gamehall.ThridGamePlatforms.verify|verify} messages. * @function encode * @memberof gamehall.ThridGamePlatforms * @static * @param {gamehall.IThridGamePlatforms} message ThridGamePlatforms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ThridGamePlatforms.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ThridPlatformId != null && Object.hasOwnProperty.call(message, "ThridPlatformId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ThridPlatformId); if (message.ThridPlatformName != null && Object.hasOwnProperty.call(message, "ThridPlatformName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.ThridPlatformName); if (message.GameDatas != null && message.GameDatas.length) for (var i = 0; i < message.GameDatas.length; ++i) $root.gamehall.ThridGameDatas.encode(message.GameDatas[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified ThridGamePlatforms message, length delimited. Does not implicitly {@link gamehall.ThridGamePlatforms.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.ThridGamePlatforms * @static * @param {gamehall.IThridGamePlatforms} message ThridGamePlatforms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ThridGamePlatforms.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ThridGamePlatforms message from the specified reader or buffer. * @function decode * @memberof gamehall.ThridGamePlatforms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.ThridGamePlatforms} ThridGamePlatforms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ThridGamePlatforms.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.ThridGamePlatforms(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ThridPlatformId = reader.int32(); break; } case 2: { message.ThridPlatformName = reader.string(); break; } case 3: { if (!(message.GameDatas && message.GameDatas.length)) message.GameDatas = []; message.GameDatas.push($root.gamehall.ThridGameDatas.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ThridGamePlatforms message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.ThridGamePlatforms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.ThridGamePlatforms} ThridGamePlatforms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ThridGamePlatforms.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ThridGamePlatforms message. * @function verify * @memberof gamehall.ThridGamePlatforms * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ThridGamePlatforms.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ThridPlatformId != null && message.hasOwnProperty("ThridPlatformId")) if (!$util.isInteger(message.ThridPlatformId)) return "ThridPlatformId: integer expected"; if (message.ThridPlatformName != null && message.hasOwnProperty("ThridPlatformName")) if (!$util.isString(message.ThridPlatformName)) return "ThridPlatformName: string expected"; if (message.GameDatas != null && message.hasOwnProperty("GameDatas")) { if (!Array.isArray(message.GameDatas)) return "GameDatas: array expected"; for (var i = 0; i < message.GameDatas.length; ++i) { var error = $root.gamehall.ThridGameDatas.verify(message.GameDatas[i]); if (error) return "GameDatas." + error; } } return null; }; /** * Creates a ThridGamePlatforms message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.ThridGamePlatforms * @static * @param {Object.} object Plain object * @returns {gamehall.ThridGamePlatforms} ThridGamePlatforms */ ThridGamePlatforms.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.ThridGamePlatforms) return object; var message = new $root.gamehall.ThridGamePlatforms(); if (object.ThridPlatformId != null) message.ThridPlatformId = object.ThridPlatformId | 0; if (object.ThridPlatformName != null) message.ThridPlatformName = String(object.ThridPlatformName); if (object.GameDatas) { if (!Array.isArray(object.GameDatas)) throw TypeError(".gamehall.ThridGamePlatforms.GameDatas: array expected"); message.GameDatas = []; for (var i = 0; i < object.GameDatas.length; ++i) { if (typeof object.GameDatas[i] !== "object") throw TypeError(".gamehall.ThridGamePlatforms.GameDatas: object expected"); message.GameDatas[i] = $root.gamehall.ThridGameDatas.fromObject(object.GameDatas[i]); } } return message; }; /** * Creates a plain object from a ThridGamePlatforms message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.ThridGamePlatforms * @static * @param {gamehall.ThridGamePlatforms} message ThridGamePlatforms * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ThridGamePlatforms.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GameDatas = []; if (options.defaults) { object.ThridPlatformId = 0; object.ThridPlatformName = ""; } if (message.ThridPlatformId != null && message.hasOwnProperty("ThridPlatformId")) object.ThridPlatformId = message.ThridPlatformId; if (message.ThridPlatformName != null && message.hasOwnProperty("ThridPlatformName")) object.ThridPlatformName = message.ThridPlatformName; if (message.GameDatas && message.GameDatas.length) { object.GameDatas = []; for (var j = 0; j < message.GameDatas.length; ++j) object.GameDatas[j] = $root.gamehall.ThridGameDatas.toObject(message.GameDatas[j], options); } return object; }; /** * Converts this ThridGamePlatforms to JSON. * @function toJSON * @memberof gamehall.ThridGamePlatforms * @instance * @returns {Object.} JSON object */ ThridGamePlatforms.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ThridGamePlatforms * @function getTypeUrl * @memberof gamehall.ThridGamePlatforms * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ThridGamePlatforms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.ThridGamePlatforms"; }; return ThridGamePlatforms; })(); gamehall.SCThridGameList = (function() { /** * Properties of a SCThridGameList. * @memberof gamehall * @interface ISCThridGameList * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCThridGameList OpRetCode * @property {Array.|null} [GamePlatforms] SCThridGameList GamePlatforms */ /** * Constructs a new SCThridGameList. * @memberof gamehall * @classdesc Represents a SCThridGameList. * @implements ISCThridGameList * @constructor * @param {gamehall.ISCThridGameList=} [properties] Properties to set */ function SCThridGameList(properties) { this.GamePlatforms = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCThridGameList OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCThridGameList * @instance */ SCThridGameList.prototype.OpRetCode = 0; /** * SCThridGameList GamePlatforms. * @member {Array.} GamePlatforms * @memberof gamehall.SCThridGameList * @instance */ SCThridGameList.prototype.GamePlatforms = $util.emptyArray; /** * Creates a new SCThridGameList instance using the specified properties. * @function create * @memberof gamehall.SCThridGameList * @static * @param {gamehall.ISCThridGameList=} [properties] Properties to set * @returns {gamehall.SCThridGameList} SCThridGameList instance */ SCThridGameList.create = function create(properties) { return new SCThridGameList(properties); }; /** * Encodes the specified SCThridGameList message. Does not implicitly {@link gamehall.SCThridGameList.verify|verify} messages. * @function encode * @memberof gamehall.SCThridGameList * @static * @param {gamehall.ISCThridGameList} message SCThridGameList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridGameList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.GamePlatforms != null && message.GamePlatforms.length) for (var i = 0; i < message.GamePlatforms.length; ++i) $root.gamehall.ThridGamePlatforms.encode(message.GamePlatforms[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCThridGameList message, length delimited. Does not implicitly {@link gamehall.SCThridGameList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCThridGameList * @static * @param {gamehall.ISCThridGameList} message SCThridGameList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridGameList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCThridGameList message from the specified reader or buffer. * @function decode * @memberof gamehall.SCThridGameList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCThridGameList} SCThridGameList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridGameList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCThridGameList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { if (!(message.GamePlatforms && message.GamePlatforms.length)) message.GamePlatforms = []; message.GamePlatforms.push($root.gamehall.ThridGamePlatforms.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCThridGameList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCThridGameList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCThridGameList} SCThridGameList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridGameList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCThridGameList message. * @function verify * @memberof gamehall.SCThridGameList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCThridGameList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.GamePlatforms != null && message.hasOwnProperty("GamePlatforms")) { if (!Array.isArray(message.GamePlatforms)) return "GamePlatforms: array expected"; for (var i = 0; i < message.GamePlatforms.length; ++i) { var error = $root.gamehall.ThridGamePlatforms.verify(message.GamePlatforms[i]); if (error) return "GamePlatforms." + error; } } return null; }; /** * Creates a SCThridGameList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCThridGameList * @static * @param {Object.} object Plain object * @returns {gamehall.SCThridGameList} SCThridGameList */ SCThridGameList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCThridGameList) return object; var message = new $root.gamehall.SCThridGameList(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.GamePlatforms) { if (!Array.isArray(object.GamePlatforms)) throw TypeError(".gamehall.SCThridGameList.GamePlatforms: array expected"); message.GamePlatforms = []; for (var i = 0; i < object.GamePlatforms.length; ++i) { if (typeof object.GamePlatforms[i] !== "object") throw TypeError(".gamehall.SCThridGameList.GamePlatforms: object expected"); message.GamePlatforms[i] = $root.gamehall.ThridGamePlatforms.fromObject(object.GamePlatforms[i]); } } return message; }; /** * Creates a plain object from a SCThridGameList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCThridGameList * @static * @param {gamehall.SCThridGameList} message SCThridGameList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCThridGameList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GamePlatforms = []; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.GamePlatforms && message.GamePlatforms.length) { object.GamePlatforms = []; for (var j = 0; j < message.GamePlatforms.length; ++j) object.GamePlatforms[j] = $root.gamehall.ThridGamePlatforms.toObject(message.GamePlatforms[j], options); } return object; }; /** * Converts this SCThridGameList to JSON. * @function toJSON * @memberof gamehall.SCThridGameList * @instance * @returns {Object.} JSON object */ SCThridGameList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCThridGameList * @function getTypeUrl * @memberof gamehall.SCThridGameList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCThridGameList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCThridGameList"; }; return SCThridGameList; })(); gamehall.CSThridGameBalanceUpdate = (function() { /** * Properties of a CSThridGameBalanceUpdate. * @memberof gamehall * @interface ICSThridGameBalanceUpdate */ /** * Constructs a new CSThridGameBalanceUpdate. * @memberof gamehall * @classdesc Represents a CSThridGameBalanceUpdate. * @implements ICSThridGameBalanceUpdate * @constructor * @param {gamehall.ICSThridGameBalanceUpdate=} [properties] Properties to set */ function CSThridGameBalanceUpdate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSThridGameBalanceUpdate instance using the specified properties. * @function create * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {gamehall.ICSThridGameBalanceUpdate=} [properties] Properties to set * @returns {gamehall.CSThridGameBalanceUpdate} CSThridGameBalanceUpdate instance */ CSThridGameBalanceUpdate.create = function create(properties) { return new CSThridGameBalanceUpdate(properties); }; /** * Encodes the specified CSThridGameBalanceUpdate message. Does not implicitly {@link gamehall.CSThridGameBalanceUpdate.verify|verify} messages. * @function encode * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {gamehall.ICSThridGameBalanceUpdate} message CSThridGameBalanceUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridGameBalanceUpdate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSThridGameBalanceUpdate message, length delimited. Does not implicitly {@link gamehall.CSThridGameBalanceUpdate.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {gamehall.ICSThridGameBalanceUpdate} message CSThridGameBalanceUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSThridGameBalanceUpdate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSThridGameBalanceUpdate message from the specified reader or buffer. * @function decode * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSThridGameBalanceUpdate} CSThridGameBalanceUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridGameBalanceUpdate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSThridGameBalanceUpdate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSThridGameBalanceUpdate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSThridGameBalanceUpdate} CSThridGameBalanceUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSThridGameBalanceUpdate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSThridGameBalanceUpdate message. * @function verify * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSThridGameBalanceUpdate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSThridGameBalanceUpdate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {Object.} object Plain object * @returns {gamehall.CSThridGameBalanceUpdate} CSThridGameBalanceUpdate */ CSThridGameBalanceUpdate.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSThridGameBalanceUpdate) return object; return new $root.gamehall.CSThridGameBalanceUpdate(); }; /** * Creates a plain object from a CSThridGameBalanceUpdate message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {gamehall.CSThridGameBalanceUpdate} message CSThridGameBalanceUpdate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSThridGameBalanceUpdate.toObject = function toObject() { return {}; }; /** * Converts this CSThridGameBalanceUpdate to JSON. * @function toJSON * @memberof gamehall.CSThridGameBalanceUpdate * @instance * @returns {Object.} JSON object */ CSThridGameBalanceUpdate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSThridGameBalanceUpdate * @function getTypeUrl * @memberof gamehall.CSThridGameBalanceUpdate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSThridGameBalanceUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSThridGameBalanceUpdate"; }; return CSThridGameBalanceUpdate; })(); gamehall.SCThridGameBalanceUpdate = (function() { /** * Properties of a SCThridGameBalanceUpdate. * @memberof gamehall * @interface ISCThridGameBalanceUpdate * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCThridGameBalanceUpdate OpRetCode * @property {number|Long|null} [Coin] SCThridGameBalanceUpdate Coin */ /** * Constructs a new SCThridGameBalanceUpdate. * @memberof gamehall * @classdesc Represents a SCThridGameBalanceUpdate. * @implements ISCThridGameBalanceUpdate * @constructor * @param {gamehall.ISCThridGameBalanceUpdate=} [properties] Properties to set */ function SCThridGameBalanceUpdate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCThridGameBalanceUpdate OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCThridGameBalanceUpdate * @instance */ SCThridGameBalanceUpdate.prototype.OpRetCode = 0; /** * SCThridGameBalanceUpdate Coin. * @member {number|Long} Coin * @memberof gamehall.SCThridGameBalanceUpdate * @instance */ SCThridGameBalanceUpdate.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCThridGameBalanceUpdate instance using the specified properties. * @function create * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {gamehall.ISCThridGameBalanceUpdate=} [properties] Properties to set * @returns {gamehall.SCThridGameBalanceUpdate} SCThridGameBalanceUpdate instance */ SCThridGameBalanceUpdate.create = function create(properties) { return new SCThridGameBalanceUpdate(properties); }; /** * Encodes the specified SCThridGameBalanceUpdate message. Does not implicitly {@link gamehall.SCThridGameBalanceUpdate.verify|verify} messages. * @function encode * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {gamehall.ISCThridGameBalanceUpdate} message SCThridGameBalanceUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridGameBalanceUpdate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.Coin); return writer; }; /** * Encodes the specified SCThridGameBalanceUpdate message, length delimited. Does not implicitly {@link gamehall.SCThridGameBalanceUpdate.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {gamehall.ISCThridGameBalanceUpdate} message SCThridGameBalanceUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridGameBalanceUpdate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCThridGameBalanceUpdate message from the specified reader or buffer. * @function decode * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCThridGameBalanceUpdate} SCThridGameBalanceUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridGameBalanceUpdate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCThridGameBalanceUpdate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.Coin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCThridGameBalanceUpdate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCThridGameBalanceUpdate} SCThridGameBalanceUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridGameBalanceUpdate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCThridGameBalanceUpdate message. * @function verify * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCThridGameBalanceUpdate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; return null; }; /** * Creates a SCThridGameBalanceUpdate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {Object.} object Plain object * @returns {gamehall.SCThridGameBalanceUpdate} SCThridGameBalanceUpdate */ SCThridGameBalanceUpdate.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCThridGameBalanceUpdate) return object; var message = new $root.gamehall.SCThridGameBalanceUpdate(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCThridGameBalanceUpdate message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {gamehall.SCThridGameBalanceUpdate} message SCThridGameBalanceUpdate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCThridGameBalanceUpdate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; return object; }; /** * Converts this SCThridGameBalanceUpdate to JSON. * @function toJSON * @memberof gamehall.SCThridGameBalanceUpdate * @instance * @returns {Object.} JSON object */ SCThridGameBalanceUpdate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCThridGameBalanceUpdate * @function getTypeUrl * @memberof gamehall.SCThridGameBalanceUpdate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCThridGameBalanceUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCThridGameBalanceUpdate"; }; return SCThridGameBalanceUpdate; })(); gamehall.SCThridGameBalanceUpdateState = (function() { /** * Properties of a SCThridGameBalanceUpdateState. * @memberof gamehall * @interface ISCThridGameBalanceUpdateState * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCThridGameBalanceUpdateState OpRetCode */ /** * Constructs a new SCThridGameBalanceUpdateState. * @memberof gamehall * @classdesc Represents a SCThridGameBalanceUpdateState. * @implements ISCThridGameBalanceUpdateState * @constructor * @param {gamehall.ISCThridGameBalanceUpdateState=} [properties] Properties to set */ function SCThridGameBalanceUpdateState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCThridGameBalanceUpdateState OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCThridGameBalanceUpdateState * @instance */ SCThridGameBalanceUpdateState.prototype.OpRetCode = 0; /** * Creates a new SCThridGameBalanceUpdateState instance using the specified properties. * @function create * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {gamehall.ISCThridGameBalanceUpdateState=} [properties] Properties to set * @returns {gamehall.SCThridGameBalanceUpdateState} SCThridGameBalanceUpdateState instance */ SCThridGameBalanceUpdateState.create = function create(properties) { return new SCThridGameBalanceUpdateState(properties); }; /** * Encodes the specified SCThridGameBalanceUpdateState message. Does not implicitly {@link gamehall.SCThridGameBalanceUpdateState.verify|verify} messages. * @function encode * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {gamehall.ISCThridGameBalanceUpdateState} message SCThridGameBalanceUpdateState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridGameBalanceUpdateState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCThridGameBalanceUpdateState message, length delimited. Does not implicitly {@link gamehall.SCThridGameBalanceUpdateState.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {gamehall.ISCThridGameBalanceUpdateState} message SCThridGameBalanceUpdateState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCThridGameBalanceUpdateState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCThridGameBalanceUpdateState message from the specified reader or buffer. * @function decode * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCThridGameBalanceUpdateState} SCThridGameBalanceUpdateState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridGameBalanceUpdateState.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCThridGameBalanceUpdateState(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCThridGameBalanceUpdateState message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCThridGameBalanceUpdateState} SCThridGameBalanceUpdateState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCThridGameBalanceUpdateState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCThridGameBalanceUpdateState message. * @function verify * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCThridGameBalanceUpdateState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCThridGameBalanceUpdateState message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {Object.} object Plain object * @returns {gamehall.SCThridGameBalanceUpdateState} SCThridGameBalanceUpdateState */ SCThridGameBalanceUpdateState.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCThridGameBalanceUpdateState) return object; var message = new $root.gamehall.SCThridGameBalanceUpdateState(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCThridGameBalanceUpdateState message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {gamehall.SCThridGameBalanceUpdateState} message SCThridGameBalanceUpdateState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCThridGameBalanceUpdateState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCThridGameBalanceUpdateState to JSON. * @function toJSON * @memberof gamehall.SCThridGameBalanceUpdateState * @instance * @returns {Object.} JSON object */ SCThridGameBalanceUpdateState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCThridGameBalanceUpdateState * @function getTypeUrl * @memberof gamehall.SCThridGameBalanceUpdateState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCThridGameBalanceUpdateState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCThridGameBalanceUpdateState"; }; return SCThridGameBalanceUpdateState; })(); gamehall.CSCreatePrivateRoom = (function() { /** * Properties of a CSCreatePrivateRoom. * @memberof gamehall * @interface ICSCreatePrivateRoom * @property {number|null} [GameFreeId] CSCreatePrivateRoom GameFreeId * @property {Array.|null} [Params] CSCreatePrivateRoom Params */ /** * Constructs a new CSCreatePrivateRoom. * @memberof gamehall * @classdesc Represents a CSCreatePrivateRoom. * @implements ICSCreatePrivateRoom * @constructor * @param {gamehall.ICSCreatePrivateRoom=} [properties] Properties to set */ function CSCreatePrivateRoom(properties) { this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCreatePrivateRoom GameFreeId. * @member {number} GameFreeId * @memberof gamehall.CSCreatePrivateRoom * @instance */ CSCreatePrivateRoom.prototype.GameFreeId = 0; /** * CSCreatePrivateRoom Params. * @member {Array.} Params * @memberof gamehall.CSCreatePrivateRoom * @instance */ CSCreatePrivateRoom.prototype.Params = $util.emptyArray; /** * Creates a new CSCreatePrivateRoom instance using the specified properties. * @function create * @memberof gamehall.CSCreatePrivateRoom * @static * @param {gamehall.ICSCreatePrivateRoom=} [properties] Properties to set * @returns {gamehall.CSCreatePrivateRoom} CSCreatePrivateRoom instance */ CSCreatePrivateRoom.create = function create(properties) { return new CSCreatePrivateRoom(properties); }; /** * Encodes the specified CSCreatePrivateRoom message. Does not implicitly {@link gamehall.CSCreatePrivateRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSCreatePrivateRoom * @static * @param {gamehall.ICSCreatePrivateRoom} message CSCreatePrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreatePrivateRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.Params != null && message.Params.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified CSCreatePrivateRoom message, length delimited. Does not implicitly {@link gamehall.CSCreatePrivateRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCreatePrivateRoom * @static * @param {gamehall.ICSCreatePrivateRoom} message CSCreatePrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreatePrivateRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCreatePrivateRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCreatePrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCreatePrivateRoom} CSCreatePrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreatePrivateRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCreatePrivateRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCreatePrivateRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCreatePrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCreatePrivateRoom} CSCreatePrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreatePrivateRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCreatePrivateRoom message. * @function verify * @memberof gamehall.CSCreatePrivateRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCreatePrivateRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } return null; }; /** * Creates a CSCreatePrivateRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCreatePrivateRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSCreatePrivateRoom} CSCreatePrivateRoom */ CSCreatePrivateRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCreatePrivateRoom) return object; var message = new $root.gamehall.CSCreatePrivateRoom(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.CSCreatePrivateRoom.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } return message; }; /** * Creates a plain object from a CSCreatePrivateRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCreatePrivateRoom * @static * @param {gamehall.CSCreatePrivateRoom} message CSCreatePrivateRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCreatePrivateRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Params = []; if (options.defaults) object.GameFreeId = 0; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } return object; }; /** * Converts this CSCreatePrivateRoom to JSON. * @function toJSON * @memberof gamehall.CSCreatePrivateRoom * @instance * @returns {Object.} JSON object */ CSCreatePrivateRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCreatePrivateRoom * @function getTypeUrl * @memberof gamehall.CSCreatePrivateRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCreatePrivateRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCreatePrivateRoom"; }; return CSCreatePrivateRoom; })(); gamehall.SCCreatePrivateRoom = (function() { /** * Properties of a SCCreatePrivateRoom. * @memberof gamehall * @interface ISCCreatePrivateRoom * @property {number|null} [GameFreeId] SCCreatePrivateRoom GameFreeId * @property {Array.|null} [Params] SCCreatePrivateRoom Params * @property {number|null} [RoomId] SCCreatePrivateRoom RoomId * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCCreatePrivateRoom OpRetCode */ /** * Constructs a new SCCreatePrivateRoom. * @memberof gamehall * @classdesc Represents a SCCreatePrivateRoom. * @implements ISCCreatePrivateRoom * @constructor * @param {gamehall.ISCCreatePrivateRoom=} [properties] Properties to set */ function SCCreatePrivateRoom(properties) { this.Params = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCreatePrivateRoom GameFreeId. * @member {number} GameFreeId * @memberof gamehall.SCCreatePrivateRoom * @instance */ SCCreatePrivateRoom.prototype.GameFreeId = 0; /** * SCCreatePrivateRoom Params. * @member {Array.} Params * @memberof gamehall.SCCreatePrivateRoom * @instance */ SCCreatePrivateRoom.prototype.Params = $util.emptyArray; /** * SCCreatePrivateRoom RoomId. * @member {number} RoomId * @memberof gamehall.SCCreatePrivateRoom * @instance */ SCCreatePrivateRoom.prototype.RoomId = 0; /** * SCCreatePrivateRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCCreatePrivateRoom * @instance */ SCCreatePrivateRoom.prototype.OpRetCode = 0; /** * Creates a new SCCreatePrivateRoom instance using the specified properties. * @function create * @memberof gamehall.SCCreatePrivateRoom * @static * @param {gamehall.ISCCreatePrivateRoom=} [properties] Properties to set * @returns {gamehall.SCCreatePrivateRoom} SCCreatePrivateRoom instance */ SCCreatePrivateRoom.create = function create(properties) { return new SCCreatePrivateRoom(properties); }; /** * Encodes the specified SCCreatePrivateRoom message. Does not implicitly {@link gamehall.SCCreatePrivateRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCCreatePrivateRoom * @static * @param {gamehall.ISCCreatePrivateRoom} message SCCreatePrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCreatePrivateRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.Params != null && message.Params.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); for (var i = 0; i < message.Params.length; ++i) writer.int32(message.Params[i]); writer.ldelim(); } if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.RoomId); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCCreatePrivateRoom message, length delimited. Does not implicitly {@link gamehall.SCCreatePrivateRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCreatePrivateRoom * @static * @param {gamehall.ISCCreatePrivateRoom} message SCCreatePrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCreatePrivateRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCreatePrivateRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCreatePrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCreatePrivateRoom} SCCreatePrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCreatePrivateRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCreatePrivateRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { if (!(message.Params && message.Params.length)) message.Params = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Params.push(reader.int32()); } else message.Params.push(reader.int32()); break; } case 3: { message.RoomId = reader.int32(); break; } case 4: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCreatePrivateRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCreatePrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCreatePrivateRoom} SCCreatePrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCreatePrivateRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCreatePrivateRoom message. * @function verify * @memberof gamehall.SCCreatePrivateRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCreatePrivateRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.Params != null && message.hasOwnProperty("Params")) { if (!Array.isArray(message.Params)) return "Params: array expected"; for (var i = 0; i < message.Params.length; ++i) if (!$util.isInteger(message.Params[i])) return "Params: integer[] expected"; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCCreatePrivateRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCreatePrivateRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCCreatePrivateRoom} SCCreatePrivateRoom */ SCCreatePrivateRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCreatePrivateRoom) return object; var message = new $root.gamehall.SCCreatePrivateRoom(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.Params) { if (!Array.isArray(object.Params)) throw TypeError(".gamehall.SCCreatePrivateRoom.Params: array expected"); message.Params = []; for (var i = 0; i < object.Params.length; ++i) message.Params[i] = object.Params[i] | 0; } if (object.RoomId != null) message.RoomId = object.RoomId | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCCreatePrivateRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCreatePrivateRoom * @static * @param {gamehall.SCCreatePrivateRoom} message SCCreatePrivateRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCreatePrivateRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Params = []; if (options.defaults) { object.GameFreeId = 0; object.RoomId = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.Params && message.Params.length) { object.Params = []; for (var j = 0; j < message.Params.length; ++j) object.Params[j] = message.Params[j]; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCCreatePrivateRoom to JSON. * @function toJSON * @memberof gamehall.SCCreatePrivateRoom * @instance * @returns {Object.} JSON object */ SCCreatePrivateRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCreatePrivateRoom * @function getTypeUrl * @memberof gamehall.SCCreatePrivateRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCreatePrivateRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCreatePrivateRoom"; }; return SCCreatePrivateRoom; })(); gamehall.PrivateRoomInfo = (function() { /** * Properties of a PrivateRoomInfo. * @memberof gamehall * @interface IPrivateRoomInfo * @property {number|null} [GameFreeId] PrivateRoomInfo GameFreeId * @property {number|null} [RoomId] PrivateRoomInfo RoomId * @property {number|null} [CurrRound] PrivateRoomInfo CurrRound * @property {number|null} [MaxRound] PrivateRoomInfo MaxRound * @property {number|null} [CurrNum] PrivateRoomInfo CurrNum * @property {number|null} [MaxPlayer] PrivateRoomInfo MaxPlayer * @property {number|null} [CreateTs] PrivateRoomInfo CreateTs */ /** * Constructs a new PrivateRoomInfo. * @memberof gamehall * @classdesc Represents a PrivateRoomInfo. * @implements IPrivateRoomInfo * @constructor * @param {gamehall.IPrivateRoomInfo=} [properties] Properties to set */ function PrivateRoomInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * PrivateRoomInfo GameFreeId. * @member {number} GameFreeId * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.GameFreeId = 0; /** * PrivateRoomInfo RoomId. * @member {number} RoomId * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.RoomId = 0; /** * PrivateRoomInfo CurrRound. * @member {number} CurrRound * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.CurrRound = 0; /** * PrivateRoomInfo MaxRound. * @member {number} MaxRound * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.MaxRound = 0; /** * PrivateRoomInfo CurrNum. * @member {number} CurrNum * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.CurrNum = 0; /** * PrivateRoomInfo MaxPlayer. * @member {number} MaxPlayer * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.MaxPlayer = 0; /** * PrivateRoomInfo CreateTs. * @member {number} CreateTs * @memberof gamehall.PrivateRoomInfo * @instance */ PrivateRoomInfo.prototype.CreateTs = 0; /** * Creates a new PrivateRoomInfo instance using the specified properties. * @function create * @memberof gamehall.PrivateRoomInfo * @static * @param {gamehall.IPrivateRoomInfo=} [properties] Properties to set * @returns {gamehall.PrivateRoomInfo} PrivateRoomInfo instance */ PrivateRoomInfo.create = function create(properties) { return new PrivateRoomInfo(properties); }; /** * Encodes the specified PrivateRoomInfo message. Does not implicitly {@link gamehall.PrivateRoomInfo.verify|verify} messages. * @function encode * @memberof gamehall.PrivateRoomInfo * @static * @param {gamehall.IPrivateRoomInfo} message PrivateRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PrivateRoomInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.RoomId); if (message.CurrRound != null && Object.hasOwnProperty.call(message, "CurrRound")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.CurrRound); if (message.MaxRound != null && Object.hasOwnProperty.call(message, "MaxRound")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.MaxRound); if (message.CurrNum != null && Object.hasOwnProperty.call(message, "CurrNum")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.CurrNum); if (message.MaxPlayer != null && Object.hasOwnProperty.call(message, "MaxPlayer")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.MaxPlayer); if (message.CreateTs != null && Object.hasOwnProperty.call(message, "CreateTs")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.CreateTs); return writer; }; /** * Encodes the specified PrivateRoomInfo message, length delimited. Does not implicitly {@link gamehall.PrivateRoomInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.PrivateRoomInfo * @static * @param {gamehall.IPrivateRoomInfo} message PrivateRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PrivateRoomInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PrivateRoomInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.PrivateRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.PrivateRoomInfo} PrivateRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PrivateRoomInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.PrivateRoomInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.RoomId = reader.int32(); break; } case 3: { message.CurrRound = reader.int32(); break; } case 4: { message.MaxRound = reader.int32(); break; } case 5: { message.CurrNum = reader.int32(); break; } case 6: { message.MaxPlayer = reader.int32(); break; } case 7: { message.CreateTs = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PrivateRoomInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.PrivateRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.PrivateRoomInfo} PrivateRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PrivateRoomInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PrivateRoomInfo message. * @function verify * @memberof gamehall.PrivateRoomInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PrivateRoomInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.CurrRound != null && message.hasOwnProperty("CurrRound")) if (!$util.isInteger(message.CurrRound)) return "CurrRound: integer expected"; if (message.MaxRound != null && message.hasOwnProperty("MaxRound")) if (!$util.isInteger(message.MaxRound)) return "MaxRound: integer expected"; if (message.CurrNum != null && message.hasOwnProperty("CurrNum")) if (!$util.isInteger(message.CurrNum)) return "CurrNum: integer expected"; if (message.MaxPlayer != null && message.hasOwnProperty("MaxPlayer")) if (!$util.isInteger(message.MaxPlayer)) return "MaxPlayer: integer expected"; if (message.CreateTs != null && message.hasOwnProperty("CreateTs")) if (!$util.isInteger(message.CreateTs)) return "CreateTs: integer expected"; return null; }; /** * Creates a PrivateRoomInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.PrivateRoomInfo * @static * @param {Object.} object Plain object * @returns {gamehall.PrivateRoomInfo} PrivateRoomInfo */ PrivateRoomInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.PrivateRoomInfo) return object; var message = new $root.gamehall.PrivateRoomInfo(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.CurrRound != null) message.CurrRound = object.CurrRound | 0; if (object.MaxRound != null) message.MaxRound = object.MaxRound | 0; if (object.CurrNum != null) message.CurrNum = object.CurrNum | 0; if (object.MaxPlayer != null) message.MaxPlayer = object.MaxPlayer | 0; if (object.CreateTs != null) message.CreateTs = object.CreateTs | 0; return message; }; /** * Creates a plain object from a PrivateRoomInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.PrivateRoomInfo * @static * @param {gamehall.PrivateRoomInfo} message PrivateRoomInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PrivateRoomInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; object.RoomId = 0; object.CurrRound = 0; object.MaxRound = 0; object.CurrNum = 0; object.MaxPlayer = 0; object.CreateTs = 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.CurrRound != null && message.hasOwnProperty("CurrRound")) object.CurrRound = message.CurrRound; if (message.MaxRound != null && message.hasOwnProperty("MaxRound")) object.MaxRound = message.MaxRound; if (message.CurrNum != null && message.hasOwnProperty("CurrNum")) object.CurrNum = message.CurrNum; if (message.MaxPlayer != null && message.hasOwnProperty("MaxPlayer")) object.MaxPlayer = message.MaxPlayer; if (message.CreateTs != null && message.hasOwnProperty("CreateTs")) object.CreateTs = message.CreateTs; return object; }; /** * Converts this PrivateRoomInfo to JSON. * @function toJSON * @memberof gamehall.PrivateRoomInfo * @instance * @returns {Object.} JSON object */ PrivateRoomInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PrivateRoomInfo * @function getTypeUrl * @memberof gamehall.PrivateRoomInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PrivateRoomInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.PrivateRoomInfo"; }; return PrivateRoomInfo; })(); gamehall.CSGetPrivateRoomList = (function() { /** * Properties of a CSGetPrivateRoomList. * @memberof gamehall * @interface ICSGetPrivateRoomList */ /** * Constructs a new CSGetPrivateRoomList. * @memberof gamehall * @classdesc Represents a CSGetPrivateRoomList. * @implements ICSGetPrivateRoomList * @constructor * @param {gamehall.ICSGetPrivateRoomList=} [properties] Properties to set */ function CSGetPrivateRoomList(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSGetPrivateRoomList instance using the specified properties. * @function create * @memberof gamehall.CSGetPrivateRoomList * @static * @param {gamehall.ICSGetPrivateRoomList=} [properties] Properties to set * @returns {gamehall.CSGetPrivateRoomList} CSGetPrivateRoomList instance */ CSGetPrivateRoomList.create = function create(properties) { return new CSGetPrivateRoomList(properties); }; /** * Encodes the specified CSGetPrivateRoomList message. Does not implicitly {@link gamehall.CSGetPrivateRoomList.verify|verify} messages. * @function encode * @memberof gamehall.CSGetPrivateRoomList * @static * @param {gamehall.ICSGetPrivateRoomList} message CSGetPrivateRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPrivateRoomList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSGetPrivateRoomList message, length delimited. Does not implicitly {@link gamehall.CSGetPrivateRoomList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGetPrivateRoomList * @static * @param {gamehall.ICSGetPrivateRoomList} message CSGetPrivateRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPrivateRoomList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetPrivateRoomList message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGetPrivateRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGetPrivateRoomList} CSGetPrivateRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPrivateRoomList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGetPrivateRoomList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetPrivateRoomList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGetPrivateRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGetPrivateRoomList} CSGetPrivateRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPrivateRoomList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetPrivateRoomList message. * @function verify * @memberof gamehall.CSGetPrivateRoomList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetPrivateRoomList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSGetPrivateRoomList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGetPrivateRoomList * @static * @param {Object.} object Plain object * @returns {gamehall.CSGetPrivateRoomList} CSGetPrivateRoomList */ CSGetPrivateRoomList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGetPrivateRoomList) return object; return new $root.gamehall.CSGetPrivateRoomList(); }; /** * Creates a plain object from a CSGetPrivateRoomList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGetPrivateRoomList * @static * @param {gamehall.CSGetPrivateRoomList} message CSGetPrivateRoomList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetPrivateRoomList.toObject = function toObject() { return {}; }; /** * Converts this CSGetPrivateRoomList to JSON. * @function toJSON * @memberof gamehall.CSGetPrivateRoomList * @instance * @returns {Object.} JSON object */ CSGetPrivateRoomList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetPrivateRoomList * @function getTypeUrl * @memberof gamehall.CSGetPrivateRoomList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetPrivateRoomList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGetPrivateRoomList"; }; return CSGetPrivateRoomList; })(); gamehall.SCGetPrivateRoomList = (function() { /** * Properties of a SCGetPrivateRoomList. * @memberof gamehall * @interface ISCGetPrivateRoomList * @property {Array.|null} [Datas] SCGetPrivateRoomList Datas */ /** * Constructs a new SCGetPrivateRoomList. * @memberof gamehall * @classdesc Represents a SCGetPrivateRoomList. * @implements ISCGetPrivateRoomList * @constructor * @param {gamehall.ISCGetPrivateRoomList=} [properties] Properties to set */ function SCGetPrivateRoomList(properties) { this.Datas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGetPrivateRoomList Datas. * @member {Array.} Datas * @memberof gamehall.SCGetPrivateRoomList * @instance */ SCGetPrivateRoomList.prototype.Datas = $util.emptyArray; /** * Creates a new SCGetPrivateRoomList instance using the specified properties. * @function create * @memberof gamehall.SCGetPrivateRoomList * @static * @param {gamehall.ISCGetPrivateRoomList=} [properties] Properties to set * @returns {gamehall.SCGetPrivateRoomList} SCGetPrivateRoomList instance */ SCGetPrivateRoomList.create = function create(properties) { return new SCGetPrivateRoomList(properties); }; /** * Encodes the specified SCGetPrivateRoomList message. Does not implicitly {@link gamehall.SCGetPrivateRoomList.verify|verify} messages. * @function encode * @memberof gamehall.SCGetPrivateRoomList * @static * @param {gamehall.ISCGetPrivateRoomList} message SCGetPrivateRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetPrivateRoomList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Datas != null && message.Datas.length) for (var i = 0; i < message.Datas.length; ++i) $root.gamehall.PrivateRoomInfo.encode(message.Datas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCGetPrivateRoomList message, length delimited. Does not implicitly {@link gamehall.SCGetPrivateRoomList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGetPrivateRoomList * @static * @param {gamehall.ISCGetPrivateRoomList} message SCGetPrivateRoomList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetPrivateRoomList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGetPrivateRoomList message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGetPrivateRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGetPrivateRoomList} SCGetPrivateRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetPrivateRoomList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGetPrivateRoomList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.Datas && message.Datas.length)) message.Datas = []; message.Datas.push($root.gamehall.PrivateRoomInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGetPrivateRoomList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGetPrivateRoomList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGetPrivateRoomList} SCGetPrivateRoomList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetPrivateRoomList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGetPrivateRoomList message. * @function verify * @memberof gamehall.SCGetPrivateRoomList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGetPrivateRoomList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Datas != null && message.hasOwnProperty("Datas")) { if (!Array.isArray(message.Datas)) return "Datas: array expected"; for (var i = 0; i < message.Datas.length; ++i) { var error = $root.gamehall.PrivateRoomInfo.verify(message.Datas[i]); if (error) return "Datas." + error; } } return null; }; /** * Creates a SCGetPrivateRoomList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGetPrivateRoomList * @static * @param {Object.} object Plain object * @returns {gamehall.SCGetPrivateRoomList} SCGetPrivateRoomList */ SCGetPrivateRoomList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGetPrivateRoomList) return object; var message = new $root.gamehall.SCGetPrivateRoomList(); if (object.Datas) { if (!Array.isArray(object.Datas)) throw TypeError(".gamehall.SCGetPrivateRoomList.Datas: array expected"); message.Datas = []; for (var i = 0; i < object.Datas.length; ++i) { if (typeof object.Datas[i] !== "object") throw TypeError(".gamehall.SCGetPrivateRoomList.Datas: object expected"); message.Datas[i] = $root.gamehall.PrivateRoomInfo.fromObject(object.Datas[i]); } } return message; }; /** * Creates a plain object from a SCGetPrivateRoomList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGetPrivateRoomList * @static * @param {gamehall.SCGetPrivateRoomList} message SCGetPrivateRoomList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGetPrivateRoomList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Datas = []; if (message.Datas && message.Datas.length) { object.Datas = []; for (var j = 0; j < message.Datas.length; ++j) object.Datas[j] = $root.gamehall.PrivateRoomInfo.toObject(message.Datas[j], options); } return object; }; /** * Converts this SCGetPrivateRoomList to JSON. * @function toJSON * @memberof gamehall.SCGetPrivateRoomList * @instance * @returns {Object.} JSON object */ SCGetPrivateRoomList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGetPrivateRoomList * @function getTypeUrl * @memberof gamehall.SCGetPrivateRoomList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGetPrivateRoomList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGetPrivateRoomList"; }; return SCGetPrivateRoomList; })(); gamehall.CSGetPrivateRoomHistory = (function() { /** * Properties of a CSGetPrivateRoomHistory. * @memberof gamehall * @interface ICSGetPrivateRoomHistory * @property {number|null} [QueryTime] CSGetPrivateRoomHistory QueryTime */ /** * Constructs a new CSGetPrivateRoomHistory. * @memberof gamehall * @classdesc Represents a CSGetPrivateRoomHistory. * @implements ICSGetPrivateRoomHistory * @constructor * @param {gamehall.ICSGetPrivateRoomHistory=} [properties] Properties to set */ function CSGetPrivateRoomHistory(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSGetPrivateRoomHistory QueryTime. * @member {number} QueryTime * @memberof gamehall.CSGetPrivateRoomHistory * @instance */ CSGetPrivateRoomHistory.prototype.QueryTime = 0; /** * Creates a new CSGetPrivateRoomHistory instance using the specified properties. * @function create * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {gamehall.ICSGetPrivateRoomHistory=} [properties] Properties to set * @returns {gamehall.CSGetPrivateRoomHistory} CSGetPrivateRoomHistory instance */ CSGetPrivateRoomHistory.create = function create(properties) { return new CSGetPrivateRoomHistory(properties); }; /** * Encodes the specified CSGetPrivateRoomHistory message. Does not implicitly {@link gamehall.CSGetPrivateRoomHistory.verify|verify} messages. * @function encode * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {gamehall.ICSGetPrivateRoomHistory} message CSGetPrivateRoomHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPrivateRoomHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.QueryTime != null && Object.hasOwnProperty.call(message, "QueryTime")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.QueryTime); return writer; }; /** * Encodes the specified CSGetPrivateRoomHistory message, length delimited. Does not implicitly {@link gamehall.CSGetPrivateRoomHistory.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {gamehall.ICSGetPrivateRoomHistory} message CSGetPrivateRoomHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPrivateRoomHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetPrivateRoomHistory message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGetPrivateRoomHistory} CSGetPrivateRoomHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPrivateRoomHistory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGetPrivateRoomHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.QueryTime = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetPrivateRoomHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGetPrivateRoomHistory} CSGetPrivateRoomHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPrivateRoomHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetPrivateRoomHistory message. * @function verify * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetPrivateRoomHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.QueryTime != null && message.hasOwnProperty("QueryTime")) if (!$util.isInteger(message.QueryTime)) return "QueryTime: integer expected"; return null; }; /** * Creates a CSGetPrivateRoomHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {Object.} object Plain object * @returns {gamehall.CSGetPrivateRoomHistory} CSGetPrivateRoomHistory */ CSGetPrivateRoomHistory.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGetPrivateRoomHistory) return object; var message = new $root.gamehall.CSGetPrivateRoomHistory(); if (object.QueryTime != null) message.QueryTime = object.QueryTime | 0; return message; }; /** * Creates a plain object from a CSGetPrivateRoomHistory message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {gamehall.CSGetPrivateRoomHistory} message CSGetPrivateRoomHistory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetPrivateRoomHistory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.QueryTime = 0; if (message.QueryTime != null && message.hasOwnProperty("QueryTime")) object.QueryTime = message.QueryTime; return object; }; /** * Converts this CSGetPrivateRoomHistory to JSON. * @function toJSON * @memberof gamehall.CSGetPrivateRoomHistory * @instance * @returns {Object.} JSON object */ CSGetPrivateRoomHistory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetPrivateRoomHistory * @function getTypeUrl * @memberof gamehall.CSGetPrivateRoomHistory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetPrivateRoomHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGetPrivateRoomHistory"; }; return CSGetPrivateRoomHistory; })(); gamehall.PrivateRoomHistory = (function() { /** * Properties of a PrivateRoomHistory. * @memberof gamehall * @interface IPrivateRoomHistory * @property {number|null} [GameFreeId] PrivateRoomHistory GameFreeId * @property {number|null} [RoomId] PrivateRoomHistory RoomId * @property {number|null} [CreateTime] PrivateRoomHistory CreateTime * @property {number|null} [DestroyTime] PrivateRoomHistory DestroyTime * @property {number|null} [CreateFee] PrivateRoomHistory CreateFee */ /** * Constructs a new PrivateRoomHistory. * @memberof gamehall * @classdesc Represents a PrivateRoomHistory. * @implements IPrivateRoomHistory * @constructor * @param {gamehall.IPrivateRoomHistory=} [properties] Properties to set */ function PrivateRoomHistory(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * PrivateRoomHistory GameFreeId. * @member {number} GameFreeId * @memberof gamehall.PrivateRoomHistory * @instance */ PrivateRoomHistory.prototype.GameFreeId = 0; /** * PrivateRoomHistory RoomId. * @member {number} RoomId * @memberof gamehall.PrivateRoomHistory * @instance */ PrivateRoomHistory.prototype.RoomId = 0; /** * PrivateRoomHistory CreateTime. * @member {number} CreateTime * @memberof gamehall.PrivateRoomHistory * @instance */ PrivateRoomHistory.prototype.CreateTime = 0; /** * PrivateRoomHistory DestroyTime. * @member {number} DestroyTime * @memberof gamehall.PrivateRoomHistory * @instance */ PrivateRoomHistory.prototype.DestroyTime = 0; /** * PrivateRoomHistory CreateFee. * @member {number} CreateFee * @memberof gamehall.PrivateRoomHistory * @instance */ PrivateRoomHistory.prototype.CreateFee = 0; /** * Creates a new PrivateRoomHistory instance using the specified properties. * @function create * @memberof gamehall.PrivateRoomHistory * @static * @param {gamehall.IPrivateRoomHistory=} [properties] Properties to set * @returns {gamehall.PrivateRoomHistory} PrivateRoomHistory instance */ PrivateRoomHistory.create = function create(properties) { return new PrivateRoomHistory(properties); }; /** * Encodes the specified PrivateRoomHistory message. Does not implicitly {@link gamehall.PrivateRoomHistory.verify|verify} messages. * @function encode * @memberof gamehall.PrivateRoomHistory * @static * @param {gamehall.IPrivateRoomHistory} message PrivateRoomHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PrivateRoomHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.RoomId); if (message.CreateTime != null && Object.hasOwnProperty.call(message, "CreateTime")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.CreateTime); if (message.DestroyTime != null && Object.hasOwnProperty.call(message, "DestroyTime")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.DestroyTime); if (message.CreateFee != null && Object.hasOwnProperty.call(message, "CreateFee")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.CreateFee); return writer; }; /** * Encodes the specified PrivateRoomHistory message, length delimited. Does not implicitly {@link gamehall.PrivateRoomHistory.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.PrivateRoomHistory * @static * @param {gamehall.IPrivateRoomHistory} message PrivateRoomHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PrivateRoomHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PrivateRoomHistory message from the specified reader or buffer. * @function decode * @memberof gamehall.PrivateRoomHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.PrivateRoomHistory} PrivateRoomHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PrivateRoomHistory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.PrivateRoomHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.RoomId = reader.int32(); break; } case 3: { message.CreateTime = reader.int32(); break; } case 4: { message.DestroyTime = reader.int32(); break; } case 5: { message.CreateFee = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PrivateRoomHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.PrivateRoomHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.PrivateRoomHistory} PrivateRoomHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PrivateRoomHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PrivateRoomHistory message. * @function verify * @memberof gamehall.PrivateRoomHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PrivateRoomHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.CreateTime != null && message.hasOwnProperty("CreateTime")) if (!$util.isInteger(message.CreateTime)) return "CreateTime: integer expected"; if (message.DestroyTime != null && message.hasOwnProperty("DestroyTime")) if (!$util.isInteger(message.DestroyTime)) return "DestroyTime: integer expected"; if (message.CreateFee != null && message.hasOwnProperty("CreateFee")) if (!$util.isInteger(message.CreateFee)) return "CreateFee: integer expected"; return null; }; /** * Creates a PrivateRoomHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.PrivateRoomHistory * @static * @param {Object.} object Plain object * @returns {gamehall.PrivateRoomHistory} PrivateRoomHistory */ PrivateRoomHistory.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.PrivateRoomHistory) return object; var message = new $root.gamehall.PrivateRoomHistory(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.CreateTime != null) message.CreateTime = object.CreateTime | 0; if (object.DestroyTime != null) message.DestroyTime = object.DestroyTime | 0; if (object.CreateFee != null) message.CreateFee = object.CreateFee | 0; return message; }; /** * Creates a plain object from a PrivateRoomHistory message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.PrivateRoomHistory * @static * @param {gamehall.PrivateRoomHistory} message PrivateRoomHistory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PrivateRoomHistory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; object.RoomId = 0; object.CreateTime = 0; object.DestroyTime = 0; object.CreateFee = 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.CreateTime != null && message.hasOwnProperty("CreateTime")) object.CreateTime = message.CreateTime; if (message.DestroyTime != null && message.hasOwnProperty("DestroyTime")) object.DestroyTime = message.DestroyTime; if (message.CreateFee != null && message.hasOwnProperty("CreateFee")) object.CreateFee = message.CreateFee; return object; }; /** * Converts this PrivateRoomHistory to JSON. * @function toJSON * @memberof gamehall.PrivateRoomHistory * @instance * @returns {Object.} JSON object */ PrivateRoomHistory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PrivateRoomHistory * @function getTypeUrl * @memberof gamehall.PrivateRoomHistory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PrivateRoomHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.PrivateRoomHistory"; }; return PrivateRoomHistory; })(); gamehall.SCGetPrivateRoomHistory = (function() { /** * Properties of a SCGetPrivateRoomHistory. * @memberof gamehall * @interface ISCGetPrivateRoomHistory * @property {number|null} [QueryTime] SCGetPrivateRoomHistory QueryTime * @property {Array.|null} [Datas] SCGetPrivateRoomHistory Datas */ /** * Constructs a new SCGetPrivateRoomHistory. * @memberof gamehall * @classdesc Represents a SCGetPrivateRoomHistory. * @implements ISCGetPrivateRoomHistory * @constructor * @param {gamehall.ISCGetPrivateRoomHistory=} [properties] Properties to set */ function SCGetPrivateRoomHistory(properties) { this.Datas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGetPrivateRoomHistory QueryTime. * @member {number} QueryTime * @memberof gamehall.SCGetPrivateRoomHistory * @instance */ SCGetPrivateRoomHistory.prototype.QueryTime = 0; /** * SCGetPrivateRoomHistory Datas. * @member {Array.} Datas * @memberof gamehall.SCGetPrivateRoomHistory * @instance */ SCGetPrivateRoomHistory.prototype.Datas = $util.emptyArray; /** * Creates a new SCGetPrivateRoomHistory instance using the specified properties. * @function create * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {gamehall.ISCGetPrivateRoomHistory=} [properties] Properties to set * @returns {gamehall.SCGetPrivateRoomHistory} SCGetPrivateRoomHistory instance */ SCGetPrivateRoomHistory.create = function create(properties) { return new SCGetPrivateRoomHistory(properties); }; /** * Encodes the specified SCGetPrivateRoomHistory message. Does not implicitly {@link gamehall.SCGetPrivateRoomHistory.verify|verify} messages. * @function encode * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {gamehall.ISCGetPrivateRoomHistory} message SCGetPrivateRoomHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetPrivateRoomHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.QueryTime != null && Object.hasOwnProperty.call(message, "QueryTime")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.QueryTime); if (message.Datas != null && message.Datas.length) for (var i = 0; i < message.Datas.length; ++i) $root.gamehall.PrivateRoomHistory.encode(message.Datas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCGetPrivateRoomHistory message, length delimited. Does not implicitly {@link gamehall.SCGetPrivateRoomHistory.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {gamehall.ISCGetPrivateRoomHistory} message SCGetPrivateRoomHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetPrivateRoomHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGetPrivateRoomHistory message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGetPrivateRoomHistory} SCGetPrivateRoomHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetPrivateRoomHistory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGetPrivateRoomHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.QueryTime = reader.int32(); break; } case 2: { if (!(message.Datas && message.Datas.length)) message.Datas = []; message.Datas.push($root.gamehall.PrivateRoomHistory.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGetPrivateRoomHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGetPrivateRoomHistory} SCGetPrivateRoomHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetPrivateRoomHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGetPrivateRoomHistory message. * @function verify * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGetPrivateRoomHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.QueryTime != null && message.hasOwnProperty("QueryTime")) if (!$util.isInteger(message.QueryTime)) return "QueryTime: integer expected"; if (message.Datas != null && message.hasOwnProperty("Datas")) { if (!Array.isArray(message.Datas)) return "Datas: array expected"; for (var i = 0; i < message.Datas.length; ++i) { var error = $root.gamehall.PrivateRoomHistory.verify(message.Datas[i]); if (error) return "Datas." + error; } } return null; }; /** * Creates a SCGetPrivateRoomHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {Object.} object Plain object * @returns {gamehall.SCGetPrivateRoomHistory} SCGetPrivateRoomHistory */ SCGetPrivateRoomHistory.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGetPrivateRoomHistory) return object; var message = new $root.gamehall.SCGetPrivateRoomHistory(); if (object.QueryTime != null) message.QueryTime = object.QueryTime | 0; if (object.Datas) { if (!Array.isArray(object.Datas)) throw TypeError(".gamehall.SCGetPrivateRoomHistory.Datas: array expected"); message.Datas = []; for (var i = 0; i < object.Datas.length; ++i) { if (typeof object.Datas[i] !== "object") throw TypeError(".gamehall.SCGetPrivateRoomHistory.Datas: object expected"); message.Datas[i] = $root.gamehall.PrivateRoomHistory.fromObject(object.Datas[i]); } } return message; }; /** * Creates a plain object from a SCGetPrivateRoomHistory message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {gamehall.SCGetPrivateRoomHistory} message SCGetPrivateRoomHistory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGetPrivateRoomHistory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Datas = []; if (options.defaults) object.QueryTime = 0; if (message.QueryTime != null && message.hasOwnProperty("QueryTime")) object.QueryTime = message.QueryTime; if (message.Datas && message.Datas.length) { object.Datas = []; for (var j = 0; j < message.Datas.length; ++j) object.Datas[j] = $root.gamehall.PrivateRoomHistory.toObject(message.Datas[j], options); } return object; }; /** * Converts this SCGetPrivateRoomHistory to JSON. * @function toJSON * @memberof gamehall.SCGetPrivateRoomHistory * @instance * @returns {Object.} JSON object */ SCGetPrivateRoomHistory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGetPrivateRoomHistory * @function getTypeUrl * @memberof gamehall.SCGetPrivateRoomHistory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGetPrivateRoomHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGetPrivateRoomHistory"; }; return SCGetPrivateRoomHistory; })(); gamehall.CSDestroyPrivateRoom = (function() { /** * Properties of a CSDestroyPrivateRoom. * @memberof gamehall * @interface ICSDestroyPrivateRoom * @property {number|null} [RoomId] CSDestroyPrivateRoom RoomId */ /** * Constructs a new CSDestroyPrivateRoom. * @memberof gamehall * @classdesc Represents a CSDestroyPrivateRoom. * @implements ICSDestroyPrivateRoom * @constructor * @param {gamehall.ICSDestroyPrivateRoom=} [properties] Properties to set */ function CSDestroyPrivateRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSDestroyPrivateRoom RoomId. * @member {number} RoomId * @memberof gamehall.CSDestroyPrivateRoom * @instance */ CSDestroyPrivateRoom.prototype.RoomId = 0; /** * Creates a new CSDestroyPrivateRoom instance using the specified properties. * @function create * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {gamehall.ICSDestroyPrivateRoom=} [properties] Properties to set * @returns {gamehall.CSDestroyPrivateRoom} CSDestroyPrivateRoom instance */ CSDestroyPrivateRoom.create = function create(properties) { return new CSDestroyPrivateRoom(properties); }; /** * Encodes the specified CSDestroyPrivateRoom message. Does not implicitly {@link gamehall.CSDestroyPrivateRoom.verify|verify} messages. * @function encode * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {gamehall.ICSDestroyPrivateRoom} message CSDestroyPrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDestroyPrivateRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); return writer; }; /** * Encodes the specified CSDestroyPrivateRoom message, length delimited. Does not implicitly {@link gamehall.CSDestroyPrivateRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {gamehall.ICSDestroyPrivateRoom} message CSDestroyPrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDestroyPrivateRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSDestroyPrivateRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSDestroyPrivateRoom} CSDestroyPrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDestroyPrivateRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSDestroyPrivateRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSDestroyPrivateRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSDestroyPrivateRoom} CSDestroyPrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDestroyPrivateRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSDestroyPrivateRoom message. * @function verify * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSDestroyPrivateRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; return null; }; /** * Creates a CSDestroyPrivateRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {Object.} object Plain object * @returns {gamehall.CSDestroyPrivateRoom} CSDestroyPrivateRoom */ CSDestroyPrivateRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSDestroyPrivateRoom) return object; var message = new $root.gamehall.CSDestroyPrivateRoom(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; return message; }; /** * Creates a plain object from a CSDestroyPrivateRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {gamehall.CSDestroyPrivateRoom} message CSDestroyPrivateRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSDestroyPrivateRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.RoomId = 0; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; return object; }; /** * Converts this CSDestroyPrivateRoom to JSON. * @function toJSON * @memberof gamehall.CSDestroyPrivateRoom * @instance * @returns {Object.} JSON object */ CSDestroyPrivateRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSDestroyPrivateRoom * @function getTypeUrl * @memberof gamehall.CSDestroyPrivateRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSDestroyPrivateRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSDestroyPrivateRoom"; }; return CSDestroyPrivateRoom; })(); gamehall.SCDestroyPrivateRoom = (function() { /** * Properties of a SCDestroyPrivateRoom. * @memberof gamehall * @interface ISCDestroyPrivateRoom * @property {number|null} [RoomId] SCDestroyPrivateRoom RoomId * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCDestroyPrivateRoom OpRetCode * @property {number|null} [State] SCDestroyPrivateRoom State */ /** * Constructs a new SCDestroyPrivateRoom. * @memberof gamehall * @classdesc Represents a SCDestroyPrivateRoom. * @implements ISCDestroyPrivateRoom * @constructor * @param {gamehall.ISCDestroyPrivateRoom=} [properties] Properties to set */ function SCDestroyPrivateRoom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCDestroyPrivateRoom RoomId. * @member {number} RoomId * @memberof gamehall.SCDestroyPrivateRoom * @instance */ SCDestroyPrivateRoom.prototype.RoomId = 0; /** * SCDestroyPrivateRoom OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCDestroyPrivateRoom * @instance */ SCDestroyPrivateRoom.prototype.OpRetCode = 0; /** * SCDestroyPrivateRoom State. * @member {number} State * @memberof gamehall.SCDestroyPrivateRoom * @instance */ SCDestroyPrivateRoom.prototype.State = 0; /** * Creates a new SCDestroyPrivateRoom instance using the specified properties. * @function create * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {gamehall.ISCDestroyPrivateRoom=} [properties] Properties to set * @returns {gamehall.SCDestroyPrivateRoom} SCDestroyPrivateRoom instance */ SCDestroyPrivateRoom.create = function create(properties) { return new SCDestroyPrivateRoom(properties); }; /** * Encodes the specified SCDestroyPrivateRoom message. Does not implicitly {@link gamehall.SCDestroyPrivateRoom.verify|verify} messages. * @function encode * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {gamehall.ISCDestroyPrivateRoom} message SCDestroyPrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCDestroyPrivateRoom.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpRetCode); if (message.State != null && Object.hasOwnProperty.call(message, "State")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.State); return writer; }; /** * Encodes the specified SCDestroyPrivateRoom message, length delimited. Does not implicitly {@link gamehall.SCDestroyPrivateRoom.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {gamehall.ISCDestroyPrivateRoom} message SCDestroyPrivateRoom message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCDestroyPrivateRoom.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCDestroyPrivateRoom message from the specified reader or buffer. * @function decode * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCDestroyPrivateRoom} SCDestroyPrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCDestroyPrivateRoom.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCDestroyPrivateRoom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.OpRetCode = reader.int32(); break; } case 3: { message.State = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCDestroyPrivateRoom message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCDestroyPrivateRoom} SCDestroyPrivateRoom * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCDestroyPrivateRoom.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCDestroyPrivateRoom message. * @function verify * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCDestroyPrivateRoom.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.State != null && message.hasOwnProperty("State")) if (!$util.isInteger(message.State)) return "State: integer expected"; return null; }; /** * Creates a SCDestroyPrivateRoom message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {Object.} object Plain object * @returns {gamehall.SCDestroyPrivateRoom} SCDestroyPrivateRoom */ SCDestroyPrivateRoom.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCDestroyPrivateRoom) return object; var message = new $root.gamehall.SCDestroyPrivateRoom(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } if (object.State != null) message.State = object.State | 0; return message; }; /** * Creates a plain object from a SCDestroyPrivateRoom message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {gamehall.SCDestroyPrivateRoom} message SCDestroyPrivateRoom * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCDestroyPrivateRoom.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.State = 0; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; if (message.State != null && message.hasOwnProperty("State")) object.State = message.State; return object; }; /** * Converts this SCDestroyPrivateRoom to JSON. * @function toJSON * @memberof gamehall.SCDestroyPrivateRoom * @instance * @returns {Object.} JSON object */ SCDestroyPrivateRoom.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCDestroyPrivateRoom * @function getTypeUrl * @memberof gamehall.SCDestroyPrivateRoom * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCDestroyPrivateRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCDestroyPrivateRoom"; }; return SCDestroyPrivateRoom; })(); gamehall.CSQueryRoomInfo = (function() { /** * Properties of a CSQueryRoomInfo. * @memberof gamehall * @interface ICSQueryRoomInfo * @property {Array.|null} [GameIds] CSQueryRoomInfo GameIds * @property {number|null} [GameSite] CSQueryRoomInfo GameSite */ /** * Constructs a new CSQueryRoomInfo. * @memberof gamehall * @classdesc Represents a CSQueryRoomInfo. * @implements ICSQueryRoomInfo * @constructor * @param {gamehall.ICSQueryRoomInfo=} [properties] Properties to set */ function CSQueryRoomInfo(properties) { this.GameIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSQueryRoomInfo GameIds. * @member {Array.} GameIds * @memberof gamehall.CSQueryRoomInfo * @instance */ CSQueryRoomInfo.prototype.GameIds = $util.emptyArray; /** * CSQueryRoomInfo GameSite. * @member {number} GameSite * @memberof gamehall.CSQueryRoomInfo * @instance */ CSQueryRoomInfo.prototype.GameSite = 0; /** * Creates a new CSQueryRoomInfo instance using the specified properties. * @function create * @memberof gamehall.CSQueryRoomInfo * @static * @param {gamehall.ICSQueryRoomInfo=} [properties] Properties to set * @returns {gamehall.CSQueryRoomInfo} CSQueryRoomInfo instance */ CSQueryRoomInfo.create = function create(properties) { return new CSQueryRoomInfo(properties); }; /** * Encodes the specified CSQueryRoomInfo message. Does not implicitly {@link gamehall.CSQueryRoomInfo.verify|verify} messages. * @function encode * @memberof gamehall.CSQueryRoomInfo * @static * @param {gamehall.ICSQueryRoomInfo} message CSQueryRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQueryRoomInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameIds != null && message.GameIds.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.GameIds.length; ++i) writer.int32(message.GameIds[i]); writer.ldelim(); } if (message.GameSite != null && Object.hasOwnProperty.call(message, "GameSite")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameSite); return writer; }; /** * Encodes the specified CSQueryRoomInfo message, length delimited. Does not implicitly {@link gamehall.CSQueryRoomInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSQueryRoomInfo * @static * @param {gamehall.ICSQueryRoomInfo} message CSQueryRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQueryRoomInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSQueryRoomInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.CSQueryRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSQueryRoomInfo} CSQueryRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQueryRoomInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSQueryRoomInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.GameIds && message.GameIds.length)) message.GameIds = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.GameIds.push(reader.int32()); } else message.GameIds.push(reader.int32()); break; } case 2: { message.GameSite = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSQueryRoomInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSQueryRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSQueryRoomInfo} CSQueryRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQueryRoomInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSQueryRoomInfo message. * @function verify * @memberof gamehall.CSQueryRoomInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSQueryRoomInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameIds != null && message.hasOwnProperty("GameIds")) { if (!Array.isArray(message.GameIds)) return "GameIds: array expected"; for (var i = 0; i < message.GameIds.length; ++i) if (!$util.isInteger(message.GameIds[i])) return "GameIds: integer[] expected"; } if (message.GameSite != null && message.hasOwnProperty("GameSite")) if (!$util.isInteger(message.GameSite)) return "GameSite: integer expected"; return null; }; /** * Creates a CSQueryRoomInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSQueryRoomInfo * @static * @param {Object.} object Plain object * @returns {gamehall.CSQueryRoomInfo} CSQueryRoomInfo */ CSQueryRoomInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSQueryRoomInfo) return object; var message = new $root.gamehall.CSQueryRoomInfo(); if (object.GameIds) { if (!Array.isArray(object.GameIds)) throw TypeError(".gamehall.CSQueryRoomInfo.GameIds: array expected"); message.GameIds = []; for (var i = 0; i < object.GameIds.length; ++i) message.GameIds[i] = object.GameIds[i] | 0; } if (object.GameSite != null) message.GameSite = object.GameSite | 0; return message; }; /** * Creates a plain object from a CSQueryRoomInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSQueryRoomInfo * @static * @param {gamehall.CSQueryRoomInfo} message CSQueryRoomInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSQueryRoomInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GameIds = []; if (options.defaults) object.GameSite = 0; if (message.GameIds && message.GameIds.length) { object.GameIds = []; for (var j = 0; j < message.GameIds.length; ++j) object.GameIds[j] = message.GameIds[j]; } if (message.GameSite != null && message.hasOwnProperty("GameSite")) object.GameSite = message.GameSite; return object; }; /** * Converts this CSQueryRoomInfo to JSON. * @function toJSON * @memberof gamehall.CSQueryRoomInfo * @instance * @returns {Object.} JSON object */ CSQueryRoomInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSQueryRoomInfo * @function getTypeUrl * @memberof gamehall.CSQueryRoomInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSQueryRoomInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSQueryRoomInfo"; }; return CSQueryRoomInfo; })(); gamehall.QRoomInfo = (function() { /** * Properties of a QRoomInfo. * @memberof gamehall * @interface IQRoomInfo * @property {number|null} [GameFreeId] QRoomInfo GameFreeId * @property {number|null} [GameId] QRoomInfo GameId * @property {number|null} [RoomId] QRoomInfo RoomId * @property {number|null} [BaseCoin] QRoomInfo BaseCoin * @property {number|null} [LimitCoin] QRoomInfo LimitCoin * @property {number|null} [CurrNum] QRoomInfo CurrNum * @property {number|null} [MaxPlayer] QRoomInfo MaxPlayer * @property {number|null} [Creator] QRoomInfo Creator * @property {number|null} [CreateTs] QRoomInfo CreateTs */ /** * Constructs a new QRoomInfo. * @memberof gamehall * @classdesc Represents a QRoomInfo. * @implements IQRoomInfo * @constructor * @param {gamehall.IQRoomInfo=} [properties] Properties to set */ function QRoomInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * QRoomInfo GameFreeId. * @member {number} GameFreeId * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.GameFreeId = 0; /** * QRoomInfo GameId. * @member {number} GameId * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.GameId = 0; /** * QRoomInfo RoomId. * @member {number} RoomId * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.RoomId = 0; /** * QRoomInfo BaseCoin. * @member {number} BaseCoin * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.BaseCoin = 0; /** * QRoomInfo LimitCoin. * @member {number} LimitCoin * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.LimitCoin = 0; /** * QRoomInfo CurrNum. * @member {number} CurrNum * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.CurrNum = 0; /** * QRoomInfo MaxPlayer. * @member {number} MaxPlayer * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.MaxPlayer = 0; /** * QRoomInfo Creator. * @member {number} Creator * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.Creator = 0; /** * QRoomInfo CreateTs. * @member {number} CreateTs * @memberof gamehall.QRoomInfo * @instance */ QRoomInfo.prototype.CreateTs = 0; /** * Creates a new QRoomInfo instance using the specified properties. * @function create * @memberof gamehall.QRoomInfo * @static * @param {gamehall.IQRoomInfo=} [properties] Properties to set * @returns {gamehall.QRoomInfo} QRoomInfo instance */ QRoomInfo.create = function create(properties) { return new QRoomInfo(properties); }; /** * Encodes the specified QRoomInfo message. Does not implicitly {@link gamehall.QRoomInfo.verify|verify} messages. * @function encode * @memberof gamehall.QRoomInfo * @static * @param {gamehall.IQRoomInfo} message QRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ QRoomInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameId); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.RoomId); if (message.BaseCoin != null && Object.hasOwnProperty.call(message, "BaseCoin")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.BaseCoin); if (message.LimitCoin != null && Object.hasOwnProperty.call(message, "LimitCoin")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.LimitCoin); if (message.CurrNum != null && Object.hasOwnProperty.call(message, "CurrNum")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.CurrNum); if (message.MaxPlayer != null && Object.hasOwnProperty.call(message, "MaxPlayer")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.MaxPlayer); if (message.Creator != null && Object.hasOwnProperty.call(message, "Creator")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.Creator); if (message.CreateTs != null && Object.hasOwnProperty.call(message, "CreateTs")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.CreateTs); return writer; }; /** * Encodes the specified QRoomInfo message, length delimited. Does not implicitly {@link gamehall.QRoomInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.QRoomInfo * @static * @param {gamehall.IQRoomInfo} message QRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ QRoomInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a QRoomInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.QRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.QRoomInfo} QRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ QRoomInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.QRoomInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.GameId = reader.int32(); break; } case 3: { message.RoomId = reader.int32(); break; } case 4: { message.BaseCoin = reader.int32(); break; } case 5: { message.LimitCoin = reader.int32(); break; } case 6: { message.CurrNum = reader.int32(); break; } case 7: { message.MaxPlayer = reader.int32(); break; } case 8: { message.Creator = reader.int32(); break; } case 9: { message.CreateTs = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a QRoomInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.QRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.QRoomInfo} QRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ QRoomInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a QRoomInfo message. * @function verify * @memberof gamehall.QRoomInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ QRoomInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.BaseCoin != null && message.hasOwnProperty("BaseCoin")) if (!$util.isInteger(message.BaseCoin)) return "BaseCoin: integer expected"; if (message.LimitCoin != null && message.hasOwnProperty("LimitCoin")) if (!$util.isInteger(message.LimitCoin)) return "LimitCoin: integer expected"; if (message.CurrNum != null && message.hasOwnProperty("CurrNum")) if (!$util.isInteger(message.CurrNum)) return "CurrNum: integer expected"; if (message.MaxPlayer != null && message.hasOwnProperty("MaxPlayer")) if (!$util.isInteger(message.MaxPlayer)) return "MaxPlayer: integer expected"; if (message.Creator != null && message.hasOwnProperty("Creator")) if (!$util.isInteger(message.Creator)) return "Creator: integer expected"; if (message.CreateTs != null && message.hasOwnProperty("CreateTs")) if (!$util.isInteger(message.CreateTs)) return "CreateTs: integer expected"; return null; }; /** * Creates a QRoomInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.QRoomInfo * @static * @param {Object.} object Plain object * @returns {gamehall.QRoomInfo} QRoomInfo */ QRoomInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.QRoomInfo) return object; var message = new $root.gamehall.QRoomInfo(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.GameId != null) message.GameId = object.GameId | 0; if (object.RoomId != null) message.RoomId = object.RoomId | 0; if (object.BaseCoin != null) message.BaseCoin = object.BaseCoin | 0; if (object.LimitCoin != null) message.LimitCoin = object.LimitCoin | 0; if (object.CurrNum != null) message.CurrNum = object.CurrNum | 0; if (object.MaxPlayer != null) message.MaxPlayer = object.MaxPlayer | 0; if (object.Creator != null) message.Creator = object.Creator | 0; if (object.CreateTs != null) message.CreateTs = object.CreateTs | 0; return message; }; /** * Creates a plain object from a QRoomInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.QRoomInfo * @static * @param {gamehall.QRoomInfo} message QRoomInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ QRoomInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; object.GameId = 0; object.RoomId = 0; object.BaseCoin = 0; object.LimitCoin = 0; object.CurrNum = 0; object.MaxPlayer = 0; object.Creator = 0; object.CreateTs = 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.BaseCoin != null && message.hasOwnProperty("BaseCoin")) object.BaseCoin = message.BaseCoin; if (message.LimitCoin != null && message.hasOwnProperty("LimitCoin")) object.LimitCoin = message.LimitCoin; if (message.CurrNum != null && message.hasOwnProperty("CurrNum")) object.CurrNum = message.CurrNum; if (message.MaxPlayer != null && message.hasOwnProperty("MaxPlayer")) object.MaxPlayer = message.MaxPlayer; if (message.Creator != null && message.hasOwnProperty("Creator")) object.Creator = message.Creator; if (message.CreateTs != null && message.hasOwnProperty("CreateTs")) object.CreateTs = message.CreateTs; return object; }; /** * Converts this QRoomInfo to JSON. * @function toJSON * @memberof gamehall.QRoomInfo * @instance * @returns {Object.} JSON object */ QRoomInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for QRoomInfo * @function getTypeUrl * @memberof gamehall.QRoomInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ QRoomInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.QRoomInfo"; }; return QRoomInfo; })(); gamehall.SCQueryRoomInfo = (function() { /** * Properties of a SCQueryRoomInfo. * @memberof gamehall * @interface ISCQueryRoomInfo * @property {Array.|null} [GameIds] SCQueryRoomInfo GameIds * @property {number|null} [GameSite] SCQueryRoomInfo GameSite * @property {Array.|null} [RoomInfo] SCQueryRoomInfo RoomInfo * @property {gamehall.OpResultCode_Game|null} [OpRetCode] SCQueryRoomInfo OpRetCode */ /** * Constructs a new SCQueryRoomInfo. * @memberof gamehall * @classdesc Represents a SCQueryRoomInfo. * @implements ISCQueryRoomInfo * @constructor * @param {gamehall.ISCQueryRoomInfo=} [properties] Properties to set */ function SCQueryRoomInfo(properties) { this.GameIds = []; this.RoomInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCQueryRoomInfo GameIds. * @member {Array.} GameIds * @memberof gamehall.SCQueryRoomInfo * @instance */ SCQueryRoomInfo.prototype.GameIds = $util.emptyArray; /** * SCQueryRoomInfo GameSite. * @member {number} GameSite * @memberof gamehall.SCQueryRoomInfo * @instance */ SCQueryRoomInfo.prototype.GameSite = 0; /** * SCQueryRoomInfo RoomInfo. * @member {Array.} RoomInfo * @memberof gamehall.SCQueryRoomInfo * @instance */ SCQueryRoomInfo.prototype.RoomInfo = $util.emptyArray; /** * SCQueryRoomInfo OpRetCode. * @member {gamehall.OpResultCode_Game} OpRetCode * @memberof gamehall.SCQueryRoomInfo * @instance */ SCQueryRoomInfo.prototype.OpRetCode = 0; /** * Creates a new SCQueryRoomInfo instance using the specified properties. * @function create * @memberof gamehall.SCQueryRoomInfo * @static * @param {gamehall.ISCQueryRoomInfo=} [properties] Properties to set * @returns {gamehall.SCQueryRoomInfo} SCQueryRoomInfo instance */ SCQueryRoomInfo.create = function create(properties) { return new SCQueryRoomInfo(properties); }; /** * Encodes the specified SCQueryRoomInfo message. Does not implicitly {@link gamehall.SCQueryRoomInfo.verify|verify} messages. * @function encode * @memberof gamehall.SCQueryRoomInfo * @static * @param {gamehall.ISCQueryRoomInfo} message SCQueryRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCQueryRoomInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameIds != null && message.GameIds.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.GameIds.length; ++i) writer.int32(message.GameIds[i]); writer.ldelim(); } if (message.GameSite != null && Object.hasOwnProperty.call(message, "GameSite")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameSite); if (message.RoomInfo != null && message.RoomInfo.length) for (var i = 0; i < message.RoomInfo.length; ++i) $root.gamehall.QRoomInfo.encode(message.RoomInfo[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.OpRetCode); return writer; }; /** * Encodes the specified SCQueryRoomInfo message, length delimited. Does not implicitly {@link gamehall.SCQueryRoomInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCQueryRoomInfo * @static * @param {gamehall.ISCQueryRoomInfo} message SCQueryRoomInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCQueryRoomInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCQueryRoomInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.SCQueryRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCQueryRoomInfo} SCQueryRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCQueryRoomInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCQueryRoomInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.GameIds && message.GameIds.length)) message.GameIds = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.GameIds.push(reader.int32()); } else message.GameIds.push(reader.int32()); break; } case 2: { message.GameSite = reader.int32(); break; } case 3: { if (!(message.RoomInfo && message.RoomInfo.length)) message.RoomInfo = []; message.RoomInfo.push($root.gamehall.QRoomInfo.decode(reader, reader.uint32())); break; } case 4: { message.OpRetCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCQueryRoomInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCQueryRoomInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCQueryRoomInfo} SCQueryRoomInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCQueryRoomInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCQueryRoomInfo message. * @function verify * @memberof gamehall.SCQueryRoomInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCQueryRoomInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameIds != null && message.hasOwnProperty("GameIds")) { if (!Array.isArray(message.GameIds)) return "GameIds: array expected"; for (var i = 0; i < message.GameIds.length; ++i) if (!$util.isInteger(message.GameIds[i])) return "GameIds: integer[] expected"; } if (message.GameSite != null && message.hasOwnProperty("GameSite")) if (!$util.isInteger(message.GameSite)) return "GameSite: integer expected"; if (message.RoomInfo != null && message.hasOwnProperty("RoomInfo")) { if (!Array.isArray(message.RoomInfo)) return "RoomInfo: array expected"; for (var i = 0; i < message.RoomInfo.length; ++i) { var error = $root.gamehall.QRoomInfo.verify(message.RoomInfo[i]); if (error) return "RoomInfo." + error; } } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCQueryRoomInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCQueryRoomInfo * @static * @param {Object.} object Plain object * @returns {gamehall.SCQueryRoomInfo} SCQueryRoomInfo */ SCQueryRoomInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCQueryRoomInfo) return object; var message = new $root.gamehall.SCQueryRoomInfo(); if (object.GameIds) { if (!Array.isArray(object.GameIds)) throw TypeError(".gamehall.SCQueryRoomInfo.GameIds: array expected"); message.GameIds = []; for (var i = 0; i < object.GameIds.length; ++i) message.GameIds[i] = object.GameIds[i] | 0; } if (object.GameSite != null) message.GameSite = object.GameSite | 0; if (object.RoomInfo) { if (!Array.isArray(object.RoomInfo)) throw TypeError(".gamehall.SCQueryRoomInfo.RoomInfo: array expected"); message.RoomInfo = []; for (var i = 0; i < object.RoomInfo.length; ++i) { if (typeof object.RoomInfo[i] !== "object") throw TypeError(".gamehall.SCQueryRoomInfo.RoomInfo: object expected"); message.RoomInfo[i] = $root.gamehall.QRoomInfo.fromObject(object.RoomInfo[i]); } } switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Game": case 1: message.OpRetCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpRetCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpRetCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpRetCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpRetCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpRetCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpRetCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpRetCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpRetCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpRetCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpRetCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpRetCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpRetCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpRetCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpRetCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpRetCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpRetCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpRetCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpRetCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpRetCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpRetCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpRetCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpRetCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpRetCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpRetCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpRetCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpRetCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpRetCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpRetCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpRetCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpRetCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpRetCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpRetCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpRetCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpRetCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpRetCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpRetCode = 9010; break; } return message; }; /** * Creates a plain object from a SCQueryRoomInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCQueryRoomInfo * @static * @param {gamehall.SCQueryRoomInfo} message SCQueryRoomInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCQueryRoomInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.GameIds = []; object.RoomInfo = []; } if (options.defaults) { object.GameSite = 0; object.OpRetCode = options.enums === String ? "OPRC_Sucess_Game" : 0; } if (message.GameIds && message.GameIds.length) { object.GameIds = []; for (var j = 0; j < message.GameIds.length; ++j) object.GameIds[j] = message.GameIds[j]; } if (message.GameSite != null && message.hasOwnProperty("GameSite")) object.GameSite = message.GameSite; if (message.RoomInfo && message.RoomInfo.length) { object.RoomInfo = []; for (var j = 0; j < message.RoomInfo.length; ++j) object.RoomInfo[j] = $root.gamehall.QRoomInfo.toObject(message.RoomInfo[j], options); } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Game[message.OpRetCode] : message.OpRetCode; return object; }; /** * Converts this SCQueryRoomInfo to JSON. * @function toJSON * @memberof gamehall.SCQueryRoomInfo * @instance * @returns {Object.} JSON object */ SCQueryRoomInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCQueryRoomInfo * @function getTypeUrl * @memberof gamehall.SCQueryRoomInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCQueryRoomInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCQueryRoomInfo"; }; return SCQueryRoomInfo; })(); gamehall.CSGameObserve = (function() { /** * Properties of a CSGameObserve. * @memberof gamehall * @interface ICSGameObserve * @property {number|null} [GameId] CSGameObserve GameId * @property {boolean|null} [StartOrEnd] CSGameObserve StartOrEnd */ /** * Constructs a new CSGameObserve. * @memberof gamehall * @classdesc Represents a CSGameObserve. * @implements ICSGameObserve * @constructor * @param {gamehall.ICSGameObserve=} [properties] Properties to set */ function CSGameObserve(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSGameObserve GameId. * @member {number} GameId * @memberof gamehall.CSGameObserve * @instance */ CSGameObserve.prototype.GameId = 0; /** * CSGameObserve StartOrEnd. * @member {boolean} StartOrEnd * @memberof gamehall.CSGameObserve * @instance */ CSGameObserve.prototype.StartOrEnd = false; /** * Creates a new CSGameObserve instance using the specified properties. * @function create * @memberof gamehall.CSGameObserve * @static * @param {gamehall.ICSGameObserve=} [properties] Properties to set * @returns {gamehall.CSGameObserve} CSGameObserve instance */ CSGameObserve.create = function create(properties) { return new CSGameObserve(properties); }; /** * Encodes the specified CSGameObserve message. Does not implicitly {@link gamehall.CSGameObserve.verify|verify} messages. * @function encode * @memberof gamehall.CSGameObserve * @static * @param {gamehall.ICSGameObserve} message CSGameObserve message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGameObserve.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.StartOrEnd != null && Object.hasOwnProperty.call(message, "StartOrEnd")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.StartOrEnd); return writer; }; /** * Encodes the specified CSGameObserve message, length delimited. Does not implicitly {@link gamehall.CSGameObserve.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGameObserve * @static * @param {gamehall.ICSGameObserve} message CSGameObserve message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGameObserve.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGameObserve message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGameObserve * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGameObserve} CSGameObserve * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGameObserve.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGameObserve(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.StartOrEnd = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGameObserve message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGameObserve * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGameObserve} CSGameObserve * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGameObserve.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGameObserve message. * @function verify * @memberof gamehall.CSGameObserve * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGameObserve.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.StartOrEnd != null && message.hasOwnProperty("StartOrEnd")) if (typeof message.StartOrEnd !== "boolean") return "StartOrEnd: boolean expected"; return null; }; /** * Creates a CSGameObserve message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGameObserve * @static * @param {Object.} object Plain object * @returns {gamehall.CSGameObserve} CSGameObserve */ CSGameObserve.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGameObserve) return object; var message = new $root.gamehall.CSGameObserve(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.StartOrEnd != null) message.StartOrEnd = Boolean(object.StartOrEnd); return message; }; /** * Creates a plain object from a CSGameObserve message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGameObserve * @static * @param {gamehall.CSGameObserve} message CSGameObserve * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGameObserve.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameId = 0; object.StartOrEnd = false; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.StartOrEnd != null && message.hasOwnProperty("StartOrEnd")) object.StartOrEnd = message.StartOrEnd; return object; }; /** * Converts this CSGameObserve to JSON. * @function toJSON * @memberof gamehall.CSGameObserve * @instance * @returns {Object.} JSON object */ CSGameObserve.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGameObserve * @function getTypeUrl * @memberof gamehall.CSGameObserve * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGameObserve.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGameObserve"; }; return CSGameObserve; })(); gamehall.GameSubRecord = (function() { /** * Properties of a GameSubRecord. * @memberof gamehall * @interface IGameSubRecord * @property {number|null} [GameFreeId] GameSubRecord GameFreeId * @property {number|null} [LogCnt] GameSubRecord LogCnt * @property {number|null} [NewLog] GameSubRecord NewLog * @property {Array.|null} [TotleLog] GameSubRecord TotleLog */ /** * Constructs a new GameSubRecord. * @memberof gamehall * @classdesc Represents a GameSubRecord. * @implements IGameSubRecord * @constructor * @param {gamehall.IGameSubRecord=} [properties] Properties to set */ function GameSubRecord(properties) { this.TotleLog = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GameSubRecord GameFreeId. * @member {number} GameFreeId * @memberof gamehall.GameSubRecord * @instance */ GameSubRecord.prototype.GameFreeId = 0; /** * GameSubRecord LogCnt. * @member {number} LogCnt * @memberof gamehall.GameSubRecord * @instance */ GameSubRecord.prototype.LogCnt = 0; /** * GameSubRecord NewLog. * @member {number} NewLog * @memberof gamehall.GameSubRecord * @instance */ GameSubRecord.prototype.NewLog = 0; /** * GameSubRecord TotleLog. * @member {Array.} TotleLog * @memberof gamehall.GameSubRecord * @instance */ GameSubRecord.prototype.TotleLog = $util.emptyArray; /** * Creates a new GameSubRecord instance using the specified properties. * @function create * @memberof gamehall.GameSubRecord * @static * @param {gamehall.IGameSubRecord=} [properties] Properties to set * @returns {gamehall.GameSubRecord} GameSubRecord instance */ GameSubRecord.create = function create(properties) { return new GameSubRecord(properties); }; /** * Encodes the specified GameSubRecord message. Does not implicitly {@link gamehall.GameSubRecord.verify|verify} messages. * @function encode * @memberof gamehall.GameSubRecord * @static * @param {gamehall.IGameSubRecord} message GameSubRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameSubRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.LogCnt != null && Object.hasOwnProperty.call(message, "LogCnt")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.LogCnt); if (message.NewLog != null && Object.hasOwnProperty.call(message, "NewLog")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.NewLog); if (message.TotleLog != null && message.TotleLog.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (var i = 0; i < message.TotleLog.length; ++i) writer.int32(message.TotleLog[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified GameSubRecord message, length delimited. Does not implicitly {@link gamehall.GameSubRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.GameSubRecord * @static * @param {gamehall.IGameSubRecord} message GameSubRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameSubRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GameSubRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.GameSubRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.GameSubRecord} GameSubRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameSubRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.GameSubRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.LogCnt = reader.int32(); break; } case 3: { message.NewLog = reader.int32(); break; } case 4: { if (!(message.TotleLog && message.TotleLog.length)) message.TotleLog = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.TotleLog.push(reader.int32()); } else message.TotleLog.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GameSubRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.GameSubRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.GameSubRecord} GameSubRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameSubRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GameSubRecord message. * @function verify * @memberof gamehall.GameSubRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GameSubRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.LogCnt != null && message.hasOwnProperty("LogCnt")) if (!$util.isInteger(message.LogCnt)) return "LogCnt: integer expected"; if (message.NewLog != null && message.hasOwnProperty("NewLog")) if (!$util.isInteger(message.NewLog)) return "NewLog: integer expected"; if (message.TotleLog != null && message.hasOwnProperty("TotleLog")) { if (!Array.isArray(message.TotleLog)) return "TotleLog: array expected"; for (var i = 0; i < message.TotleLog.length; ++i) if (!$util.isInteger(message.TotleLog[i])) return "TotleLog: integer[] expected"; } return null; }; /** * Creates a GameSubRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.GameSubRecord * @static * @param {Object.} object Plain object * @returns {gamehall.GameSubRecord} GameSubRecord */ GameSubRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.GameSubRecord) return object; var message = new $root.gamehall.GameSubRecord(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.LogCnt != null) message.LogCnt = object.LogCnt | 0; if (object.NewLog != null) message.NewLog = object.NewLog | 0; if (object.TotleLog) { if (!Array.isArray(object.TotleLog)) throw TypeError(".gamehall.GameSubRecord.TotleLog: array expected"); message.TotleLog = []; for (var i = 0; i < object.TotleLog.length; ++i) message.TotleLog[i] = object.TotleLog[i] | 0; } return message; }; /** * Creates a plain object from a GameSubRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.GameSubRecord * @static * @param {gamehall.GameSubRecord} message GameSubRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GameSubRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.TotleLog = []; if (options.defaults) { object.GameFreeId = 0; object.LogCnt = 0; object.NewLog = 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.LogCnt != null && message.hasOwnProperty("LogCnt")) object.LogCnt = message.LogCnt; if (message.NewLog != null && message.hasOwnProperty("NewLog")) object.NewLog = message.NewLog; if (message.TotleLog && message.TotleLog.length) { object.TotleLog = []; for (var j = 0; j < message.TotleLog.length; ++j) object.TotleLog[j] = message.TotleLog[j]; } return object; }; /** * Converts this GameSubRecord to JSON. * @function toJSON * @memberof gamehall.GameSubRecord * @instance * @returns {Object.} JSON object */ GameSubRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GameSubRecord * @function getTypeUrl * @memberof gamehall.GameSubRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GameSubRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.GameSubRecord"; }; return GameSubRecord; })(); gamehall.SCGameSubList = (function() { /** * Properties of a SCGameSubList. * @memberof gamehall * @interface ISCGameSubList * @property {Array.|null} [List] SCGameSubList List */ /** * Constructs a new SCGameSubList. * @memberof gamehall * @classdesc Represents a SCGameSubList. * @implements ISCGameSubList * @constructor * @param {gamehall.ISCGameSubList=} [properties] Properties to set */ function SCGameSubList(properties) { this.List = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGameSubList List. * @member {Array.} List * @memberof gamehall.SCGameSubList * @instance */ SCGameSubList.prototype.List = $util.emptyArray; /** * Creates a new SCGameSubList instance using the specified properties. * @function create * @memberof gamehall.SCGameSubList * @static * @param {gamehall.ISCGameSubList=} [properties] Properties to set * @returns {gamehall.SCGameSubList} SCGameSubList instance */ SCGameSubList.create = function create(properties) { return new SCGameSubList(properties); }; /** * Encodes the specified SCGameSubList message. Does not implicitly {@link gamehall.SCGameSubList.verify|verify} messages. * @function encode * @memberof gamehall.SCGameSubList * @static * @param {gamehall.ISCGameSubList} message SCGameSubList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGameSubList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.List != null && message.List.length) for (var i = 0; i < message.List.length; ++i) $root.gamehall.GameSubRecord.encode(message.List[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCGameSubList message, length delimited. Does not implicitly {@link gamehall.SCGameSubList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGameSubList * @static * @param {gamehall.ISCGameSubList} message SCGameSubList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGameSubList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGameSubList message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGameSubList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGameSubList} SCGameSubList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGameSubList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGameSubList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.List && message.List.length)) message.List = []; message.List.push($root.gamehall.GameSubRecord.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGameSubList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGameSubList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGameSubList} SCGameSubList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGameSubList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGameSubList message. * @function verify * @memberof gamehall.SCGameSubList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGameSubList.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 (var i = 0; i < message.List.length; ++i) { var error = $root.gamehall.GameSubRecord.verify(message.List[i]); if (error) return "List." + error; } } return null; }; /** * Creates a SCGameSubList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGameSubList * @static * @param {Object.} object Plain object * @returns {gamehall.SCGameSubList} SCGameSubList */ SCGameSubList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGameSubList) return object; var message = new $root.gamehall.SCGameSubList(); if (object.List) { if (!Array.isArray(object.List)) throw TypeError(".gamehall.SCGameSubList.List: array expected"); message.List = []; for (var i = 0; i < object.List.length; ++i) { if (typeof object.List[i] !== "object") throw TypeError(".gamehall.SCGameSubList.List: object expected"); message.List[i] = $root.gamehall.GameSubRecord.fromObject(object.List[i]); } } return message; }; /** * Creates a plain object from a SCGameSubList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGameSubList * @static * @param {gamehall.SCGameSubList} message SCGameSubList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGameSubList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.List = []; if (message.List && message.List.length) { object.List = []; for (var j = 0; j < message.List.length; ++j) object.List[j] = $root.gamehall.GameSubRecord.toObject(message.List[j], options); } return object; }; /** * Converts this SCGameSubList to JSON. * @function toJSON * @memberof gamehall.SCGameSubList * @instance * @returns {Object.} JSON object */ SCGameSubList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGameSubList * @function getTypeUrl * @memberof gamehall.SCGameSubList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGameSubList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGameSubList"; }; return SCGameSubList; })(); gamehall.GameState = (function() { /** * Properties of a GameState. * @memberof gamehall * @interface IGameState * @property {number|null} [GameFreeId] GameState GameFreeId * @property {number|Long|null} [Ts] GameState Ts * @property {number|null} [Sec] GameState Sec */ /** * Constructs a new GameState. * @memberof gamehall * @classdesc Represents a GameState. * @implements IGameState * @constructor * @param {gamehall.IGameState=} [properties] Properties to set */ function GameState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GameState GameFreeId. * @member {number} GameFreeId * @memberof gamehall.GameState * @instance */ GameState.prototype.GameFreeId = 0; /** * GameState Ts. * @member {number|Long} Ts * @memberof gamehall.GameState * @instance */ GameState.prototype.Ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * GameState Sec. * @member {number} Sec * @memberof gamehall.GameState * @instance */ GameState.prototype.Sec = 0; /** * Creates a new GameState instance using the specified properties. * @function create * @memberof gamehall.GameState * @static * @param {gamehall.IGameState=} [properties] Properties to set * @returns {gamehall.GameState} GameState instance */ GameState.create = function create(properties) { return new GameState(properties); }; /** * Encodes the specified GameState message. Does not implicitly {@link gamehall.GameState.verify|verify} messages. * @function encode * @memberof gamehall.GameState * @static * @param {gamehall.IGameState} message GameState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.Ts); if (message.Sec != null && Object.hasOwnProperty.call(message, "Sec")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Sec); return writer; }; /** * Encodes the specified GameState message, length delimited. Does not implicitly {@link gamehall.GameState.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.GameState * @static * @param {gamehall.IGameState} message GameState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GameState message from the specified reader or buffer. * @function decode * @memberof gamehall.GameState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.GameState} GameState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameState.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.GameState(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.Ts = reader.int64(); break; } case 3: { message.Sec = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GameState message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.GameState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.GameState} GameState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GameState message. * @function verify * @memberof gamehall.GameState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GameState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts) && !(message.Ts && $util.isInteger(message.Ts.low) && $util.isInteger(message.Ts.high))) return "Ts: integer|Long expected"; if (message.Sec != null && message.hasOwnProperty("Sec")) if (!$util.isInteger(message.Sec)) return "Sec: integer expected"; return null; }; /** * Creates a GameState message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.GameState * @static * @param {Object.} object Plain object * @returns {gamehall.GameState} GameState */ GameState.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.GameState) return object; var message = new $root.gamehall.GameState(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.Ts != null) if ($util.Long) (message.Ts = $util.Long.fromValue(object.Ts)).unsigned = false; else if (typeof object.Ts === "string") message.Ts = parseInt(object.Ts, 10); else if (typeof object.Ts === "number") message.Ts = object.Ts; else if (typeof object.Ts === "object") message.Ts = new $util.LongBits(object.Ts.low >>> 0, object.Ts.high >>> 0).toNumber(); if (object.Sec != null) message.Sec = object.Sec | 0; return message; }; /** * Creates a plain object from a GameState message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.GameState * @static * @param {gamehall.GameState} message GameState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GameState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Ts = options.longs === String ? "0" : 0; object.Sec = 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.Ts != null && message.hasOwnProperty("Ts")) if (typeof message.Ts === "number") object.Ts = options.longs === String ? String(message.Ts) : message.Ts; else object.Ts = options.longs === String ? $util.Long.prototype.toString.call(message.Ts) : options.longs === Number ? new $util.LongBits(message.Ts.low >>> 0, message.Ts.high >>> 0).toNumber() : message.Ts; if (message.Sec != null && message.hasOwnProperty("Sec")) object.Sec = message.Sec; return object; }; /** * Converts this GameState to JSON. * @function toJSON * @memberof gamehall.GameState * @instance * @returns {Object.} JSON object */ GameState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GameState * @function getTypeUrl * @memberof gamehall.GameState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GameState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.GameState"; }; return GameState; })(); gamehall.SCGameState = (function() { /** * Properties of a SCGameState. * @memberof gamehall * @interface ISCGameState * @property {Array.|null} [List] SCGameState List */ /** * Constructs a new SCGameState. * @memberof gamehall * @classdesc Represents a SCGameState. * @implements ISCGameState * @constructor * @param {gamehall.ISCGameState=} [properties] Properties to set */ function SCGameState(properties) { this.List = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGameState List. * @member {Array.} List * @memberof gamehall.SCGameState * @instance */ SCGameState.prototype.List = $util.emptyArray; /** * Creates a new SCGameState instance using the specified properties. * @function create * @memberof gamehall.SCGameState * @static * @param {gamehall.ISCGameState=} [properties] Properties to set * @returns {gamehall.SCGameState} SCGameState instance */ SCGameState.create = function create(properties) { return new SCGameState(properties); }; /** * Encodes the specified SCGameState message. Does not implicitly {@link gamehall.SCGameState.verify|verify} messages. * @function encode * @memberof gamehall.SCGameState * @static * @param {gamehall.ISCGameState} message SCGameState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGameState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.List != null && message.List.length) for (var i = 0; i < message.List.length; ++i) $root.gamehall.GameState.encode(message.List[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCGameState message, length delimited. Does not implicitly {@link gamehall.SCGameState.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGameState * @static * @param {gamehall.ISCGameState} message SCGameState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGameState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGameState message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGameState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGameState} SCGameState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGameState.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGameState(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.List && message.List.length)) message.List = []; message.List.push($root.gamehall.GameState.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGameState message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGameState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGameState} SCGameState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGameState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGameState message. * @function verify * @memberof gamehall.SCGameState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGameState.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 (var i = 0; i < message.List.length; ++i) { var error = $root.gamehall.GameState.verify(message.List[i]); if (error) return "List." + error; } } return null; }; /** * Creates a SCGameState message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGameState * @static * @param {Object.} object Plain object * @returns {gamehall.SCGameState} SCGameState */ SCGameState.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGameState) return object; var message = new $root.gamehall.SCGameState(); if (object.List) { if (!Array.isArray(object.List)) throw TypeError(".gamehall.SCGameState.List: array expected"); message.List = []; for (var i = 0; i < object.List.length; ++i) { if (typeof object.List[i] !== "object") throw TypeError(".gamehall.SCGameState.List: object expected"); message.List[i] = $root.gamehall.GameState.fromObject(object.List[i]); } } return message; }; /** * Creates a plain object from a SCGameState message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGameState * @static * @param {gamehall.SCGameState} message SCGameState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGameState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.List = []; if (message.List && message.List.length) { object.List = []; for (var j = 0; j < message.List.length; ++j) object.List[j] = $root.gamehall.GameState.toObject(message.List[j], options); } return object; }; /** * Converts this SCGameState to JSON. * @function toJSON * @memberof gamehall.SCGameState * @instance * @returns {Object.} JSON object */ SCGameState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGameState * @function getTypeUrl * @memberof gamehall.SCGameState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGameState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGameState"; }; return SCGameState; })(); gamehall.LotteryData = (function() { /** * Properties of a LotteryData. * @memberof gamehall * @interface ILotteryData * @property {number|null} [GameFreeId] LotteryData GameFreeId * @property {number|Long|null} [Value] LotteryData Value */ /** * Constructs a new LotteryData. * @memberof gamehall * @classdesc Represents a LotteryData. * @implements ILotteryData * @constructor * @param {gamehall.ILotteryData=} [properties] Properties to set */ function LotteryData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * LotteryData GameFreeId. * @member {number} GameFreeId * @memberof gamehall.LotteryData * @instance */ LotteryData.prototype.GameFreeId = 0; /** * LotteryData Value. * @member {number|Long} Value * @memberof gamehall.LotteryData * @instance */ LotteryData.prototype.Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new LotteryData instance using the specified properties. * @function create * @memberof gamehall.LotteryData * @static * @param {gamehall.ILotteryData=} [properties] Properties to set * @returns {gamehall.LotteryData} LotteryData instance */ LotteryData.create = function create(properties) { return new LotteryData(properties); }; /** * Encodes the specified LotteryData message. Does not implicitly {@link gamehall.LotteryData.verify|verify} messages. * @function encode * @memberof gamehall.LotteryData * @static * @param {gamehall.ILotteryData} message LotteryData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ LotteryData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.Value != null && Object.hasOwnProperty.call(message, "Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.Value); return writer; }; /** * Encodes the specified LotteryData message, length delimited. Does not implicitly {@link gamehall.LotteryData.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.LotteryData * @static * @param {gamehall.ILotteryData} message LotteryData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ LotteryData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a LotteryData message from the specified reader or buffer. * @function decode * @memberof gamehall.LotteryData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.LotteryData} LotteryData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ LotteryData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.LotteryData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.Value = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a LotteryData message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.LotteryData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.LotteryData} LotteryData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ LotteryData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a LotteryData message. * @function verify * @memberof gamehall.LotteryData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ LotteryData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.Value != null && message.hasOwnProperty("Value")) if (!$util.isInteger(message.Value) && !(message.Value && $util.isInteger(message.Value.low) && $util.isInteger(message.Value.high))) return "Value: integer|Long expected"; return null; }; /** * Creates a LotteryData message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.LotteryData * @static * @param {Object.} object Plain object * @returns {gamehall.LotteryData} LotteryData */ LotteryData.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.LotteryData) return object; var message = new $root.gamehall.LotteryData(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.Value != null) if ($util.Long) (message.Value = $util.Long.fromValue(object.Value)).unsigned = false; else if (typeof object.Value === "string") message.Value = parseInt(object.Value, 10); else if (typeof object.Value === "number") message.Value = object.Value; else if (typeof object.Value === "object") message.Value = new $util.LongBits(object.Value.low >>> 0, object.Value.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a LotteryData message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.LotteryData * @static * @param {gamehall.LotteryData} message LotteryData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ LotteryData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Value = options.longs === String ? "0" : 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.Value != null && message.hasOwnProperty("Value")) if (typeof message.Value === "number") object.Value = options.longs === String ? String(message.Value) : message.Value; else object.Value = options.longs === String ? $util.Long.prototype.toString.call(message.Value) : options.longs === Number ? new $util.LongBits(message.Value.low >>> 0, message.Value.high >>> 0).toNumber() : message.Value; return object; }; /** * Converts this LotteryData to JSON. * @function toJSON * @memberof gamehall.LotteryData * @instance * @returns {Object.} JSON object */ LotteryData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for LotteryData * @function getTypeUrl * @memberof gamehall.LotteryData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ LotteryData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.LotteryData"; }; return LotteryData; })(); gamehall.SCLotterySync = (function() { /** * Properties of a SCLotterySync. * @memberof gamehall * @interface ISCLotterySync * @property {Array.|null} [Datas] SCLotterySync Datas */ /** * Constructs a new SCLotterySync. * @memberof gamehall * @classdesc Represents a SCLotterySync. * @implements ISCLotterySync * @constructor * @param {gamehall.ISCLotterySync=} [properties] Properties to set */ function SCLotterySync(properties) { this.Datas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLotterySync Datas. * @member {Array.} Datas * @memberof gamehall.SCLotterySync * @instance */ SCLotterySync.prototype.Datas = $util.emptyArray; /** * Creates a new SCLotterySync instance using the specified properties. * @function create * @memberof gamehall.SCLotterySync * @static * @param {gamehall.ISCLotterySync=} [properties] Properties to set * @returns {gamehall.SCLotterySync} SCLotterySync instance */ SCLotterySync.create = function create(properties) { return new SCLotterySync(properties); }; /** * Encodes the specified SCLotterySync message. Does not implicitly {@link gamehall.SCLotterySync.verify|verify} messages. * @function encode * @memberof gamehall.SCLotterySync * @static * @param {gamehall.ISCLotterySync} message SCLotterySync message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLotterySync.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Datas != null && message.Datas.length) for (var i = 0; i < message.Datas.length; ++i) $root.gamehall.LotteryData.encode(message.Datas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCLotterySync message, length delimited. Does not implicitly {@link gamehall.SCLotterySync.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLotterySync * @static * @param {gamehall.ISCLotterySync} message SCLotterySync message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLotterySync.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLotterySync message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLotterySync * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLotterySync} SCLotterySync * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLotterySync.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLotterySync(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.Datas && message.Datas.length)) message.Datas = []; message.Datas.push($root.gamehall.LotteryData.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLotterySync message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLotterySync * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLotterySync} SCLotterySync * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLotterySync.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLotterySync message. * @function verify * @memberof gamehall.SCLotterySync * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLotterySync.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Datas != null && message.hasOwnProperty("Datas")) { if (!Array.isArray(message.Datas)) return "Datas: array expected"; for (var i = 0; i < message.Datas.length; ++i) { var error = $root.gamehall.LotteryData.verify(message.Datas[i]); if (error) return "Datas." + error; } } return null; }; /** * Creates a SCLotterySync message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLotterySync * @static * @param {Object.} object Plain object * @returns {gamehall.SCLotterySync} SCLotterySync */ SCLotterySync.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLotterySync) return object; var message = new $root.gamehall.SCLotterySync(); if (object.Datas) { if (!Array.isArray(object.Datas)) throw TypeError(".gamehall.SCLotterySync.Datas: array expected"); message.Datas = []; for (var i = 0; i < object.Datas.length; ++i) { if (typeof object.Datas[i] !== "object") throw TypeError(".gamehall.SCLotterySync.Datas: object expected"); message.Datas[i] = $root.gamehall.LotteryData.fromObject(object.Datas[i]); } } return message; }; /** * Creates a plain object from a SCLotterySync message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLotterySync * @static * @param {gamehall.SCLotterySync} message SCLotterySync * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLotterySync.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Datas = []; if (message.Datas && message.Datas.length) { object.Datas = []; for (var j = 0; j < message.Datas.length; ++j) object.Datas[j] = $root.gamehall.LotteryData.toObject(message.Datas[j], options); } return object; }; /** * Converts this SCLotterySync to JSON. * @function toJSON * @memberof gamehall.SCLotterySync * @instance * @returns {Object.} JSON object */ SCLotterySync.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLotterySync * @function getTypeUrl * @memberof gamehall.SCLotterySync * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLotterySync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLotterySync"; }; return SCLotterySync; })(); gamehall.CSLotteryLog = (function() { /** * Properties of a CSLotteryLog. * @memberof gamehall * @interface ICSLotteryLog * @property {number|null} [GameFreeId] CSLotteryLog GameFreeId */ /** * Constructs a new CSLotteryLog. * @memberof gamehall * @classdesc Represents a CSLotteryLog. * @implements ICSLotteryLog * @constructor * @param {gamehall.ICSLotteryLog=} [properties] Properties to set */ function CSLotteryLog(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSLotteryLog GameFreeId. * @member {number} GameFreeId * @memberof gamehall.CSLotteryLog * @instance */ CSLotteryLog.prototype.GameFreeId = 0; /** * Creates a new CSLotteryLog instance using the specified properties. * @function create * @memberof gamehall.CSLotteryLog * @static * @param {gamehall.ICSLotteryLog=} [properties] Properties to set * @returns {gamehall.CSLotteryLog} CSLotteryLog instance */ CSLotteryLog.create = function create(properties) { return new CSLotteryLog(properties); }; /** * Encodes the specified CSLotteryLog message. Does not implicitly {@link gamehall.CSLotteryLog.verify|verify} messages. * @function encode * @memberof gamehall.CSLotteryLog * @static * @param {gamehall.ICSLotteryLog} message CSLotteryLog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLotteryLog.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); return writer; }; /** * Encodes the specified CSLotteryLog message, length delimited. Does not implicitly {@link gamehall.CSLotteryLog.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSLotteryLog * @static * @param {gamehall.ICSLotteryLog} message CSLotteryLog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLotteryLog.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLotteryLog message from the specified reader or buffer. * @function decode * @memberof gamehall.CSLotteryLog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSLotteryLog} CSLotteryLog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLotteryLog.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSLotteryLog(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLotteryLog message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSLotteryLog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSLotteryLog} CSLotteryLog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLotteryLog.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLotteryLog message. * @function verify * @memberof gamehall.CSLotteryLog * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLotteryLog.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; return null; }; /** * Creates a CSLotteryLog message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSLotteryLog * @static * @param {Object.} object Plain object * @returns {gamehall.CSLotteryLog} CSLotteryLog */ CSLotteryLog.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSLotteryLog) return object; var message = new $root.gamehall.CSLotteryLog(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; return message; }; /** * Creates a plain object from a CSLotteryLog message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSLotteryLog * @static * @param {gamehall.CSLotteryLog} message CSLotteryLog * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLotteryLog.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.GameFreeId = 0; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; return object; }; /** * Converts this CSLotteryLog to JSON. * @function toJSON * @memberof gamehall.CSLotteryLog * @instance * @returns {Object.} JSON object */ CSLotteryLog.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLotteryLog * @function getTypeUrl * @memberof gamehall.CSLotteryLog * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLotteryLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSLotteryLog"; }; return CSLotteryLog; })(); gamehall.LotteryLog = (function() { /** * Properties of a LotteryLog. * @memberof gamehall * @interface ILotteryLog * @property {number|null} [Time] LotteryLog Time * @property {string|null} [NickName] LotteryLog NickName * @property {Array.|null} [Card] LotteryLog Card * @property {number|null} [Kind] LotteryLog Kind * @property {number|null} [Coin] LotteryLog Coin */ /** * Constructs a new LotteryLog. * @memberof gamehall * @classdesc Represents a LotteryLog. * @implements ILotteryLog * @constructor * @param {gamehall.ILotteryLog=} [properties] Properties to set */ function LotteryLog(properties) { this.Card = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * LotteryLog Time. * @member {number} Time * @memberof gamehall.LotteryLog * @instance */ LotteryLog.prototype.Time = 0; /** * LotteryLog NickName. * @member {string} NickName * @memberof gamehall.LotteryLog * @instance */ LotteryLog.prototype.NickName = ""; /** * LotteryLog Card. * @member {Array.} Card * @memberof gamehall.LotteryLog * @instance */ LotteryLog.prototype.Card = $util.emptyArray; /** * LotteryLog Kind. * @member {number} Kind * @memberof gamehall.LotteryLog * @instance */ LotteryLog.prototype.Kind = 0; /** * LotteryLog Coin. * @member {number} Coin * @memberof gamehall.LotteryLog * @instance */ LotteryLog.prototype.Coin = 0; /** * Creates a new LotteryLog instance using the specified properties. * @function create * @memberof gamehall.LotteryLog * @static * @param {gamehall.ILotteryLog=} [properties] Properties to set * @returns {gamehall.LotteryLog} LotteryLog instance */ LotteryLog.create = function create(properties) { return new LotteryLog(properties); }; /** * Encodes the specified LotteryLog message. Does not implicitly {@link gamehall.LotteryLog.verify|verify} messages. * @function encode * @memberof gamehall.LotteryLog * @static * @param {gamehall.ILotteryLog} message LotteryLog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ LotteryLog.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).int32(message.Time); if (message.NickName != null && Object.hasOwnProperty.call(message, "NickName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.NickName); if (message.Card != null && message.Card.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (var i = 0; i < message.Card.length; ++i) writer.int32(message.Card[i]); writer.ldelim(); } if (message.Kind != null && Object.hasOwnProperty.call(message, "Kind")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.Kind); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.Coin); return writer; }; /** * Encodes the specified LotteryLog message, length delimited. Does not implicitly {@link gamehall.LotteryLog.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.LotteryLog * @static * @param {gamehall.ILotteryLog} message LotteryLog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ LotteryLog.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a LotteryLog message from the specified reader or buffer. * @function decode * @memberof gamehall.LotteryLog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.LotteryLog} LotteryLog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ LotteryLog.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.LotteryLog(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Time = reader.int32(); break; } case 2: { message.NickName = reader.string(); break; } case 3: { if (!(message.Card && message.Card.length)) message.Card = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Card.push(reader.int32()); } else message.Card.push(reader.int32()); break; } case 4: { message.Kind = reader.int32(); break; } case 5: { message.Coin = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a LotteryLog message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.LotteryLog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.LotteryLog} LotteryLog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ LotteryLog.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a LotteryLog message. * @function verify * @memberof gamehall.LotteryLog * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ LotteryLog.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)) return "Time: integer expected"; if (message.NickName != null && message.hasOwnProperty("NickName")) if (!$util.isString(message.NickName)) return "NickName: string expected"; if (message.Card != null && message.hasOwnProperty("Card")) { if (!Array.isArray(message.Card)) return "Card: array expected"; for (var i = 0; i < message.Card.length; ++i) if (!$util.isInteger(message.Card[i])) return "Card: integer[] expected"; } if (message.Kind != null && message.hasOwnProperty("Kind")) if (!$util.isInteger(message.Kind)) return "Kind: integer expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin)) return "Coin: integer expected"; return null; }; /** * Creates a LotteryLog message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.LotteryLog * @static * @param {Object.} object Plain object * @returns {gamehall.LotteryLog} LotteryLog */ LotteryLog.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.LotteryLog) return object; var message = new $root.gamehall.LotteryLog(); if (object.Time != null) message.Time = object.Time | 0; if (object.NickName != null) message.NickName = String(object.NickName); if (object.Card) { if (!Array.isArray(object.Card)) throw TypeError(".gamehall.LotteryLog.Card: array expected"); message.Card = []; for (var i = 0; i < object.Card.length; ++i) message.Card[i] = object.Card[i] | 0; } if (object.Kind != null) message.Kind = object.Kind | 0; if (object.Coin != null) message.Coin = object.Coin | 0; return message; }; /** * Creates a plain object from a LotteryLog message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.LotteryLog * @static * @param {gamehall.LotteryLog} message LotteryLog * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ LotteryLog.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Card = []; if (options.defaults) { object.Time = 0; object.NickName = ""; object.Kind = 0; object.Coin = 0; } if (message.Time != null && message.hasOwnProperty("Time")) object.Time = message.Time; if (message.NickName != null && message.hasOwnProperty("NickName")) object.NickName = message.NickName; if (message.Card && message.Card.length) { object.Card = []; for (var j = 0; j < message.Card.length; ++j) object.Card[j] = message.Card[j]; } if (message.Kind != null && message.hasOwnProperty("Kind")) object.Kind = message.Kind; if (message.Coin != null && message.hasOwnProperty("Coin")) object.Coin = message.Coin; return object; }; /** * Converts this LotteryLog to JSON. * @function toJSON * @memberof gamehall.LotteryLog * @instance * @returns {Object.} JSON object */ LotteryLog.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for LotteryLog * @function getTypeUrl * @memberof gamehall.LotteryLog * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ LotteryLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.LotteryLog"; }; return LotteryLog; })(); gamehall.SCLotteryLog = (function() { /** * Properties of a SCLotteryLog. * @memberof gamehall * @interface ISCLotteryLog * @property {number|null} [GameFreeId] SCLotteryLog GameFreeId * @property {Array.|null} [Logs] SCLotteryLog Logs */ /** * Constructs a new SCLotteryLog. * @memberof gamehall * @classdesc Represents a SCLotteryLog. * @implements ISCLotteryLog * @constructor * @param {gamehall.ISCLotteryLog=} [properties] Properties to set */ function SCLotteryLog(properties) { this.Logs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLotteryLog GameFreeId. * @member {number} GameFreeId * @memberof gamehall.SCLotteryLog * @instance */ SCLotteryLog.prototype.GameFreeId = 0; /** * SCLotteryLog Logs. * @member {Array.} Logs * @memberof gamehall.SCLotteryLog * @instance */ SCLotteryLog.prototype.Logs = $util.emptyArray; /** * Creates a new SCLotteryLog instance using the specified properties. * @function create * @memberof gamehall.SCLotteryLog * @static * @param {gamehall.ISCLotteryLog=} [properties] Properties to set * @returns {gamehall.SCLotteryLog} SCLotteryLog instance */ SCLotteryLog.create = function create(properties) { return new SCLotteryLog(properties); }; /** * Encodes the specified SCLotteryLog message. Does not implicitly {@link gamehall.SCLotteryLog.verify|verify} messages. * @function encode * @memberof gamehall.SCLotteryLog * @static * @param {gamehall.ISCLotteryLog} message SCLotteryLog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLotteryLog.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.Logs != null && message.Logs.length) for (var i = 0; i < message.Logs.length; ++i) $root.gamehall.LotteryLog.encode(message.Logs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCLotteryLog message, length delimited. Does not implicitly {@link gamehall.SCLotteryLog.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLotteryLog * @static * @param {gamehall.ISCLotteryLog} message SCLotteryLog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLotteryLog.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLotteryLog message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLotteryLog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLotteryLog} SCLotteryLog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLotteryLog.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLotteryLog(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { if (!(message.Logs && message.Logs.length)) message.Logs = []; message.Logs.push($root.gamehall.LotteryLog.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLotteryLog message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLotteryLog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLotteryLog} SCLotteryLog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLotteryLog.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLotteryLog message. * @function verify * @memberof gamehall.SCLotteryLog * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLotteryLog.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.Logs != null && message.hasOwnProperty("Logs")) { if (!Array.isArray(message.Logs)) return "Logs: array expected"; for (var i = 0; i < message.Logs.length; ++i) { var error = $root.gamehall.LotteryLog.verify(message.Logs[i]); if (error) return "Logs." + error; } } return null; }; /** * Creates a SCLotteryLog message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLotteryLog * @static * @param {Object.} object Plain object * @returns {gamehall.SCLotteryLog} SCLotteryLog */ SCLotteryLog.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLotteryLog) return object; var message = new $root.gamehall.SCLotteryLog(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.Logs) { if (!Array.isArray(object.Logs)) throw TypeError(".gamehall.SCLotteryLog.Logs: array expected"); message.Logs = []; for (var i = 0; i < object.Logs.length; ++i) { if (typeof object.Logs[i] !== "object") throw TypeError(".gamehall.SCLotteryLog.Logs: object expected"); message.Logs[i] = $root.gamehall.LotteryLog.fromObject(object.Logs[i]); } } return message; }; /** * Creates a plain object from a SCLotteryLog message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLotteryLog * @static * @param {gamehall.SCLotteryLog} message SCLotteryLog * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLotteryLog.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Logs = []; if (options.defaults) object.GameFreeId = 0; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.Logs && message.Logs.length) { object.Logs = []; for (var j = 0; j < message.Logs.length; ++j) object.Logs[j] = $root.gamehall.LotteryLog.toObject(message.Logs[j], options); } return object; }; /** * Converts this SCLotteryLog to JSON. * @function toJSON * @memberof gamehall.SCLotteryLog * @instance * @returns {Object.} JSON object */ SCLotteryLog.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLotteryLog * @function getTypeUrl * @memberof gamehall.SCLotteryLog * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLotteryLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLotteryLog"; }; return SCLotteryLog; })(); gamehall.SCLotteryBill = (function() { /** * Properties of a SCLotteryBill. * @memberof gamehall * @interface ISCLotteryBill * @property {number|null} [GameFreeId] SCLotteryBill GameFreeId * @property {number|null} [SnId] SCLotteryBill SnId * @property {string|null} [Name] SCLotteryBill Name * @property {number|null} [Kind] SCLotteryBill Kind * @property {Array.|null} [Card] SCLotteryBill Card * @property {number|Long|null} [Value] SCLotteryBill Value */ /** * Constructs a new SCLotteryBill. * @memberof gamehall * @classdesc Represents a SCLotteryBill. * @implements ISCLotteryBill * @constructor * @param {gamehall.ISCLotteryBill=} [properties] Properties to set */ function SCLotteryBill(properties) { this.Card = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCLotteryBill GameFreeId. * @member {number} GameFreeId * @memberof gamehall.SCLotteryBill * @instance */ SCLotteryBill.prototype.GameFreeId = 0; /** * SCLotteryBill SnId. * @member {number} SnId * @memberof gamehall.SCLotteryBill * @instance */ SCLotteryBill.prototype.SnId = 0; /** * SCLotteryBill Name. * @member {string} Name * @memberof gamehall.SCLotteryBill * @instance */ SCLotteryBill.prototype.Name = ""; /** * SCLotteryBill Kind. * @member {number} Kind * @memberof gamehall.SCLotteryBill * @instance */ SCLotteryBill.prototype.Kind = 0; /** * SCLotteryBill Card. * @member {Array.} Card * @memberof gamehall.SCLotteryBill * @instance */ SCLotteryBill.prototype.Card = $util.emptyArray; /** * SCLotteryBill Value. * @member {number|Long} Value * @memberof gamehall.SCLotteryBill * @instance */ SCLotteryBill.prototype.Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCLotteryBill instance using the specified properties. * @function create * @memberof gamehall.SCLotteryBill * @static * @param {gamehall.ISCLotteryBill=} [properties] Properties to set * @returns {gamehall.SCLotteryBill} SCLotteryBill instance */ SCLotteryBill.create = function create(properties) { return new SCLotteryBill(properties); }; /** * Encodes the specified SCLotteryBill message. Does not implicitly {@link gamehall.SCLotteryBill.verify|verify} messages. * @function encode * @memberof gamehall.SCLotteryBill * @static * @param {gamehall.ISCLotteryBill} message SCLotteryBill message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLotteryBill.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.SnId != null && Object.hasOwnProperty.call(message, "SnId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.SnId); if (message.Name != null && Object.hasOwnProperty.call(message, "Name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Name); if (message.Kind != null && Object.hasOwnProperty.call(message, "Kind")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.Kind); if (message.Card != null && message.Card.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (var i = 0; i < message.Card.length; ++i) writer.int32(message.Card[i]); writer.ldelim(); } if (message.Value != null && Object.hasOwnProperty.call(message, "Value")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.Value); return writer; }; /** * Encodes the specified SCLotteryBill message, length delimited. Does not implicitly {@link gamehall.SCLotteryBill.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCLotteryBill * @static * @param {gamehall.ISCLotteryBill} message SCLotteryBill message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCLotteryBill.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCLotteryBill message from the specified reader or buffer. * @function decode * @memberof gamehall.SCLotteryBill * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCLotteryBill} SCLotteryBill * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLotteryBill.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCLotteryBill(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.SnId = reader.int32(); break; } case 3: { message.Name = reader.string(); break; } case 4: { message.Kind = reader.int32(); break; } case 5: { if (!(message.Card && message.Card.length)) message.Card = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Card.push(reader.int32()); } else message.Card.push(reader.int32()); break; } case 6: { message.Value = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCLotteryBill message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCLotteryBill * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCLotteryBill} SCLotteryBill * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCLotteryBill.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCLotteryBill message. * @function verify * @memberof gamehall.SCLotteryBill * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCLotteryBill.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.SnId != null && message.hasOwnProperty("SnId")) if (!$util.isInteger(message.SnId)) return "SnId: integer expected"; if (message.Name != null && message.hasOwnProperty("Name")) if (!$util.isString(message.Name)) return "Name: string expected"; if (message.Kind != null && message.hasOwnProperty("Kind")) if (!$util.isInteger(message.Kind)) return "Kind: integer expected"; if (message.Card != null && message.hasOwnProperty("Card")) { if (!Array.isArray(message.Card)) return "Card: array expected"; for (var i = 0; i < message.Card.length; ++i) if (!$util.isInteger(message.Card[i])) return "Card: integer[] expected"; } if (message.Value != null && message.hasOwnProperty("Value")) if (!$util.isInteger(message.Value) && !(message.Value && $util.isInteger(message.Value.low) && $util.isInteger(message.Value.high))) return "Value: integer|Long expected"; return null; }; /** * Creates a SCLotteryBill message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCLotteryBill * @static * @param {Object.} object Plain object * @returns {gamehall.SCLotteryBill} SCLotteryBill */ SCLotteryBill.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCLotteryBill) return object; var message = new $root.gamehall.SCLotteryBill(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.SnId != null) message.SnId = object.SnId | 0; if (object.Name != null) message.Name = String(object.Name); if (object.Kind != null) message.Kind = object.Kind | 0; if (object.Card) { if (!Array.isArray(object.Card)) throw TypeError(".gamehall.SCLotteryBill.Card: array expected"); message.Card = []; for (var i = 0; i < object.Card.length; ++i) message.Card[i] = object.Card[i] | 0; } if (object.Value != null) if ($util.Long) (message.Value = $util.Long.fromValue(object.Value)).unsigned = false; else if (typeof object.Value === "string") message.Value = parseInt(object.Value, 10); else if (typeof object.Value === "number") message.Value = object.Value; else if (typeof object.Value === "object") message.Value = new $util.LongBits(object.Value.low >>> 0, object.Value.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCLotteryBill message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCLotteryBill * @static * @param {gamehall.SCLotteryBill} message SCLotteryBill * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCLotteryBill.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Card = []; if (options.defaults) { object.GameFreeId = 0; object.SnId = 0; object.Name = ""; object.Kind = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Value = options.longs === String ? "0" : 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.SnId != null && message.hasOwnProperty("SnId")) object.SnId = message.SnId; if (message.Name != null && message.hasOwnProperty("Name")) object.Name = message.Name; if (message.Kind != null && message.hasOwnProperty("Kind")) object.Kind = message.Kind; if (message.Card && message.Card.length) { object.Card = []; for (var j = 0; j < message.Card.length; ++j) object.Card[j] = message.Card[j]; } if (message.Value != null && message.hasOwnProperty("Value")) if (typeof message.Value === "number") object.Value = options.longs === String ? String(message.Value) : message.Value; else object.Value = options.longs === String ? $util.Long.prototype.toString.call(message.Value) : options.longs === Number ? new $util.LongBits(message.Value.low >>> 0, message.Value.high >>> 0).toNumber() : message.Value; return object; }; /** * Converts this SCLotteryBill to JSON. * @function toJSON * @memberof gamehall.SCLotteryBill * @instance * @returns {Object.} JSON object */ SCLotteryBill.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCLotteryBill * @function getTypeUrl * @memberof gamehall.SCLotteryBill * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCLotteryBill.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCLotteryBill"; }; return SCLotteryBill; })(); gamehall.GameConfig1 = (function() { /** * Properties of a GameConfig1. * @memberof gamehall * @interface IGameConfig1 * @property {number|null} [LogicId] GameConfig1 LogicId * @property {number|null} [LimitCoin] GameConfig1 LimitCoin * @property {number|null} [MaxCoinLimit] GameConfig1 MaxCoinLimit * @property {number|null} [BaseScore] GameConfig1 BaseScore * @property {Array.|null} [OtherIntParams] GameConfig1 OtherIntParams * @property {number|null} [BetScore] GameConfig1 BetScore * @property {Array.|null} [MaxBetCoin] GameConfig1 MaxBetCoin * @property {number|null} [MatchMode] GameConfig1 MatchMode * @property {number|Long|null} [LotteryCoin] GameConfig1 LotteryCoin * @property {string|null} [LotteryCfg] GameConfig1 LotteryCfg * @property {boolean|null} [Status] GameConfig1 Status */ /** * Constructs a new GameConfig1. * @memberof gamehall * @classdesc Represents a GameConfig1. * @implements IGameConfig1 * @constructor * @param {gamehall.IGameConfig1=} [properties] Properties to set */ function GameConfig1(properties) { this.OtherIntParams = []; this.MaxBetCoin = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GameConfig1 LogicId. * @member {number} LogicId * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.LogicId = 0; /** * GameConfig1 LimitCoin. * @member {number} LimitCoin * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.LimitCoin = 0; /** * GameConfig1 MaxCoinLimit. * @member {number} MaxCoinLimit * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.MaxCoinLimit = 0; /** * GameConfig1 BaseScore. * @member {number} BaseScore * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.BaseScore = 0; /** * GameConfig1 OtherIntParams. * @member {Array.} OtherIntParams * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.OtherIntParams = $util.emptyArray; /** * GameConfig1 BetScore. * @member {number} BetScore * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.BetScore = 0; /** * GameConfig1 MaxBetCoin. * @member {Array.} MaxBetCoin * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.MaxBetCoin = $util.emptyArray; /** * GameConfig1 MatchMode. * @member {number} MatchMode * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.MatchMode = 0; /** * GameConfig1 LotteryCoin. * @member {number|Long} LotteryCoin * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.LotteryCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * GameConfig1 LotteryCfg. * @member {string} LotteryCfg * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.LotteryCfg = ""; /** * GameConfig1 Status. * @member {boolean} Status * @memberof gamehall.GameConfig1 * @instance */ GameConfig1.prototype.Status = false; /** * Creates a new GameConfig1 instance using the specified properties. * @function create * @memberof gamehall.GameConfig1 * @static * @param {gamehall.IGameConfig1=} [properties] Properties to set * @returns {gamehall.GameConfig1} GameConfig1 instance */ GameConfig1.create = function create(properties) { return new GameConfig1(properties); }; /** * Encodes the specified GameConfig1 message. Does not implicitly {@link gamehall.GameConfig1.verify|verify} messages. * @function encode * @memberof gamehall.GameConfig1 * @static * @param {gamehall.IGameConfig1} message GameConfig1 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameConfig1.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.LogicId != null && Object.hasOwnProperty.call(message, "LogicId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.LogicId); if (message.LimitCoin != null && Object.hasOwnProperty.call(message, "LimitCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.LimitCoin); if (message.MaxCoinLimit != null && Object.hasOwnProperty.call(message, "MaxCoinLimit")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.MaxCoinLimit); if (message.BaseScore != null && Object.hasOwnProperty.call(message, "BaseScore")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.BaseScore); if (message.OtherIntParams != null && message.OtherIntParams.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); for (var i = 0; i < message.OtherIntParams.length; ++i) writer.int32(message.OtherIntParams[i]); writer.ldelim(); } if (message.BetScore != null && Object.hasOwnProperty.call(message, "BetScore")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.BetScore); if (message.MaxBetCoin != null && message.MaxBetCoin.length) { writer.uint32(/* id 7, wireType 2 =*/58).fork(); for (var i = 0; i < message.MaxBetCoin.length; ++i) writer.int32(message.MaxBetCoin[i]); writer.ldelim(); } if (message.MatchMode != null && Object.hasOwnProperty.call(message, "MatchMode")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.MatchMode); if (message.LotteryCoin != null && Object.hasOwnProperty.call(message, "LotteryCoin")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.LotteryCoin); if (message.LotteryCfg != null && Object.hasOwnProperty.call(message, "LotteryCfg")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.LotteryCfg); if (message.Status != null && Object.hasOwnProperty.call(message, "Status")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.Status); return writer; }; /** * Encodes the specified GameConfig1 message, length delimited. Does not implicitly {@link gamehall.GameConfig1.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.GameConfig1 * @static * @param {gamehall.IGameConfig1} message GameConfig1 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameConfig1.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GameConfig1 message from the specified reader or buffer. * @function decode * @memberof gamehall.GameConfig1 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.GameConfig1} GameConfig1 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameConfig1.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.GameConfig1(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.LogicId = reader.int32(); break; } case 2: { message.LimitCoin = reader.int32(); break; } case 3: { message.MaxCoinLimit = reader.int32(); break; } case 4: { message.BaseScore = reader.int32(); break; } case 5: { if (!(message.OtherIntParams && message.OtherIntParams.length)) message.OtherIntParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OtherIntParams.push(reader.int32()); } else message.OtherIntParams.push(reader.int32()); break; } case 6: { message.BetScore = reader.int32(); break; } case 7: { if (!(message.MaxBetCoin && message.MaxBetCoin.length)) message.MaxBetCoin = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.MaxBetCoin.push(reader.int32()); } else message.MaxBetCoin.push(reader.int32()); break; } case 8: { message.MatchMode = reader.int32(); break; } case 9: { message.LotteryCoin = reader.int64(); break; } case 10: { message.LotteryCfg = reader.string(); break; } case 11: { message.Status = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GameConfig1 message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.GameConfig1 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.GameConfig1} GameConfig1 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameConfig1.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GameConfig1 message. * @function verify * @memberof gamehall.GameConfig1 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GameConfig1.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.LogicId != null && message.hasOwnProperty("LogicId")) if (!$util.isInteger(message.LogicId)) return "LogicId: integer expected"; if (message.LimitCoin != null && message.hasOwnProperty("LimitCoin")) if (!$util.isInteger(message.LimitCoin)) return "LimitCoin: integer expected"; if (message.MaxCoinLimit != null && message.hasOwnProperty("MaxCoinLimit")) if (!$util.isInteger(message.MaxCoinLimit)) return "MaxCoinLimit: integer expected"; if (message.BaseScore != null && message.hasOwnProperty("BaseScore")) if (!$util.isInteger(message.BaseScore)) return "BaseScore: integer expected"; if (message.OtherIntParams != null && message.hasOwnProperty("OtherIntParams")) { if (!Array.isArray(message.OtherIntParams)) return "OtherIntParams: array expected"; for (var i = 0; i < message.OtherIntParams.length; ++i) if (!$util.isInteger(message.OtherIntParams[i])) return "OtherIntParams: integer[] expected"; } if (message.BetScore != null && message.hasOwnProperty("BetScore")) if (!$util.isInteger(message.BetScore)) return "BetScore: integer expected"; if (message.MaxBetCoin != null && message.hasOwnProperty("MaxBetCoin")) { if (!Array.isArray(message.MaxBetCoin)) return "MaxBetCoin: array expected"; for (var i = 0; i < message.MaxBetCoin.length; ++i) if (!$util.isInteger(message.MaxBetCoin[i])) return "MaxBetCoin: integer[] expected"; } if (message.MatchMode != null && message.hasOwnProperty("MatchMode")) if (!$util.isInteger(message.MatchMode)) return "MatchMode: integer expected"; if (message.LotteryCoin != null && message.hasOwnProperty("LotteryCoin")) if (!$util.isInteger(message.LotteryCoin) && !(message.LotteryCoin && $util.isInteger(message.LotteryCoin.low) && $util.isInteger(message.LotteryCoin.high))) return "LotteryCoin: integer|Long expected"; if (message.LotteryCfg != null && message.hasOwnProperty("LotteryCfg")) if (!$util.isString(message.LotteryCfg)) return "LotteryCfg: string expected"; if (message.Status != null && message.hasOwnProperty("Status")) if (typeof message.Status !== "boolean") return "Status: boolean expected"; return null; }; /** * Creates a GameConfig1 message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.GameConfig1 * @static * @param {Object.} object Plain object * @returns {gamehall.GameConfig1} GameConfig1 */ GameConfig1.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.GameConfig1) return object; var message = new $root.gamehall.GameConfig1(); if (object.LogicId != null) message.LogicId = object.LogicId | 0; if (object.LimitCoin != null) message.LimitCoin = object.LimitCoin | 0; if (object.MaxCoinLimit != null) message.MaxCoinLimit = object.MaxCoinLimit | 0; if (object.BaseScore != null) message.BaseScore = object.BaseScore | 0; if (object.OtherIntParams) { if (!Array.isArray(object.OtherIntParams)) throw TypeError(".gamehall.GameConfig1.OtherIntParams: array expected"); message.OtherIntParams = []; for (var i = 0; i < object.OtherIntParams.length; ++i) message.OtherIntParams[i] = object.OtherIntParams[i] | 0; } if (object.BetScore != null) message.BetScore = object.BetScore | 0; if (object.MaxBetCoin) { if (!Array.isArray(object.MaxBetCoin)) throw TypeError(".gamehall.GameConfig1.MaxBetCoin: array expected"); message.MaxBetCoin = []; for (var i = 0; i < object.MaxBetCoin.length; ++i) message.MaxBetCoin[i] = object.MaxBetCoin[i] | 0; } if (object.MatchMode != null) message.MatchMode = object.MatchMode | 0; if (object.LotteryCoin != null) if ($util.Long) (message.LotteryCoin = $util.Long.fromValue(object.LotteryCoin)).unsigned = false; else if (typeof object.LotteryCoin === "string") message.LotteryCoin = parseInt(object.LotteryCoin, 10); else if (typeof object.LotteryCoin === "number") message.LotteryCoin = object.LotteryCoin; else if (typeof object.LotteryCoin === "object") message.LotteryCoin = new $util.LongBits(object.LotteryCoin.low >>> 0, object.LotteryCoin.high >>> 0).toNumber(); if (object.LotteryCfg != null) message.LotteryCfg = String(object.LotteryCfg); if (object.Status != null) message.Status = Boolean(object.Status); return message; }; /** * Creates a plain object from a GameConfig1 message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.GameConfig1 * @static * @param {gamehall.GameConfig1} message GameConfig1 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GameConfig1.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.OtherIntParams = []; object.MaxBetCoin = []; } if (options.defaults) { object.LogicId = 0; object.LimitCoin = 0; object.MaxCoinLimit = 0; object.BaseScore = 0; object.BetScore = 0; object.MatchMode = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.LotteryCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.LotteryCoin = options.longs === String ? "0" : 0; object.LotteryCfg = ""; object.Status = false; } if (message.LogicId != null && message.hasOwnProperty("LogicId")) object.LogicId = message.LogicId; if (message.LimitCoin != null && message.hasOwnProperty("LimitCoin")) object.LimitCoin = message.LimitCoin; if (message.MaxCoinLimit != null && message.hasOwnProperty("MaxCoinLimit")) object.MaxCoinLimit = message.MaxCoinLimit; if (message.BaseScore != null && message.hasOwnProperty("BaseScore")) object.BaseScore = message.BaseScore; if (message.OtherIntParams && message.OtherIntParams.length) { object.OtherIntParams = []; for (var j = 0; j < message.OtherIntParams.length; ++j) object.OtherIntParams[j] = message.OtherIntParams[j]; } if (message.BetScore != null && message.hasOwnProperty("BetScore")) object.BetScore = message.BetScore; if (message.MaxBetCoin && message.MaxBetCoin.length) { object.MaxBetCoin = []; for (var j = 0; j < message.MaxBetCoin.length; ++j) object.MaxBetCoin[j] = message.MaxBetCoin[j]; } if (message.MatchMode != null && message.hasOwnProperty("MatchMode")) object.MatchMode = message.MatchMode; if (message.LotteryCoin != null && message.hasOwnProperty("LotteryCoin")) if (typeof message.LotteryCoin === "number") object.LotteryCoin = options.longs === String ? String(message.LotteryCoin) : message.LotteryCoin; else object.LotteryCoin = options.longs === String ? $util.Long.prototype.toString.call(message.LotteryCoin) : options.longs === Number ? new $util.LongBits(message.LotteryCoin.low >>> 0, message.LotteryCoin.high >>> 0).toNumber() : message.LotteryCoin; if (message.LotteryCfg != null && message.hasOwnProperty("LotteryCfg")) object.LotteryCfg = message.LotteryCfg; if (message.Status != null && message.hasOwnProperty("Status")) object.Status = message.Status; return object; }; /** * Converts this GameConfig1 to JSON. * @function toJSON * @memberof gamehall.GameConfig1 * @instance * @returns {Object.} JSON object */ GameConfig1.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GameConfig1 * @function getTypeUrl * @memberof gamehall.GameConfig1 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GameConfig1.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.GameConfig1"; }; return GameConfig1; })(); gamehall.CSGetGameConfig = (function() { /** * Properties of a CSGetGameConfig. * @memberof gamehall * @interface ICSGetGameConfig * @property {string|null} [Platform] CSGetGameConfig Platform * @property {string|null} [Channel] CSGetGameConfig Channel * @property {number|null} [GameId] CSGetGameConfig GameId */ /** * Constructs a new CSGetGameConfig. * @memberof gamehall * @classdesc Represents a CSGetGameConfig. * @implements ICSGetGameConfig * @constructor * @param {gamehall.ICSGetGameConfig=} [properties] Properties to set */ function CSGetGameConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSGetGameConfig Platform. * @member {string} Platform * @memberof gamehall.CSGetGameConfig * @instance */ CSGetGameConfig.prototype.Platform = ""; /** * CSGetGameConfig Channel. * @member {string} Channel * @memberof gamehall.CSGetGameConfig * @instance */ CSGetGameConfig.prototype.Channel = ""; /** * CSGetGameConfig GameId. * @member {number} GameId * @memberof gamehall.CSGetGameConfig * @instance */ CSGetGameConfig.prototype.GameId = 0; /** * Creates a new CSGetGameConfig instance using the specified properties. * @function create * @memberof gamehall.CSGetGameConfig * @static * @param {gamehall.ICSGetGameConfig=} [properties] Properties to set * @returns {gamehall.CSGetGameConfig} CSGetGameConfig instance */ CSGetGameConfig.create = function create(properties) { return new CSGetGameConfig(properties); }; /** * Encodes the specified CSGetGameConfig message. Does not implicitly {@link gamehall.CSGetGameConfig.verify|verify} messages. * @function encode * @memberof gamehall.CSGetGameConfig * @static * @param {gamehall.ICSGetGameConfig} message CSGetGameConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGameConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Platform != null && Object.hasOwnProperty.call(message, "Platform")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.Platform); if (message.Channel != null && Object.hasOwnProperty.call(message, "Channel")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.Channel); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.GameId); return writer; }; /** * Encodes the specified CSGetGameConfig message, length delimited. Does not implicitly {@link gamehall.CSGetGameConfig.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGetGameConfig * @static * @param {gamehall.ICSGetGameConfig} message CSGetGameConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGameConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetGameConfig message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGetGameConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGetGameConfig} CSGetGameConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGameConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGetGameConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Platform = reader.string(); break; } case 2: { message.Channel = reader.string(); break; } case 3: { message.GameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetGameConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGetGameConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGetGameConfig} CSGetGameConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGameConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetGameConfig message. * @function verify * @memberof gamehall.CSGetGameConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetGameConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Platform != null && message.hasOwnProperty("Platform")) if (!$util.isString(message.Platform)) return "Platform: string expected"; if (message.Channel != null && message.hasOwnProperty("Channel")) if (!$util.isString(message.Channel)) return "Channel: string expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; return null; }; /** * Creates a CSGetGameConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGetGameConfig * @static * @param {Object.} object Plain object * @returns {gamehall.CSGetGameConfig} CSGetGameConfig */ CSGetGameConfig.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGetGameConfig) return object; var message = new $root.gamehall.CSGetGameConfig(); if (object.Platform != null) message.Platform = String(object.Platform); if (object.Channel != null) message.Channel = String(object.Channel); if (object.GameId != null) message.GameId = object.GameId | 0; return message; }; /** * Creates a plain object from a CSGetGameConfig message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGetGameConfig * @static * @param {gamehall.CSGetGameConfig} message CSGetGameConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetGameConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Platform = ""; object.Channel = ""; object.GameId = 0; } if (message.Platform != null && message.hasOwnProperty("Platform")) object.Platform = message.Platform; if (message.Channel != null && message.hasOwnProperty("Channel")) object.Channel = message.Channel; if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; return object; }; /** * Converts this CSGetGameConfig to JSON. * @function toJSON * @memberof gamehall.CSGetGameConfig * @instance * @returns {Object.} JSON object */ CSGetGameConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetGameConfig * @function getTypeUrl * @memberof gamehall.CSGetGameConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetGameConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGetGameConfig"; }; return CSGetGameConfig; })(); gamehall.SCGetGameConfig = (function() { /** * Properties of a SCGetGameConfig. * @memberof gamehall * @interface ISCGetGameConfig * @property {Array.|null} [GameCfg] SCGetGameConfig GameCfg * @property {number|null} [GameId] SCGetGameConfig GameId */ /** * Constructs a new SCGetGameConfig. * @memberof gamehall * @classdesc Represents a SCGetGameConfig. * @implements ISCGetGameConfig * @constructor * @param {gamehall.ISCGetGameConfig=} [properties] Properties to set */ function SCGetGameConfig(properties) { this.GameCfg = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGetGameConfig GameCfg. * @member {Array.} GameCfg * @memberof gamehall.SCGetGameConfig * @instance */ SCGetGameConfig.prototype.GameCfg = $util.emptyArray; /** * SCGetGameConfig GameId. * @member {number} GameId * @memberof gamehall.SCGetGameConfig * @instance */ SCGetGameConfig.prototype.GameId = 0; /** * Creates a new SCGetGameConfig instance using the specified properties. * @function create * @memberof gamehall.SCGetGameConfig * @static * @param {gamehall.ISCGetGameConfig=} [properties] Properties to set * @returns {gamehall.SCGetGameConfig} SCGetGameConfig instance */ SCGetGameConfig.create = function create(properties) { return new SCGetGameConfig(properties); }; /** * Encodes the specified SCGetGameConfig message. Does not implicitly {@link gamehall.SCGetGameConfig.verify|verify} messages. * @function encode * @memberof gamehall.SCGetGameConfig * @static * @param {gamehall.ISCGetGameConfig} message SCGetGameConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetGameConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameCfg != null && message.GameCfg.length) for (var i = 0; i < message.GameCfg.length; ++i) $root.gamehall.GameConfig1.encode(message.GameCfg[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameId); return writer; }; /** * Encodes the specified SCGetGameConfig message, length delimited. Does not implicitly {@link gamehall.SCGetGameConfig.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGetGameConfig * @static * @param {gamehall.ISCGetGameConfig} message SCGetGameConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetGameConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGetGameConfig message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGetGameConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGetGameConfig} SCGetGameConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetGameConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGetGameConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.GameCfg && message.GameCfg.length)) message.GameCfg = []; message.GameCfg.push($root.gamehall.GameConfig1.decode(reader, reader.uint32())); break; } case 2: { message.GameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGetGameConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGetGameConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGetGameConfig} SCGetGameConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetGameConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGetGameConfig message. * @function verify * @memberof gamehall.SCGetGameConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGetGameConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameCfg != null && message.hasOwnProperty("GameCfg")) { if (!Array.isArray(message.GameCfg)) return "GameCfg: array expected"; for (var i = 0; i < message.GameCfg.length; ++i) { var error = $root.gamehall.GameConfig1.verify(message.GameCfg[i]); if (error) return "GameCfg." + error; } } if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; return null; }; /** * Creates a SCGetGameConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGetGameConfig * @static * @param {Object.} object Plain object * @returns {gamehall.SCGetGameConfig} SCGetGameConfig */ SCGetGameConfig.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGetGameConfig) return object; var message = new $root.gamehall.SCGetGameConfig(); if (object.GameCfg) { if (!Array.isArray(object.GameCfg)) throw TypeError(".gamehall.SCGetGameConfig.GameCfg: array expected"); message.GameCfg = []; for (var i = 0; i < object.GameCfg.length; ++i) { if (typeof object.GameCfg[i] !== "object") throw TypeError(".gamehall.SCGetGameConfig.GameCfg: object expected"); message.GameCfg[i] = $root.gamehall.GameConfig1.fromObject(object.GameCfg[i]); } } if (object.GameId != null) message.GameId = object.GameId | 0; return message; }; /** * Creates a plain object from a SCGetGameConfig message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGetGameConfig * @static * @param {gamehall.SCGetGameConfig} message SCGetGameConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGetGameConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GameCfg = []; if (options.defaults) object.GameId = 0; if (message.GameCfg && message.GameCfg.length) { object.GameCfg = []; for (var j = 0; j < message.GameCfg.length; ++j) object.GameCfg[j] = $root.gamehall.GameConfig1.toObject(message.GameCfg[j], options); } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; return object; }; /** * Converts this SCGetGameConfig to JSON. * @function toJSON * @memberof gamehall.SCGetGameConfig * @instance * @returns {Object.} JSON object */ SCGetGameConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGetGameConfig * @function getTypeUrl * @memberof gamehall.SCGetGameConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGetGameConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGetGameConfig"; }; return SCGetGameConfig; })(); gamehall.SCChangeGameStatus = (function() { /** * Properties of a SCChangeGameStatus. * @memberof gamehall * @interface ISCChangeGameStatus * @property {Array.|null} [GameCfg] SCChangeGameStatus GameCfg */ /** * Constructs a new SCChangeGameStatus. * @memberof gamehall * @classdesc Represents a SCChangeGameStatus. * @implements ISCChangeGameStatus * @constructor * @param {gamehall.ISCChangeGameStatus=} [properties] Properties to set */ function SCChangeGameStatus(properties) { this.GameCfg = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCChangeGameStatus GameCfg. * @member {Array.} GameCfg * @memberof gamehall.SCChangeGameStatus * @instance */ SCChangeGameStatus.prototype.GameCfg = $util.emptyArray; /** * Creates a new SCChangeGameStatus instance using the specified properties. * @function create * @memberof gamehall.SCChangeGameStatus * @static * @param {gamehall.ISCChangeGameStatus=} [properties] Properties to set * @returns {gamehall.SCChangeGameStatus} SCChangeGameStatus instance */ SCChangeGameStatus.create = function create(properties) { return new SCChangeGameStatus(properties); }; /** * Encodes the specified SCChangeGameStatus message. Does not implicitly {@link gamehall.SCChangeGameStatus.verify|verify} messages. * @function encode * @memberof gamehall.SCChangeGameStatus * @static * @param {gamehall.ISCChangeGameStatus} message SCChangeGameStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCChangeGameStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameCfg != null && message.GameCfg.length) for (var i = 0; i < message.GameCfg.length; ++i) $root.gamehall.GameConfig1.encode(message.GameCfg[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCChangeGameStatus message, length delimited. Does not implicitly {@link gamehall.SCChangeGameStatus.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCChangeGameStatus * @static * @param {gamehall.ISCChangeGameStatus} message SCChangeGameStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCChangeGameStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCChangeGameStatus message from the specified reader or buffer. * @function decode * @memberof gamehall.SCChangeGameStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCChangeGameStatus} SCChangeGameStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCChangeGameStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCChangeGameStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.GameCfg && message.GameCfg.length)) message.GameCfg = []; message.GameCfg.push($root.gamehall.GameConfig1.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCChangeGameStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCChangeGameStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCChangeGameStatus} SCChangeGameStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCChangeGameStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCChangeGameStatus message. * @function verify * @memberof gamehall.SCChangeGameStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCChangeGameStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameCfg != null && message.hasOwnProperty("GameCfg")) { if (!Array.isArray(message.GameCfg)) return "GameCfg: array expected"; for (var i = 0; i < message.GameCfg.length; ++i) { var error = $root.gamehall.GameConfig1.verify(message.GameCfg[i]); if (error) return "GameCfg." + error; } } return null; }; /** * Creates a SCChangeGameStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCChangeGameStatus * @static * @param {Object.} object Plain object * @returns {gamehall.SCChangeGameStatus} SCChangeGameStatus */ SCChangeGameStatus.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCChangeGameStatus) return object; var message = new $root.gamehall.SCChangeGameStatus(); if (object.GameCfg) { if (!Array.isArray(object.GameCfg)) throw TypeError(".gamehall.SCChangeGameStatus.GameCfg: array expected"); message.GameCfg = []; for (var i = 0; i < object.GameCfg.length; ++i) { if (typeof object.GameCfg[i] !== "object") throw TypeError(".gamehall.SCChangeGameStatus.GameCfg: object expected"); message.GameCfg[i] = $root.gamehall.GameConfig1.fromObject(object.GameCfg[i]); } } return message; }; /** * Creates a plain object from a SCChangeGameStatus message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCChangeGameStatus * @static * @param {gamehall.SCChangeGameStatus} message SCChangeGameStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCChangeGameStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GameCfg = []; if (message.GameCfg && message.GameCfg.length) { object.GameCfg = []; for (var j = 0; j < message.GameCfg.length; ++j) object.GameCfg[j] = $root.gamehall.GameConfig1.toObject(message.GameCfg[j], options); } return object; }; /** * Converts this SCChangeGameStatus to JSON. * @function toJSON * @memberof gamehall.SCChangeGameStatus * @instance * @returns {Object.} JSON object */ SCChangeGameStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCChangeGameStatus * @function getTypeUrl * @memberof gamehall.SCChangeGameStatus * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCChangeGameStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCChangeGameStatus"; }; return SCChangeGameStatus; })(); gamehall.SCChangeEntrySwitch = (function() { /** * Properties of a SCChangeEntrySwitch. * @memberof gamehall * @interface ISCChangeEntrySwitch * @property {Array.|null} [GameCfg] SCChangeEntrySwitch GameCfg */ /** * Constructs a new SCChangeEntrySwitch. * @memberof gamehall * @classdesc Represents a SCChangeEntrySwitch. * @implements ISCChangeEntrySwitch * @constructor * @param {gamehall.ISCChangeEntrySwitch=} [properties] Properties to set */ function SCChangeEntrySwitch(properties) { this.GameCfg = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCChangeEntrySwitch GameCfg. * @member {Array.} GameCfg * @memberof gamehall.SCChangeEntrySwitch * @instance */ SCChangeEntrySwitch.prototype.GameCfg = $util.emptyArray; /** * Creates a new SCChangeEntrySwitch instance using the specified properties. * @function create * @memberof gamehall.SCChangeEntrySwitch * @static * @param {gamehall.ISCChangeEntrySwitch=} [properties] Properties to set * @returns {gamehall.SCChangeEntrySwitch} SCChangeEntrySwitch instance */ SCChangeEntrySwitch.create = function create(properties) { return new SCChangeEntrySwitch(properties); }; /** * Encodes the specified SCChangeEntrySwitch message. Does not implicitly {@link gamehall.SCChangeEntrySwitch.verify|verify} messages. * @function encode * @memberof gamehall.SCChangeEntrySwitch * @static * @param {gamehall.ISCChangeEntrySwitch} message SCChangeEntrySwitch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCChangeEntrySwitch.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameCfg != null && message.GameCfg.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.GameCfg.length; ++i) writer.int32(message.GameCfg[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCChangeEntrySwitch message, length delimited. Does not implicitly {@link gamehall.SCChangeEntrySwitch.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCChangeEntrySwitch * @static * @param {gamehall.ISCChangeEntrySwitch} message SCChangeEntrySwitch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCChangeEntrySwitch.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCChangeEntrySwitch message from the specified reader or buffer. * @function decode * @memberof gamehall.SCChangeEntrySwitch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCChangeEntrySwitch} SCChangeEntrySwitch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCChangeEntrySwitch.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCChangeEntrySwitch(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.GameCfg && message.GameCfg.length)) message.GameCfg = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.GameCfg.push(reader.int32()); } else message.GameCfg.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCChangeEntrySwitch message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCChangeEntrySwitch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCChangeEntrySwitch} SCChangeEntrySwitch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCChangeEntrySwitch.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCChangeEntrySwitch message. * @function verify * @memberof gamehall.SCChangeEntrySwitch * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCChangeEntrySwitch.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameCfg != null && message.hasOwnProperty("GameCfg")) { if (!Array.isArray(message.GameCfg)) return "GameCfg: array expected"; for (var i = 0; i < message.GameCfg.length; ++i) if (!$util.isInteger(message.GameCfg[i])) return "GameCfg: integer[] expected"; } return null; }; /** * Creates a SCChangeEntrySwitch message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCChangeEntrySwitch * @static * @param {Object.} object Plain object * @returns {gamehall.SCChangeEntrySwitch} SCChangeEntrySwitch */ SCChangeEntrySwitch.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCChangeEntrySwitch) return object; var message = new $root.gamehall.SCChangeEntrySwitch(); if (object.GameCfg) { if (!Array.isArray(object.GameCfg)) throw TypeError(".gamehall.SCChangeEntrySwitch.GameCfg: array expected"); message.GameCfg = []; for (var i = 0; i < object.GameCfg.length; ++i) message.GameCfg[i] = object.GameCfg[i] | 0; } return message; }; /** * Creates a plain object from a SCChangeEntrySwitch message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCChangeEntrySwitch * @static * @param {gamehall.SCChangeEntrySwitch} message SCChangeEntrySwitch * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCChangeEntrySwitch.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GameCfg = []; if (message.GameCfg && message.GameCfg.length) { object.GameCfg = []; for (var j = 0; j < message.GameCfg.length; ++j) object.GameCfg[j] = message.GameCfg[j]; } return object; }; /** * Converts this SCChangeEntrySwitch to JSON. * @function toJSON * @memberof gamehall.SCChangeEntrySwitch * @instance * @returns {Object.} JSON object */ SCChangeEntrySwitch.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCChangeEntrySwitch * @function getTypeUrl * @memberof gamehall.SCChangeEntrySwitch * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCChangeEntrySwitch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCChangeEntrySwitch"; }; return SCChangeEntrySwitch; })(); gamehall.CSEnterGame = (function() { /** * Properties of a CSEnterGame. * @memberof gamehall * @interface ICSEnterGame * @property {number|null} [Id] CSEnterGame Id * @property {Array.|null} [OpParams] CSEnterGame OpParams * @property {string|null} [Platform] CSEnterGame Platform * @property {number|null} [ApkVer] CSEnterGame ApkVer * @property {number|null} [ResVer] CSEnterGame ResVer */ /** * Constructs a new CSEnterGame. * @memberof gamehall * @classdesc Represents a CSEnterGame. * @implements ICSEnterGame * @constructor * @param {gamehall.ICSEnterGame=} [properties] Properties to set */ function CSEnterGame(properties) { this.OpParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSEnterGame Id. * @member {number} Id * @memberof gamehall.CSEnterGame * @instance */ CSEnterGame.prototype.Id = 0; /** * CSEnterGame OpParams. * @member {Array.} OpParams * @memberof gamehall.CSEnterGame * @instance */ CSEnterGame.prototype.OpParams = $util.emptyArray; /** * CSEnterGame Platform. * @member {string} Platform * @memberof gamehall.CSEnterGame * @instance */ CSEnterGame.prototype.Platform = ""; /** * CSEnterGame ApkVer. * @member {number} ApkVer * @memberof gamehall.CSEnterGame * @instance */ CSEnterGame.prototype.ApkVer = 0; /** * CSEnterGame ResVer. * @member {number} ResVer * @memberof gamehall.CSEnterGame * @instance */ CSEnterGame.prototype.ResVer = 0; /** * Creates a new CSEnterGame instance using the specified properties. * @function create * @memberof gamehall.CSEnterGame * @static * @param {gamehall.ICSEnterGame=} [properties] Properties to set * @returns {gamehall.CSEnterGame} CSEnterGame instance */ CSEnterGame.create = function create(properties) { return new CSEnterGame(properties); }; /** * Encodes the specified CSEnterGame message. Does not implicitly {@link gamehall.CSEnterGame.verify|verify} messages. * @function encode * @memberof gamehall.CSEnterGame * @static * @param {gamehall.ICSEnterGame} message CSEnterGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterGame.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).int32(message.Id); if (message.OpParams != null && message.OpParams.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); for (var i = 0; i < message.OpParams.length; ++i) writer.int32(message.OpParams[i]); writer.ldelim(); } if (message.Platform != null && Object.hasOwnProperty.call(message, "Platform")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Platform); if (message.ApkVer != null && Object.hasOwnProperty.call(message, "ApkVer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.ApkVer); if (message.ResVer != null && Object.hasOwnProperty.call(message, "ResVer")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ResVer); return writer; }; /** * Encodes the specified CSEnterGame message, length delimited. Does not implicitly {@link gamehall.CSEnterGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSEnterGame * @static * @param {gamehall.ICSEnterGame} message CSEnterGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSEnterGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSEnterGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSEnterGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSEnterGame} CSEnterGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSEnterGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { if (!(message.OpParams && message.OpParams.length)) message.OpParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OpParams.push(reader.int32()); } else message.OpParams.push(reader.int32()); break; } case 3: { message.Platform = reader.string(); break; } case 4: { message.ApkVer = reader.int32(); break; } case 5: { message.ResVer = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSEnterGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSEnterGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSEnterGame} CSEnterGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSEnterGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSEnterGame message. * @function verify * @memberof gamehall.CSEnterGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSEnterGame.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)) return "Id: integer expected"; if (message.OpParams != null && message.hasOwnProperty("OpParams")) { if (!Array.isArray(message.OpParams)) return "OpParams: array expected"; for (var i = 0; i < message.OpParams.length; ++i) if (!$util.isInteger(message.OpParams[i])) return "OpParams: integer[] expected"; } if (message.Platform != null && message.hasOwnProperty("Platform")) if (!$util.isString(message.Platform)) return "Platform: string expected"; if (message.ApkVer != null && message.hasOwnProperty("ApkVer")) if (!$util.isInteger(message.ApkVer)) return "ApkVer: integer expected"; if (message.ResVer != null && message.hasOwnProperty("ResVer")) if (!$util.isInteger(message.ResVer)) return "ResVer: integer expected"; return null; }; /** * Creates a CSEnterGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSEnterGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSEnterGame} CSEnterGame */ CSEnterGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSEnterGame) return object; var message = new $root.gamehall.CSEnterGame(); if (object.Id != null) message.Id = object.Id | 0; if (object.OpParams) { if (!Array.isArray(object.OpParams)) throw TypeError(".gamehall.CSEnterGame.OpParams: array expected"); message.OpParams = []; for (var i = 0; i < object.OpParams.length; ++i) message.OpParams[i] = object.OpParams[i] | 0; } if (object.Platform != null) message.Platform = String(object.Platform); if (object.ApkVer != null) message.ApkVer = object.ApkVer | 0; if (object.ResVer != null) message.ResVer = object.ResVer | 0; return message; }; /** * Creates a plain object from a CSEnterGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSEnterGame * @static * @param {gamehall.CSEnterGame} message CSEnterGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSEnterGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OpParams = []; if (options.defaults) { object.Id = 0; object.Platform = ""; object.ApkVer = 0; object.ResVer = 0; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpParams && message.OpParams.length) { object.OpParams = []; for (var j = 0; j < message.OpParams.length; ++j) object.OpParams[j] = message.OpParams[j]; } if (message.Platform != null && message.hasOwnProperty("Platform")) object.Platform = message.Platform; if (message.ApkVer != null && message.hasOwnProperty("ApkVer")) object.ApkVer = message.ApkVer; if (message.ResVer != null && message.hasOwnProperty("ResVer")) object.ResVer = message.ResVer; return object; }; /** * Converts this CSEnterGame to JSON. * @function toJSON * @memberof gamehall.CSEnterGame * @instance * @returns {Object.} JSON object */ CSEnterGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSEnterGame * @function getTypeUrl * @memberof gamehall.CSEnterGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSEnterGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSEnterGame"; }; return CSEnterGame; })(); gamehall.SCEnterGame = (function() { /** * Properties of a SCEnterGame. * @memberof gamehall * @interface ISCEnterGame * @property {gamehall.OpResultCode_Game|null} [OpCode] SCEnterGame OpCode * @property {number|null} [Id] SCEnterGame Id * @property {Array.|null} [OpParams] SCEnterGame OpParams * @property {number|null} [MinApkVer] SCEnterGame MinApkVer * @property {number|null} [LatestApkVer] SCEnterGame LatestApkVer * @property {number|null} [MinResVer] SCEnterGame MinResVer * @property {number|null} [LatestResVer] SCEnterGame LatestResVer */ /** * Constructs a new SCEnterGame. * @memberof gamehall * @classdesc Represents a SCEnterGame. * @implements ISCEnterGame * @constructor * @param {gamehall.ISCEnterGame=} [properties] Properties to set */ function SCEnterGame(properties) { this.OpParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCEnterGame OpCode. * @member {gamehall.OpResultCode_Game} OpCode * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.OpCode = 0; /** * SCEnterGame Id. * @member {number} Id * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.Id = 0; /** * SCEnterGame OpParams. * @member {Array.} OpParams * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.OpParams = $util.emptyArray; /** * SCEnterGame MinApkVer. * @member {number} MinApkVer * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.MinApkVer = 0; /** * SCEnterGame LatestApkVer. * @member {number} LatestApkVer * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.LatestApkVer = 0; /** * SCEnterGame MinResVer. * @member {number} MinResVer * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.MinResVer = 0; /** * SCEnterGame LatestResVer. * @member {number} LatestResVer * @memberof gamehall.SCEnterGame * @instance */ SCEnterGame.prototype.LatestResVer = 0; /** * Creates a new SCEnterGame instance using the specified properties. * @function create * @memberof gamehall.SCEnterGame * @static * @param {gamehall.ISCEnterGame=} [properties] Properties to set * @returns {gamehall.SCEnterGame} SCEnterGame instance */ SCEnterGame.create = function create(properties) { return new SCEnterGame(properties); }; /** * Encodes the specified SCEnterGame message. Does not implicitly {@link gamehall.SCEnterGame.verify|verify} messages. * @function encode * @memberof gamehall.SCEnterGame * @static * @param {gamehall.ISCEnterGame} message SCEnterGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpCode); if (message.Id != null && Object.hasOwnProperty.call(message, "Id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Id); if (message.OpParams != null && message.OpParams.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (var i = 0; i < message.OpParams.length; ++i) writer.int32(message.OpParams[i]); writer.ldelim(); } if (message.MinApkVer != null && Object.hasOwnProperty.call(message, "MinApkVer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.MinApkVer); if (message.LatestApkVer != null && Object.hasOwnProperty.call(message, "LatestApkVer")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.LatestApkVer); if (message.MinResVer != null && Object.hasOwnProperty.call(message, "MinResVer")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.MinResVer); if (message.LatestResVer != null && Object.hasOwnProperty.call(message, "LatestResVer")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.LatestResVer); return writer; }; /** * Encodes the specified SCEnterGame message, length delimited. Does not implicitly {@link gamehall.SCEnterGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCEnterGame * @static * @param {gamehall.ISCEnterGame} message SCEnterGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCEnterGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCEnterGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCEnterGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCEnterGame} SCEnterGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCEnterGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpCode = reader.int32(); break; } case 2: { message.Id = reader.int32(); break; } case 3: { if (!(message.OpParams && message.OpParams.length)) message.OpParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OpParams.push(reader.int32()); } else message.OpParams.push(reader.int32()); break; } case 4: { message.MinApkVer = reader.int32(); break; } case 5: { message.LatestApkVer = reader.int32(); break; } case 6: { message.MinResVer = reader.int32(); break; } case 7: { message.LatestResVer = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCEnterGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCEnterGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCEnterGame} SCEnterGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCEnterGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCEnterGame message. * @function verify * @memberof gamehall.SCEnterGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCEnterGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) switch (message.OpCode) { default: return "OpCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.Id != null && message.hasOwnProperty("Id")) if (!$util.isInteger(message.Id)) return "Id: integer expected"; if (message.OpParams != null && message.hasOwnProperty("OpParams")) { if (!Array.isArray(message.OpParams)) return "OpParams: array expected"; for (var i = 0; i < message.OpParams.length; ++i) if (!$util.isInteger(message.OpParams[i])) return "OpParams: integer[] expected"; } if (message.MinApkVer != null && message.hasOwnProperty("MinApkVer")) if (!$util.isInteger(message.MinApkVer)) return "MinApkVer: integer expected"; if (message.LatestApkVer != null && message.hasOwnProperty("LatestApkVer")) if (!$util.isInteger(message.LatestApkVer)) return "LatestApkVer: integer expected"; if (message.MinResVer != null && message.hasOwnProperty("MinResVer")) if (!$util.isInteger(message.MinResVer)) return "MinResVer: integer expected"; if (message.LatestResVer != null && message.hasOwnProperty("LatestResVer")) if (!$util.isInteger(message.LatestResVer)) return "LatestResVer: integer expected"; return null; }; /** * Creates a SCEnterGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCEnterGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCEnterGame} SCEnterGame */ SCEnterGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCEnterGame) return object; var message = new $root.gamehall.SCEnterGame(); switch (object.OpCode) { default: if (typeof object.OpCode === "number") { message.OpCode = object.OpCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpCode = 0; break; case "OPRC_Error_Game": case 1: message.OpCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpCode = 9010; break; } if (object.Id != null) message.Id = object.Id | 0; if (object.OpParams) { if (!Array.isArray(object.OpParams)) throw TypeError(".gamehall.SCEnterGame.OpParams: array expected"); message.OpParams = []; for (var i = 0; i < object.OpParams.length; ++i) message.OpParams[i] = object.OpParams[i] | 0; } if (object.MinApkVer != null) message.MinApkVer = object.MinApkVer | 0; if (object.LatestApkVer != null) message.LatestApkVer = object.LatestApkVer | 0; if (object.MinResVer != null) message.MinResVer = object.MinResVer | 0; if (object.LatestResVer != null) message.LatestResVer = object.LatestResVer | 0; return message; }; /** * Creates a plain object from a SCEnterGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCEnterGame * @static * @param {gamehall.SCEnterGame} message SCEnterGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCEnterGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OpParams = []; if (options.defaults) { object.OpCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.Id = 0; object.MinApkVer = 0; object.LatestApkVer = 0; object.MinResVer = 0; object.LatestResVer = 0; } if (message.OpCode != null && message.hasOwnProperty("OpCode")) object.OpCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpCode] === undefined ? message.OpCode : $root.gamehall.OpResultCode_Game[message.OpCode] : message.OpCode; if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpParams && message.OpParams.length) { object.OpParams = []; for (var j = 0; j < message.OpParams.length; ++j) object.OpParams[j] = message.OpParams[j]; } if (message.MinApkVer != null && message.hasOwnProperty("MinApkVer")) object.MinApkVer = message.MinApkVer; if (message.LatestApkVer != null && message.hasOwnProperty("LatestApkVer")) object.LatestApkVer = message.LatestApkVer; if (message.MinResVer != null && message.hasOwnProperty("MinResVer")) object.MinResVer = message.MinResVer; if (message.LatestResVer != null && message.hasOwnProperty("LatestResVer")) object.LatestResVer = message.LatestResVer; return object; }; /** * Converts this SCEnterGame to JSON. * @function toJSON * @memberof gamehall.SCEnterGame * @instance * @returns {Object.} JSON object */ SCEnterGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCEnterGame * @function getTypeUrl * @memberof gamehall.SCEnterGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCEnterGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCEnterGame"; }; return SCEnterGame; })(); gamehall.CSQuitGame = (function() { /** * Properties of a CSQuitGame. * @memberof gamehall * @interface ICSQuitGame * @property {number|null} [Id] CSQuitGame Id * @property {boolean|null} [IsAudience] CSQuitGame IsAudience */ /** * Constructs a new CSQuitGame. * @memberof gamehall * @classdesc Represents a CSQuitGame. * @implements ICSQuitGame * @constructor * @param {gamehall.ICSQuitGame=} [properties] Properties to set */ function CSQuitGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSQuitGame Id. * @member {number} Id * @memberof gamehall.CSQuitGame * @instance */ CSQuitGame.prototype.Id = 0; /** * CSQuitGame IsAudience. * @member {boolean} IsAudience * @memberof gamehall.CSQuitGame * @instance */ CSQuitGame.prototype.IsAudience = false; /** * Creates a new CSQuitGame instance using the specified properties. * @function create * @memberof gamehall.CSQuitGame * @static * @param {gamehall.ICSQuitGame=} [properties] Properties to set * @returns {gamehall.CSQuitGame} CSQuitGame instance */ CSQuitGame.create = function create(properties) { return new CSQuitGame(properties); }; /** * Encodes the specified CSQuitGame message. Does not implicitly {@link gamehall.CSQuitGame.verify|verify} messages. * @function encode * @memberof gamehall.CSQuitGame * @static * @param {gamehall.ICSQuitGame} message CSQuitGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQuitGame.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).int32(message.Id); if (message.IsAudience != null && Object.hasOwnProperty.call(message, "IsAudience")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.IsAudience); return writer; }; /** * Encodes the specified CSQuitGame message, length delimited. Does not implicitly {@link gamehall.CSQuitGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSQuitGame * @static * @param {gamehall.ICSQuitGame} message CSQuitGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQuitGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSQuitGame message from the specified reader or buffer. * @function decode * @memberof gamehall.CSQuitGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSQuitGame} CSQuitGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQuitGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSQuitGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.IsAudience = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSQuitGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSQuitGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSQuitGame} CSQuitGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQuitGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSQuitGame message. * @function verify * @memberof gamehall.CSQuitGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSQuitGame.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)) return "Id: integer expected"; if (message.IsAudience != null && message.hasOwnProperty("IsAudience")) if (typeof message.IsAudience !== "boolean") return "IsAudience: boolean expected"; return null; }; /** * Creates a CSQuitGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSQuitGame * @static * @param {Object.} object Plain object * @returns {gamehall.CSQuitGame} CSQuitGame */ CSQuitGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSQuitGame) return object; var message = new $root.gamehall.CSQuitGame(); if (object.Id != null) message.Id = object.Id | 0; if (object.IsAudience != null) message.IsAudience = Boolean(object.IsAudience); return message; }; /** * Creates a plain object from a CSQuitGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSQuitGame * @static * @param {gamehall.CSQuitGame} message CSQuitGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSQuitGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Id = 0; object.IsAudience = false; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.IsAudience != null && message.hasOwnProperty("IsAudience")) object.IsAudience = message.IsAudience; return object; }; /** * Converts this CSQuitGame to JSON. * @function toJSON * @memberof gamehall.CSQuitGame * @instance * @returns {Object.} JSON object */ CSQuitGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSQuitGame * @function getTypeUrl * @memberof gamehall.CSQuitGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSQuitGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSQuitGame"; }; return CSQuitGame; })(); gamehall.SCQuitGame = (function() { /** * Properties of a SCQuitGame. * @memberof gamehall * @interface ISCQuitGame * @property {gamehall.OpResultCode_Game|null} [OpCode] SCQuitGame OpCode * @property {number|null} [Id] SCQuitGame Id * @property {number|null} [Reason] SCQuitGame Reason */ /** * Constructs a new SCQuitGame. * @memberof gamehall * @classdesc Represents a SCQuitGame. * @implements ISCQuitGame * @constructor * @param {gamehall.ISCQuitGame=} [properties] Properties to set */ function SCQuitGame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCQuitGame OpCode. * @member {gamehall.OpResultCode_Game} OpCode * @memberof gamehall.SCQuitGame * @instance */ SCQuitGame.prototype.OpCode = 0; /** * SCQuitGame Id. * @member {number} Id * @memberof gamehall.SCQuitGame * @instance */ SCQuitGame.prototype.Id = 0; /** * SCQuitGame Reason. * @member {number} Reason * @memberof gamehall.SCQuitGame * @instance */ SCQuitGame.prototype.Reason = 0; /** * Creates a new SCQuitGame instance using the specified properties. * @function create * @memberof gamehall.SCQuitGame * @static * @param {gamehall.ISCQuitGame=} [properties] Properties to set * @returns {gamehall.SCQuitGame} SCQuitGame instance */ SCQuitGame.create = function create(properties) { return new SCQuitGame(properties); }; /** * Encodes the specified SCQuitGame message. Does not implicitly {@link gamehall.SCQuitGame.verify|verify} messages. * @function encode * @memberof gamehall.SCQuitGame * @static * @param {gamehall.ISCQuitGame} message SCQuitGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCQuitGame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpCode); if (message.Id != null && Object.hasOwnProperty.call(message, "Id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Id); if (message.Reason != null && Object.hasOwnProperty.call(message, "Reason")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Reason); return writer; }; /** * Encodes the specified SCQuitGame message, length delimited. Does not implicitly {@link gamehall.SCQuitGame.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCQuitGame * @static * @param {gamehall.ISCQuitGame} message SCQuitGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCQuitGame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCQuitGame message from the specified reader or buffer. * @function decode * @memberof gamehall.SCQuitGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCQuitGame} SCQuitGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCQuitGame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCQuitGame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpCode = reader.int32(); break; } case 2: { message.Id = reader.int32(); break; } case 3: { message.Reason = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCQuitGame message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCQuitGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCQuitGame} SCQuitGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCQuitGame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCQuitGame message. * @function verify * @memberof gamehall.SCQuitGame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCQuitGame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) switch (message.OpCode) { default: return "OpCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.Id != null && message.hasOwnProperty("Id")) if (!$util.isInteger(message.Id)) return "Id: integer expected"; if (message.Reason != null && message.hasOwnProperty("Reason")) if (!$util.isInteger(message.Reason)) return "Reason: integer expected"; return null; }; /** * Creates a SCQuitGame message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCQuitGame * @static * @param {Object.} object Plain object * @returns {gamehall.SCQuitGame} SCQuitGame */ SCQuitGame.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCQuitGame) return object; var message = new $root.gamehall.SCQuitGame(); switch (object.OpCode) { default: if (typeof object.OpCode === "number") { message.OpCode = object.OpCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpCode = 0; break; case "OPRC_Error_Game": case 1: message.OpCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpCode = 9010; break; } if (object.Id != null) message.Id = object.Id | 0; if (object.Reason != null) message.Reason = object.Reason | 0; return message; }; /** * Creates a plain object from a SCQuitGame message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCQuitGame * @static * @param {gamehall.SCQuitGame} message SCQuitGame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCQuitGame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpCode = options.enums === String ? "OPRC_Sucess_Game" : 0; object.Id = 0; object.Reason = 0; } if (message.OpCode != null && message.hasOwnProperty("OpCode")) object.OpCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpCode] === undefined ? message.OpCode : $root.gamehall.OpResultCode_Game[message.OpCode] : message.OpCode; if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.Reason != null && message.hasOwnProperty("Reason")) object.Reason = message.Reason; return object; }; /** * Converts this SCQuitGame to JSON. * @function toJSON * @memberof gamehall.SCQuitGame * @instance * @returns {Object.} JSON object */ SCQuitGame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCQuitGame * @function getTypeUrl * @memberof gamehall.SCQuitGame * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCQuitGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCQuitGame"; }; return SCQuitGame; })(); gamehall.CSUploadLoc = (function() { /** * Properties of a CSUploadLoc. * @memberof gamehall * @interface ICSUploadLoc * @property {number|null} [Longitude] CSUploadLoc Longitude * @property {number|null} [Latitude] CSUploadLoc Latitude * @property {string|null} [City] CSUploadLoc City */ /** * Constructs a new CSUploadLoc. * @memberof gamehall * @classdesc Represents a CSUploadLoc. * @implements ICSUploadLoc * @constructor * @param {gamehall.ICSUploadLoc=} [properties] Properties to set */ function CSUploadLoc(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSUploadLoc Longitude. * @member {number} Longitude * @memberof gamehall.CSUploadLoc * @instance */ CSUploadLoc.prototype.Longitude = 0; /** * CSUploadLoc Latitude. * @member {number} Latitude * @memberof gamehall.CSUploadLoc * @instance */ CSUploadLoc.prototype.Latitude = 0; /** * CSUploadLoc City. * @member {string} City * @memberof gamehall.CSUploadLoc * @instance */ CSUploadLoc.prototype.City = ""; /** * Creates a new CSUploadLoc instance using the specified properties. * @function create * @memberof gamehall.CSUploadLoc * @static * @param {gamehall.ICSUploadLoc=} [properties] Properties to set * @returns {gamehall.CSUploadLoc} CSUploadLoc instance */ CSUploadLoc.create = function create(properties) { return new CSUploadLoc(properties); }; /** * Encodes the specified CSUploadLoc message. Does not implicitly {@link gamehall.CSUploadLoc.verify|verify} messages. * @function encode * @memberof gamehall.CSUploadLoc * @static * @param {gamehall.ICSUploadLoc} message CSUploadLoc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUploadLoc.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Longitude != null && Object.hasOwnProperty.call(message, "Longitude")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Longitude); if (message.Latitude != null && Object.hasOwnProperty.call(message, "Latitude")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Latitude); if (message.City != null && Object.hasOwnProperty.call(message, "City")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.City); return writer; }; /** * Encodes the specified CSUploadLoc message, length delimited. Does not implicitly {@link gamehall.CSUploadLoc.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSUploadLoc * @static * @param {gamehall.ICSUploadLoc} message CSUploadLoc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUploadLoc.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSUploadLoc message from the specified reader or buffer. * @function decode * @memberof gamehall.CSUploadLoc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSUploadLoc} CSUploadLoc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUploadLoc.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSUploadLoc(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Longitude = reader.int32(); break; } case 2: { message.Latitude = reader.int32(); break; } case 3: { message.City = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSUploadLoc message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSUploadLoc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSUploadLoc} CSUploadLoc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUploadLoc.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSUploadLoc message. * @function verify * @memberof gamehall.CSUploadLoc * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSUploadLoc.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Longitude != null && message.hasOwnProperty("Longitude")) if (!$util.isInteger(message.Longitude)) return "Longitude: integer expected"; if (message.Latitude != null && message.hasOwnProperty("Latitude")) if (!$util.isInteger(message.Latitude)) return "Latitude: integer expected"; if (message.City != null && message.hasOwnProperty("City")) if (!$util.isString(message.City)) return "City: string expected"; return null; }; /** * Creates a CSUploadLoc message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSUploadLoc * @static * @param {Object.} object Plain object * @returns {gamehall.CSUploadLoc} CSUploadLoc */ CSUploadLoc.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSUploadLoc) return object; var message = new $root.gamehall.CSUploadLoc(); if (object.Longitude != null) message.Longitude = object.Longitude | 0; if (object.Latitude != null) message.Latitude = object.Latitude | 0; if (object.City != null) message.City = String(object.City); return message; }; /** * Creates a plain object from a CSUploadLoc message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSUploadLoc * @static * @param {gamehall.CSUploadLoc} message CSUploadLoc * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSUploadLoc.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Longitude = 0; object.Latitude = 0; object.City = ""; } if (message.Longitude != null && message.hasOwnProperty("Longitude")) object.Longitude = message.Longitude; if (message.Latitude != null && message.hasOwnProperty("Latitude")) object.Latitude = message.Latitude; if (message.City != null && message.hasOwnProperty("City")) object.City = message.City; return object; }; /** * Converts this CSUploadLoc to JSON. * @function toJSON * @memberof gamehall.CSUploadLoc * @instance * @returns {Object.} JSON object */ CSUploadLoc.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSUploadLoc * @function getTypeUrl * @memberof gamehall.CSUploadLoc * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSUploadLoc.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSUploadLoc"; }; return CSUploadLoc; })(); gamehall.SCUploadLoc = (function() { /** * Properties of a SCUploadLoc. * @memberof gamehall * @interface ISCUploadLoc * @property {number|null} [Pos] SCUploadLoc Pos * @property {number|null} [Longitude] SCUploadLoc Longitude * @property {number|null} [Latitude] SCUploadLoc Latitude * @property {string|null} [City] SCUploadLoc City */ /** * Constructs a new SCUploadLoc. * @memberof gamehall * @classdesc Represents a SCUploadLoc. * @implements ISCUploadLoc * @constructor * @param {gamehall.ISCUploadLoc=} [properties] Properties to set */ function SCUploadLoc(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCUploadLoc Pos. * @member {number} Pos * @memberof gamehall.SCUploadLoc * @instance */ SCUploadLoc.prototype.Pos = 0; /** * SCUploadLoc Longitude. * @member {number} Longitude * @memberof gamehall.SCUploadLoc * @instance */ SCUploadLoc.prototype.Longitude = 0; /** * SCUploadLoc Latitude. * @member {number} Latitude * @memberof gamehall.SCUploadLoc * @instance */ SCUploadLoc.prototype.Latitude = 0; /** * SCUploadLoc City. * @member {string} City * @memberof gamehall.SCUploadLoc * @instance */ SCUploadLoc.prototype.City = ""; /** * Creates a new SCUploadLoc instance using the specified properties. * @function create * @memberof gamehall.SCUploadLoc * @static * @param {gamehall.ISCUploadLoc=} [properties] Properties to set * @returns {gamehall.SCUploadLoc} SCUploadLoc instance */ SCUploadLoc.create = function create(properties) { return new SCUploadLoc(properties); }; /** * Encodes the specified SCUploadLoc message. Does not implicitly {@link gamehall.SCUploadLoc.verify|verify} messages. * @function encode * @memberof gamehall.SCUploadLoc * @static * @param {gamehall.ISCUploadLoc} message SCUploadLoc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCUploadLoc.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).int32(message.Pos); if (message.Longitude != null && Object.hasOwnProperty.call(message, "Longitude")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Longitude); if (message.Latitude != null && Object.hasOwnProperty.call(message, "Latitude")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Latitude); if (message.City != null && Object.hasOwnProperty.call(message, "City")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.City); return writer; }; /** * Encodes the specified SCUploadLoc message, length delimited. Does not implicitly {@link gamehall.SCUploadLoc.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCUploadLoc * @static * @param {gamehall.ISCUploadLoc} message SCUploadLoc message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCUploadLoc.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCUploadLoc message from the specified reader or buffer. * @function decode * @memberof gamehall.SCUploadLoc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCUploadLoc} SCUploadLoc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCUploadLoc.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCUploadLoc(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Pos = reader.int32(); break; } case 2: { message.Longitude = reader.int32(); break; } case 3: { message.Latitude = reader.int32(); break; } case 4: { message.City = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCUploadLoc message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCUploadLoc * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCUploadLoc} SCUploadLoc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCUploadLoc.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCUploadLoc message. * @function verify * @memberof gamehall.SCUploadLoc * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCUploadLoc.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)) return "Pos: integer expected"; if (message.Longitude != null && message.hasOwnProperty("Longitude")) if (!$util.isInteger(message.Longitude)) return "Longitude: integer expected"; if (message.Latitude != null && message.hasOwnProperty("Latitude")) if (!$util.isInteger(message.Latitude)) return "Latitude: integer expected"; if (message.City != null && message.hasOwnProperty("City")) if (!$util.isString(message.City)) return "City: string expected"; return null; }; /** * Creates a SCUploadLoc message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCUploadLoc * @static * @param {Object.} object Plain object * @returns {gamehall.SCUploadLoc} SCUploadLoc */ SCUploadLoc.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCUploadLoc) return object; var message = new $root.gamehall.SCUploadLoc(); if (object.Pos != null) message.Pos = object.Pos | 0; if (object.Longitude != null) message.Longitude = object.Longitude | 0; if (object.Latitude != null) message.Latitude = object.Latitude | 0; if (object.City != null) message.City = String(object.City); return message; }; /** * Creates a plain object from a SCUploadLoc message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCUploadLoc * @static * @param {gamehall.SCUploadLoc} message SCUploadLoc * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCUploadLoc.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Pos = 0; object.Longitude = 0; object.Latitude = 0; object.City = ""; } if (message.Pos != null && message.hasOwnProperty("Pos")) object.Pos = message.Pos; if (message.Longitude != null && message.hasOwnProperty("Longitude")) object.Longitude = message.Longitude; if (message.Latitude != null && message.hasOwnProperty("Latitude")) object.Latitude = message.Latitude; if (message.City != null && message.hasOwnProperty("City")) object.City = message.City; return object; }; /** * Converts this SCUploadLoc to JSON. * @function toJSON * @memberof gamehall.SCUploadLoc * @instance * @returns {Object.} JSON object */ SCUploadLoc.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCUploadLoc * @function getTypeUrl * @memberof gamehall.SCUploadLoc * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCUploadLoc.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCUploadLoc"; }; return SCUploadLoc; })(); gamehall.CSAudienceSit = (function() { /** * Properties of a CSAudienceSit. * @memberof gamehall * @interface ICSAudienceSit * @property {number|null} [RoomId] CSAudienceSit RoomId */ /** * Constructs a new CSAudienceSit. * @memberof gamehall * @classdesc Represents a CSAudienceSit. * @implements ICSAudienceSit * @constructor * @param {gamehall.ICSAudienceSit=} [properties] Properties to set */ function CSAudienceSit(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSAudienceSit RoomId. * @member {number} RoomId * @memberof gamehall.CSAudienceSit * @instance */ CSAudienceSit.prototype.RoomId = 0; /** * Creates a new CSAudienceSit instance using the specified properties. * @function create * @memberof gamehall.CSAudienceSit * @static * @param {gamehall.ICSAudienceSit=} [properties] Properties to set * @returns {gamehall.CSAudienceSit} CSAudienceSit instance */ CSAudienceSit.create = function create(properties) { return new CSAudienceSit(properties); }; /** * Encodes the specified CSAudienceSit message. Does not implicitly {@link gamehall.CSAudienceSit.verify|verify} messages. * @function encode * @memberof gamehall.CSAudienceSit * @static * @param {gamehall.ICSAudienceSit} message CSAudienceSit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSAudienceSit.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); return writer; }; /** * Encodes the specified CSAudienceSit message, length delimited. Does not implicitly {@link gamehall.CSAudienceSit.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSAudienceSit * @static * @param {gamehall.ICSAudienceSit} message CSAudienceSit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSAudienceSit.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSAudienceSit message from the specified reader or buffer. * @function decode * @memberof gamehall.CSAudienceSit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSAudienceSit} CSAudienceSit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSAudienceSit.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSAudienceSit(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSAudienceSit message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSAudienceSit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSAudienceSit} CSAudienceSit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSAudienceSit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSAudienceSit message. * @function verify * @memberof gamehall.CSAudienceSit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSAudienceSit.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; return null; }; /** * Creates a CSAudienceSit message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSAudienceSit * @static * @param {Object.} object Plain object * @returns {gamehall.CSAudienceSit} CSAudienceSit */ CSAudienceSit.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSAudienceSit) return object; var message = new $root.gamehall.CSAudienceSit(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; return message; }; /** * Creates a plain object from a CSAudienceSit message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSAudienceSit * @static * @param {gamehall.CSAudienceSit} message CSAudienceSit * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSAudienceSit.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.RoomId = 0; if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; return object; }; /** * Converts this CSAudienceSit to JSON. * @function toJSON * @memberof gamehall.CSAudienceSit * @instance * @returns {Object.} JSON object */ CSAudienceSit.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSAudienceSit * @function getTypeUrl * @memberof gamehall.CSAudienceSit * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSAudienceSit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSAudienceSit"; }; return CSAudienceSit; })(); gamehall.SCAudienceSit = (function() { /** * Properties of a SCAudienceSit. * @memberof gamehall * @interface ISCAudienceSit * @property {number|null} [RoomId] SCAudienceSit RoomId * @property {gamehall.OpResultCode_Game|null} [OpCode] SCAudienceSit OpCode */ /** * Constructs a new SCAudienceSit. * @memberof gamehall * @classdesc Represents a SCAudienceSit. * @implements ISCAudienceSit * @constructor * @param {gamehall.ISCAudienceSit=} [properties] Properties to set */ function SCAudienceSit(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCAudienceSit RoomId. * @member {number} RoomId * @memberof gamehall.SCAudienceSit * @instance */ SCAudienceSit.prototype.RoomId = 0; /** * SCAudienceSit OpCode. * @member {gamehall.OpResultCode_Game} OpCode * @memberof gamehall.SCAudienceSit * @instance */ SCAudienceSit.prototype.OpCode = 0; /** * Creates a new SCAudienceSit instance using the specified properties. * @function create * @memberof gamehall.SCAudienceSit * @static * @param {gamehall.ISCAudienceSit=} [properties] Properties to set * @returns {gamehall.SCAudienceSit} SCAudienceSit instance */ SCAudienceSit.create = function create(properties) { return new SCAudienceSit(properties); }; /** * Encodes the specified SCAudienceSit message. Does not implicitly {@link gamehall.SCAudienceSit.verify|verify} messages. * @function encode * @memberof gamehall.SCAudienceSit * @static * @param {gamehall.ISCAudienceSit} message SCAudienceSit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCAudienceSit.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RoomId != null && Object.hasOwnProperty.call(message, "RoomId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RoomId); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpCode); return writer; }; /** * Encodes the specified SCAudienceSit message, length delimited. Does not implicitly {@link gamehall.SCAudienceSit.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCAudienceSit * @static * @param {gamehall.ISCAudienceSit} message SCAudienceSit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCAudienceSit.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCAudienceSit message from the specified reader or buffer. * @function decode * @memberof gamehall.SCAudienceSit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCAudienceSit} SCAudienceSit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCAudienceSit.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCAudienceSit(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RoomId = reader.int32(); break; } case 2: { message.OpCode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCAudienceSit message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCAudienceSit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCAudienceSit} SCAudienceSit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCAudienceSit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCAudienceSit message. * @function verify * @memberof gamehall.SCAudienceSit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCAudienceSit.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RoomId != null && message.hasOwnProperty("RoomId")) if (!$util.isInteger(message.RoomId)) return "RoomId: integer expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) switch (message.OpCode) { default: return "OpCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } return null; }; /** * Creates a SCAudienceSit message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCAudienceSit * @static * @param {Object.} object Plain object * @returns {gamehall.SCAudienceSit} SCAudienceSit */ SCAudienceSit.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCAudienceSit) return object; var message = new $root.gamehall.SCAudienceSit(); if (object.RoomId != null) message.RoomId = object.RoomId | 0; switch (object.OpCode) { default: if (typeof object.OpCode === "number") { message.OpCode = object.OpCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpCode = 0; break; case "OPRC_Error_Game": case 1: message.OpCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpCode = 9010; break; } return message; }; /** * Creates a plain object from a SCAudienceSit message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCAudienceSit * @static * @param {gamehall.SCAudienceSit} message SCAudienceSit * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCAudienceSit.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.RoomId = 0; object.OpCode = options.enums === String ? "OPRC_Sucess_Game" : 0; } if (message.RoomId != null && message.hasOwnProperty("RoomId")) object.RoomId = message.RoomId; if (message.OpCode != null && message.hasOwnProperty("OpCode")) object.OpCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpCode] === undefined ? message.OpCode : $root.gamehall.OpResultCode_Game[message.OpCode] : message.OpCode; return object; }; /** * Converts this SCAudienceSit to JSON. * @function toJSON * @memberof gamehall.SCAudienceSit * @instance * @returns {Object.} JSON object */ SCAudienceSit.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCAudienceSit * @function getTypeUrl * @memberof gamehall.SCAudienceSit * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCAudienceSit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCAudienceSit"; }; return SCAudienceSit; })(); gamehall.CSRecordAndNotice = (function() { /** * Properties of a CSRecordAndNotice. * @memberof gamehall * @interface ICSRecordAndNotice * @property {number|null} [PageNo] CSRecordAndNotice PageNo * @property {number|null} [PageSize] CSRecordAndNotice PageSize * @property {number|null} [Opt] CSRecordAndNotice Opt * @property {number|Long|null} [StartTime] CSRecordAndNotice StartTime */ /** * Constructs a new CSRecordAndNotice. * @memberof gamehall * @classdesc Represents a CSRecordAndNotice. * @implements ICSRecordAndNotice * @constructor * @param {gamehall.ICSRecordAndNotice=} [properties] Properties to set */ function CSRecordAndNotice(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSRecordAndNotice PageNo. * @member {number} PageNo * @memberof gamehall.CSRecordAndNotice * @instance */ CSRecordAndNotice.prototype.PageNo = 0; /** * CSRecordAndNotice PageSize. * @member {number} PageSize * @memberof gamehall.CSRecordAndNotice * @instance */ CSRecordAndNotice.prototype.PageSize = 0; /** * CSRecordAndNotice Opt. * @member {number} Opt * @memberof gamehall.CSRecordAndNotice * @instance */ CSRecordAndNotice.prototype.Opt = 0; /** * CSRecordAndNotice StartTime. * @member {number|Long} StartTime * @memberof gamehall.CSRecordAndNotice * @instance */ CSRecordAndNotice.prototype.StartTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSRecordAndNotice instance using the specified properties. * @function create * @memberof gamehall.CSRecordAndNotice * @static * @param {gamehall.ICSRecordAndNotice=} [properties] Properties to set * @returns {gamehall.CSRecordAndNotice} CSRecordAndNotice instance */ CSRecordAndNotice.create = function create(properties) { return new CSRecordAndNotice(properties); }; /** * Encodes the specified CSRecordAndNotice message. Does not implicitly {@link gamehall.CSRecordAndNotice.verify|verify} messages. * @function encode * @memberof gamehall.CSRecordAndNotice * @static * @param {gamehall.ICSRecordAndNotice} message CSRecordAndNotice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSRecordAndNotice.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.PageNo); if (message.PageSize != null && Object.hasOwnProperty.call(message, "PageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.PageSize); if (message.Opt != null && Object.hasOwnProperty.call(message, "Opt")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Opt); if (message.StartTime != null && Object.hasOwnProperty.call(message, "StartTime")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.StartTime); return writer; }; /** * Encodes the specified CSRecordAndNotice message, length delimited. Does not implicitly {@link gamehall.CSRecordAndNotice.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSRecordAndNotice * @static * @param {gamehall.ICSRecordAndNotice} message CSRecordAndNotice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSRecordAndNotice.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSRecordAndNotice message from the specified reader or buffer. * @function decode * @memberof gamehall.CSRecordAndNotice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSRecordAndNotice} CSRecordAndNotice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSRecordAndNotice.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSRecordAndNotice(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.PageNo = reader.int32(); break; } case 2: { message.PageSize = reader.int32(); break; } case 3: { message.Opt = reader.int32(); break; } case 4: { message.StartTime = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSRecordAndNotice message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSRecordAndNotice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSRecordAndNotice} CSRecordAndNotice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSRecordAndNotice.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSRecordAndNotice message. * @function verify * @memberof gamehall.CSRecordAndNotice * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSRecordAndNotice.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; if (message.PageSize != null && message.hasOwnProperty("PageSize")) if (!$util.isInteger(message.PageSize)) return "PageSize: integer expected"; if (message.Opt != null && message.hasOwnProperty("Opt")) if (!$util.isInteger(message.Opt)) return "Opt: integer 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"; return null; }; /** * Creates a CSRecordAndNotice message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSRecordAndNotice * @static * @param {Object.} object Plain object * @returns {gamehall.CSRecordAndNotice} CSRecordAndNotice */ CSRecordAndNotice.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSRecordAndNotice) return object; var message = new $root.gamehall.CSRecordAndNotice(); if (object.PageNo != null) message.PageNo = object.PageNo | 0; if (object.PageSize != null) message.PageSize = object.PageSize | 0; if (object.Opt != null) message.Opt = object.Opt | 0; 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(); return message; }; /** * Creates a plain object from a CSRecordAndNotice message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSRecordAndNotice * @static * @param {gamehall.CSRecordAndNotice} message CSRecordAndNotice * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSRecordAndNotice.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.PageNo = 0; object.PageSize = 0; object.Opt = 0; if ($util.Long) { var 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; } if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; if (message.PageSize != null && message.hasOwnProperty("PageSize")) object.PageSize = message.PageSize; if (message.Opt != null && message.hasOwnProperty("Opt")) object.Opt = message.Opt; 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; return object; }; /** * Converts this CSRecordAndNotice to JSON. * @function toJSON * @memberof gamehall.CSRecordAndNotice * @instance * @returns {Object.} JSON object */ CSRecordAndNotice.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSRecordAndNotice * @function getTypeUrl * @memberof gamehall.CSRecordAndNotice * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSRecordAndNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSRecordAndNotice"; }; return CSRecordAndNotice; })(); gamehall.CommonNotice = (function() { /** * Properties of a CommonNotice. * @memberof gamehall * @interface ICommonNotice * @property {number|null} [Sort] CommonNotice Sort * @property {string|null} [Title] CommonNotice Title * @property {string|null} [Content] CommonNotice Content * @property {string|null} [TypeName] CommonNotice TypeName * @property {number|null} [Type] CommonNotice Type * @property {number|null} [StartTime] CommonNotice StartTime * @property {number|null} [EndTime] CommonNotice EndTime * @property {string|null} [Platform] CommonNotice Platform */ /** * Constructs a new CommonNotice. * @memberof gamehall * @classdesc Represents a CommonNotice. * @implements ICommonNotice * @constructor * @param {gamehall.ICommonNotice=} [properties] Properties to set */ function CommonNotice(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CommonNotice Sort. * @member {number} Sort * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.Sort = 0; /** * CommonNotice Title. * @member {string} Title * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.Title = ""; /** * CommonNotice Content. * @member {string} Content * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.Content = ""; /** * CommonNotice TypeName. * @member {string} TypeName * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.TypeName = ""; /** * CommonNotice Type. * @member {number} Type * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.Type = 0; /** * CommonNotice StartTime. * @member {number} StartTime * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.StartTime = 0; /** * CommonNotice EndTime. * @member {number} EndTime * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.EndTime = 0; /** * CommonNotice Platform. * @member {string} Platform * @memberof gamehall.CommonNotice * @instance */ CommonNotice.prototype.Platform = ""; /** * Creates a new CommonNotice instance using the specified properties. * @function create * @memberof gamehall.CommonNotice * @static * @param {gamehall.ICommonNotice=} [properties] Properties to set * @returns {gamehall.CommonNotice} CommonNotice instance */ CommonNotice.create = function create(properties) { return new CommonNotice(properties); }; /** * Encodes the specified CommonNotice message. Does not implicitly {@link gamehall.CommonNotice.verify|verify} messages. * @function encode * @memberof gamehall.CommonNotice * @static * @param {gamehall.ICommonNotice} message CommonNotice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CommonNotice.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Sort != null && Object.hasOwnProperty.call(message, "Sort")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Sort); if (message.Title != null && Object.hasOwnProperty.call(message, "Title")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.Title); if (message.Content != null && Object.hasOwnProperty.call(message, "Content")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Content); if (message.TypeName != null && Object.hasOwnProperty.call(message, "TypeName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.TypeName); if (message.Type != null && Object.hasOwnProperty.call(message, "Type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.Type); if (message.StartTime != null && Object.hasOwnProperty.call(message, "StartTime")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.StartTime); if (message.EndTime != null && Object.hasOwnProperty.call(message, "EndTime")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.EndTime); if (message.Platform != null && Object.hasOwnProperty.call(message, "Platform")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.Platform); return writer; }; /** * Encodes the specified CommonNotice message, length delimited. Does not implicitly {@link gamehall.CommonNotice.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CommonNotice * @static * @param {gamehall.ICommonNotice} message CommonNotice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CommonNotice.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CommonNotice message from the specified reader or buffer. * @function decode * @memberof gamehall.CommonNotice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CommonNotice} CommonNotice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CommonNotice.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CommonNotice(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Sort = reader.int32(); break; } case 2: { message.Title = reader.string(); break; } case 3: { message.Content = reader.string(); break; } case 4: { message.TypeName = reader.string(); break; } case 5: { message.Type = reader.int32(); break; } case 6: { message.StartTime = reader.int32(); break; } case 7: { message.EndTime = reader.int32(); break; } case 8: { message.Platform = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CommonNotice message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CommonNotice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CommonNotice} CommonNotice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CommonNotice.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CommonNotice message. * @function verify * @memberof gamehall.CommonNotice * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CommonNotice.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Sort != null && message.hasOwnProperty("Sort")) if (!$util.isInteger(message.Sort)) return "Sort: integer expected"; if (message.Title != null && message.hasOwnProperty("Title")) if (!$util.isString(message.Title)) return "Title: string expected"; if (message.Content != null && message.hasOwnProperty("Content")) if (!$util.isString(message.Content)) return "Content: string expected"; if (message.TypeName != null && message.hasOwnProperty("TypeName")) if (!$util.isString(message.TypeName)) return "TypeName: string expected"; if (message.Type != null && message.hasOwnProperty("Type")) if (!$util.isInteger(message.Type)) return "Type: integer expected"; if (message.StartTime != null && message.hasOwnProperty("StartTime")) if (!$util.isInteger(message.StartTime)) return "StartTime: integer expected"; if (message.EndTime != null && message.hasOwnProperty("EndTime")) if (!$util.isInteger(message.EndTime)) return "EndTime: integer expected"; if (message.Platform != null && message.hasOwnProperty("Platform")) if (!$util.isString(message.Platform)) return "Platform: string expected"; return null; }; /** * Creates a CommonNotice message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CommonNotice * @static * @param {Object.} object Plain object * @returns {gamehall.CommonNotice} CommonNotice */ CommonNotice.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CommonNotice) return object; var message = new $root.gamehall.CommonNotice(); if (object.Sort != null) message.Sort = object.Sort | 0; if (object.Title != null) message.Title = String(object.Title); if (object.Content != null) message.Content = String(object.Content); if (object.TypeName != null) message.TypeName = String(object.TypeName); if (object.Type != null) message.Type = object.Type | 0; if (object.StartTime != null) message.StartTime = object.StartTime | 0; if (object.EndTime != null) message.EndTime = object.EndTime | 0; if (object.Platform != null) message.Platform = String(object.Platform); return message; }; /** * Creates a plain object from a CommonNotice message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CommonNotice * @static * @param {gamehall.CommonNotice} message CommonNotice * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CommonNotice.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Sort = 0; object.Title = ""; object.Content = ""; object.TypeName = ""; object.Type = 0; object.StartTime = 0; object.EndTime = 0; object.Platform = ""; } if (message.Sort != null && message.hasOwnProperty("Sort")) object.Sort = message.Sort; if (message.Title != null && message.hasOwnProperty("Title")) object.Title = message.Title; if (message.Content != null && message.hasOwnProperty("Content")) object.Content = message.Content; if (message.TypeName != null && message.hasOwnProperty("TypeName")) object.TypeName = message.TypeName; if (message.Type != null && message.hasOwnProperty("Type")) object.Type = message.Type; if (message.StartTime != null && message.hasOwnProperty("StartTime")) object.StartTime = message.StartTime; if (message.EndTime != null && message.hasOwnProperty("EndTime")) object.EndTime = message.EndTime; if (message.Platform != null && message.hasOwnProperty("Platform")) object.Platform = message.Platform; return object; }; /** * Converts this CommonNotice to JSON. * @function toJSON * @memberof gamehall.CommonNotice * @instance * @returns {Object.} JSON object */ CommonNotice.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CommonNotice * @function getTypeUrl * @memberof gamehall.CommonNotice * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CommonNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CommonNotice"; }; return CommonNotice; })(); gamehall.PlayerRecord = (function() { /** * Properties of a PlayerRecord. * @memberof gamehall * @interface IPlayerRecord * @property {number|null} [GameFreeid] PlayerRecord GameFreeid * @property {string|null} [GameDetailedLogId] PlayerRecord GameDetailedLogId * @property {number|Long|null} [TotalIn] PlayerRecord TotalIn * @property {number|Long|null} [TotalOut] PlayerRecord TotalOut * @property {number|null} [Ts] PlayerRecord Ts * @property {number|null} [MatchType] PlayerRecord MatchType */ /** * Constructs a new PlayerRecord. * @memberof gamehall * @classdesc Represents a PlayerRecord. * @implements IPlayerRecord * @constructor * @param {gamehall.IPlayerRecord=} [properties] Properties to set */ function PlayerRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * PlayerRecord GameFreeid. * @member {number} GameFreeid * @memberof gamehall.PlayerRecord * @instance */ PlayerRecord.prototype.GameFreeid = 0; /** * PlayerRecord GameDetailedLogId. * @member {string} GameDetailedLogId * @memberof gamehall.PlayerRecord * @instance */ PlayerRecord.prototype.GameDetailedLogId = ""; /** * PlayerRecord TotalIn. * @member {number|Long} TotalIn * @memberof gamehall.PlayerRecord * @instance */ PlayerRecord.prototype.TotalIn = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerRecord TotalOut. * @member {number|Long} TotalOut * @memberof gamehall.PlayerRecord * @instance */ PlayerRecord.prototype.TotalOut = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerRecord Ts. * @member {number} Ts * @memberof gamehall.PlayerRecord * @instance */ PlayerRecord.prototype.Ts = 0; /** * PlayerRecord MatchType. * @member {number} MatchType * @memberof gamehall.PlayerRecord * @instance */ PlayerRecord.prototype.MatchType = 0; /** * Creates a new PlayerRecord instance using the specified properties. * @function create * @memberof gamehall.PlayerRecord * @static * @param {gamehall.IPlayerRecord=} [properties] Properties to set * @returns {gamehall.PlayerRecord} PlayerRecord instance */ PlayerRecord.create = function create(properties) { return new PlayerRecord(properties); }; /** * Encodes the specified PlayerRecord message. Does not implicitly {@link gamehall.PlayerRecord.verify|verify} messages. * @function encode * @memberof gamehall.PlayerRecord * @static * @param {gamehall.IPlayerRecord} message PlayerRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PlayerRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeid != null && Object.hasOwnProperty.call(message, "GameFreeid")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeid); if (message.GameDetailedLogId != null && Object.hasOwnProperty.call(message, "GameDetailedLogId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.GameDetailedLogId); if (message.TotalIn != null && Object.hasOwnProperty.call(message, "TotalIn")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.TotalIn); if (message.TotalOut != null && Object.hasOwnProperty.call(message, "TotalOut")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.TotalOut); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.Ts); if (message.MatchType != null && Object.hasOwnProperty.call(message, "MatchType")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.MatchType); return writer; }; /** * Encodes the specified PlayerRecord message, length delimited. Does not implicitly {@link gamehall.PlayerRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.PlayerRecord * @static * @param {gamehall.IPlayerRecord} message PlayerRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PlayerRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PlayerRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.PlayerRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.PlayerRecord} PlayerRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PlayerRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.PlayerRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeid = reader.int32(); break; } case 2: { message.GameDetailedLogId = reader.string(); break; } case 3: { message.TotalIn = reader.int64(); break; } case 4: { message.TotalOut = reader.int64(); break; } case 5: { message.Ts = reader.int32(); break; } case 6: { message.MatchType = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PlayerRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.PlayerRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.PlayerRecord} PlayerRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PlayerRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PlayerRecord message. * @function verify * @memberof gamehall.PlayerRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PlayerRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeid != null && message.hasOwnProperty("GameFreeid")) if (!$util.isInteger(message.GameFreeid)) return "GameFreeid: integer expected"; if (message.GameDetailedLogId != null && message.hasOwnProperty("GameDetailedLogId")) if (!$util.isString(message.GameDetailedLogId)) return "GameDetailedLogId: string expected"; if (message.TotalIn != null && message.hasOwnProperty("TotalIn")) if (!$util.isInteger(message.TotalIn) && !(message.TotalIn && $util.isInteger(message.TotalIn.low) && $util.isInteger(message.TotalIn.high))) return "TotalIn: integer|Long expected"; if (message.TotalOut != null && message.hasOwnProperty("TotalOut")) if (!$util.isInteger(message.TotalOut) && !(message.TotalOut && $util.isInteger(message.TotalOut.low) && $util.isInteger(message.TotalOut.high))) return "TotalOut: integer|Long expected"; if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts)) return "Ts: integer expected"; if (message.MatchType != null && message.hasOwnProperty("MatchType")) if (!$util.isInteger(message.MatchType)) return "MatchType: integer expected"; return null; }; /** * Creates a PlayerRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.PlayerRecord * @static * @param {Object.} object Plain object * @returns {gamehall.PlayerRecord} PlayerRecord */ PlayerRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.PlayerRecord) return object; var message = new $root.gamehall.PlayerRecord(); if (object.GameFreeid != null) message.GameFreeid = object.GameFreeid | 0; if (object.GameDetailedLogId != null) message.GameDetailedLogId = String(object.GameDetailedLogId); if (object.TotalIn != null) if ($util.Long) (message.TotalIn = $util.Long.fromValue(object.TotalIn)).unsigned = false; else if (typeof object.TotalIn === "string") message.TotalIn = parseInt(object.TotalIn, 10); else if (typeof object.TotalIn === "number") message.TotalIn = object.TotalIn; else if (typeof object.TotalIn === "object") message.TotalIn = new $util.LongBits(object.TotalIn.low >>> 0, object.TotalIn.high >>> 0).toNumber(); if (object.TotalOut != null) if ($util.Long) (message.TotalOut = $util.Long.fromValue(object.TotalOut)).unsigned = false; else if (typeof object.TotalOut === "string") message.TotalOut = parseInt(object.TotalOut, 10); else if (typeof object.TotalOut === "number") message.TotalOut = object.TotalOut; else if (typeof object.TotalOut === "object") message.TotalOut = new $util.LongBits(object.TotalOut.low >>> 0, object.TotalOut.high >>> 0).toNumber(); if (object.Ts != null) message.Ts = object.Ts | 0; if (object.MatchType != null) message.MatchType = object.MatchType | 0; return message; }; /** * Creates a plain object from a PlayerRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.PlayerRecord * @static * @param {gamehall.PlayerRecord} message PlayerRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PlayerRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeid = 0; object.GameDetailedLogId = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalIn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalIn = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalOut = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalOut = options.longs === String ? "0" : 0; object.Ts = 0; object.MatchType = 0; } if (message.GameFreeid != null && message.hasOwnProperty("GameFreeid")) object.GameFreeid = message.GameFreeid; if (message.GameDetailedLogId != null && message.hasOwnProperty("GameDetailedLogId")) object.GameDetailedLogId = message.GameDetailedLogId; if (message.TotalIn != null && message.hasOwnProperty("TotalIn")) if (typeof message.TotalIn === "number") object.TotalIn = options.longs === String ? String(message.TotalIn) : message.TotalIn; else object.TotalIn = options.longs === String ? $util.Long.prototype.toString.call(message.TotalIn) : options.longs === Number ? new $util.LongBits(message.TotalIn.low >>> 0, message.TotalIn.high >>> 0).toNumber() : message.TotalIn; if (message.TotalOut != null && message.hasOwnProperty("TotalOut")) if (typeof message.TotalOut === "number") object.TotalOut = options.longs === String ? String(message.TotalOut) : message.TotalOut; else object.TotalOut = options.longs === String ? $util.Long.prototype.toString.call(message.TotalOut) : options.longs === Number ? new $util.LongBits(message.TotalOut.low >>> 0, message.TotalOut.high >>> 0).toNumber() : message.TotalOut; if (message.Ts != null && message.hasOwnProperty("Ts")) object.Ts = message.Ts; if (message.MatchType != null && message.hasOwnProperty("MatchType")) object.MatchType = message.MatchType; return object; }; /** * Converts this PlayerRecord to JSON. * @function toJSON * @memberof gamehall.PlayerRecord * @instance * @returns {Object.} JSON object */ PlayerRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PlayerRecord * @function getTypeUrl * @memberof gamehall.PlayerRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PlayerRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.PlayerRecord"; }; return PlayerRecord; })(); gamehall.SCRecordAndNotice = (function() { /** * Properties of a SCRecordAndNotice. * @memberof gamehall * @interface ISCRecordAndNotice * @property {gamehall.OpResultCode_Game|null} [OpCode] SCRecordAndNotice OpCode * @property {Array.|null} [List] SCRecordAndNotice List * @property {Array.|null} [Glist] SCRecordAndNotice Glist * @property {Array.|null} [GlistTs] SCRecordAndNotice GlistTs */ /** * Constructs a new SCRecordAndNotice. * @memberof gamehall * @classdesc Represents a SCRecordAndNotice. * @implements ISCRecordAndNotice * @constructor * @param {gamehall.ISCRecordAndNotice=} [properties] Properties to set */ function SCRecordAndNotice(properties) { this.List = []; this.Glist = []; this.GlistTs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRecordAndNotice OpCode. * @member {gamehall.OpResultCode_Game} OpCode * @memberof gamehall.SCRecordAndNotice * @instance */ SCRecordAndNotice.prototype.OpCode = 0; /** * SCRecordAndNotice List. * @member {Array.} List * @memberof gamehall.SCRecordAndNotice * @instance */ SCRecordAndNotice.prototype.List = $util.emptyArray; /** * SCRecordAndNotice Glist. * @member {Array.} Glist * @memberof gamehall.SCRecordAndNotice * @instance */ SCRecordAndNotice.prototype.Glist = $util.emptyArray; /** * SCRecordAndNotice GlistTs. * @member {Array.} GlistTs * @memberof gamehall.SCRecordAndNotice * @instance */ SCRecordAndNotice.prototype.GlistTs = $util.emptyArray; /** * Creates a new SCRecordAndNotice instance using the specified properties. * @function create * @memberof gamehall.SCRecordAndNotice * @static * @param {gamehall.ISCRecordAndNotice=} [properties] Properties to set * @returns {gamehall.SCRecordAndNotice} SCRecordAndNotice instance */ SCRecordAndNotice.create = function create(properties) { return new SCRecordAndNotice(properties); }; /** * Encodes the specified SCRecordAndNotice message. Does not implicitly {@link gamehall.SCRecordAndNotice.verify|verify} messages. * @function encode * @memberof gamehall.SCRecordAndNotice * @static * @param {gamehall.ISCRecordAndNotice} message SCRecordAndNotice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRecordAndNotice.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpCode); if (message.List != null && message.List.length) for (var i = 0; i < message.List.length; ++i) $root.gamehall.CommonNotice.encode(message.List[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.Glist != null && message.Glist.length) for (var i = 0; i < message.Glist.length; ++i) $root.gamehall.PlayerRecord.encode(message.Glist[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.GlistTs != null && message.GlistTs.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (var i = 0; i < message.GlistTs.length; ++i) writer.int64(message.GlistTs[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCRecordAndNotice message, length delimited. Does not implicitly {@link gamehall.SCRecordAndNotice.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRecordAndNotice * @static * @param {gamehall.ISCRecordAndNotice} message SCRecordAndNotice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRecordAndNotice.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRecordAndNotice message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRecordAndNotice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRecordAndNotice} SCRecordAndNotice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRecordAndNotice.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRecordAndNotice(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpCode = reader.int32(); break; } case 2: { if (!(message.List && message.List.length)) message.List = []; message.List.push($root.gamehall.CommonNotice.decode(reader, reader.uint32())); break; } case 3: { if (!(message.Glist && message.Glist.length)) message.Glist = []; message.Glist.push($root.gamehall.PlayerRecord.decode(reader, reader.uint32())); break; } case 4: { if (!(message.GlistTs && message.GlistTs.length)) message.GlistTs = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.GlistTs.push(reader.int64()); } else message.GlistTs.push(reader.int64()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRecordAndNotice message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRecordAndNotice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRecordAndNotice} SCRecordAndNotice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRecordAndNotice.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRecordAndNotice message. * @function verify * @memberof gamehall.SCRecordAndNotice * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRecordAndNotice.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) switch (message.OpCode) { default: return "OpCode: enum value expected"; case 0: case 1: case 1016: case 1017: case 1018: case 1019: case 1020: case 1022: case 1024: case 1040: case 1042: case 1043: case 1044: case 1045: case 1048: case 1050: case 1053: case 1054: case 1055: case 1056: case 1058: case 1059: case 1082: case 1097: case 1098: case 1075: case 1076: case 1077: case 1078: case 1096: case 1103: case 1113: case 5023: case 9000: case 9001: case 9002: case 9003: case 9010: break; } if (message.List != null && message.hasOwnProperty("List")) { if (!Array.isArray(message.List)) return "List: array expected"; for (var i = 0; i < message.List.length; ++i) { var error = $root.gamehall.CommonNotice.verify(message.List[i]); if (error) return "List." + error; } } if (message.Glist != null && message.hasOwnProperty("Glist")) { if (!Array.isArray(message.Glist)) return "Glist: array expected"; for (var i = 0; i < message.Glist.length; ++i) { var error = $root.gamehall.PlayerRecord.verify(message.Glist[i]); if (error) return "Glist." + error; } } if (message.GlistTs != null && message.hasOwnProperty("GlistTs")) { if (!Array.isArray(message.GlistTs)) return "GlistTs: array expected"; for (var i = 0; i < message.GlistTs.length; ++i) if (!$util.isInteger(message.GlistTs[i]) && !(message.GlistTs[i] && $util.isInteger(message.GlistTs[i].low) && $util.isInteger(message.GlistTs[i].high))) return "GlistTs: integer|Long[] expected"; } return null; }; /** * Creates a SCRecordAndNotice message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRecordAndNotice * @static * @param {Object.} object Plain object * @returns {gamehall.SCRecordAndNotice} SCRecordAndNotice */ SCRecordAndNotice.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRecordAndNotice) return object; var message = new $root.gamehall.SCRecordAndNotice(); switch (object.OpCode) { default: if (typeof object.OpCode === "number") { message.OpCode = object.OpCode; break; } break; case "OPRC_Sucess_Game": case 0: message.OpCode = 0; break; case "OPRC_Error_Game": case 1: message.OpCode = 1; break; case "OPRC_RoomNotExist_Game": case 1016: message.OpCode = 1016; break; case "OPRC_GameNotExist_Game": case 1017: message.OpCode = 1017; break; case "OPRC_GameHadClosed": case 1018: message.OpCode = 1018; break; case "OPRC_RoomIsFull_Game": case 1019: message.OpCode = 1019; break; case "OPRC_RoomHadExist_Game": case 1020: message.OpCode = 1020; break; case "OPRC_GameStarting_Game": case 1022: message.OpCode = 1022; break; case "OPRC_CannotWatchReasonInOther_Game": case 1024: message.OpCode = 1024; break; case "OPRC_MoneyNotEnough_Game": case 1040: message.OpCode = 1040; break; case "OPRC_CannotWatchReasonRoomNotStart_Game": case 1042: message.OpCode = 1042; break; case "OPRC_OnlyAllowClubMemberEnter_Game": case 1043: message.OpCode = 1043; break; case "OPRC_YourResVerIsLow_Game": case 1044: message.OpCode = 1044; break; case "OPRC_YourAppVerIsLow_Game": case 1045: message.OpCode = 1045; break; case "OPRC_ScenePosFull_Game": case 1048: message.OpCode = 1048; break; case "OPRC_SceneEnterForWatcher_Game": case 1050: message.OpCode = 1050; break; case "OPRC_RoomHadClosed_Game": case 1053: message.OpCode = 1053; break; case "OPRC_SceneServerMaintain_Game": case 1054: message.OpCode = 1054; break; case "OPRC_SameIpForbid_Game": case 1055: message.OpCode = 1055; break; case "OPRC_CoinNotEnough_Game": case 1056: message.OpCode = 1056; break; case "OPRC_CoinTooMore_Game": case 1058: message.OpCode = 1058; break; case "OPRC_InOtherGameIng_Game": case 1059: message.OpCode = 1059; break; case "OPRC_OpYield_Game": case 1082: message.OpCode = 1082; break; case "OPRC_AllocRoomIdFailed_Game": case 1097: message.OpCode = 1097; break; case "OPRC_PrivateRoomCountLimit_Game": case 1098: message.OpCode = 1098; break; case "OPRC_LowerRice_ScenceMax_Game": case 1075: message.OpCode = 1075; break; case "OPRC_LowerRice_PlayerMax_Game": case 1076: message.OpCode = 1076; break; case "OPRC_LowerRice_PlayerDownMax_Game": case 1077: message.OpCode = 1077; break; case "OPRC_YourAreGamingCannotLeave_Game": case 1078: message.OpCode = 1078; break; case "OPRC_ThirdPltProcessing_Game": case 1096: message.OpCode = 1096; break; case "OPRC_RoomGameTimes_Game": case 1103: message.OpCode = 1103; break; case "OPRC_MustBindPromoter_Game": case 1113: message.OpCode = 1113; break; case "Oprc_Club_ClubIsClose_Game": case 5023: message.OpCode = 5023; break; case "OPRC_Dg_RegistErr_Game": case 9000: message.OpCode = 9000; break; case "OPRC_Dg_LoginErr_Game": case 9001: message.OpCode = 9001; break; case "OPRC_Dg_PlatErr_Game": case 9002: message.OpCode = 9002; break; case "OPRC_Dg_QuotaNotEnough_Game": case 9003: message.OpCode = 9003; break; case "OPRC_Thr_GameClose_Game": case 9010: message.OpCode = 9010; break; } if (object.List) { if (!Array.isArray(object.List)) throw TypeError(".gamehall.SCRecordAndNotice.List: array expected"); message.List = []; for (var i = 0; i < object.List.length; ++i) { if (typeof object.List[i] !== "object") throw TypeError(".gamehall.SCRecordAndNotice.List: object expected"); message.List[i] = $root.gamehall.CommonNotice.fromObject(object.List[i]); } } if (object.Glist) { if (!Array.isArray(object.Glist)) throw TypeError(".gamehall.SCRecordAndNotice.Glist: array expected"); message.Glist = []; for (var i = 0; i < object.Glist.length; ++i) { if (typeof object.Glist[i] !== "object") throw TypeError(".gamehall.SCRecordAndNotice.Glist: object expected"); message.Glist[i] = $root.gamehall.PlayerRecord.fromObject(object.Glist[i]); } } if (object.GlistTs) { if (!Array.isArray(object.GlistTs)) throw TypeError(".gamehall.SCRecordAndNotice.GlistTs: array expected"); message.GlistTs = []; for (var i = 0; i < object.GlistTs.length; ++i) if ($util.Long) (message.GlistTs[i] = $util.Long.fromValue(object.GlistTs[i])).unsigned = false; else if (typeof object.GlistTs[i] === "string") message.GlistTs[i] = parseInt(object.GlistTs[i], 10); else if (typeof object.GlistTs[i] === "number") message.GlistTs[i] = object.GlistTs[i]; else if (typeof object.GlistTs[i] === "object") message.GlistTs[i] = new $util.LongBits(object.GlistTs[i].low >>> 0, object.GlistTs[i].high >>> 0).toNumber(); } return message; }; /** * Creates a plain object from a SCRecordAndNotice message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRecordAndNotice * @static * @param {gamehall.SCRecordAndNotice} message SCRecordAndNotice * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRecordAndNotice.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.List = []; object.Glist = []; object.GlistTs = []; } if (options.defaults) object.OpCode = options.enums === String ? "OPRC_Sucess_Game" : 0; if (message.OpCode != null && message.hasOwnProperty("OpCode")) object.OpCode = options.enums === String ? $root.gamehall.OpResultCode_Game[message.OpCode] === undefined ? message.OpCode : $root.gamehall.OpResultCode_Game[message.OpCode] : message.OpCode; if (message.List && message.List.length) { object.List = []; for (var j = 0; j < message.List.length; ++j) object.List[j] = $root.gamehall.CommonNotice.toObject(message.List[j], options); } if (message.Glist && message.Glist.length) { object.Glist = []; for (var j = 0; j < message.Glist.length; ++j) object.Glist[j] = $root.gamehall.PlayerRecord.toObject(message.Glist[j], options); } if (message.GlistTs && message.GlistTs.length) { object.GlistTs = []; for (var j = 0; j < message.GlistTs.length; ++j) if (typeof message.GlistTs[j] === "number") object.GlistTs[j] = options.longs === String ? String(message.GlistTs[j]) : message.GlistTs[j]; else object.GlistTs[j] = options.longs === String ? $util.Long.prototype.toString.call(message.GlistTs[j]) : options.longs === Number ? new $util.LongBits(message.GlistTs[j].low >>> 0, message.GlistTs[j].high >>> 0).toNumber() : message.GlistTs[j]; } return object; }; /** * Converts this SCRecordAndNotice to JSON. * @function toJSON * @memberof gamehall.SCRecordAndNotice * @instance * @returns {Object.} JSON object */ SCRecordAndNotice.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRecordAndNotice * @function getTypeUrl * @memberof gamehall.SCRecordAndNotice * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRecordAndNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRecordAndNotice"; }; return SCRecordAndNotice; })(); /** * OpResultCode_Hall enum. * @name gamehall.OpResultCode_Hall * @enum {number} * @property {number} OPRC_Sucess_Hall=0 OPRC_Sucess_Hall value * @property {number} OPRC_Error_Hall=1 OPRC_Error_Hall value * @property {number} OPRC_OnlineReward_Info_FindPlatform_Fail_Hall=10008 OPRC_OnlineReward_Info_FindPlatform_Fail_Hall value */ gamehall.OpResultCode_Hall = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OPRC_Sucess_Hall"] = 0; values[valuesById[1] = "OPRC_Error_Hall"] = 1; values[valuesById[10008] = "OPRC_OnlineReward_Info_FindPlatform_Fail_Hall"] = 10008; return values; })(); /** * 大厅协议 2340-2379 * @name gamehall.HallPacketID * @enum {number} * @property {number} PACKET_Hall_ZERO=0 PACKET_Hall_ZERO value * @property {number} PACKET_CS_REBATE_LIST=2340 PACKET_CS_REBATE_LIST value * @property {number} PACKET_SC_REBATE_LIST=2341 PACKET_SC_REBATE_LIST value * @property {number} PACKET_CS_REBATE_RECEIVE=2342 PACKET_CS_REBATE_RECEIVE value * @property {number} PACKET_SC_REBATE_RECEIVE=2343 PACKET_SC_REBATE_RECEIVE value * @property {number} PACKET_SC_HALL_REDCTRL=2344 PACKET_SC_HALL_REDCTRL value * @property {number} PACKET_CS_NEWPLAYERINFO=2345 新个人中心 * @property {number} PACKET_SC_NEWPLAYERINFO=2346 PACKET_SC_NEWPLAYERINFO value * @property {number} PACKET_CS_CODETYPERECORD=2347 PACKET_CS_CODETYPERECORD value * @property {number} PACKET_SC_CODETYPERECORD=2348 PACKET_SC_CODETYPERECORD value * @property {number} PACKET_CS_BETCOINRECORD=2349 PACKET_CS_BETCOINRECORD value * @property {number} PACKET_SC_BETCOINRECORD=2350 PACKET_SC_BETCOINRECORD value * @property {number} PACKET_CS_COINDETAILED=2351 PACKET_CS_COINDETAILED value * @property {number} PACKET_SC_COINDETAILEDTOTAL=2352 PACKET_SC_COINDETAILEDTOTAL value * @property {number} PACKET_SC_COINTOTAL=2353 PACKET_SC_COINTOTAL value * @property {number} PACKET_CS_REPORTFORM=2354 PACKET_CS_REPORTFORM value * @property {number} PACKET_SC_REPORTFORM=2355 PACKET_SC_REPORTFORM value * @property {number} PACKET_CS_HISTORYRECORD=2356 PACKET_CS_HISTORYRECORD value * @property {number} PACKET_SC_HISTORYRECORD=2357 PACKET_SC_HISTORYRECORD value * @property {number} PACKET_CS_RECEIVECODECOIN=2358 PACKET_CS_RECEIVECODECOIN value * @property {number} PACKET_SC_RECEIVECODECOIN=2359 PACKET_SC_RECEIVECODECOIN value * @property {number} PACKET_SC_REBATETOTALINFO=2360 PACKET_SC_REBATETOTALINFO value * @property {number} PACKET_CS_GETISCANREBATE=2362 PACKET_CS_GETISCANREBATE value * @property {number} PACKET_SC_GETISCANREBATE=2363 PACKET_SC_GETISCANREBATE value * @property {number} PACKET_CS_GETRANKINFO=2364 PACKET_CS_GETRANKINFO value * @property {number} PACKET_SC_GETRANKINFO=2365 PACKET_SC_GETRANKINFO value * @property {number} PACKET_SC_SHOWRED=2366 PACKET_SC_SHOWRED value */ gamehall.HallPacketID = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "PACKET_Hall_ZERO"] = 0; values[valuesById[2340] = "PACKET_CS_REBATE_LIST"] = 2340; values[valuesById[2341] = "PACKET_SC_REBATE_LIST"] = 2341; values[valuesById[2342] = "PACKET_CS_REBATE_RECEIVE"] = 2342; values[valuesById[2343] = "PACKET_SC_REBATE_RECEIVE"] = 2343; values[valuesById[2344] = "PACKET_SC_HALL_REDCTRL"] = 2344; values[valuesById[2345] = "PACKET_CS_NEWPLAYERINFO"] = 2345; values[valuesById[2346] = "PACKET_SC_NEWPLAYERINFO"] = 2346; values[valuesById[2347] = "PACKET_CS_CODETYPERECORD"] = 2347; values[valuesById[2348] = "PACKET_SC_CODETYPERECORD"] = 2348; values[valuesById[2349] = "PACKET_CS_BETCOINRECORD"] = 2349; values[valuesById[2350] = "PACKET_SC_BETCOINRECORD"] = 2350; values[valuesById[2351] = "PACKET_CS_COINDETAILED"] = 2351; values[valuesById[2352] = "PACKET_SC_COINDETAILEDTOTAL"] = 2352; values[valuesById[2353] = "PACKET_SC_COINTOTAL"] = 2353; values[valuesById[2354] = "PACKET_CS_REPORTFORM"] = 2354; values[valuesById[2355] = "PACKET_SC_REPORTFORM"] = 2355; values[valuesById[2356] = "PACKET_CS_HISTORYRECORD"] = 2356; values[valuesById[2357] = "PACKET_SC_HISTORYRECORD"] = 2357; values[valuesById[2358] = "PACKET_CS_RECEIVECODECOIN"] = 2358; values[valuesById[2359] = "PACKET_SC_RECEIVECODECOIN"] = 2359; values[valuesById[2360] = "PACKET_SC_REBATETOTALINFO"] = 2360; values[valuesById[2362] = "PACKET_CS_GETISCANREBATE"] = 2362; values[valuesById[2363] = "PACKET_SC_GETISCANREBATE"] = 2363; values[valuesById[2364] = "PACKET_CS_GETRANKINFO"] = 2364; values[valuesById[2365] = "PACKET_SC_GETRANKINFO"] = 2365; values[valuesById[2366] = "PACKET_SC_SHOWRED"] = 2366; return values; })(); gamehall.RebateInfo = (function() { /** * Properties of a RebateInfo. * @memberof gamehall * @interface IRebateInfo * @property {string|null} [Platform] RebateInfo Platform * @property {number|Long|null} [validBetTotal] RebateInfo validBetTotal */ /** * Constructs a new RebateInfo. * @memberof gamehall * @classdesc rebatetask * @implements IRebateInfo * @constructor * @param {gamehall.IRebateInfo=} [properties] Properties to set */ function RebateInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * RebateInfo Platform. * @member {string} Platform * @memberof gamehall.RebateInfo * @instance */ RebateInfo.prototype.Platform = ""; /** * RebateInfo validBetTotal. * @member {number|Long} validBetTotal * @memberof gamehall.RebateInfo * @instance */ RebateInfo.prototype.validBetTotal = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new RebateInfo instance using the specified properties. * @function create * @memberof gamehall.RebateInfo * @static * @param {gamehall.IRebateInfo=} [properties] Properties to set * @returns {gamehall.RebateInfo} RebateInfo instance */ RebateInfo.create = function create(properties) { return new RebateInfo(properties); }; /** * Encodes the specified RebateInfo message. Does not implicitly {@link gamehall.RebateInfo.verify|verify} messages. * @function encode * @memberof gamehall.RebateInfo * @static * @param {gamehall.IRebateInfo} message RebateInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RebateInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Platform != null && Object.hasOwnProperty.call(message, "Platform")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.Platform); if (message.validBetTotal != null && Object.hasOwnProperty.call(message, "validBetTotal")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.validBetTotal); return writer; }; /** * Encodes the specified RebateInfo message, length delimited. Does not implicitly {@link gamehall.RebateInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.RebateInfo * @static * @param {gamehall.IRebateInfo} message RebateInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RebateInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a RebateInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.RebateInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.RebateInfo} RebateInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RebateInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.RebateInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Platform = reader.string(); break; } case 2: { message.validBetTotal = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a RebateInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.RebateInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.RebateInfo} RebateInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RebateInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a RebateInfo message. * @function verify * @memberof gamehall.RebateInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RebateInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Platform != null && message.hasOwnProperty("Platform")) if (!$util.isString(message.Platform)) return "Platform: string expected"; if (message.validBetTotal != null && message.hasOwnProperty("validBetTotal")) if (!$util.isInteger(message.validBetTotal) && !(message.validBetTotal && $util.isInteger(message.validBetTotal.low) && $util.isInteger(message.validBetTotal.high))) return "validBetTotal: integer|Long expected"; return null; }; /** * Creates a RebateInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.RebateInfo * @static * @param {Object.} object Plain object * @returns {gamehall.RebateInfo} RebateInfo */ RebateInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.RebateInfo) return object; var message = new $root.gamehall.RebateInfo(); if (object.Platform != null) message.Platform = String(object.Platform); if (object.validBetTotal != null) if ($util.Long) (message.validBetTotal = $util.Long.fromValue(object.validBetTotal)).unsigned = false; else if (typeof object.validBetTotal === "string") message.validBetTotal = parseInt(object.validBetTotal, 10); else if (typeof object.validBetTotal === "number") message.validBetTotal = object.validBetTotal; else if (typeof object.validBetTotal === "object") message.validBetTotal = new $util.LongBits(object.validBetTotal.low >>> 0, object.validBetTotal.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a RebateInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.RebateInfo * @static * @param {gamehall.RebateInfo} message RebateInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ RebateInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Platform = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.validBetTotal = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.validBetTotal = options.longs === String ? "0" : 0; } if (message.Platform != null && message.hasOwnProperty("Platform")) object.Platform = message.Platform; if (message.validBetTotal != null && message.hasOwnProperty("validBetTotal")) if (typeof message.validBetTotal === "number") object.validBetTotal = options.longs === String ? String(message.validBetTotal) : message.validBetTotal; else object.validBetTotal = options.longs === String ? $util.Long.prototype.toString.call(message.validBetTotal) : options.longs === Number ? new $util.LongBits(message.validBetTotal.low >>> 0, message.validBetTotal.high >>> 0).toNumber() : message.validBetTotal; return object; }; /** * Converts this RebateInfo to JSON. * @function toJSON * @memberof gamehall.RebateInfo * @instance * @returns {Object.} JSON object */ RebateInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for RebateInfo * @function getTypeUrl * @memberof gamehall.RebateInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ RebateInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.RebateInfo"; }; return RebateInfo; })(); gamehall.CSRebateList = (function() { /** * Properties of a CSRebateList. * @memberof gamehall * @interface ICSRebateList */ /** * Constructs a new CSRebateList. * @memberof gamehall * @classdesc Represents a CSRebateList. * @implements ICSRebateList * @constructor * @param {gamehall.ICSRebateList=} [properties] Properties to set */ function CSRebateList(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSRebateList instance using the specified properties. * @function create * @memberof gamehall.CSRebateList * @static * @param {gamehall.ICSRebateList=} [properties] Properties to set * @returns {gamehall.CSRebateList} CSRebateList instance */ CSRebateList.create = function create(properties) { return new CSRebateList(properties); }; /** * Encodes the specified CSRebateList message. Does not implicitly {@link gamehall.CSRebateList.verify|verify} messages. * @function encode * @memberof gamehall.CSRebateList * @static * @param {gamehall.ICSRebateList} message CSRebateList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSRebateList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSRebateList message, length delimited. Does not implicitly {@link gamehall.CSRebateList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSRebateList * @static * @param {gamehall.ICSRebateList} message CSRebateList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSRebateList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSRebateList message from the specified reader or buffer. * @function decode * @memberof gamehall.CSRebateList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSRebateList} CSRebateList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSRebateList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSRebateList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSRebateList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSRebateList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSRebateList} CSRebateList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSRebateList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSRebateList message. * @function verify * @memberof gamehall.CSRebateList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSRebateList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSRebateList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSRebateList * @static * @param {Object.} object Plain object * @returns {gamehall.CSRebateList} CSRebateList */ CSRebateList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSRebateList) return object; return new $root.gamehall.CSRebateList(); }; /** * Creates a plain object from a CSRebateList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSRebateList * @static * @param {gamehall.CSRebateList} message CSRebateList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSRebateList.toObject = function toObject() { return {}; }; /** * Converts this CSRebateList to JSON. * @function toJSON * @memberof gamehall.CSRebateList * @instance * @returns {Object.} JSON object */ CSRebateList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSRebateList * @function getTypeUrl * @memberof gamehall.CSRebateList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSRebateList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSRebateList"; }; return CSRebateList; })(); gamehall.SCRebateList = (function() { /** * Properties of a SCRebateList. * @memberof gamehall * @interface ISCRebateList * @property {Array.|null} [RebateList] SCRebateList RebateList * @property {number|Long|null} [RebateTotalCoin] SCRebateList RebateTotalCoin */ /** * Constructs a new SCRebateList. * @memberof gamehall * @classdesc Represents a SCRebateList. * @implements ISCRebateList * @constructor * @param {gamehall.ISCRebateList=} [properties] Properties to set */ function SCRebateList(properties) { this.RebateList = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRebateList RebateList. * @member {Array.} RebateList * @memberof gamehall.SCRebateList * @instance */ SCRebateList.prototype.RebateList = $util.emptyArray; /** * SCRebateList RebateTotalCoin. * @member {number|Long} RebateTotalCoin * @memberof gamehall.SCRebateList * @instance */ SCRebateList.prototype.RebateTotalCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCRebateList instance using the specified properties. * @function create * @memberof gamehall.SCRebateList * @static * @param {gamehall.ISCRebateList=} [properties] Properties to set * @returns {gamehall.SCRebateList} SCRebateList instance */ SCRebateList.create = function create(properties) { return new SCRebateList(properties); }; /** * Encodes the specified SCRebateList message. Does not implicitly {@link gamehall.SCRebateList.verify|verify} messages. * @function encode * @memberof gamehall.SCRebateList * @static * @param {gamehall.ISCRebateList} message SCRebateList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRebateList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RebateList != null && message.RebateList.length) for (var i = 0; i < message.RebateList.length; ++i) $root.gamehall.RebateInfo.encode(message.RebateList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.RebateTotalCoin != null && Object.hasOwnProperty.call(message, "RebateTotalCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.RebateTotalCoin); return writer; }; /** * Encodes the specified SCRebateList message, length delimited. Does not implicitly {@link gamehall.SCRebateList.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRebateList * @static * @param {gamehall.ISCRebateList} message SCRebateList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRebateList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRebateList message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRebateList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRebateList} SCRebateList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRebateList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRebateList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.RebateList && message.RebateList.length)) message.RebateList = []; message.RebateList.push($root.gamehall.RebateInfo.decode(reader, reader.uint32())); break; } case 2: { message.RebateTotalCoin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRebateList message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRebateList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRebateList} SCRebateList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRebateList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRebateList message. * @function verify * @memberof gamehall.SCRebateList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRebateList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RebateList != null && message.hasOwnProperty("RebateList")) { if (!Array.isArray(message.RebateList)) return "RebateList: array expected"; for (var i = 0; i < message.RebateList.length; ++i) { var error = $root.gamehall.RebateInfo.verify(message.RebateList[i]); if (error) return "RebateList." + error; } } if (message.RebateTotalCoin != null && message.hasOwnProperty("RebateTotalCoin")) if (!$util.isInteger(message.RebateTotalCoin) && !(message.RebateTotalCoin && $util.isInteger(message.RebateTotalCoin.low) && $util.isInteger(message.RebateTotalCoin.high))) return "RebateTotalCoin: integer|Long expected"; return null; }; /** * Creates a SCRebateList message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRebateList * @static * @param {Object.} object Plain object * @returns {gamehall.SCRebateList} SCRebateList */ SCRebateList.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRebateList) return object; var message = new $root.gamehall.SCRebateList(); if (object.RebateList) { if (!Array.isArray(object.RebateList)) throw TypeError(".gamehall.SCRebateList.RebateList: array expected"); message.RebateList = []; for (var i = 0; i < object.RebateList.length; ++i) { if (typeof object.RebateList[i] !== "object") throw TypeError(".gamehall.SCRebateList.RebateList: object expected"); message.RebateList[i] = $root.gamehall.RebateInfo.fromObject(object.RebateList[i]); } } if (object.RebateTotalCoin != null) if ($util.Long) (message.RebateTotalCoin = $util.Long.fromValue(object.RebateTotalCoin)).unsigned = false; else if (typeof object.RebateTotalCoin === "string") message.RebateTotalCoin = parseInt(object.RebateTotalCoin, 10); else if (typeof object.RebateTotalCoin === "number") message.RebateTotalCoin = object.RebateTotalCoin; else if (typeof object.RebateTotalCoin === "object") message.RebateTotalCoin = new $util.LongBits(object.RebateTotalCoin.low >>> 0, object.RebateTotalCoin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCRebateList message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRebateList * @static * @param {gamehall.SCRebateList} message SCRebateList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRebateList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.RebateList = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); object.RebateTotalCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.RebateTotalCoin = options.longs === String ? "0" : 0; if (message.RebateList && message.RebateList.length) { object.RebateList = []; for (var j = 0; j < message.RebateList.length; ++j) object.RebateList[j] = $root.gamehall.RebateInfo.toObject(message.RebateList[j], options); } if (message.RebateTotalCoin != null && message.hasOwnProperty("RebateTotalCoin")) if (typeof message.RebateTotalCoin === "number") object.RebateTotalCoin = options.longs === String ? String(message.RebateTotalCoin) : message.RebateTotalCoin; else object.RebateTotalCoin = options.longs === String ? $util.Long.prototype.toString.call(message.RebateTotalCoin) : options.longs === Number ? new $util.LongBits(message.RebateTotalCoin.low >>> 0, message.RebateTotalCoin.high >>> 0).toNumber() : message.RebateTotalCoin; return object; }; /** * Converts this SCRebateList to JSON. * @function toJSON * @memberof gamehall.SCRebateList * @instance * @returns {Object.} JSON object */ SCRebateList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRebateList * @function getTypeUrl * @memberof gamehall.SCRebateList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRebateList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRebateList"; }; return SCRebateList; })(); gamehall.CSReceiveRebate = (function() { /** * Properties of a CSReceiveRebate. * @memberof gamehall * @interface ICSReceiveRebate */ /** * Constructs a new CSReceiveRebate. * @memberof gamehall * @classdesc Represents a CSReceiveRebate. * @implements ICSReceiveRebate * @constructor * @param {gamehall.ICSReceiveRebate=} [properties] Properties to set */ function CSReceiveRebate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSReceiveRebate instance using the specified properties. * @function create * @memberof gamehall.CSReceiveRebate * @static * @param {gamehall.ICSReceiveRebate=} [properties] Properties to set * @returns {gamehall.CSReceiveRebate} CSReceiveRebate instance */ CSReceiveRebate.create = function create(properties) { return new CSReceiveRebate(properties); }; /** * Encodes the specified CSReceiveRebate message. Does not implicitly {@link gamehall.CSReceiveRebate.verify|verify} messages. * @function encode * @memberof gamehall.CSReceiveRebate * @static * @param {gamehall.ICSReceiveRebate} message CSReceiveRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReceiveRebate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSReceiveRebate message, length delimited. Does not implicitly {@link gamehall.CSReceiveRebate.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSReceiveRebate * @static * @param {gamehall.ICSReceiveRebate} message CSReceiveRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReceiveRebate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSReceiveRebate message from the specified reader or buffer. * @function decode * @memberof gamehall.CSReceiveRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSReceiveRebate} CSReceiveRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReceiveRebate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSReceiveRebate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSReceiveRebate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSReceiveRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSReceiveRebate} CSReceiveRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReceiveRebate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSReceiveRebate message. * @function verify * @memberof gamehall.CSReceiveRebate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSReceiveRebate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSReceiveRebate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSReceiveRebate * @static * @param {Object.} object Plain object * @returns {gamehall.CSReceiveRebate} CSReceiveRebate */ CSReceiveRebate.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSReceiveRebate) return object; return new $root.gamehall.CSReceiveRebate(); }; /** * Creates a plain object from a CSReceiveRebate message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSReceiveRebate * @static * @param {gamehall.CSReceiveRebate} message CSReceiveRebate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSReceiveRebate.toObject = function toObject() { return {}; }; /** * Converts this CSReceiveRebate to JSON. * @function toJSON * @memberof gamehall.CSReceiveRebate * @instance * @returns {Object.} JSON object */ CSReceiveRebate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSReceiveRebate * @function getTypeUrl * @memberof gamehall.CSReceiveRebate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSReceiveRebate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSReceiveRebate"; }; return CSReceiveRebate; })(); gamehall.SCReceiveRebate = (function() { /** * Properties of a SCReceiveRebate. * @memberof gamehall * @interface ISCReceiveRebate * @property {gamehall.OpResultCode_Hall|null} [OpRetCode] SCReceiveRebate OpRetCode * @property {number|Long|null} [Coin] SCReceiveRebate Coin */ /** * Constructs a new SCReceiveRebate. * @memberof gamehall * @classdesc Represents a SCReceiveRebate. * @implements ISCReceiveRebate * @constructor * @param {gamehall.ISCReceiveRebate=} [properties] Properties to set */ function SCReceiveRebate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCReceiveRebate OpRetCode. * @member {gamehall.OpResultCode_Hall} OpRetCode * @memberof gamehall.SCReceiveRebate * @instance */ SCReceiveRebate.prototype.OpRetCode = 0; /** * SCReceiveRebate Coin. * @member {number|Long} Coin * @memberof gamehall.SCReceiveRebate * @instance */ SCReceiveRebate.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCReceiveRebate instance using the specified properties. * @function create * @memberof gamehall.SCReceiveRebate * @static * @param {gamehall.ISCReceiveRebate=} [properties] Properties to set * @returns {gamehall.SCReceiveRebate} SCReceiveRebate instance */ SCReceiveRebate.create = function create(properties) { return new SCReceiveRebate(properties); }; /** * Encodes the specified SCReceiveRebate message. Does not implicitly {@link gamehall.SCReceiveRebate.verify|verify} messages. * @function encode * @memberof gamehall.SCReceiveRebate * @static * @param {gamehall.ISCReceiveRebate} message SCReceiveRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReceiveRebate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.Coin); return writer; }; /** * Encodes the specified SCReceiveRebate message, length delimited. Does not implicitly {@link gamehall.SCReceiveRebate.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCReceiveRebate * @static * @param {gamehall.ISCReceiveRebate} message SCReceiveRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReceiveRebate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCReceiveRebate message from the specified reader or buffer. * @function decode * @memberof gamehall.SCReceiveRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCReceiveRebate} SCReceiveRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReceiveRebate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCReceiveRebate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.Coin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCReceiveRebate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCReceiveRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCReceiveRebate} SCReceiveRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReceiveRebate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCReceiveRebate message. * @function verify * @memberof gamehall.SCReceiveRebate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCReceiveRebate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 10008: break; } if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; return null; }; /** * Creates a SCReceiveRebate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCReceiveRebate * @static * @param {Object.} object Plain object * @returns {gamehall.SCReceiveRebate} SCReceiveRebate */ SCReceiveRebate.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCReceiveRebate) return object; var message = new $root.gamehall.SCReceiveRebate(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Hall": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Hall": case 1: message.OpRetCode = 1; break; case "OPRC_OnlineReward_Info_FindPlatform_Fail_Hall": case 10008: message.OpRetCode = 10008; break; } if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCReceiveRebate message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCReceiveRebate * @static * @param {gamehall.SCReceiveRebate} message SCReceiveRebate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCReceiveRebate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Hall" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Hall[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Hall[message.OpRetCode] : message.OpRetCode; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; return object; }; /** * Converts this SCReceiveRebate to JSON. * @function toJSON * @memberof gamehall.SCReceiveRebate * @instance * @returns {Object.} JSON object */ SCReceiveRebate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCReceiveRebate * @function getTypeUrl * @memberof gamehall.SCReceiveRebate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCReceiveRebate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCReceiveRebate"; }; return SCReceiveRebate; })(); gamehall.SCRedCtrl = (function() { /** * Properties of a SCRedCtrl. * @memberof gamehall * @interface ISCRedCtrl * @property {number|Long|null} [OpCode] SCRedCtrl OpCode * @property {boolean|null} [IsFShow] SCRedCtrl IsFShow */ /** * Constructs a new SCRedCtrl. * @memberof gamehall * @classdesc Represents a SCRedCtrl. * @implements ISCRedCtrl * @constructor * @param {gamehall.ISCRedCtrl=} [properties] Properties to set */ function SCRedCtrl(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRedCtrl OpCode. * @member {number|Long} OpCode * @memberof gamehall.SCRedCtrl * @instance */ SCRedCtrl.prototype.OpCode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCRedCtrl IsFShow. * @member {boolean} IsFShow * @memberof gamehall.SCRedCtrl * @instance */ SCRedCtrl.prototype.IsFShow = false; /** * Creates a new SCRedCtrl instance using the specified properties. * @function create * @memberof gamehall.SCRedCtrl * @static * @param {gamehall.ISCRedCtrl=} [properties] Properties to set * @returns {gamehall.SCRedCtrl} SCRedCtrl instance */ SCRedCtrl.create = function create(properties) { return new SCRedCtrl(properties); }; /** * Encodes the specified SCRedCtrl message. Does not implicitly {@link gamehall.SCRedCtrl.verify|verify} messages. * @function encode * @memberof gamehall.SCRedCtrl * @static * @param {gamehall.ISCRedCtrl} message SCRedCtrl message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRedCtrl.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.OpCode); if (message.IsFShow != null && Object.hasOwnProperty.call(message, "IsFShow")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.IsFShow); return writer; }; /** * Encodes the specified SCRedCtrl message, length delimited. Does not implicitly {@link gamehall.SCRedCtrl.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRedCtrl * @static * @param {gamehall.ISCRedCtrl} message SCRedCtrl message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRedCtrl.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRedCtrl message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRedCtrl * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRedCtrl} SCRedCtrl * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRedCtrl.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRedCtrl(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpCode = reader.int64(); break; } case 2: { message.IsFShow = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRedCtrl message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRedCtrl * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRedCtrl} SCRedCtrl * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRedCtrl.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRedCtrl message. * @function verify * @memberof gamehall.SCRedCtrl * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRedCtrl.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) if (!$util.isInteger(message.OpCode) && !(message.OpCode && $util.isInteger(message.OpCode.low) && $util.isInteger(message.OpCode.high))) return "OpCode: integer|Long expected"; if (message.IsFShow != null && message.hasOwnProperty("IsFShow")) if (typeof message.IsFShow !== "boolean") return "IsFShow: boolean expected"; return null; }; /** * Creates a SCRedCtrl message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRedCtrl * @static * @param {Object.} object Plain object * @returns {gamehall.SCRedCtrl} SCRedCtrl */ SCRedCtrl.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRedCtrl) return object; var message = new $root.gamehall.SCRedCtrl(); if (object.OpCode != null) if ($util.Long) (message.OpCode = $util.Long.fromValue(object.OpCode)).unsigned = false; else if (typeof object.OpCode === "string") message.OpCode = parseInt(object.OpCode, 10); else if (typeof object.OpCode === "number") message.OpCode = object.OpCode; else if (typeof object.OpCode === "object") message.OpCode = new $util.LongBits(object.OpCode.low >>> 0, object.OpCode.high >>> 0).toNumber(); if (object.IsFShow != null) message.IsFShow = Boolean(object.IsFShow); return message; }; /** * Creates a plain object from a SCRedCtrl message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRedCtrl * @static * @param {gamehall.SCRedCtrl} message SCRedCtrl * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRedCtrl.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.OpCode = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.OpCode = options.longs === String ? "0" : 0; object.IsFShow = false; } if (message.OpCode != null && message.hasOwnProperty("OpCode")) if (typeof message.OpCode === "number") object.OpCode = options.longs === String ? String(message.OpCode) : message.OpCode; else object.OpCode = options.longs === String ? $util.Long.prototype.toString.call(message.OpCode) : options.longs === Number ? new $util.LongBits(message.OpCode.low >>> 0, message.OpCode.high >>> 0).toNumber() : message.OpCode; if (message.IsFShow != null && message.hasOwnProperty("IsFShow")) object.IsFShow = message.IsFShow; return object; }; /** * Converts this SCRedCtrl to JSON. * @function toJSON * @memberof gamehall.SCRedCtrl * @instance * @returns {Object.} JSON object */ SCRedCtrl.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRedCtrl * @function getTypeUrl * @memberof gamehall.SCRedCtrl * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRedCtrl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRedCtrl"; }; return SCRedCtrl; })(); gamehall.CSGetIsCanRebate = (function() { /** * Properties of a CSGetIsCanRebate. * @memberof gamehall * @interface ICSGetIsCanRebate */ /** * Constructs a new CSGetIsCanRebate. * @memberof gamehall * @classdesc Represents a CSGetIsCanRebate. * @implements ICSGetIsCanRebate * @constructor * @param {gamehall.ICSGetIsCanRebate=} [properties] Properties to set */ function CSGetIsCanRebate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSGetIsCanRebate instance using the specified properties. * @function create * @memberof gamehall.CSGetIsCanRebate * @static * @param {gamehall.ICSGetIsCanRebate=} [properties] Properties to set * @returns {gamehall.CSGetIsCanRebate} CSGetIsCanRebate instance */ CSGetIsCanRebate.create = function create(properties) { return new CSGetIsCanRebate(properties); }; /** * Encodes the specified CSGetIsCanRebate message. Does not implicitly {@link gamehall.CSGetIsCanRebate.verify|verify} messages. * @function encode * @memberof gamehall.CSGetIsCanRebate * @static * @param {gamehall.ICSGetIsCanRebate} message CSGetIsCanRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetIsCanRebate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSGetIsCanRebate message, length delimited. Does not implicitly {@link gamehall.CSGetIsCanRebate.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGetIsCanRebate * @static * @param {gamehall.ICSGetIsCanRebate} message CSGetIsCanRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetIsCanRebate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetIsCanRebate message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGetIsCanRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGetIsCanRebate} CSGetIsCanRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetIsCanRebate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGetIsCanRebate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetIsCanRebate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGetIsCanRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGetIsCanRebate} CSGetIsCanRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetIsCanRebate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetIsCanRebate message. * @function verify * @memberof gamehall.CSGetIsCanRebate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetIsCanRebate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSGetIsCanRebate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGetIsCanRebate * @static * @param {Object.} object Plain object * @returns {gamehall.CSGetIsCanRebate} CSGetIsCanRebate */ CSGetIsCanRebate.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGetIsCanRebate) return object; return new $root.gamehall.CSGetIsCanRebate(); }; /** * Creates a plain object from a CSGetIsCanRebate message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGetIsCanRebate * @static * @param {gamehall.CSGetIsCanRebate} message CSGetIsCanRebate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetIsCanRebate.toObject = function toObject() { return {}; }; /** * Converts this CSGetIsCanRebate to JSON. * @function toJSON * @memberof gamehall.CSGetIsCanRebate * @instance * @returns {Object.} JSON object */ CSGetIsCanRebate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetIsCanRebate * @function getTypeUrl * @memberof gamehall.CSGetIsCanRebate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetIsCanRebate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGetIsCanRebate"; }; return CSGetIsCanRebate; })(); gamehall.SCGetIsCanRebate = (function() { /** * Properties of a SCGetIsCanRebate. * @memberof gamehall * @interface ISCGetIsCanRebate * @property {gamehall.OpResultCode_Hall|null} [OpRetCode] SCGetIsCanRebate OpRetCode * @property {number|Long|null} [IsCan] SCGetIsCanRebate IsCan * @property {string|null} [Url] SCGetIsCanRebate Url * @property {string|null} [WX] SCGetIsCanRebate WX */ /** * Constructs a new SCGetIsCanRebate. * @memberof gamehall * @classdesc Represents a SCGetIsCanRebate. * @implements ISCGetIsCanRebate * @constructor * @param {gamehall.ISCGetIsCanRebate=} [properties] Properties to set */ function SCGetIsCanRebate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGetIsCanRebate OpRetCode. * @member {gamehall.OpResultCode_Hall} OpRetCode * @memberof gamehall.SCGetIsCanRebate * @instance */ SCGetIsCanRebate.prototype.OpRetCode = 0; /** * SCGetIsCanRebate IsCan. * @member {number|Long} IsCan * @memberof gamehall.SCGetIsCanRebate * @instance */ SCGetIsCanRebate.prototype.IsCan = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCGetIsCanRebate Url. * @member {string} Url * @memberof gamehall.SCGetIsCanRebate * @instance */ SCGetIsCanRebate.prototype.Url = ""; /** * SCGetIsCanRebate WX. * @member {string} WX * @memberof gamehall.SCGetIsCanRebate * @instance */ SCGetIsCanRebate.prototype.WX = ""; /** * Creates a new SCGetIsCanRebate instance using the specified properties. * @function create * @memberof gamehall.SCGetIsCanRebate * @static * @param {gamehall.ISCGetIsCanRebate=} [properties] Properties to set * @returns {gamehall.SCGetIsCanRebate} SCGetIsCanRebate instance */ SCGetIsCanRebate.create = function create(properties) { return new SCGetIsCanRebate(properties); }; /** * Encodes the specified SCGetIsCanRebate message. Does not implicitly {@link gamehall.SCGetIsCanRebate.verify|verify} messages. * @function encode * @memberof gamehall.SCGetIsCanRebate * @static * @param {gamehall.ISCGetIsCanRebate} message SCGetIsCanRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetIsCanRebate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.IsCan != null && Object.hasOwnProperty.call(message, "IsCan")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.IsCan); if (message.Url != null && Object.hasOwnProperty.call(message, "Url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Url); if (message.WX != null && Object.hasOwnProperty.call(message, "WX")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.WX); return writer; }; /** * Encodes the specified SCGetIsCanRebate message, length delimited. Does not implicitly {@link gamehall.SCGetIsCanRebate.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGetIsCanRebate * @static * @param {gamehall.ISCGetIsCanRebate} message SCGetIsCanRebate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetIsCanRebate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGetIsCanRebate message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGetIsCanRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGetIsCanRebate} SCGetIsCanRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetIsCanRebate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGetIsCanRebate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.IsCan = reader.int64(); break; } case 3: { message.Url = reader.string(); break; } case 4: { message.WX = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGetIsCanRebate message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGetIsCanRebate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGetIsCanRebate} SCGetIsCanRebate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetIsCanRebate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGetIsCanRebate message. * @function verify * @memberof gamehall.SCGetIsCanRebate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGetIsCanRebate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 10008: break; } if (message.IsCan != null && message.hasOwnProperty("IsCan")) if (!$util.isInteger(message.IsCan) && !(message.IsCan && $util.isInteger(message.IsCan.low) && $util.isInteger(message.IsCan.high))) return "IsCan: integer|Long expected"; if (message.Url != null && message.hasOwnProperty("Url")) if (!$util.isString(message.Url)) return "Url: string expected"; if (message.WX != null && message.hasOwnProperty("WX")) if (!$util.isString(message.WX)) return "WX: string expected"; return null; }; /** * Creates a SCGetIsCanRebate message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGetIsCanRebate * @static * @param {Object.} object Plain object * @returns {gamehall.SCGetIsCanRebate} SCGetIsCanRebate */ SCGetIsCanRebate.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGetIsCanRebate) return object; var message = new $root.gamehall.SCGetIsCanRebate(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Hall": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Hall": case 1: message.OpRetCode = 1; break; case "OPRC_OnlineReward_Info_FindPlatform_Fail_Hall": case 10008: message.OpRetCode = 10008; break; } if (object.IsCan != null) if ($util.Long) (message.IsCan = $util.Long.fromValue(object.IsCan)).unsigned = false; else if (typeof object.IsCan === "string") message.IsCan = parseInt(object.IsCan, 10); else if (typeof object.IsCan === "number") message.IsCan = object.IsCan; else if (typeof object.IsCan === "object") message.IsCan = new $util.LongBits(object.IsCan.low >>> 0, object.IsCan.high >>> 0).toNumber(); if (object.Url != null) message.Url = String(object.Url); if (object.WX != null) message.WX = String(object.WX); return message; }; /** * Creates a plain object from a SCGetIsCanRebate message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGetIsCanRebate * @static * @param {gamehall.SCGetIsCanRebate} message SCGetIsCanRebate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGetIsCanRebate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Hall" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.IsCan = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.IsCan = options.longs === String ? "0" : 0; object.Url = ""; object.WX = ""; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Hall[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Hall[message.OpRetCode] : message.OpRetCode; if (message.IsCan != null && message.hasOwnProperty("IsCan")) if (typeof message.IsCan === "number") object.IsCan = options.longs === String ? String(message.IsCan) : message.IsCan; else object.IsCan = options.longs === String ? $util.Long.prototype.toString.call(message.IsCan) : options.longs === Number ? new $util.LongBits(message.IsCan.low >>> 0, message.IsCan.high >>> 0).toNumber() : message.IsCan; if (message.Url != null && message.hasOwnProperty("Url")) object.Url = message.Url; if (message.WX != null && message.hasOwnProperty("WX")) object.WX = message.WX; return object; }; /** * Converts this SCGetIsCanRebate to JSON. * @function toJSON * @memberof gamehall.SCGetIsCanRebate * @instance * @returns {Object.} JSON object */ SCGetIsCanRebate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGetIsCanRebate * @function getTypeUrl * @memberof gamehall.SCGetIsCanRebate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGetIsCanRebate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGetIsCanRebate"; }; return SCGetIsCanRebate; })(); gamehall.HallGameType = (function() { /** * Properties of a HallGameType. * @memberof gamehall * @interface IHallGameType * @property {number|null} [GameId] HallGameType GameId * @property {number|null} [GameMode] HallGameType GameMode */ /** * Constructs a new HallGameType. * @memberof gamehall * @classdesc 个人信息////////////////////////////////////////////////////////////// * @implements IHallGameType * @constructor * @param {gamehall.IHallGameType=} [properties] Properties to set */ function HallGameType(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * HallGameType GameId. * @member {number} GameId * @memberof gamehall.HallGameType * @instance */ HallGameType.prototype.GameId = 0; /** * HallGameType GameMode. * @member {number} GameMode * @memberof gamehall.HallGameType * @instance */ HallGameType.prototype.GameMode = 0; /** * Creates a new HallGameType instance using the specified properties. * @function create * @memberof gamehall.HallGameType * @static * @param {gamehall.IHallGameType=} [properties] Properties to set * @returns {gamehall.HallGameType} HallGameType instance */ HallGameType.create = function create(properties) { return new HallGameType(properties); }; /** * Encodes the specified HallGameType message. Does not implicitly {@link gamehall.HallGameType.verify|verify} messages. * @function encode * @memberof gamehall.HallGameType * @static * @param {gamehall.IHallGameType} message HallGameType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HallGameType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.GameMode != null && Object.hasOwnProperty.call(message, "GameMode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameMode); return writer; }; /** * Encodes the specified HallGameType message, length delimited. Does not implicitly {@link gamehall.HallGameType.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.HallGameType * @static * @param {gamehall.IHallGameType} message HallGameType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HallGameType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a HallGameType message from the specified reader or buffer. * @function decode * @memberof gamehall.HallGameType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.HallGameType} HallGameType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HallGameType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.HallGameType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.GameMode = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a HallGameType message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.HallGameType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.HallGameType} HallGameType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HallGameType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a HallGameType message. * @function verify * @memberof gamehall.HallGameType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ HallGameType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.GameMode != null && message.hasOwnProperty("GameMode")) if (!$util.isInteger(message.GameMode)) return "GameMode: integer expected"; return null; }; /** * Creates a HallGameType message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.HallGameType * @static * @param {Object.} object Plain object * @returns {gamehall.HallGameType} HallGameType */ HallGameType.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.HallGameType) return object; var message = new $root.gamehall.HallGameType(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.GameMode != null) message.GameMode = object.GameMode | 0; return message; }; /** * Creates a plain object from a HallGameType message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.HallGameType * @static * @param {gamehall.HallGameType} message HallGameType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ HallGameType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameId = 0; object.GameMode = 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.GameMode != null && message.hasOwnProperty("GameMode")) object.GameMode = message.GameMode; return object; }; /** * Converts this HallGameType to JSON. * @function toJSON * @memberof gamehall.HallGameType * @instance * @returns {Object.} JSON object */ HallGameType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for HallGameType * @function getTypeUrl * @memberof gamehall.HallGameType * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ HallGameType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.HallGameType"; }; return HallGameType; })(); /** * HallOperaCode enum. * @name gamehall.HallOperaCode * @enum {number} * @property {number} HallOperaZero=0 HallOperaZero value * @property {number} HallChessGame=1 HallChessGame value * @property {number} HallElectronicGame=2 HallElectronicGame value * @property {number} HallFishingGame=3 HallFishingGame value * @property {number} HallLiveVideo=4 HallLiveVideo value * @property {number} HallLotteryGame=5 HallLotteryGame value * @property {number} HallSportsGame=6 HallSportsGame value * @property {number} HallPrivateRoom=7 HallPrivateRoom value * @property {number} HallClubRoom=8 HallClubRoom value * @property {number} HallThirdPlt=101 HallThirdPlt value */ gamehall.HallOperaCode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "HallOperaZero"] = 0; values[valuesById[1] = "HallChessGame"] = 1; values[valuesById[2] = "HallElectronicGame"] = 2; values[valuesById[3] = "HallFishingGame"] = 3; values[valuesById[4] = "HallLiveVideo"] = 4; values[valuesById[5] = "HallLotteryGame"] = 5; values[valuesById[6] = "HallSportsGame"] = 6; values[valuesById[7] = "HallPrivateRoom"] = 7; values[valuesById[8] = "HallClubRoom"] = 8; values[valuesById[101] = "HallThirdPlt"] = 101; return values; })(); gamehall.CSNewPlayerInfo = (function() { /** * Properties of a CSNewPlayerInfo. * @memberof gamehall * @interface ICSNewPlayerInfo */ /** * Constructs a new CSNewPlayerInfo. * @memberof gamehall * @classdesc Represents a CSNewPlayerInfo. * @implements ICSNewPlayerInfo * @constructor * @param {gamehall.ICSNewPlayerInfo=} [properties] Properties to set */ function CSNewPlayerInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSNewPlayerInfo instance using the specified properties. * @function create * @memberof gamehall.CSNewPlayerInfo * @static * @param {gamehall.ICSNewPlayerInfo=} [properties] Properties to set * @returns {gamehall.CSNewPlayerInfo} CSNewPlayerInfo instance */ CSNewPlayerInfo.create = function create(properties) { return new CSNewPlayerInfo(properties); }; /** * Encodes the specified CSNewPlayerInfo message. Does not implicitly {@link gamehall.CSNewPlayerInfo.verify|verify} messages. * @function encode * @memberof gamehall.CSNewPlayerInfo * @static * @param {gamehall.ICSNewPlayerInfo} message CSNewPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSNewPlayerInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSNewPlayerInfo message, length delimited. Does not implicitly {@link gamehall.CSNewPlayerInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSNewPlayerInfo * @static * @param {gamehall.ICSNewPlayerInfo} message CSNewPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSNewPlayerInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSNewPlayerInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.CSNewPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSNewPlayerInfo} CSNewPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSNewPlayerInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSNewPlayerInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSNewPlayerInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSNewPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSNewPlayerInfo} CSNewPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSNewPlayerInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSNewPlayerInfo message. * @function verify * @memberof gamehall.CSNewPlayerInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSNewPlayerInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSNewPlayerInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSNewPlayerInfo * @static * @param {Object.} object Plain object * @returns {gamehall.CSNewPlayerInfo} CSNewPlayerInfo */ CSNewPlayerInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSNewPlayerInfo) return object; return new $root.gamehall.CSNewPlayerInfo(); }; /** * Creates a plain object from a CSNewPlayerInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSNewPlayerInfo * @static * @param {gamehall.CSNewPlayerInfo} message CSNewPlayerInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSNewPlayerInfo.toObject = function toObject() { return {}; }; /** * Converts this CSNewPlayerInfo to JSON. * @function toJSON * @memberof gamehall.CSNewPlayerInfo * @instance * @returns {Object.} JSON object */ CSNewPlayerInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSNewPlayerInfo * @function getTypeUrl * @memberof gamehall.CSNewPlayerInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSNewPlayerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSNewPlayerInfo"; }; return CSNewPlayerInfo; })(); gamehall.SCNewPlayerInfo = (function() { /** * Properties of a SCNewPlayerInfo. * @memberof gamehall * @interface ISCNewPlayerInfo * @property {number|null} [GameTotalNum] SCNewPlayerInfo GameTotalNum * @property {string|null} [GameMostPartake] SCNewPlayerInfo GameMostPartake * @property {string|null} [GameMostProfit] SCNewPlayerInfo GameMostProfit * @property {number|null} [GameMostProfitNum] SCNewPlayerInfo GameMostProfitNum * @property {number|null} [CreateRoomNum] SCNewPlayerInfo CreateRoomNum * @property {string|null} [CreateRoomMost] SCNewPlayerInfo CreateRoomMost * @property {number|null} [CreateClubNum] SCNewPlayerInfo CreateClubNum * @property {string|null} [CreateClubRoomMost] SCNewPlayerInfo CreateClubRoomMost * @property {number|null} [TeamNum] SCNewPlayerInfo TeamNum * @property {number|null} [AchievementTotal] SCNewPlayerInfo AchievementTotal * @property {number|null} [RewardTotal] SCNewPlayerInfo RewardTotal * @property {number|Long|null} [TotalCoin] SCNewPlayerInfo TotalCoin * @property {number|Long|null} [LastGetCoinTime] SCNewPlayerInfo LastGetCoinTime * @property {number|Long|null} [Coin] SCNewPlayerInfo Coin * @property {number|null} [CodeType] SCNewPlayerInfo CodeType * @property {Array.|null} [ClassType] SCNewPlayerInfo ClassType */ /** * Constructs a new SCNewPlayerInfo. * @memberof gamehall * @classdesc Represents a SCNewPlayerInfo. * @implements ISCNewPlayerInfo * @constructor * @param {gamehall.ISCNewPlayerInfo=} [properties] Properties to set */ function SCNewPlayerInfo(properties) { this.ClassType = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCNewPlayerInfo GameTotalNum. * @member {number} GameTotalNum * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.GameTotalNum = 0; /** * SCNewPlayerInfo GameMostPartake. * @member {string} GameMostPartake * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.GameMostPartake = ""; /** * SCNewPlayerInfo GameMostProfit. * @member {string} GameMostProfit * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.GameMostProfit = ""; /** * SCNewPlayerInfo GameMostProfitNum. * @member {number} GameMostProfitNum * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.GameMostProfitNum = 0; /** * SCNewPlayerInfo CreateRoomNum. * @member {number} CreateRoomNum * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.CreateRoomNum = 0; /** * SCNewPlayerInfo CreateRoomMost. * @member {string} CreateRoomMost * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.CreateRoomMost = ""; /** * SCNewPlayerInfo CreateClubNum. * @member {number} CreateClubNum * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.CreateClubNum = 0; /** * SCNewPlayerInfo CreateClubRoomMost. * @member {string} CreateClubRoomMost * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.CreateClubRoomMost = ""; /** * SCNewPlayerInfo TeamNum. * @member {number} TeamNum * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.TeamNum = 0; /** * SCNewPlayerInfo AchievementTotal. * @member {number} AchievementTotal * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.AchievementTotal = 0; /** * SCNewPlayerInfo RewardTotal. * @member {number} RewardTotal * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.RewardTotal = 0; /** * SCNewPlayerInfo TotalCoin. * @member {number|Long} TotalCoin * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.TotalCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCNewPlayerInfo LastGetCoinTime. * @member {number|Long} LastGetCoinTime * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.LastGetCoinTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCNewPlayerInfo Coin. * @member {number|Long} Coin * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCNewPlayerInfo CodeType. * @member {number} CodeType * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.CodeType = 0; /** * SCNewPlayerInfo ClassType. * @member {Array.} ClassType * @memberof gamehall.SCNewPlayerInfo * @instance */ SCNewPlayerInfo.prototype.ClassType = $util.emptyArray; /** * Creates a new SCNewPlayerInfo instance using the specified properties. * @function create * @memberof gamehall.SCNewPlayerInfo * @static * @param {gamehall.ISCNewPlayerInfo=} [properties] Properties to set * @returns {gamehall.SCNewPlayerInfo} SCNewPlayerInfo instance */ SCNewPlayerInfo.create = function create(properties) { return new SCNewPlayerInfo(properties); }; /** * Encodes the specified SCNewPlayerInfo message. Does not implicitly {@link gamehall.SCNewPlayerInfo.verify|verify} messages. * @function encode * @memberof gamehall.SCNewPlayerInfo * @static * @param {gamehall.ISCNewPlayerInfo} message SCNewPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCNewPlayerInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameTotalNum != null && Object.hasOwnProperty.call(message, "GameTotalNum")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameTotalNum); if (message.GameMostPartake != null && Object.hasOwnProperty.call(message, "GameMostPartake")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.GameMostPartake); if (message.GameMostProfit != null && Object.hasOwnProperty.call(message, "GameMostProfit")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.GameMostProfit); if (message.GameMostProfitNum != null && Object.hasOwnProperty.call(message, "GameMostProfitNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.GameMostProfitNum); if (message.CreateRoomNum != null && Object.hasOwnProperty.call(message, "CreateRoomNum")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.CreateRoomNum); if (message.CreateRoomMost != null && Object.hasOwnProperty.call(message, "CreateRoomMost")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.CreateRoomMost); if (message.CreateClubNum != null && Object.hasOwnProperty.call(message, "CreateClubNum")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.CreateClubNum); if (message.CreateClubRoomMost != null && Object.hasOwnProperty.call(message, "CreateClubRoomMost")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.CreateClubRoomMost); if (message.TeamNum != null && Object.hasOwnProperty.call(message, "TeamNum")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.TeamNum); if (message.AchievementTotal != null && Object.hasOwnProperty.call(message, "AchievementTotal")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.AchievementTotal); if (message.RewardTotal != null && Object.hasOwnProperty.call(message, "RewardTotal")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.RewardTotal); if (message.TotalCoin != null && Object.hasOwnProperty.call(message, "TotalCoin")) writer.uint32(/* id 12, wireType 0 =*/96).int64(message.TotalCoin); if (message.LastGetCoinTime != null && Object.hasOwnProperty.call(message, "LastGetCoinTime")) writer.uint32(/* id 13, wireType 0 =*/104).int64(message.LastGetCoinTime); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 14, wireType 0 =*/112).int64(message.Coin); if (message.CodeType != null && Object.hasOwnProperty.call(message, "CodeType")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.CodeType); if (message.ClassType != null && message.ClassType.length) { writer.uint32(/* id 16, wireType 2 =*/130).fork(); for (var i = 0; i < message.ClassType.length; ++i) writer.int32(message.ClassType[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCNewPlayerInfo message, length delimited. Does not implicitly {@link gamehall.SCNewPlayerInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCNewPlayerInfo * @static * @param {gamehall.ISCNewPlayerInfo} message SCNewPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCNewPlayerInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCNewPlayerInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.SCNewPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCNewPlayerInfo} SCNewPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCNewPlayerInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCNewPlayerInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameTotalNum = reader.int32(); break; } case 2: { message.GameMostPartake = reader.string(); break; } case 3: { message.GameMostProfit = reader.string(); break; } case 4: { message.GameMostProfitNum = reader.int32(); break; } case 5: { message.CreateRoomNum = reader.int32(); break; } case 6: { message.CreateRoomMost = reader.string(); break; } case 7: { message.CreateClubNum = reader.int32(); break; } case 8: { message.CreateClubRoomMost = reader.string(); break; } case 9: { message.TeamNum = reader.int32(); break; } case 10: { message.AchievementTotal = reader.int32(); break; } case 11: { message.RewardTotal = reader.int32(); break; } case 12: { message.TotalCoin = reader.int64(); break; } case 13: { message.LastGetCoinTime = reader.int64(); break; } case 14: { message.Coin = reader.int64(); break; } case 15: { message.CodeType = reader.int32(); break; } case 16: { if (!(message.ClassType && message.ClassType.length)) message.ClassType = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.ClassType.push(reader.int32()); } else message.ClassType.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCNewPlayerInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCNewPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCNewPlayerInfo} SCNewPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCNewPlayerInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCNewPlayerInfo message. * @function verify * @memberof gamehall.SCNewPlayerInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCNewPlayerInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameTotalNum != null && message.hasOwnProperty("GameTotalNum")) if (!$util.isInteger(message.GameTotalNum)) return "GameTotalNum: integer expected"; if (message.GameMostPartake != null && message.hasOwnProperty("GameMostPartake")) if (!$util.isString(message.GameMostPartake)) return "GameMostPartake: string expected"; if (message.GameMostProfit != null && message.hasOwnProperty("GameMostProfit")) if (!$util.isString(message.GameMostProfit)) return "GameMostProfit: string expected"; if (message.GameMostProfitNum != null && message.hasOwnProperty("GameMostProfitNum")) if (!$util.isInteger(message.GameMostProfitNum)) return "GameMostProfitNum: integer expected"; if (message.CreateRoomNum != null && message.hasOwnProperty("CreateRoomNum")) if (!$util.isInteger(message.CreateRoomNum)) return "CreateRoomNum: integer expected"; if (message.CreateRoomMost != null && message.hasOwnProperty("CreateRoomMost")) if (!$util.isString(message.CreateRoomMost)) return "CreateRoomMost: string expected"; if (message.CreateClubNum != null && message.hasOwnProperty("CreateClubNum")) if (!$util.isInteger(message.CreateClubNum)) return "CreateClubNum: integer expected"; if (message.CreateClubRoomMost != null && message.hasOwnProperty("CreateClubRoomMost")) if (!$util.isString(message.CreateClubRoomMost)) return "CreateClubRoomMost: string expected"; if (message.TeamNum != null && message.hasOwnProperty("TeamNum")) if (!$util.isInteger(message.TeamNum)) return "TeamNum: integer expected"; if (message.AchievementTotal != null && message.hasOwnProperty("AchievementTotal")) if (!$util.isInteger(message.AchievementTotal)) return "AchievementTotal: integer expected"; if (message.RewardTotal != null && message.hasOwnProperty("RewardTotal")) if (!$util.isInteger(message.RewardTotal)) return "RewardTotal: integer expected"; if (message.TotalCoin != null && message.hasOwnProperty("TotalCoin")) if (!$util.isInteger(message.TotalCoin) && !(message.TotalCoin && $util.isInteger(message.TotalCoin.low) && $util.isInteger(message.TotalCoin.high))) return "TotalCoin: integer|Long expected"; if (message.LastGetCoinTime != null && message.hasOwnProperty("LastGetCoinTime")) if (!$util.isInteger(message.LastGetCoinTime) && !(message.LastGetCoinTime && $util.isInteger(message.LastGetCoinTime.low) && $util.isInteger(message.LastGetCoinTime.high))) return "LastGetCoinTime: integer|Long expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; if (message.CodeType != null && message.hasOwnProperty("CodeType")) if (!$util.isInteger(message.CodeType)) return "CodeType: integer expected"; if (message.ClassType != null && message.hasOwnProperty("ClassType")) { if (!Array.isArray(message.ClassType)) return "ClassType: array expected"; for (var i = 0; i < message.ClassType.length; ++i) if (!$util.isInteger(message.ClassType[i])) return "ClassType: integer[] expected"; } return null; }; /** * Creates a SCNewPlayerInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCNewPlayerInfo * @static * @param {Object.} object Plain object * @returns {gamehall.SCNewPlayerInfo} SCNewPlayerInfo */ SCNewPlayerInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCNewPlayerInfo) return object; var message = new $root.gamehall.SCNewPlayerInfo(); if (object.GameTotalNum != null) message.GameTotalNum = object.GameTotalNum | 0; if (object.GameMostPartake != null) message.GameMostPartake = String(object.GameMostPartake); if (object.GameMostProfit != null) message.GameMostProfit = String(object.GameMostProfit); if (object.GameMostProfitNum != null) message.GameMostProfitNum = object.GameMostProfitNum | 0; if (object.CreateRoomNum != null) message.CreateRoomNum = object.CreateRoomNum | 0; if (object.CreateRoomMost != null) message.CreateRoomMost = String(object.CreateRoomMost); if (object.CreateClubNum != null) message.CreateClubNum = object.CreateClubNum | 0; if (object.CreateClubRoomMost != null) message.CreateClubRoomMost = String(object.CreateClubRoomMost); if (object.TeamNum != null) message.TeamNum = object.TeamNum | 0; if (object.AchievementTotal != null) message.AchievementTotal = object.AchievementTotal | 0; if (object.RewardTotal != null) message.RewardTotal = object.RewardTotal | 0; if (object.TotalCoin != null) if ($util.Long) (message.TotalCoin = $util.Long.fromValue(object.TotalCoin)).unsigned = false; else if (typeof object.TotalCoin === "string") message.TotalCoin = parseInt(object.TotalCoin, 10); else if (typeof object.TotalCoin === "number") message.TotalCoin = object.TotalCoin; else if (typeof object.TotalCoin === "object") message.TotalCoin = new $util.LongBits(object.TotalCoin.low >>> 0, object.TotalCoin.high >>> 0).toNumber(); if (object.LastGetCoinTime != null) if ($util.Long) (message.LastGetCoinTime = $util.Long.fromValue(object.LastGetCoinTime)).unsigned = false; else if (typeof object.LastGetCoinTime === "string") message.LastGetCoinTime = parseInt(object.LastGetCoinTime, 10); else if (typeof object.LastGetCoinTime === "number") message.LastGetCoinTime = object.LastGetCoinTime; else if (typeof object.LastGetCoinTime === "object") message.LastGetCoinTime = new $util.LongBits(object.LastGetCoinTime.low >>> 0, object.LastGetCoinTime.high >>> 0).toNumber(); if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); if (object.CodeType != null) message.CodeType = object.CodeType | 0; if (object.ClassType) { if (!Array.isArray(object.ClassType)) throw TypeError(".gamehall.SCNewPlayerInfo.ClassType: array expected"); message.ClassType = []; for (var i = 0; i < object.ClassType.length; ++i) message.ClassType[i] = object.ClassType[i] | 0; } return message; }; /** * Creates a plain object from a SCNewPlayerInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCNewPlayerInfo * @static * @param {gamehall.SCNewPlayerInfo} message SCNewPlayerInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCNewPlayerInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.ClassType = []; if (options.defaults) { object.GameTotalNum = 0; object.GameMostPartake = ""; object.GameMostProfit = ""; object.GameMostProfitNum = 0; object.CreateRoomNum = 0; object.CreateRoomMost = ""; object.CreateClubNum = 0; object.CreateClubRoomMost = ""; object.TeamNum = 0; object.AchievementTotal = 0; object.RewardTotal = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.LastGetCoinTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.LastGetCoinTime = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; object.CodeType = 0; } if (message.GameTotalNum != null && message.hasOwnProperty("GameTotalNum")) object.GameTotalNum = message.GameTotalNum; if (message.GameMostPartake != null && message.hasOwnProperty("GameMostPartake")) object.GameMostPartake = message.GameMostPartake; if (message.GameMostProfit != null && message.hasOwnProperty("GameMostProfit")) object.GameMostProfit = message.GameMostProfit; if (message.GameMostProfitNum != null && message.hasOwnProperty("GameMostProfitNum")) object.GameMostProfitNum = message.GameMostProfitNum; if (message.CreateRoomNum != null && message.hasOwnProperty("CreateRoomNum")) object.CreateRoomNum = message.CreateRoomNum; if (message.CreateRoomMost != null && message.hasOwnProperty("CreateRoomMost")) object.CreateRoomMost = message.CreateRoomMost; if (message.CreateClubNum != null && message.hasOwnProperty("CreateClubNum")) object.CreateClubNum = message.CreateClubNum; if (message.CreateClubRoomMost != null && message.hasOwnProperty("CreateClubRoomMost")) object.CreateClubRoomMost = message.CreateClubRoomMost; if (message.TeamNum != null && message.hasOwnProperty("TeamNum")) object.TeamNum = message.TeamNum; if (message.AchievementTotal != null && message.hasOwnProperty("AchievementTotal")) object.AchievementTotal = message.AchievementTotal; if (message.RewardTotal != null && message.hasOwnProperty("RewardTotal")) object.RewardTotal = message.RewardTotal; if (message.TotalCoin != null && message.hasOwnProperty("TotalCoin")) if (typeof message.TotalCoin === "number") object.TotalCoin = options.longs === String ? String(message.TotalCoin) : message.TotalCoin; else object.TotalCoin = options.longs === String ? $util.Long.prototype.toString.call(message.TotalCoin) : options.longs === Number ? new $util.LongBits(message.TotalCoin.low >>> 0, message.TotalCoin.high >>> 0).toNumber() : message.TotalCoin; if (message.LastGetCoinTime != null && message.hasOwnProperty("LastGetCoinTime")) if (typeof message.LastGetCoinTime === "number") object.LastGetCoinTime = options.longs === String ? String(message.LastGetCoinTime) : message.LastGetCoinTime; else object.LastGetCoinTime = options.longs === String ? $util.Long.prototype.toString.call(message.LastGetCoinTime) : options.longs === Number ? new $util.LongBits(message.LastGetCoinTime.low >>> 0, message.LastGetCoinTime.high >>> 0).toNumber() : message.LastGetCoinTime; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; if (message.CodeType != null && message.hasOwnProperty("CodeType")) object.CodeType = message.CodeType; if (message.ClassType && message.ClassType.length) { object.ClassType = []; for (var j = 0; j < message.ClassType.length; ++j) object.ClassType[j] = message.ClassType[j]; } return object; }; /** * Converts this SCNewPlayerInfo to JSON. * @function toJSON * @memberof gamehall.SCNewPlayerInfo * @instance * @returns {Object.} JSON object */ SCNewPlayerInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCNewPlayerInfo * @function getTypeUrl * @memberof gamehall.SCNewPlayerInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCNewPlayerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCNewPlayerInfo"; }; return SCNewPlayerInfo; })(); gamehall.SCRebateTotalInfo = (function() { /** * Properties of a SCRebateTotalInfo. * @memberof gamehall * @interface ISCRebateTotalInfo * @property {number|Long|null} [TotalCoin] SCRebateTotalInfo TotalCoin * @property {number|Long|null} [LastGetCoinTime] SCRebateTotalInfo LastGetCoinTime * @property {number|Long|null} [Coin] SCRebateTotalInfo Coin * @property {number|null} [CodeType] SCRebateTotalInfo CodeType */ /** * Constructs a new SCRebateTotalInfo. * @memberof gamehall * @classdesc Represents a SCRebateTotalInfo. * @implements ISCRebateTotalInfo * @constructor * @param {gamehall.ISCRebateTotalInfo=} [properties] Properties to set */ function SCRebateTotalInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCRebateTotalInfo TotalCoin. * @member {number|Long} TotalCoin * @memberof gamehall.SCRebateTotalInfo * @instance */ SCRebateTotalInfo.prototype.TotalCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCRebateTotalInfo LastGetCoinTime. * @member {number|Long} LastGetCoinTime * @memberof gamehall.SCRebateTotalInfo * @instance */ SCRebateTotalInfo.prototype.LastGetCoinTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCRebateTotalInfo Coin. * @member {number|Long} Coin * @memberof gamehall.SCRebateTotalInfo * @instance */ SCRebateTotalInfo.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCRebateTotalInfo CodeType. * @member {number} CodeType * @memberof gamehall.SCRebateTotalInfo * @instance */ SCRebateTotalInfo.prototype.CodeType = 0; /** * Creates a new SCRebateTotalInfo instance using the specified properties. * @function create * @memberof gamehall.SCRebateTotalInfo * @static * @param {gamehall.ISCRebateTotalInfo=} [properties] Properties to set * @returns {gamehall.SCRebateTotalInfo} SCRebateTotalInfo instance */ SCRebateTotalInfo.create = function create(properties) { return new SCRebateTotalInfo(properties); }; /** * Encodes the specified SCRebateTotalInfo message. Does not implicitly {@link gamehall.SCRebateTotalInfo.verify|verify} messages. * @function encode * @memberof gamehall.SCRebateTotalInfo * @static * @param {gamehall.ISCRebateTotalInfo} message SCRebateTotalInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRebateTotalInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.TotalCoin != null && Object.hasOwnProperty.call(message, "TotalCoin")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.TotalCoin); if (message.LastGetCoinTime != null && Object.hasOwnProperty.call(message, "LastGetCoinTime")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.LastGetCoinTime); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.Coin); if (message.CodeType != null && Object.hasOwnProperty.call(message, "CodeType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.CodeType); return writer; }; /** * Encodes the specified SCRebateTotalInfo message, length delimited. Does not implicitly {@link gamehall.SCRebateTotalInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCRebateTotalInfo * @static * @param {gamehall.ISCRebateTotalInfo} message SCRebateTotalInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCRebateTotalInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCRebateTotalInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.SCRebateTotalInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCRebateTotalInfo} SCRebateTotalInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRebateTotalInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCRebateTotalInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.TotalCoin = reader.int64(); break; } case 2: { message.LastGetCoinTime = reader.int64(); break; } case 3: { message.Coin = reader.int64(); break; } case 4: { message.CodeType = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCRebateTotalInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCRebateTotalInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCRebateTotalInfo} SCRebateTotalInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCRebateTotalInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCRebateTotalInfo message. * @function verify * @memberof gamehall.SCRebateTotalInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCRebateTotalInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.TotalCoin != null && message.hasOwnProperty("TotalCoin")) if (!$util.isInteger(message.TotalCoin) && !(message.TotalCoin && $util.isInteger(message.TotalCoin.low) && $util.isInteger(message.TotalCoin.high))) return "TotalCoin: integer|Long expected"; if (message.LastGetCoinTime != null && message.hasOwnProperty("LastGetCoinTime")) if (!$util.isInteger(message.LastGetCoinTime) && !(message.LastGetCoinTime && $util.isInteger(message.LastGetCoinTime.low) && $util.isInteger(message.LastGetCoinTime.high))) return "LastGetCoinTime: integer|Long expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; if (message.CodeType != null && message.hasOwnProperty("CodeType")) if (!$util.isInteger(message.CodeType)) return "CodeType: integer expected"; return null; }; /** * Creates a SCRebateTotalInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCRebateTotalInfo * @static * @param {Object.} object Plain object * @returns {gamehall.SCRebateTotalInfo} SCRebateTotalInfo */ SCRebateTotalInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCRebateTotalInfo) return object; var message = new $root.gamehall.SCRebateTotalInfo(); if (object.TotalCoin != null) if ($util.Long) (message.TotalCoin = $util.Long.fromValue(object.TotalCoin)).unsigned = false; else if (typeof object.TotalCoin === "string") message.TotalCoin = parseInt(object.TotalCoin, 10); else if (typeof object.TotalCoin === "number") message.TotalCoin = object.TotalCoin; else if (typeof object.TotalCoin === "object") message.TotalCoin = new $util.LongBits(object.TotalCoin.low >>> 0, object.TotalCoin.high >>> 0).toNumber(); if (object.LastGetCoinTime != null) if ($util.Long) (message.LastGetCoinTime = $util.Long.fromValue(object.LastGetCoinTime)).unsigned = false; else if (typeof object.LastGetCoinTime === "string") message.LastGetCoinTime = parseInt(object.LastGetCoinTime, 10); else if (typeof object.LastGetCoinTime === "number") message.LastGetCoinTime = object.LastGetCoinTime; else if (typeof object.LastGetCoinTime === "object") message.LastGetCoinTime = new $util.LongBits(object.LastGetCoinTime.low >>> 0, object.LastGetCoinTime.high >>> 0).toNumber(); if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); if (object.CodeType != null) message.CodeType = object.CodeType | 0; return message; }; /** * Creates a plain object from a SCRebateTotalInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCRebateTotalInfo * @static * @param {gamehall.SCRebateTotalInfo} message SCRebateTotalInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCRebateTotalInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.LastGetCoinTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.LastGetCoinTime = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; object.CodeType = 0; } if (message.TotalCoin != null && message.hasOwnProperty("TotalCoin")) if (typeof message.TotalCoin === "number") object.TotalCoin = options.longs === String ? String(message.TotalCoin) : message.TotalCoin; else object.TotalCoin = options.longs === String ? $util.Long.prototype.toString.call(message.TotalCoin) : options.longs === Number ? new $util.LongBits(message.TotalCoin.low >>> 0, message.TotalCoin.high >>> 0).toNumber() : message.TotalCoin; if (message.LastGetCoinTime != null && message.hasOwnProperty("LastGetCoinTime")) if (typeof message.LastGetCoinTime === "number") object.LastGetCoinTime = options.longs === String ? String(message.LastGetCoinTime) : message.LastGetCoinTime; else object.LastGetCoinTime = options.longs === String ? $util.Long.prototype.toString.call(message.LastGetCoinTime) : options.longs === Number ? new $util.LongBits(message.LastGetCoinTime.low >>> 0, message.LastGetCoinTime.high >>> 0).toNumber() : message.LastGetCoinTime; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; if (message.CodeType != null && message.hasOwnProperty("CodeType")) object.CodeType = message.CodeType; return object; }; /** * Converts this SCRebateTotalInfo to JSON. * @function toJSON * @memberof gamehall.SCRebateTotalInfo * @instance * @returns {Object.} JSON object */ SCRebateTotalInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCRebateTotalInfo * @function getTypeUrl * @memberof gamehall.SCRebateTotalInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCRebateTotalInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCRebateTotalInfo"; }; return SCRebateTotalInfo; })(); gamehall.CSCodeTypeRecord = (function() { /** * Properties of a CSCodeTypeRecord. * @memberof gamehall * @interface ICSCodeTypeRecord * @property {gamehall.HallOperaCode|null} [ShowTypeId] CSCodeTypeRecord ShowTypeId */ /** * Constructs a new CSCodeTypeRecord. * @memberof gamehall * @classdesc Represents a CSCodeTypeRecord. * @implements ICSCodeTypeRecord * @constructor * @param {gamehall.ICSCodeTypeRecord=} [properties] Properties to set */ function CSCodeTypeRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCodeTypeRecord ShowTypeId. * @member {gamehall.HallOperaCode} ShowTypeId * @memberof gamehall.CSCodeTypeRecord * @instance */ CSCodeTypeRecord.prototype.ShowTypeId = 0; /** * Creates a new CSCodeTypeRecord instance using the specified properties. * @function create * @memberof gamehall.CSCodeTypeRecord * @static * @param {gamehall.ICSCodeTypeRecord=} [properties] Properties to set * @returns {gamehall.CSCodeTypeRecord} CSCodeTypeRecord instance */ CSCodeTypeRecord.create = function create(properties) { return new CSCodeTypeRecord(properties); }; /** * Encodes the specified CSCodeTypeRecord message. Does not implicitly {@link gamehall.CSCodeTypeRecord.verify|verify} messages. * @function encode * @memberof gamehall.CSCodeTypeRecord * @static * @param {gamehall.ICSCodeTypeRecord} message CSCodeTypeRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCodeTypeRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowTypeId != null && Object.hasOwnProperty.call(message, "ShowTypeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShowTypeId); return writer; }; /** * Encodes the specified CSCodeTypeRecord message, length delimited. Does not implicitly {@link gamehall.CSCodeTypeRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCodeTypeRecord * @static * @param {gamehall.ICSCodeTypeRecord} message CSCodeTypeRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCodeTypeRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCodeTypeRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCodeTypeRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCodeTypeRecord} CSCodeTypeRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCodeTypeRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCodeTypeRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowTypeId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCodeTypeRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCodeTypeRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCodeTypeRecord} CSCodeTypeRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCodeTypeRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCodeTypeRecord message. * @function verify * @memberof gamehall.CSCodeTypeRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCodeTypeRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowTypeId != null && message.hasOwnProperty("ShowTypeId")) switch (message.ShowTypeId) { default: return "ShowTypeId: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 101: break; } return null; }; /** * Creates a CSCodeTypeRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCodeTypeRecord * @static * @param {Object.} object Plain object * @returns {gamehall.CSCodeTypeRecord} CSCodeTypeRecord */ CSCodeTypeRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCodeTypeRecord) return object; var message = new $root.gamehall.CSCodeTypeRecord(); switch (object.ShowTypeId) { default: if (typeof object.ShowTypeId === "number") { message.ShowTypeId = object.ShowTypeId; break; } break; case "HallOperaZero": case 0: message.ShowTypeId = 0; break; case "HallChessGame": case 1: message.ShowTypeId = 1; break; case "HallElectronicGame": case 2: message.ShowTypeId = 2; break; case "HallFishingGame": case 3: message.ShowTypeId = 3; break; case "HallLiveVideo": case 4: message.ShowTypeId = 4; break; case "HallLotteryGame": case 5: message.ShowTypeId = 5; break; case "HallSportsGame": case 6: message.ShowTypeId = 6; break; case "HallPrivateRoom": case 7: message.ShowTypeId = 7; break; case "HallClubRoom": case 8: message.ShowTypeId = 8; break; case "HallThirdPlt": case 101: message.ShowTypeId = 101; break; } return message; }; /** * Creates a plain object from a CSCodeTypeRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCodeTypeRecord * @static * @param {gamehall.CSCodeTypeRecord} message CSCodeTypeRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCodeTypeRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.ShowTypeId = options.enums === String ? "HallOperaZero" : 0; if (message.ShowTypeId != null && message.hasOwnProperty("ShowTypeId")) object.ShowTypeId = options.enums === String ? $root.gamehall.HallOperaCode[message.ShowTypeId] === undefined ? message.ShowTypeId : $root.gamehall.HallOperaCode[message.ShowTypeId] : message.ShowTypeId; return object; }; /** * Converts this CSCodeTypeRecord to JSON. * @function toJSON * @memberof gamehall.CSCodeTypeRecord * @instance * @returns {Object.} JSON object */ CSCodeTypeRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCodeTypeRecord * @function getTypeUrl * @memberof gamehall.CSCodeTypeRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCodeTypeRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCodeTypeRecord"; }; return CSCodeTypeRecord; })(); gamehall.CodeTypeRecord = (function() { /** * Properties of a CodeTypeRecord. * @memberof gamehall * @interface ICodeTypeRecord * @property {string|null} [GameName] CodeTypeRecord GameName * @property {number|Long|null} [GameBetCoin] CodeTypeRecord GameBetCoin * @property {number|null} [Rate] CodeTypeRecord Rate * @property {number|null} [Coin] CodeTypeRecord Coin * @property {number|null} [MinCoin] CodeTypeRecord MinCoin * @property {number|null} [MaxCoin] CodeTypeRecord MaxCoin */ /** * Constructs a new CodeTypeRecord. * @memberof gamehall * @classdesc 洗码列表 * @implements ICodeTypeRecord * @constructor * @param {gamehall.ICodeTypeRecord=} [properties] Properties to set */ function CodeTypeRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CodeTypeRecord GameName. * @member {string} GameName * @memberof gamehall.CodeTypeRecord * @instance */ CodeTypeRecord.prototype.GameName = ""; /** * CodeTypeRecord GameBetCoin. * @member {number|Long} GameBetCoin * @memberof gamehall.CodeTypeRecord * @instance */ CodeTypeRecord.prototype.GameBetCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CodeTypeRecord Rate. * @member {number} Rate * @memberof gamehall.CodeTypeRecord * @instance */ CodeTypeRecord.prototype.Rate = 0; /** * CodeTypeRecord Coin. * @member {number} Coin * @memberof gamehall.CodeTypeRecord * @instance */ CodeTypeRecord.prototype.Coin = 0; /** * CodeTypeRecord MinCoin. * @member {number} MinCoin * @memberof gamehall.CodeTypeRecord * @instance */ CodeTypeRecord.prototype.MinCoin = 0; /** * CodeTypeRecord MaxCoin. * @member {number} MaxCoin * @memberof gamehall.CodeTypeRecord * @instance */ CodeTypeRecord.prototype.MaxCoin = 0; /** * Creates a new CodeTypeRecord instance using the specified properties. * @function create * @memberof gamehall.CodeTypeRecord * @static * @param {gamehall.ICodeTypeRecord=} [properties] Properties to set * @returns {gamehall.CodeTypeRecord} CodeTypeRecord instance */ CodeTypeRecord.create = function create(properties) { return new CodeTypeRecord(properties); }; /** * Encodes the specified CodeTypeRecord message. Does not implicitly {@link gamehall.CodeTypeRecord.verify|verify} messages. * @function encode * @memberof gamehall.CodeTypeRecord * @static * @param {gamehall.ICodeTypeRecord} message CodeTypeRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CodeTypeRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameName != null && Object.hasOwnProperty.call(message, "GameName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.GameName); if (message.GameBetCoin != null && Object.hasOwnProperty.call(message, "GameBetCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.GameBetCoin); if (message.Rate != null && Object.hasOwnProperty.call(message, "Rate")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Rate); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.Coin); if (message.MinCoin != null && Object.hasOwnProperty.call(message, "MinCoin")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.MinCoin); if (message.MaxCoin != null && Object.hasOwnProperty.call(message, "MaxCoin")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.MaxCoin); return writer; }; /** * Encodes the specified CodeTypeRecord message, length delimited. Does not implicitly {@link gamehall.CodeTypeRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CodeTypeRecord * @static * @param {gamehall.ICodeTypeRecord} message CodeTypeRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CodeTypeRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CodeTypeRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.CodeTypeRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CodeTypeRecord} CodeTypeRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CodeTypeRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CodeTypeRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameName = reader.string(); break; } case 2: { message.GameBetCoin = reader.int64(); break; } case 3: { message.Rate = reader.int32(); break; } case 4: { message.Coin = reader.int32(); break; } case 5: { message.MinCoin = reader.int32(); break; } case 6: { message.MaxCoin = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CodeTypeRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CodeTypeRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CodeTypeRecord} CodeTypeRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CodeTypeRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CodeTypeRecord message. * @function verify * @memberof gamehall.CodeTypeRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CodeTypeRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameName != null && message.hasOwnProperty("GameName")) if (!$util.isString(message.GameName)) return "GameName: string expected"; if (message.GameBetCoin != null && message.hasOwnProperty("GameBetCoin")) if (!$util.isInteger(message.GameBetCoin) && !(message.GameBetCoin && $util.isInteger(message.GameBetCoin.low) && $util.isInteger(message.GameBetCoin.high))) return "GameBetCoin: integer|Long expected"; if (message.Rate != null && message.hasOwnProperty("Rate")) if (!$util.isInteger(message.Rate)) return "Rate: integer expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin)) return "Coin: integer expected"; if (message.MinCoin != null && message.hasOwnProperty("MinCoin")) if (!$util.isInteger(message.MinCoin)) return "MinCoin: integer expected"; if (message.MaxCoin != null && message.hasOwnProperty("MaxCoin")) if (!$util.isInteger(message.MaxCoin)) return "MaxCoin: integer expected"; return null; }; /** * Creates a CodeTypeRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CodeTypeRecord * @static * @param {Object.} object Plain object * @returns {gamehall.CodeTypeRecord} CodeTypeRecord */ CodeTypeRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CodeTypeRecord) return object; var message = new $root.gamehall.CodeTypeRecord(); if (object.GameName != null) message.GameName = String(object.GameName); if (object.GameBetCoin != null) if ($util.Long) (message.GameBetCoin = $util.Long.fromValue(object.GameBetCoin)).unsigned = false; else if (typeof object.GameBetCoin === "string") message.GameBetCoin = parseInt(object.GameBetCoin, 10); else if (typeof object.GameBetCoin === "number") message.GameBetCoin = object.GameBetCoin; else if (typeof object.GameBetCoin === "object") message.GameBetCoin = new $util.LongBits(object.GameBetCoin.low >>> 0, object.GameBetCoin.high >>> 0).toNumber(); if (object.Rate != null) message.Rate = object.Rate | 0; if (object.Coin != null) message.Coin = object.Coin | 0; if (object.MinCoin != null) message.MinCoin = object.MinCoin | 0; if (object.MaxCoin != null) message.MaxCoin = object.MaxCoin | 0; return message; }; /** * Creates a plain object from a CodeTypeRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CodeTypeRecord * @static * @param {gamehall.CodeTypeRecord} message CodeTypeRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CodeTypeRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameName = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.GameBetCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.GameBetCoin = options.longs === String ? "0" : 0; object.Rate = 0; object.Coin = 0; object.MinCoin = 0; object.MaxCoin = 0; } if (message.GameName != null && message.hasOwnProperty("GameName")) object.GameName = message.GameName; if (message.GameBetCoin != null && message.hasOwnProperty("GameBetCoin")) if (typeof message.GameBetCoin === "number") object.GameBetCoin = options.longs === String ? String(message.GameBetCoin) : message.GameBetCoin; else object.GameBetCoin = options.longs === String ? $util.Long.prototype.toString.call(message.GameBetCoin) : options.longs === Number ? new $util.LongBits(message.GameBetCoin.low >>> 0, message.GameBetCoin.high >>> 0).toNumber() : message.GameBetCoin; if (message.Rate != null && message.hasOwnProperty("Rate")) object.Rate = message.Rate; if (message.Coin != null && message.hasOwnProperty("Coin")) object.Coin = message.Coin; if (message.MinCoin != null && message.hasOwnProperty("MinCoin")) object.MinCoin = message.MinCoin; if (message.MaxCoin != null && message.hasOwnProperty("MaxCoin")) object.MaxCoin = message.MaxCoin; return object; }; /** * Converts this CodeTypeRecord to JSON. * @function toJSON * @memberof gamehall.CodeTypeRecord * @instance * @returns {Object.} JSON object */ CodeTypeRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CodeTypeRecord * @function getTypeUrl * @memberof gamehall.CodeTypeRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CodeTypeRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CodeTypeRecord"; }; return CodeTypeRecord; })(); gamehall.SCCodeTypeRecord = (function() { /** * Properties of a SCCodeTypeRecord. * @memberof gamehall * @interface ISCCodeTypeRecord * @property {gamehall.HallOperaCode|null} [ShowType] SCCodeTypeRecord ShowType * @property {Array.|null} [CodeTypeRecord] SCCodeTypeRecord CodeTypeRecord */ /** * Constructs a new SCCodeTypeRecord. * @memberof gamehall * @classdesc Represents a SCCodeTypeRecord. * @implements ISCCodeTypeRecord * @constructor * @param {gamehall.ISCCodeTypeRecord=} [properties] Properties to set */ function SCCodeTypeRecord(properties) { this.CodeTypeRecord = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCodeTypeRecord ShowType. * @member {gamehall.HallOperaCode} ShowType * @memberof gamehall.SCCodeTypeRecord * @instance */ SCCodeTypeRecord.prototype.ShowType = 0; /** * SCCodeTypeRecord CodeTypeRecord. * @member {Array.} CodeTypeRecord * @memberof gamehall.SCCodeTypeRecord * @instance */ SCCodeTypeRecord.prototype.CodeTypeRecord = $util.emptyArray; /** * Creates a new SCCodeTypeRecord instance using the specified properties. * @function create * @memberof gamehall.SCCodeTypeRecord * @static * @param {gamehall.ISCCodeTypeRecord=} [properties] Properties to set * @returns {gamehall.SCCodeTypeRecord} SCCodeTypeRecord instance */ SCCodeTypeRecord.create = function create(properties) { return new SCCodeTypeRecord(properties); }; /** * Encodes the specified SCCodeTypeRecord message. Does not implicitly {@link gamehall.SCCodeTypeRecord.verify|verify} messages. * @function encode * @memberof gamehall.SCCodeTypeRecord * @static * @param {gamehall.ISCCodeTypeRecord} message SCCodeTypeRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCodeTypeRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowType != null && Object.hasOwnProperty.call(message, "ShowType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShowType); if (message.CodeTypeRecord != null && message.CodeTypeRecord.length) for (var i = 0; i < message.CodeTypeRecord.length; ++i) $root.gamehall.CodeTypeRecord.encode(message.CodeTypeRecord[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCCodeTypeRecord message, length delimited. Does not implicitly {@link gamehall.SCCodeTypeRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCodeTypeRecord * @static * @param {gamehall.ISCCodeTypeRecord} message SCCodeTypeRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCodeTypeRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCodeTypeRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCodeTypeRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCodeTypeRecord} SCCodeTypeRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCodeTypeRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCodeTypeRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowType = reader.int32(); break; } case 2: { if (!(message.CodeTypeRecord && message.CodeTypeRecord.length)) message.CodeTypeRecord = []; message.CodeTypeRecord.push($root.gamehall.CodeTypeRecord.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCodeTypeRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCodeTypeRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCodeTypeRecord} SCCodeTypeRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCodeTypeRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCodeTypeRecord message. * @function verify * @memberof gamehall.SCCodeTypeRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCodeTypeRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowType != null && message.hasOwnProperty("ShowType")) switch (message.ShowType) { default: return "ShowType: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 101: break; } if (message.CodeTypeRecord != null && message.hasOwnProperty("CodeTypeRecord")) { if (!Array.isArray(message.CodeTypeRecord)) return "CodeTypeRecord: array expected"; for (var i = 0; i < message.CodeTypeRecord.length; ++i) { var error = $root.gamehall.CodeTypeRecord.verify(message.CodeTypeRecord[i]); if (error) return "CodeTypeRecord." + error; } } return null; }; /** * Creates a SCCodeTypeRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCodeTypeRecord * @static * @param {Object.} object Plain object * @returns {gamehall.SCCodeTypeRecord} SCCodeTypeRecord */ SCCodeTypeRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCodeTypeRecord) return object; var message = new $root.gamehall.SCCodeTypeRecord(); switch (object.ShowType) { default: if (typeof object.ShowType === "number") { message.ShowType = object.ShowType; break; } break; case "HallOperaZero": case 0: message.ShowType = 0; break; case "HallChessGame": case 1: message.ShowType = 1; break; case "HallElectronicGame": case 2: message.ShowType = 2; break; case "HallFishingGame": case 3: message.ShowType = 3; break; case "HallLiveVideo": case 4: message.ShowType = 4; break; case "HallLotteryGame": case 5: message.ShowType = 5; break; case "HallSportsGame": case 6: message.ShowType = 6; break; case "HallPrivateRoom": case 7: message.ShowType = 7; break; case "HallClubRoom": case 8: message.ShowType = 8; break; case "HallThirdPlt": case 101: message.ShowType = 101; break; } if (object.CodeTypeRecord) { if (!Array.isArray(object.CodeTypeRecord)) throw TypeError(".gamehall.SCCodeTypeRecord.CodeTypeRecord: array expected"); message.CodeTypeRecord = []; for (var i = 0; i < object.CodeTypeRecord.length; ++i) { if (typeof object.CodeTypeRecord[i] !== "object") throw TypeError(".gamehall.SCCodeTypeRecord.CodeTypeRecord: object expected"); message.CodeTypeRecord[i] = $root.gamehall.CodeTypeRecord.fromObject(object.CodeTypeRecord[i]); } } return message; }; /** * Creates a plain object from a SCCodeTypeRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCodeTypeRecord * @static * @param {gamehall.SCCodeTypeRecord} message SCCodeTypeRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCodeTypeRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.CodeTypeRecord = []; if (options.defaults) object.ShowType = options.enums === String ? "HallOperaZero" : 0; if (message.ShowType != null && message.hasOwnProperty("ShowType")) object.ShowType = options.enums === String ? $root.gamehall.HallOperaCode[message.ShowType] === undefined ? message.ShowType : $root.gamehall.HallOperaCode[message.ShowType] : message.ShowType; if (message.CodeTypeRecord && message.CodeTypeRecord.length) { object.CodeTypeRecord = []; for (var j = 0; j < message.CodeTypeRecord.length; ++j) object.CodeTypeRecord[j] = $root.gamehall.CodeTypeRecord.toObject(message.CodeTypeRecord[j], options); } return object; }; /** * Converts this SCCodeTypeRecord to JSON. * @function toJSON * @memberof gamehall.SCCodeTypeRecord * @instance * @returns {Object.} JSON object */ SCCodeTypeRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCodeTypeRecord * @function getTypeUrl * @memberof gamehall.SCCodeTypeRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCodeTypeRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCodeTypeRecord"; }; return SCCodeTypeRecord; })(); gamehall.CSBetCoinRecord = (function() { /** * Properties of a CSBetCoinRecord. * @memberof gamehall * @interface ICSBetCoinRecord * @property {gamehall.HallOperaCode|null} [ShowTypeId] CSBetCoinRecord ShowTypeId * @property {number|Long|null} [TimeIndex] CSBetCoinRecord TimeIndex * @property {number|null} [PageNo] CSBetCoinRecord PageNo */ /** * Constructs a new CSBetCoinRecord. * @memberof gamehall * @classdesc Represents a CSBetCoinRecord. * @implements ICSBetCoinRecord * @constructor * @param {gamehall.ICSBetCoinRecord=} [properties] Properties to set */ function CSBetCoinRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSBetCoinRecord ShowTypeId. * @member {gamehall.HallOperaCode} ShowTypeId * @memberof gamehall.CSBetCoinRecord * @instance */ CSBetCoinRecord.prototype.ShowTypeId = 0; /** * CSBetCoinRecord TimeIndex. * @member {number|Long} TimeIndex * @memberof gamehall.CSBetCoinRecord * @instance */ CSBetCoinRecord.prototype.TimeIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSBetCoinRecord PageNo. * @member {number} PageNo * @memberof gamehall.CSBetCoinRecord * @instance */ CSBetCoinRecord.prototype.PageNo = 0; /** * Creates a new CSBetCoinRecord instance using the specified properties. * @function create * @memberof gamehall.CSBetCoinRecord * @static * @param {gamehall.ICSBetCoinRecord=} [properties] Properties to set * @returns {gamehall.CSBetCoinRecord} CSBetCoinRecord instance */ CSBetCoinRecord.create = function create(properties) { return new CSBetCoinRecord(properties); }; /** * Encodes the specified CSBetCoinRecord message. Does not implicitly {@link gamehall.CSBetCoinRecord.verify|verify} messages. * @function encode * @memberof gamehall.CSBetCoinRecord * @static * @param {gamehall.ICSBetCoinRecord} message CSBetCoinRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSBetCoinRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowTypeId != null && Object.hasOwnProperty.call(message, "ShowTypeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShowTypeId); if (message.TimeIndex != null && Object.hasOwnProperty.call(message, "TimeIndex")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.TimeIndex); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.PageNo); return writer; }; /** * Encodes the specified CSBetCoinRecord message, length delimited. Does not implicitly {@link gamehall.CSBetCoinRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSBetCoinRecord * @static * @param {gamehall.ICSBetCoinRecord} message CSBetCoinRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSBetCoinRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSBetCoinRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.CSBetCoinRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSBetCoinRecord} CSBetCoinRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSBetCoinRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSBetCoinRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowTypeId = reader.int32(); break; } case 2: { message.TimeIndex = reader.int64(); break; } case 3: { message.PageNo = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSBetCoinRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSBetCoinRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSBetCoinRecord} CSBetCoinRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSBetCoinRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSBetCoinRecord message. * @function verify * @memberof gamehall.CSBetCoinRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSBetCoinRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowTypeId != null && message.hasOwnProperty("ShowTypeId")) switch (message.ShowTypeId) { default: return "ShowTypeId: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 101: break; } if (message.TimeIndex != null && message.hasOwnProperty("TimeIndex")) if (!$util.isInteger(message.TimeIndex) && !(message.TimeIndex && $util.isInteger(message.TimeIndex.low) && $util.isInteger(message.TimeIndex.high))) return "TimeIndex: integer|Long expected"; if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; return null; }; /** * Creates a CSBetCoinRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSBetCoinRecord * @static * @param {Object.} object Plain object * @returns {gamehall.CSBetCoinRecord} CSBetCoinRecord */ CSBetCoinRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSBetCoinRecord) return object; var message = new $root.gamehall.CSBetCoinRecord(); switch (object.ShowTypeId) { default: if (typeof object.ShowTypeId === "number") { message.ShowTypeId = object.ShowTypeId; break; } break; case "HallOperaZero": case 0: message.ShowTypeId = 0; break; case "HallChessGame": case 1: message.ShowTypeId = 1; break; case "HallElectronicGame": case 2: message.ShowTypeId = 2; break; case "HallFishingGame": case 3: message.ShowTypeId = 3; break; case "HallLiveVideo": case 4: message.ShowTypeId = 4; break; case "HallLotteryGame": case 5: message.ShowTypeId = 5; break; case "HallSportsGame": case 6: message.ShowTypeId = 6; break; case "HallPrivateRoom": case 7: message.ShowTypeId = 7; break; case "HallClubRoom": case 8: message.ShowTypeId = 8; break; case "HallThirdPlt": case 101: message.ShowTypeId = 101; break; } if (object.TimeIndex != null) if ($util.Long) (message.TimeIndex = $util.Long.fromValue(object.TimeIndex)).unsigned = false; else if (typeof object.TimeIndex === "string") message.TimeIndex = parseInt(object.TimeIndex, 10); else if (typeof object.TimeIndex === "number") message.TimeIndex = object.TimeIndex; else if (typeof object.TimeIndex === "object") message.TimeIndex = new $util.LongBits(object.TimeIndex.low >>> 0, object.TimeIndex.high >>> 0).toNumber(); if (object.PageNo != null) message.PageNo = object.PageNo | 0; return message; }; /** * Creates a plain object from a CSBetCoinRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSBetCoinRecord * @static * @param {gamehall.CSBetCoinRecord} message CSBetCoinRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSBetCoinRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ShowTypeId = options.enums === String ? "HallOperaZero" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TimeIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TimeIndex = options.longs === String ? "0" : 0; object.PageNo = 0; } if (message.ShowTypeId != null && message.hasOwnProperty("ShowTypeId")) object.ShowTypeId = options.enums === String ? $root.gamehall.HallOperaCode[message.ShowTypeId] === undefined ? message.ShowTypeId : $root.gamehall.HallOperaCode[message.ShowTypeId] : message.ShowTypeId; if (message.TimeIndex != null && message.hasOwnProperty("TimeIndex")) if (typeof message.TimeIndex === "number") object.TimeIndex = options.longs === String ? String(message.TimeIndex) : message.TimeIndex; else object.TimeIndex = options.longs === String ? $util.Long.prototype.toString.call(message.TimeIndex) : options.longs === Number ? new $util.LongBits(message.TimeIndex.low >>> 0, message.TimeIndex.high >>> 0).toNumber() : message.TimeIndex; if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; return object; }; /** * Converts this CSBetCoinRecord to JSON. * @function toJSON * @memberof gamehall.CSBetCoinRecord * @instance * @returns {Object.} JSON object */ CSBetCoinRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSBetCoinRecord * @function getTypeUrl * @memberof gamehall.CSBetCoinRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSBetCoinRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSBetCoinRecord"; }; return CSBetCoinRecord; })(); gamehall.BetCoinRecord = (function() { /** * Properties of a BetCoinRecord. * @memberof gamehall * @interface IBetCoinRecord * @property {number|Long|null} [Ts] BetCoinRecord Ts * @property {string|null} [GameName] BetCoinRecord GameName * @property {string|null} [RecordId] BetCoinRecord RecordId * @property {number|Long|null} [BetCoin] BetCoinRecord BetCoin * @property {number|Long|null} [ReceivedCoin] BetCoinRecord ReceivedCoin */ /** * Constructs a new BetCoinRecord. * @memberof gamehall * @classdesc 投注记录 * @implements IBetCoinRecord * @constructor * @param {gamehall.IBetCoinRecord=} [properties] Properties to set */ function BetCoinRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * BetCoinRecord Ts. * @member {number|Long} Ts * @memberof gamehall.BetCoinRecord * @instance */ BetCoinRecord.prototype.Ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * BetCoinRecord GameName. * @member {string} GameName * @memberof gamehall.BetCoinRecord * @instance */ BetCoinRecord.prototype.GameName = ""; /** * BetCoinRecord RecordId. * @member {string} RecordId * @memberof gamehall.BetCoinRecord * @instance */ BetCoinRecord.prototype.RecordId = ""; /** * BetCoinRecord BetCoin. * @member {number|Long} BetCoin * @memberof gamehall.BetCoinRecord * @instance */ BetCoinRecord.prototype.BetCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * BetCoinRecord ReceivedCoin. * @member {number|Long} ReceivedCoin * @memberof gamehall.BetCoinRecord * @instance */ BetCoinRecord.prototype.ReceivedCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new BetCoinRecord instance using the specified properties. * @function create * @memberof gamehall.BetCoinRecord * @static * @param {gamehall.IBetCoinRecord=} [properties] Properties to set * @returns {gamehall.BetCoinRecord} BetCoinRecord instance */ BetCoinRecord.create = function create(properties) { return new BetCoinRecord(properties); }; /** * Encodes the specified BetCoinRecord message. Does not implicitly {@link gamehall.BetCoinRecord.verify|verify} messages. * @function encode * @memberof gamehall.BetCoinRecord * @static * @param {gamehall.IBetCoinRecord} message BetCoinRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BetCoinRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.Ts); if (message.GameName != null && Object.hasOwnProperty.call(message, "GameName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.GameName); if (message.RecordId != null && Object.hasOwnProperty.call(message, "RecordId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.RecordId); if (message.BetCoin != null && Object.hasOwnProperty.call(message, "BetCoin")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.BetCoin); if (message.ReceivedCoin != null && Object.hasOwnProperty.call(message, "ReceivedCoin")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ReceivedCoin); return writer; }; /** * Encodes the specified BetCoinRecord message, length delimited. Does not implicitly {@link gamehall.BetCoinRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.BetCoinRecord * @static * @param {gamehall.IBetCoinRecord} message BetCoinRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BetCoinRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a BetCoinRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.BetCoinRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.BetCoinRecord} BetCoinRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BetCoinRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.BetCoinRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Ts = reader.int64(); break; } case 2: { message.GameName = reader.string(); break; } case 3: { message.RecordId = reader.string(); break; } case 4: { message.BetCoin = reader.int64(); break; } case 5: { message.ReceivedCoin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a BetCoinRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.BetCoinRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.BetCoinRecord} BetCoinRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BetCoinRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a BetCoinRecord message. * @function verify * @memberof gamehall.BetCoinRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BetCoinRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts) && !(message.Ts && $util.isInteger(message.Ts.low) && $util.isInteger(message.Ts.high))) return "Ts: integer|Long expected"; if (message.GameName != null && message.hasOwnProperty("GameName")) if (!$util.isString(message.GameName)) return "GameName: string expected"; if (message.RecordId != null && message.hasOwnProperty("RecordId")) if (!$util.isString(message.RecordId)) return "RecordId: string expected"; if (message.BetCoin != null && message.hasOwnProperty("BetCoin")) if (!$util.isInteger(message.BetCoin) && !(message.BetCoin && $util.isInteger(message.BetCoin.low) && $util.isInteger(message.BetCoin.high))) return "BetCoin: integer|Long expected"; if (message.ReceivedCoin != null && message.hasOwnProperty("ReceivedCoin")) if (!$util.isInteger(message.ReceivedCoin) && !(message.ReceivedCoin && $util.isInteger(message.ReceivedCoin.low) && $util.isInteger(message.ReceivedCoin.high))) return "ReceivedCoin: integer|Long expected"; return null; }; /** * Creates a BetCoinRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.BetCoinRecord * @static * @param {Object.} object Plain object * @returns {gamehall.BetCoinRecord} BetCoinRecord */ BetCoinRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.BetCoinRecord) return object; var message = new $root.gamehall.BetCoinRecord(); if (object.Ts != null) if ($util.Long) (message.Ts = $util.Long.fromValue(object.Ts)).unsigned = false; else if (typeof object.Ts === "string") message.Ts = parseInt(object.Ts, 10); else if (typeof object.Ts === "number") message.Ts = object.Ts; else if (typeof object.Ts === "object") message.Ts = new $util.LongBits(object.Ts.low >>> 0, object.Ts.high >>> 0).toNumber(); if (object.GameName != null) message.GameName = String(object.GameName); if (object.RecordId != null) message.RecordId = String(object.RecordId); if (object.BetCoin != null) if ($util.Long) (message.BetCoin = $util.Long.fromValue(object.BetCoin)).unsigned = false; else if (typeof object.BetCoin === "string") message.BetCoin = parseInt(object.BetCoin, 10); else if (typeof object.BetCoin === "number") message.BetCoin = object.BetCoin; else if (typeof object.BetCoin === "object") message.BetCoin = new $util.LongBits(object.BetCoin.low >>> 0, object.BetCoin.high >>> 0).toNumber(); if (object.ReceivedCoin != null) if ($util.Long) (message.ReceivedCoin = $util.Long.fromValue(object.ReceivedCoin)).unsigned = false; else if (typeof object.ReceivedCoin === "string") message.ReceivedCoin = parseInt(object.ReceivedCoin, 10); else if (typeof object.ReceivedCoin === "number") message.ReceivedCoin = object.ReceivedCoin; else if (typeof object.ReceivedCoin === "object") message.ReceivedCoin = new $util.LongBits(object.ReceivedCoin.low >>> 0, object.ReceivedCoin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a BetCoinRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.BetCoinRecord * @static * @param {gamehall.BetCoinRecord} message BetCoinRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ BetCoinRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.Ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Ts = options.longs === String ? "0" : 0; object.GameName = ""; object.RecordId = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.BetCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.BetCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.ReceivedCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ReceivedCoin = options.longs === String ? "0" : 0; } if (message.Ts != null && message.hasOwnProperty("Ts")) if (typeof message.Ts === "number") object.Ts = options.longs === String ? String(message.Ts) : message.Ts; else object.Ts = options.longs === String ? $util.Long.prototype.toString.call(message.Ts) : options.longs === Number ? new $util.LongBits(message.Ts.low >>> 0, message.Ts.high >>> 0).toNumber() : message.Ts; if (message.GameName != null && message.hasOwnProperty("GameName")) object.GameName = message.GameName; if (message.RecordId != null && message.hasOwnProperty("RecordId")) object.RecordId = message.RecordId; if (message.BetCoin != null && message.hasOwnProperty("BetCoin")) if (typeof message.BetCoin === "number") object.BetCoin = options.longs === String ? String(message.BetCoin) : message.BetCoin; else object.BetCoin = options.longs === String ? $util.Long.prototype.toString.call(message.BetCoin) : options.longs === Number ? new $util.LongBits(message.BetCoin.low >>> 0, message.BetCoin.high >>> 0).toNumber() : message.BetCoin; if (message.ReceivedCoin != null && message.hasOwnProperty("ReceivedCoin")) if (typeof message.ReceivedCoin === "number") object.ReceivedCoin = options.longs === String ? String(message.ReceivedCoin) : message.ReceivedCoin; else object.ReceivedCoin = options.longs === String ? $util.Long.prototype.toString.call(message.ReceivedCoin) : options.longs === Number ? new $util.LongBits(message.ReceivedCoin.low >>> 0, message.ReceivedCoin.high >>> 0).toNumber() : message.ReceivedCoin; return object; }; /** * Converts this BetCoinRecord to JSON. * @function toJSON * @memberof gamehall.BetCoinRecord * @instance * @returns {Object.} JSON object */ BetCoinRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for BetCoinRecord * @function getTypeUrl * @memberof gamehall.BetCoinRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ BetCoinRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.BetCoinRecord"; }; return BetCoinRecord; })(); gamehall.SCBetCoinRecord = (function() { /** * Properties of a SCBetCoinRecord. * @memberof gamehall * @interface ISCBetCoinRecord * @property {Array.|null} [BetCoinRecord] SCBetCoinRecord BetCoinRecord * @property {number|null} [PageNo] SCBetCoinRecord PageNo * @property {number|null} [PageSize] SCBetCoinRecord PageSize * @property {number|null} [PageNum] SCBetCoinRecord PageNum */ /** * Constructs a new SCBetCoinRecord. * @memberof gamehall * @classdesc Represents a SCBetCoinRecord. * @implements ISCBetCoinRecord * @constructor * @param {gamehall.ISCBetCoinRecord=} [properties] Properties to set */ function SCBetCoinRecord(properties) { this.BetCoinRecord = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCBetCoinRecord BetCoinRecord. * @member {Array.} BetCoinRecord * @memberof gamehall.SCBetCoinRecord * @instance */ SCBetCoinRecord.prototype.BetCoinRecord = $util.emptyArray; /** * SCBetCoinRecord PageNo. * @member {number} PageNo * @memberof gamehall.SCBetCoinRecord * @instance */ SCBetCoinRecord.prototype.PageNo = 0; /** * SCBetCoinRecord PageSize. * @member {number} PageSize * @memberof gamehall.SCBetCoinRecord * @instance */ SCBetCoinRecord.prototype.PageSize = 0; /** * SCBetCoinRecord PageNum. * @member {number} PageNum * @memberof gamehall.SCBetCoinRecord * @instance */ SCBetCoinRecord.prototype.PageNum = 0; /** * Creates a new SCBetCoinRecord instance using the specified properties. * @function create * @memberof gamehall.SCBetCoinRecord * @static * @param {gamehall.ISCBetCoinRecord=} [properties] Properties to set * @returns {gamehall.SCBetCoinRecord} SCBetCoinRecord instance */ SCBetCoinRecord.create = function create(properties) { return new SCBetCoinRecord(properties); }; /** * Encodes the specified SCBetCoinRecord message. Does not implicitly {@link gamehall.SCBetCoinRecord.verify|verify} messages. * @function encode * @memberof gamehall.SCBetCoinRecord * @static * @param {gamehall.ISCBetCoinRecord} message SCBetCoinRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCBetCoinRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.BetCoinRecord != null && message.BetCoinRecord.length) for (var i = 0; i < message.BetCoinRecord.length; ++i) $root.gamehall.BetCoinRecord.encode(message.BetCoinRecord[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.PageNo); if (message.PageSize != null && Object.hasOwnProperty.call(message, "PageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.PageSize); if (message.PageNum != null && Object.hasOwnProperty.call(message, "PageNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.PageNum); return writer; }; /** * Encodes the specified SCBetCoinRecord message, length delimited. Does not implicitly {@link gamehall.SCBetCoinRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCBetCoinRecord * @static * @param {gamehall.ISCBetCoinRecord} message SCBetCoinRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCBetCoinRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCBetCoinRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.SCBetCoinRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCBetCoinRecord} SCBetCoinRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCBetCoinRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCBetCoinRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.BetCoinRecord && message.BetCoinRecord.length)) message.BetCoinRecord = []; message.BetCoinRecord.push($root.gamehall.BetCoinRecord.decode(reader, reader.uint32())); break; } case 2: { message.PageNo = reader.int32(); break; } case 3: { message.PageSize = reader.int32(); break; } case 4: { message.PageNum = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCBetCoinRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCBetCoinRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCBetCoinRecord} SCBetCoinRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCBetCoinRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCBetCoinRecord message. * @function verify * @memberof gamehall.SCBetCoinRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCBetCoinRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.BetCoinRecord != null && message.hasOwnProperty("BetCoinRecord")) { if (!Array.isArray(message.BetCoinRecord)) return "BetCoinRecord: array expected"; for (var i = 0; i < message.BetCoinRecord.length; ++i) { var error = $root.gamehall.BetCoinRecord.verify(message.BetCoinRecord[i]); if (error) return "BetCoinRecord." + error; } } if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; if (message.PageSize != null && message.hasOwnProperty("PageSize")) if (!$util.isInteger(message.PageSize)) return "PageSize: integer expected"; if (message.PageNum != null && message.hasOwnProperty("PageNum")) if (!$util.isInteger(message.PageNum)) return "PageNum: integer expected"; return null; }; /** * Creates a SCBetCoinRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCBetCoinRecord * @static * @param {Object.} object Plain object * @returns {gamehall.SCBetCoinRecord} SCBetCoinRecord */ SCBetCoinRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCBetCoinRecord) return object; var message = new $root.gamehall.SCBetCoinRecord(); if (object.BetCoinRecord) { if (!Array.isArray(object.BetCoinRecord)) throw TypeError(".gamehall.SCBetCoinRecord.BetCoinRecord: array expected"); message.BetCoinRecord = []; for (var i = 0; i < object.BetCoinRecord.length; ++i) { if (typeof object.BetCoinRecord[i] !== "object") throw TypeError(".gamehall.SCBetCoinRecord.BetCoinRecord: object expected"); message.BetCoinRecord[i] = $root.gamehall.BetCoinRecord.fromObject(object.BetCoinRecord[i]); } } if (object.PageNo != null) message.PageNo = object.PageNo | 0; if (object.PageSize != null) message.PageSize = object.PageSize | 0; if (object.PageNum != null) message.PageNum = object.PageNum | 0; return message; }; /** * Creates a plain object from a SCBetCoinRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCBetCoinRecord * @static * @param {gamehall.SCBetCoinRecord} message SCBetCoinRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCBetCoinRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.BetCoinRecord = []; if (options.defaults) { object.PageNo = 0; object.PageSize = 0; object.PageNum = 0; } if (message.BetCoinRecord && message.BetCoinRecord.length) { object.BetCoinRecord = []; for (var j = 0; j < message.BetCoinRecord.length; ++j) object.BetCoinRecord[j] = $root.gamehall.BetCoinRecord.toObject(message.BetCoinRecord[j], options); } if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; if (message.PageSize != null && message.hasOwnProperty("PageSize")) object.PageSize = message.PageSize; if (message.PageNum != null && message.hasOwnProperty("PageNum")) object.PageNum = message.PageNum; return object; }; /** * Converts this SCBetCoinRecord to JSON. * @function toJSON * @memberof gamehall.SCBetCoinRecord * @instance * @returns {Object.} JSON object */ SCBetCoinRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCBetCoinRecord * @function getTypeUrl * @memberof gamehall.SCBetCoinRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCBetCoinRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCBetCoinRecord"; }; return SCBetCoinRecord; })(); gamehall.CSCoinDetailed = (function() { /** * Properties of a CSCoinDetailed. * @memberof gamehall * @interface ICSCoinDetailed * @property {number|Long|null} [TimeIndex] CSCoinDetailed TimeIndex * @property {number|Long|null} [CoinType] CSCoinDetailed CoinType * @property {number|null} [PageNo] CSCoinDetailed PageNo */ /** * Constructs a new CSCoinDetailed. * @memberof gamehall * @classdesc Represents a CSCoinDetailed. * @implements ICSCoinDetailed * @constructor * @param {gamehall.ICSCoinDetailed=} [properties] Properties to set */ function CSCoinDetailed(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSCoinDetailed TimeIndex. * @member {number|Long} TimeIndex * @memberof gamehall.CSCoinDetailed * @instance */ CSCoinDetailed.prototype.TimeIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSCoinDetailed CoinType. * @member {number|Long} CoinType * @memberof gamehall.CSCoinDetailed * @instance */ CSCoinDetailed.prototype.CoinType = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSCoinDetailed PageNo. * @member {number} PageNo * @memberof gamehall.CSCoinDetailed * @instance */ CSCoinDetailed.prototype.PageNo = 0; /** * Creates a new CSCoinDetailed instance using the specified properties. * @function create * @memberof gamehall.CSCoinDetailed * @static * @param {gamehall.ICSCoinDetailed=} [properties] Properties to set * @returns {gamehall.CSCoinDetailed} CSCoinDetailed instance */ CSCoinDetailed.create = function create(properties) { return new CSCoinDetailed(properties); }; /** * Encodes the specified CSCoinDetailed message. Does not implicitly {@link gamehall.CSCoinDetailed.verify|verify} messages. * @function encode * @memberof gamehall.CSCoinDetailed * @static * @param {gamehall.ICSCoinDetailed} message CSCoinDetailed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinDetailed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.TimeIndex != null && Object.hasOwnProperty.call(message, "TimeIndex")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.TimeIndex); if (message.CoinType != null && Object.hasOwnProperty.call(message, "CoinType")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.CoinType); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.PageNo); return writer; }; /** * Encodes the specified CSCoinDetailed message, length delimited. Does not implicitly {@link gamehall.CSCoinDetailed.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSCoinDetailed * @static * @param {gamehall.ICSCoinDetailed} message CSCoinDetailed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCoinDetailed.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCoinDetailed message from the specified reader or buffer. * @function decode * @memberof gamehall.CSCoinDetailed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSCoinDetailed} CSCoinDetailed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinDetailed.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSCoinDetailed(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.TimeIndex = reader.int64(); break; } case 2: { message.CoinType = reader.int64(); break; } case 3: { message.PageNo = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCoinDetailed message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSCoinDetailed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSCoinDetailed} CSCoinDetailed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCoinDetailed.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCoinDetailed message. * @function verify * @memberof gamehall.CSCoinDetailed * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCoinDetailed.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.TimeIndex != null && message.hasOwnProperty("TimeIndex")) if (!$util.isInteger(message.TimeIndex) && !(message.TimeIndex && $util.isInteger(message.TimeIndex.low) && $util.isInteger(message.TimeIndex.high))) return "TimeIndex: integer|Long expected"; if (message.CoinType != null && message.hasOwnProperty("CoinType")) if (!$util.isInteger(message.CoinType) && !(message.CoinType && $util.isInteger(message.CoinType.low) && $util.isInteger(message.CoinType.high))) return "CoinType: integer|Long expected"; if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; return null; }; /** * Creates a CSCoinDetailed message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSCoinDetailed * @static * @param {Object.} object Plain object * @returns {gamehall.CSCoinDetailed} CSCoinDetailed */ CSCoinDetailed.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSCoinDetailed) return object; var message = new $root.gamehall.CSCoinDetailed(); if (object.TimeIndex != null) if ($util.Long) (message.TimeIndex = $util.Long.fromValue(object.TimeIndex)).unsigned = false; else if (typeof object.TimeIndex === "string") message.TimeIndex = parseInt(object.TimeIndex, 10); else if (typeof object.TimeIndex === "number") message.TimeIndex = object.TimeIndex; else if (typeof object.TimeIndex === "object") message.TimeIndex = new $util.LongBits(object.TimeIndex.low >>> 0, object.TimeIndex.high >>> 0).toNumber(); if (object.CoinType != null) if ($util.Long) (message.CoinType = $util.Long.fromValue(object.CoinType)).unsigned = false; else if (typeof object.CoinType === "string") message.CoinType = parseInt(object.CoinType, 10); else if (typeof object.CoinType === "number") message.CoinType = object.CoinType; else if (typeof object.CoinType === "object") message.CoinType = new $util.LongBits(object.CoinType.low >>> 0, object.CoinType.high >>> 0).toNumber(); if (object.PageNo != null) message.PageNo = object.PageNo | 0; return message; }; /** * Creates a plain object from a CSCoinDetailed message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSCoinDetailed * @static * @param {gamehall.CSCoinDetailed} message CSCoinDetailed * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCoinDetailed.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.TimeIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TimeIndex = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.CoinType = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.CoinType = options.longs === String ? "0" : 0; object.PageNo = 0; } if (message.TimeIndex != null && message.hasOwnProperty("TimeIndex")) if (typeof message.TimeIndex === "number") object.TimeIndex = options.longs === String ? String(message.TimeIndex) : message.TimeIndex; else object.TimeIndex = options.longs === String ? $util.Long.prototype.toString.call(message.TimeIndex) : options.longs === Number ? new $util.LongBits(message.TimeIndex.low >>> 0, message.TimeIndex.high >>> 0).toNumber() : message.TimeIndex; if (message.CoinType != null && message.hasOwnProperty("CoinType")) if (typeof message.CoinType === "number") object.CoinType = options.longs === String ? String(message.CoinType) : message.CoinType; else object.CoinType = options.longs === String ? $util.Long.prototype.toString.call(message.CoinType) : options.longs === Number ? new $util.LongBits(message.CoinType.low >>> 0, message.CoinType.high >>> 0).toNumber() : message.CoinType; if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; return object; }; /** * Converts this CSCoinDetailed to JSON. * @function toJSON * @memberof gamehall.CSCoinDetailed * @instance * @returns {Object.} JSON object */ CSCoinDetailed.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCoinDetailed * @function getTypeUrl * @memberof gamehall.CSCoinDetailed * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCoinDetailed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSCoinDetailed"; }; return CSCoinDetailed; })(); gamehall.CoinDetailed = (function() { /** * Properties of a CoinDetailed. * @memberof gamehall * @interface ICoinDetailed * @property {number|Long|null} [Ts] CoinDetailed Ts * @property {number|Long|null} [CoinType] CoinDetailed CoinType * @property {number|Long|null} [Income] CoinDetailed Income * @property {number|Long|null} [Disburse] CoinDetailed Disburse * @property {number|Long|null} [Coin] CoinDetailed Coin */ /** * Constructs a new CoinDetailed. * @memberof gamehall * @classdesc 账户明细 * @implements ICoinDetailed * @constructor * @param {gamehall.ICoinDetailed=} [properties] Properties to set */ function CoinDetailed(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CoinDetailed Ts. * @member {number|Long} Ts * @memberof gamehall.CoinDetailed * @instance */ CoinDetailed.prototype.Ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CoinDetailed CoinType. * @member {number|Long} CoinType * @memberof gamehall.CoinDetailed * @instance */ CoinDetailed.prototype.CoinType = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CoinDetailed Income. * @member {number|Long} Income * @memberof gamehall.CoinDetailed * @instance */ CoinDetailed.prototype.Income = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CoinDetailed Disburse. * @member {number|Long} Disburse * @memberof gamehall.CoinDetailed * @instance */ CoinDetailed.prototype.Disburse = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CoinDetailed Coin. * @member {number|Long} Coin * @memberof gamehall.CoinDetailed * @instance */ CoinDetailed.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CoinDetailed instance using the specified properties. * @function create * @memberof gamehall.CoinDetailed * @static * @param {gamehall.ICoinDetailed=} [properties] Properties to set * @returns {gamehall.CoinDetailed} CoinDetailed instance */ CoinDetailed.create = function create(properties) { return new CoinDetailed(properties); }; /** * Encodes the specified CoinDetailed message. Does not implicitly {@link gamehall.CoinDetailed.verify|verify} messages. * @function encode * @memberof gamehall.CoinDetailed * @static * @param {gamehall.ICoinDetailed} message CoinDetailed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CoinDetailed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.Ts); if (message.CoinType != null && Object.hasOwnProperty.call(message, "CoinType")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.CoinType); if (message.Income != null && Object.hasOwnProperty.call(message, "Income")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.Income); if (message.Disburse != null && Object.hasOwnProperty.call(message, "Disburse")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.Disburse); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.Coin); return writer; }; /** * Encodes the specified CoinDetailed message, length delimited. Does not implicitly {@link gamehall.CoinDetailed.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CoinDetailed * @static * @param {gamehall.ICoinDetailed} message CoinDetailed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CoinDetailed.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CoinDetailed message from the specified reader or buffer. * @function decode * @memberof gamehall.CoinDetailed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CoinDetailed} CoinDetailed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CoinDetailed.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CoinDetailed(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Ts = reader.int64(); break; } case 2: { message.CoinType = reader.int64(); break; } case 3: { message.Income = reader.int64(); break; } case 4: { message.Disburse = reader.int64(); break; } case 5: { message.Coin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CoinDetailed message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CoinDetailed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CoinDetailed} CoinDetailed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CoinDetailed.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CoinDetailed message. * @function verify * @memberof gamehall.CoinDetailed * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CoinDetailed.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts) && !(message.Ts && $util.isInteger(message.Ts.low) && $util.isInteger(message.Ts.high))) return "Ts: integer|Long expected"; if (message.CoinType != null && message.hasOwnProperty("CoinType")) if (!$util.isInteger(message.CoinType) && !(message.CoinType && $util.isInteger(message.CoinType.low) && $util.isInteger(message.CoinType.high))) return "CoinType: integer|Long expected"; if (message.Income != null && message.hasOwnProperty("Income")) if (!$util.isInteger(message.Income) && !(message.Income && $util.isInteger(message.Income.low) && $util.isInteger(message.Income.high))) return "Income: integer|Long expected"; if (message.Disburse != null && message.hasOwnProperty("Disburse")) if (!$util.isInteger(message.Disburse) && !(message.Disburse && $util.isInteger(message.Disburse.low) && $util.isInteger(message.Disburse.high))) return "Disburse: integer|Long expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; return null; }; /** * Creates a CoinDetailed message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CoinDetailed * @static * @param {Object.} object Plain object * @returns {gamehall.CoinDetailed} CoinDetailed */ CoinDetailed.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CoinDetailed) return object; var message = new $root.gamehall.CoinDetailed(); if (object.Ts != null) if ($util.Long) (message.Ts = $util.Long.fromValue(object.Ts)).unsigned = false; else if (typeof object.Ts === "string") message.Ts = parseInt(object.Ts, 10); else if (typeof object.Ts === "number") message.Ts = object.Ts; else if (typeof object.Ts === "object") message.Ts = new $util.LongBits(object.Ts.low >>> 0, object.Ts.high >>> 0).toNumber(); if (object.CoinType != null) if ($util.Long) (message.CoinType = $util.Long.fromValue(object.CoinType)).unsigned = false; else if (typeof object.CoinType === "string") message.CoinType = parseInt(object.CoinType, 10); else if (typeof object.CoinType === "number") message.CoinType = object.CoinType; else if (typeof object.CoinType === "object") message.CoinType = new $util.LongBits(object.CoinType.low >>> 0, object.CoinType.high >>> 0).toNumber(); if (object.Income != null) if ($util.Long) (message.Income = $util.Long.fromValue(object.Income)).unsigned = false; else if (typeof object.Income === "string") message.Income = parseInt(object.Income, 10); else if (typeof object.Income === "number") message.Income = object.Income; else if (typeof object.Income === "object") message.Income = new $util.LongBits(object.Income.low >>> 0, object.Income.high >>> 0).toNumber(); if (object.Disburse != null) if ($util.Long) (message.Disburse = $util.Long.fromValue(object.Disburse)).unsigned = false; else if (typeof object.Disburse === "string") message.Disburse = parseInt(object.Disburse, 10); else if (typeof object.Disburse === "number") message.Disburse = object.Disburse; else if (typeof object.Disburse === "object") message.Disburse = new $util.LongBits(object.Disburse.low >>> 0, object.Disburse.high >>> 0).toNumber(); if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CoinDetailed message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CoinDetailed * @static * @param {gamehall.CoinDetailed} message CoinDetailed * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CoinDetailed.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.Ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Ts = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.CoinType = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.CoinType = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Income = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Income = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Disburse = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Disburse = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; } if (message.Ts != null && message.hasOwnProperty("Ts")) if (typeof message.Ts === "number") object.Ts = options.longs === String ? String(message.Ts) : message.Ts; else object.Ts = options.longs === String ? $util.Long.prototype.toString.call(message.Ts) : options.longs === Number ? new $util.LongBits(message.Ts.low >>> 0, message.Ts.high >>> 0).toNumber() : message.Ts; if (message.CoinType != null && message.hasOwnProperty("CoinType")) if (typeof message.CoinType === "number") object.CoinType = options.longs === String ? String(message.CoinType) : message.CoinType; else object.CoinType = options.longs === String ? $util.Long.prototype.toString.call(message.CoinType) : options.longs === Number ? new $util.LongBits(message.CoinType.low >>> 0, message.CoinType.high >>> 0).toNumber() : message.CoinType; if (message.Income != null && message.hasOwnProperty("Income")) if (typeof message.Income === "number") object.Income = options.longs === String ? String(message.Income) : message.Income; else object.Income = options.longs === String ? $util.Long.prototype.toString.call(message.Income) : options.longs === Number ? new $util.LongBits(message.Income.low >>> 0, message.Income.high >>> 0).toNumber() : message.Income; if (message.Disburse != null && message.hasOwnProperty("Disburse")) if (typeof message.Disburse === "number") object.Disburse = options.longs === String ? String(message.Disburse) : message.Disburse; else object.Disburse = options.longs === String ? $util.Long.prototype.toString.call(message.Disburse) : options.longs === Number ? new $util.LongBits(message.Disburse.low >>> 0, message.Disburse.high >>> 0).toNumber() : message.Disburse; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; return object; }; /** * Converts this CoinDetailed to JSON. * @function toJSON * @memberof gamehall.CoinDetailed * @instance * @returns {Object.} JSON object */ CoinDetailed.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CoinDetailed * @function getTypeUrl * @memberof gamehall.CoinDetailed * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CoinDetailed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CoinDetailed"; }; return CoinDetailed; })(); gamehall.SCCoinDetailedTotal = (function() { /** * Properties of a SCCoinDetailedTotal. * @memberof gamehall * @interface ISCCoinDetailedTotal * @property {Array.|null} [CoinDetailed] SCCoinDetailedTotal CoinDetailed * @property {number|null} [PageNo] SCCoinDetailedTotal PageNo * @property {number|null} [PageSize] SCCoinDetailedTotal PageSize * @property {number|null} [PageNum] SCCoinDetailedTotal PageNum */ /** * Constructs a new SCCoinDetailedTotal. * @memberof gamehall * @classdesc Represents a SCCoinDetailedTotal. * @implements ISCCoinDetailedTotal * @constructor * @param {gamehall.ISCCoinDetailedTotal=} [properties] Properties to set */ function SCCoinDetailedTotal(properties) { this.CoinDetailed = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCoinDetailedTotal CoinDetailed. * @member {Array.} CoinDetailed * @memberof gamehall.SCCoinDetailedTotal * @instance */ SCCoinDetailedTotal.prototype.CoinDetailed = $util.emptyArray; /** * SCCoinDetailedTotal PageNo. * @member {number} PageNo * @memberof gamehall.SCCoinDetailedTotal * @instance */ SCCoinDetailedTotal.prototype.PageNo = 0; /** * SCCoinDetailedTotal PageSize. * @member {number} PageSize * @memberof gamehall.SCCoinDetailedTotal * @instance */ SCCoinDetailedTotal.prototype.PageSize = 0; /** * SCCoinDetailedTotal PageNum. * @member {number} PageNum * @memberof gamehall.SCCoinDetailedTotal * @instance */ SCCoinDetailedTotal.prototype.PageNum = 0; /** * Creates a new SCCoinDetailedTotal instance using the specified properties. * @function create * @memberof gamehall.SCCoinDetailedTotal * @static * @param {gamehall.ISCCoinDetailedTotal=} [properties] Properties to set * @returns {gamehall.SCCoinDetailedTotal} SCCoinDetailedTotal instance */ SCCoinDetailedTotal.create = function create(properties) { return new SCCoinDetailedTotal(properties); }; /** * Encodes the specified SCCoinDetailedTotal message. Does not implicitly {@link gamehall.SCCoinDetailedTotal.verify|verify} messages. * @function encode * @memberof gamehall.SCCoinDetailedTotal * @static * @param {gamehall.ISCCoinDetailedTotal} message SCCoinDetailedTotal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinDetailedTotal.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.CoinDetailed != null && message.CoinDetailed.length) for (var i = 0; i < message.CoinDetailed.length; ++i) $root.gamehall.CoinDetailed.encode(message.CoinDetailed[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.PageNo); if (message.PageSize != null && Object.hasOwnProperty.call(message, "PageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.PageSize); if (message.PageNum != null && Object.hasOwnProperty.call(message, "PageNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.PageNum); return writer; }; /** * Encodes the specified SCCoinDetailedTotal message, length delimited. Does not implicitly {@link gamehall.SCCoinDetailedTotal.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCoinDetailedTotal * @static * @param {gamehall.ISCCoinDetailedTotal} message SCCoinDetailedTotal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinDetailedTotal.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCoinDetailedTotal message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCoinDetailedTotal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCoinDetailedTotal} SCCoinDetailedTotal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinDetailedTotal.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCoinDetailedTotal(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.CoinDetailed && message.CoinDetailed.length)) message.CoinDetailed = []; message.CoinDetailed.push($root.gamehall.CoinDetailed.decode(reader, reader.uint32())); break; } case 2: { message.PageNo = reader.int32(); break; } case 3: { message.PageSize = reader.int32(); break; } case 4: { message.PageNum = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCoinDetailedTotal message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCoinDetailedTotal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCoinDetailedTotal} SCCoinDetailedTotal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinDetailedTotal.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCoinDetailedTotal message. * @function verify * @memberof gamehall.SCCoinDetailedTotal * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCoinDetailedTotal.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.CoinDetailed != null && message.hasOwnProperty("CoinDetailed")) { if (!Array.isArray(message.CoinDetailed)) return "CoinDetailed: array expected"; for (var i = 0; i < message.CoinDetailed.length; ++i) { var error = $root.gamehall.CoinDetailed.verify(message.CoinDetailed[i]); if (error) return "CoinDetailed." + error; } } if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; if (message.PageSize != null && message.hasOwnProperty("PageSize")) if (!$util.isInteger(message.PageSize)) return "PageSize: integer expected"; if (message.PageNum != null && message.hasOwnProperty("PageNum")) if (!$util.isInteger(message.PageNum)) return "PageNum: integer expected"; return null; }; /** * Creates a SCCoinDetailedTotal message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCoinDetailedTotal * @static * @param {Object.} object Plain object * @returns {gamehall.SCCoinDetailedTotal} SCCoinDetailedTotal */ SCCoinDetailedTotal.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCoinDetailedTotal) return object; var message = new $root.gamehall.SCCoinDetailedTotal(); if (object.CoinDetailed) { if (!Array.isArray(object.CoinDetailed)) throw TypeError(".gamehall.SCCoinDetailedTotal.CoinDetailed: array expected"); message.CoinDetailed = []; for (var i = 0; i < object.CoinDetailed.length; ++i) { if (typeof object.CoinDetailed[i] !== "object") throw TypeError(".gamehall.SCCoinDetailedTotal.CoinDetailed: object expected"); message.CoinDetailed[i] = $root.gamehall.CoinDetailed.fromObject(object.CoinDetailed[i]); } } if (object.PageNo != null) message.PageNo = object.PageNo | 0; if (object.PageSize != null) message.PageSize = object.PageSize | 0; if (object.PageNum != null) message.PageNum = object.PageNum | 0; return message; }; /** * Creates a plain object from a SCCoinDetailedTotal message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCoinDetailedTotal * @static * @param {gamehall.SCCoinDetailedTotal} message SCCoinDetailedTotal * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCoinDetailedTotal.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.CoinDetailed = []; if (options.defaults) { object.PageNo = 0; object.PageSize = 0; object.PageNum = 0; } if (message.CoinDetailed && message.CoinDetailed.length) { object.CoinDetailed = []; for (var j = 0; j < message.CoinDetailed.length; ++j) object.CoinDetailed[j] = $root.gamehall.CoinDetailed.toObject(message.CoinDetailed[j], options); } if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; if (message.PageSize != null && message.hasOwnProperty("PageSize")) object.PageSize = message.PageSize; if (message.PageNum != null && message.hasOwnProperty("PageNum")) object.PageNum = message.PageNum; return object; }; /** * Converts this SCCoinDetailedTotal to JSON. * @function toJSON * @memberof gamehall.SCCoinDetailedTotal * @instance * @returns {Object.} JSON object */ SCCoinDetailedTotal.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCoinDetailedTotal * @function getTypeUrl * @memberof gamehall.SCCoinDetailedTotal * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCoinDetailedTotal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCoinDetailedTotal"; }; return SCCoinDetailedTotal; })(); gamehall.SCCoinTotal = (function() { /** * Properties of a SCCoinTotal. * @memberof gamehall * @interface ISCCoinTotal * @property {number|Long|null} [RechargeCoin] SCCoinTotal RechargeCoin * @property {number|Long|null} [ExchangeCoin] SCCoinTotal ExchangeCoin * @property {number|Long|null} [ClubAddCoin] SCCoinTotal ClubAddCoin * @property {number|Long|null} [RebateCoin] SCCoinTotal RebateCoin * @property {number|Long|null} [Activity] SCCoinTotal Activity * @property {Array.|null} [TransactionType] SCCoinTotal TransactionType */ /** * Constructs a new SCCoinTotal. * @memberof gamehall * @classdesc Represents a SCCoinTotal. * @implements ISCCoinTotal * @constructor * @param {gamehall.ISCCoinTotal=} [properties] Properties to set */ function SCCoinTotal(properties) { this.TransactionType = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCCoinTotal RechargeCoin. * @member {number|Long} RechargeCoin * @memberof gamehall.SCCoinTotal * @instance */ SCCoinTotal.prototype.RechargeCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCCoinTotal ExchangeCoin. * @member {number|Long} ExchangeCoin * @memberof gamehall.SCCoinTotal * @instance */ SCCoinTotal.prototype.ExchangeCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCCoinTotal ClubAddCoin. * @member {number|Long} ClubAddCoin * @memberof gamehall.SCCoinTotal * @instance */ SCCoinTotal.prototype.ClubAddCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCCoinTotal RebateCoin. * @member {number|Long} RebateCoin * @memberof gamehall.SCCoinTotal * @instance */ SCCoinTotal.prototype.RebateCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCCoinTotal Activity. * @member {number|Long} Activity * @memberof gamehall.SCCoinTotal * @instance */ SCCoinTotal.prototype.Activity = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCCoinTotal TransactionType. * @member {Array.} TransactionType * @memberof gamehall.SCCoinTotal * @instance */ SCCoinTotal.prototype.TransactionType = $util.emptyArray; /** * Creates a new SCCoinTotal instance using the specified properties. * @function create * @memberof gamehall.SCCoinTotal * @static * @param {gamehall.ISCCoinTotal=} [properties] Properties to set * @returns {gamehall.SCCoinTotal} SCCoinTotal instance */ SCCoinTotal.create = function create(properties) { return new SCCoinTotal(properties); }; /** * Encodes the specified SCCoinTotal message. Does not implicitly {@link gamehall.SCCoinTotal.verify|verify} messages. * @function encode * @memberof gamehall.SCCoinTotal * @static * @param {gamehall.ISCCoinTotal} message SCCoinTotal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinTotal.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.RechargeCoin != null && Object.hasOwnProperty.call(message, "RechargeCoin")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.RechargeCoin); if (message.ExchangeCoin != null && Object.hasOwnProperty.call(message, "ExchangeCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ExchangeCoin); if (message.ClubAddCoin != null && Object.hasOwnProperty.call(message, "ClubAddCoin")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.ClubAddCoin); if (message.RebateCoin != null && Object.hasOwnProperty.call(message, "RebateCoin")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.RebateCoin); if (message.Activity != null && Object.hasOwnProperty.call(message, "Activity")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.Activity); if (message.TransactionType != null && message.TransactionType.length) { writer.uint32(/* id 6, wireType 2 =*/50).fork(); for (var i = 0; i < message.TransactionType.length; ++i) writer.int32(message.TransactionType[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCCoinTotal message, length delimited. Does not implicitly {@link gamehall.SCCoinTotal.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCCoinTotal * @static * @param {gamehall.ISCCoinTotal} message SCCoinTotal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCCoinTotal.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCCoinTotal message from the specified reader or buffer. * @function decode * @memberof gamehall.SCCoinTotal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCCoinTotal} SCCoinTotal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinTotal.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCCoinTotal(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.RechargeCoin = reader.int64(); break; } case 2: { message.ExchangeCoin = reader.int64(); break; } case 3: { message.ClubAddCoin = reader.int64(); break; } case 4: { message.RebateCoin = reader.int64(); break; } case 5: { message.Activity = reader.int64(); break; } case 6: { if (!(message.TransactionType && message.TransactionType.length)) message.TransactionType = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.TransactionType.push(reader.int32()); } else message.TransactionType.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCCoinTotal message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCCoinTotal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCCoinTotal} SCCoinTotal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCCoinTotal.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCCoinTotal message. * @function verify * @memberof gamehall.SCCoinTotal * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCCoinTotal.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.RechargeCoin != null && message.hasOwnProperty("RechargeCoin")) if (!$util.isInteger(message.RechargeCoin) && !(message.RechargeCoin && $util.isInteger(message.RechargeCoin.low) && $util.isInteger(message.RechargeCoin.high))) return "RechargeCoin: integer|Long expected"; if (message.ExchangeCoin != null && message.hasOwnProperty("ExchangeCoin")) if (!$util.isInteger(message.ExchangeCoin) && !(message.ExchangeCoin && $util.isInteger(message.ExchangeCoin.low) && $util.isInteger(message.ExchangeCoin.high))) return "ExchangeCoin: integer|Long expected"; if (message.ClubAddCoin != null && message.hasOwnProperty("ClubAddCoin")) if (!$util.isInteger(message.ClubAddCoin) && !(message.ClubAddCoin && $util.isInteger(message.ClubAddCoin.low) && $util.isInteger(message.ClubAddCoin.high))) return "ClubAddCoin: integer|Long expected"; if (message.RebateCoin != null && message.hasOwnProperty("RebateCoin")) if (!$util.isInteger(message.RebateCoin) && !(message.RebateCoin && $util.isInteger(message.RebateCoin.low) && $util.isInteger(message.RebateCoin.high))) return "RebateCoin: integer|Long expected"; if (message.Activity != null && message.hasOwnProperty("Activity")) if (!$util.isInteger(message.Activity) && !(message.Activity && $util.isInteger(message.Activity.low) && $util.isInteger(message.Activity.high))) return "Activity: integer|Long expected"; if (message.TransactionType != null && message.hasOwnProperty("TransactionType")) { if (!Array.isArray(message.TransactionType)) return "TransactionType: array expected"; for (var i = 0; i < message.TransactionType.length; ++i) if (!$util.isInteger(message.TransactionType[i])) return "TransactionType: integer[] expected"; } return null; }; /** * Creates a SCCoinTotal message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCCoinTotal * @static * @param {Object.} object Plain object * @returns {gamehall.SCCoinTotal} SCCoinTotal */ SCCoinTotal.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCCoinTotal) return object; var message = new $root.gamehall.SCCoinTotal(); if (object.RechargeCoin != null) if ($util.Long) (message.RechargeCoin = $util.Long.fromValue(object.RechargeCoin)).unsigned = false; else if (typeof object.RechargeCoin === "string") message.RechargeCoin = parseInt(object.RechargeCoin, 10); else if (typeof object.RechargeCoin === "number") message.RechargeCoin = object.RechargeCoin; else if (typeof object.RechargeCoin === "object") message.RechargeCoin = new $util.LongBits(object.RechargeCoin.low >>> 0, object.RechargeCoin.high >>> 0).toNumber(); if (object.ExchangeCoin != null) if ($util.Long) (message.ExchangeCoin = $util.Long.fromValue(object.ExchangeCoin)).unsigned = false; else if (typeof object.ExchangeCoin === "string") message.ExchangeCoin = parseInt(object.ExchangeCoin, 10); else if (typeof object.ExchangeCoin === "number") message.ExchangeCoin = object.ExchangeCoin; else if (typeof object.ExchangeCoin === "object") message.ExchangeCoin = new $util.LongBits(object.ExchangeCoin.low >>> 0, object.ExchangeCoin.high >>> 0).toNumber(); if (object.ClubAddCoin != null) if ($util.Long) (message.ClubAddCoin = $util.Long.fromValue(object.ClubAddCoin)).unsigned = false; else if (typeof object.ClubAddCoin === "string") message.ClubAddCoin = parseInt(object.ClubAddCoin, 10); else if (typeof object.ClubAddCoin === "number") message.ClubAddCoin = object.ClubAddCoin; else if (typeof object.ClubAddCoin === "object") message.ClubAddCoin = new $util.LongBits(object.ClubAddCoin.low >>> 0, object.ClubAddCoin.high >>> 0).toNumber(); if (object.RebateCoin != null) if ($util.Long) (message.RebateCoin = $util.Long.fromValue(object.RebateCoin)).unsigned = false; else if (typeof object.RebateCoin === "string") message.RebateCoin = parseInt(object.RebateCoin, 10); else if (typeof object.RebateCoin === "number") message.RebateCoin = object.RebateCoin; else if (typeof object.RebateCoin === "object") message.RebateCoin = new $util.LongBits(object.RebateCoin.low >>> 0, object.RebateCoin.high >>> 0).toNumber(); if (object.Activity != null) if ($util.Long) (message.Activity = $util.Long.fromValue(object.Activity)).unsigned = false; else if (typeof object.Activity === "string") message.Activity = parseInt(object.Activity, 10); else if (typeof object.Activity === "number") message.Activity = object.Activity; else if (typeof object.Activity === "object") message.Activity = new $util.LongBits(object.Activity.low >>> 0, object.Activity.high >>> 0).toNumber(); if (object.TransactionType) { if (!Array.isArray(object.TransactionType)) throw TypeError(".gamehall.SCCoinTotal.TransactionType: array expected"); message.TransactionType = []; for (var i = 0; i < object.TransactionType.length; ++i) message.TransactionType[i] = object.TransactionType[i] | 0; } return message; }; /** * Creates a plain object from a SCCoinTotal message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCCoinTotal * @static * @param {gamehall.SCCoinTotal} message SCCoinTotal * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCCoinTotal.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.TransactionType = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.RechargeCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.RechargeCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.ExchangeCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ExchangeCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.ClubAddCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ClubAddCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.RebateCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.RebateCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Activity = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Activity = options.longs === String ? "0" : 0; } if (message.RechargeCoin != null && message.hasOwnProperty("RechargeCoin")) if (typeof message.RechargeCoin === "number") object.RechargeCoin = options.longs === String ? String(message.RechargeCoin) : message.RechargeCoin; else object.RechargeCoin = options.longs === String ? $util.Long.prototype.toString.call(message.RechargeCoin) : options.longs === Number ? new $util.LongBits(message.RechargeCoin.low >>> 0, message.RechargeCoin.high >>> 0).toNumber() : message.RechargeCoin; if (message.ExchangeCoin != null && message.hasOwnProperty("ExchangeCoin")) if (typeof message.ExchangeCoin === "number") object.ExchangeCoin = options.longs === String ? String(message.ExchangeCoin) : message.ExchangeCoin; else object.ExchangeCoin = options.longs === String ? $util.Long.prototype.toString.call(message.ExchangeCoin) : options.longs === Number ? new $util.LongBits(message.ExchangeCoin.low >>> 0, message.ExchangeCoin.high >>> 0).toNumber() : message.ExchangeCoin; if (message.ClubAddCoin != null && message.hasOwnProperty("ClubAddCoin")) if (typeof message.ClubAddCoin === "number") object.ClubAddCoin = options.longs === String ? String(message.ClubAddCoin) : message.ClubAddCoin; else object.ClubAddCoin = options.longs === String ? $util.Long.prototype.toString.call(message.ClubAddCoin) : options.longs === Number ? new $util.LongBits(message.ClubAddCoin.low >>> 0, message.ClubAddCoin.high >>> 0).toNumber() : message.ClubAddCoin; if (message.RebateCoin != null && message.hasOwnProperty("RebateCoin")) if (typeof message.RebateCoin === "number") object.RebateCoin = options.longs === String ? String(message.RebateCoin) : message.RebateCoin; else object.RebateCoin = options.longs === String ? $util.Long.prototype.toString.call(message.RebateCoin) : options.longs === Number ? new $util.LongBits(message.RebateCoin.low >>> 0, message.RebateCoin.high >>> 0).toNumber() : message.RebateCoin; if (message.Activity != null && message.hasOwnProperty("Activity")) if (typeof message.Activity === "number") object.Activity = options.longs === String ? String(message.Activity) : message.Activity; else object.Activity = options.longs === String ? $util.Long.prototype.toString.call(message.Activity) : options.longs === Number ? new $util.LongBits(message.Activity.low >>> 0, message.Activity.high >>> 0).toNumber() : message.Activity; if (message.TransactionType && message.TransactionType.length) { object.TransactionType = []; for (var j = 0; j < message.TransactionType.length; ++j) object.TransactionType[j] = message.TransactionType[j]; } return object; }; /** * Converts this SCCoinTotal to JSON. * @function toJSON * @memberof gamehall.SCCoinTotal * @instance * @returns {Object.} JSON object */ SCCoinTotal.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCCoinTotal * @function getTypeUrl * @memberof gamehall.SCCoinTotal * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCCoinTotal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCCoinTotal"; }; return SCCoinTotal; })(); gamehall.CSReportForm = (function() { /** * Properties of a CSReportForm. * @memberof gamehall * @interface ICSReportForm * @property {gamehall.HallOperaCode|null} [ShowTypeId] CSReportForm ShowTypeId * @property {number|Long|null} [TimeIndex] CSReportForm TimeIndex */ /** * Constructs a new CSReportForm. * @memberof gamehall * @classdesc Represents a CSReportForm. * @implements ICSReportForm * @constructor * @param {gamehall.ICSReportForm=} [properties] Properties to set */ function CSReportForm(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSReportForm ShowTypeId. * @member {gamehall.HallOperaCode} ShowTypeId * @memberof gamehall.CSReportForm * @instance */ CSReportForm.prototype.ShowTypeId = 0; /** * CSReportForm TimeIndex. * @member {number|Long} TimeIndex * @memberof gamehall.CSReportForm * @instance */ CSReportForm.prototype.TimeIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSReportForm instance using the specified properties. * @function create * @memberof gamehall.CSReportForm * @static * @param {gamehall.ICSReportForm=} [properties] Properties to set * @returns {gamehall.CSReportForm} CSReportForm instance */ CSReportForm.create = function create(properties) { return new CSReportForm(properties); }; /** * Encodes the specified CSReportForm message. Does not implicitly {@link gamehall.CSReportForm.verify|verify} messages. * @function encode * @memberof gamehall.CSReportForm * @static * @param {gamehall.ICSReportForm} message CSReportForm message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReportForm.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowTypeId != null && Object.hasOwnProperty.call(message, "ShowTypeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShowTypeId); if (message.TimeIndex != null && Object.hasOwnProperty.call(message, "TimeIndex")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.TimeIndex); return writer; }; /** * Encodes the specified CSReportForm message, length delimited. Does not implicitly {@link gamehall.CSReportForm.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSReportForm * @static * @param {gamehall.ICSReportForm} message CSReportForm message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReportForm.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSReportForm message from the specified reader or buffer. * @function decode * @memberof gamehall.CSReportForm * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSReportForm} CSReportForm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReportForm.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSReportForm(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowTypeId = reader.int32(); break; } case 2: { message.TimeIndex = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSReportForm message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSReportForm * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSReportForm} CSReportForm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReportForm.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSReportForm message. * @function verify * @memberof gamehall.CSReportForm * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSReportForm.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowTypeId != null && message.hasOwnProperty("ShowTypeId")) switch (message.ShowTypeId) { default: return "ShowTypeId: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 101: break; } if (message.TimeIndex != null && message.hasOwnProperty("TimeIndex")) if (!$util.isInteger(message.TimeIndex) && !(message.TimeIndex && $util.isInteger(message.TimeIndex.low) && $util.isInteger(message.TimeIndex.high))) return "TimeIndex: integer|Long expected"; return null; }; /** * Creates a CSReportForm message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSReportForm * @static * @param {Object.} object Plain object * @returns {gamehall.CSReportForm} CSReportForm */ CSReportForm.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSReportForm) return object; var message = new $root.gamehall.CSReportForm(); switch (object.ShowTypeId) { default: if (typeof object.ShowTypeId === "number") { message.ShowTypeId = object.ShowTypeId; break; } break; case "HallOperaZero": case 0: message.ShowTypeId = 0; break; case "HallChessGame": case 1: message.ShowTypeId = 1; break; case "HallElectronicGame": case 2: message.ShowTypeId = 2; break; case "HallFishingGame": case 3: message.ShowTypeId = 3; break; case "HallLiveVideo": case 4: message.ShowTypeId = 4; break; case "HallLotteryGame": case 5: message.ShowTypeId = 5; break; case "HallSportsGame": case 6: message.ShowTypeId = 6; break; case "HallPrivateRoom": case 7: message.ShowTypeId = 7; break; case "HallClubRoom": case 8: message.ShowTypeId = 8; break; case "HallThirdPlt": case 101: message.ShowTypeId = 101; break; } if (object.TimeIndex != null) if ($util.Long) (message.TimeIndex = $util.Long.fromValue(object.TimeIndex)).unsigned = false; else if (typeof object.TimeIndex === "string") message.TimeIndex = parseInt(object.TimeIndex, 10); else if (typeof object.TimeIndex === "number") message.TimeIndex = object.TimeIndex; else if (typeof object.TimeIndex === "object") message.TimeIndex = new $util.LongBits(object.TimeIndex.low >>> 0, object.TimeIndex.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CSReportForm message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSReportForm * @static * @param {gamehall.CSReportForm} message CSReportForm * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSReportForm.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ShowTypeId = options.enums === String ? "HallOperaZero" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TimeIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TimeIndex = options.longs === String ? "0" : 0; } if (message.ShowTypeId != null && message.hasOwnProperty("ShowTypeId")) object.ShowTypeId = options.enums === String ? $root.gamehall.HallOperaCode[message.ShowTypeId] === undefined ? message.ShowTypeId : $root.gamehall.HallOperaCode[message.ShowTypeId] : message.ShowTypeId; if (message.TimeIndex != null && message.hasOwnProperty("TimeIndex")) if (typeof message.TimeIndex === "number") object.TimeIndex = options.longs === String ? String(message.TimeIndex) : message.TimeIndex; else object.TimeIndex = options.longs === String ? $util.Long.prototype.toString.call(message.TimeIndex) : options.longs === Number ? new $util.LongBits(message.TimeIndex.low >>> 0, message.TimeIndex.high >>> 0).toNumber() : message.TimeIndex; return object; }; /** * Converts this CSReportForm to JSON. * @function toJSON * @memberof gamehall.CSReportForm * @instance * @returns {Object.} JSON object */ CSReportForm.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSReportForm * @function getTypeUrl * @memberof gamehall.CSReportForm * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSReportForm.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSReportForm"; }; return CSReportForm; })(); gamehall.SCReportForm = (function() { /** * Properties of a SCReportForm. * @memberof gamehall * @interface ISCReportForm * @property {number|null} [ShowType] SCReportForm ShowType * @property {number|Long|null} [ProfitCoin] SCReportForm ProfitCoin * @property {number|Long|null} [BetCoin] SCReportForm BetCoin * @property {number|Long|null} [FlowCoin] SCReportForm FlowCoin */ /** * Constructs a new SCReportForm. * @memberof gamehall * @classdesc Represents a SCReportForm. * @implements ISCReportForm * @constructor * @param {gamehall.ISCReportForm=} [properties] Properties to set */ function SCReportForm(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCReportForm ShowType. * @member {number} ShowType * @memberof gamehall.SCReportForm * @instance */ SCReportForm.prototype.ShowType = 0; /** * SCReportForm ProfitCoin. * @member {number|Long} ProfitCoin * @memberof gamehall.SCReportForm * @instance */ SCReportForm.prototype.ProfitCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCReportForm BetCoin. * @member {number|Long} BetCoin * @memberof gamehall.SCReportForm * @instance */ SCReportForm.prototype.BetCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * SCReportForm FlowCoin. * @member {number|Long} FlowCoin * @memberof gamehall.SCReportForm * @instance */ SCReportForm.prototype.FlowCoin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCReportForm instance using the specified properties. * @function create * @memberof gamehall.SCReportForm * @static * @param {gamehall.ISCReportForm=} [properties] Properties to set * @returns {gamehall.SCReportForm} SCReportForm instance */ SCReportForm.create = function create(properties) { return new SCReportForm(properties); }; /** * Encodes the specified SCReportForm message. Does not implicitly {@link gamehall.SCReportForm.verify|verify} messages. * @function encode * @memberof gamehall.SCReportForm * @static * @param {gamehall.ISCReportForm} message SCReportForm message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReportForm.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowType != null && Object.hasOwnProperty.call(message, "ShowType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShowType); if (message.ProfitCoin != null && Object.hasOwnProperty.call(message, "ProfitCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ProfitCoin); if (message.BetCoin != null && Object.hasOwnProperty.call(message, "BetCoin")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.BetCoin); if (message.FlowCoin != null && Object.hasOwnProperty.call(message, "FlowCoin")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.FlowCoin); return writer; }; /** * Encodes the specified SCReportForm message, length delimited. Does not implicitly {@link gamehall.SCReportForm.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCReportForm * @static * @param {gamehall.ISCReportForm} message SCReportForm message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReportForm.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCReportForm message from the specified reader or buffer. * @function decode * @memberof gamehall.SCReportForm * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCReportForm} SCReportForm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReportForm.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCReportForm(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowType = reader.int32(); break; } case 2: { message.ProfitCoin = reader.int64(); break; } case 3: { message.BetCoin = reader.int64(); break; } case 4: { message.FlowCoin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCReportForm message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCReportForm * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCReportForm} SCReportForm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReportForm.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCReportForm message. * @function verify * @memberof gamehall.SCReportForm * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCReportForm.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowType != null && message.hasOwnProperty("ShowType")) if (!$util.isInteger(message.ShowType)) return "ShowType: integer expected"; if (message.ProfitCoin != null && message.hasOwnProperty("ProfitCoin")) if (!$util.isInteger(message.ProfitCoin) && !(message.ProfitCoin && $util.isInteger(message.ProfitCoin.low) && $util.isInteger(message.ProfitCoin.high))) return "ProfitCoin: integer|Long expected"; if (message.BetCoin != null && message.hasOwnProperty("BetCoin")) if (!$util.isInteger(message.BetCoin) && !(message.BetCoin && $util.isInteger(message.BetCoin.low) && $util.isInteger(message.BetCoin.high))) return "BetCoin: integer|Long expected"; if (message.FlowCoin != null && message.hasOwnProperty("FlowCoin")) if (!$util.isInteger(message.FlowCoin) && !(message.FlowCoin && $util.isInteger(message.FlowCoin.low) && $util.isInteger(message.FlowCoin.high))) return "FlowCoin: integer|Long expected"; return null; }; /** * Creates a SCReportForm message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCReportForm * @static * @param {Object.} object Plain object * @returns {gamehall.SCReportForm} SCReportForm */ SCReportForm.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCReportForm) return object; var message = new $root.gamehall.SCReportForm(); if (object.ShowType != null) message.ShowType = object.ShowType | 0; if (object.ProfitCoin != null) if ($util.Long) (message.ProfitCoin = $util.Long.fromValue(object.ProfitCoin)).unsigned = false; else if (typeof object.ProfitCoin === "string") message.ProfitCoin = parseInt(object.ProfitCoin, 10); else if (typeof object.ProfitCoin === "number") message.ProfitCoin = object.ProfitCoin; else if (typeof object.ProfitCoin === "object") message.ProfitCoin = new $util.LongBits(object.ProfitCoin.low >>> 0, object.ProfitCoin.high >>> 0).toNumber(); if (object.BetCoin != null) if ($util.Long) (message.BetCoin = $util.Long.fromValue(object.BetCoin)).unsigned = false; else if (typeof object.BetCoin === "string") message.BetCoin = parseInt(object.BetCoin, 10); else if (typeof object.BetCoin === "number") message.BetCoin = object.BetCoin; else if (typeof object.BetCoin === "object") message.BetCoin = new $util.LongBits(object.BetCoin.low >>> 0, object.BetCoin.high >>> 0).toNumber(); if (object.FlowCoin != null) if ($util.Long) (message.FlowCoin = $util.Long.fromValue(object.FlowCoin)).unsigned = false; else if (typeof object.FlowCoin === "string") message.FlowCoin = parseInt(object.FlowCoin, 10); else if (typeof object.FlowCoin === "number") message.FlowCoin = object.FlowCoin; else if (typeof object.FlowCoin === "object") message.FlowCoin = new $util.LongBits(object.FlowCoin.low >>> 0, object.FlowCoin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCReportForm message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCReportForm * @static * @param {gamehall.SCReportForm} message SCReportForm * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCReportForm.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ShowType = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.ProfitCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ProfitCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.BetCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.BetCoin = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.FlowCoin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.FlowCoin = options.longs === String ? "0" : 0; } if (message.ShowType != null && message.hasOwnProperty("ShowType")) object.ShowType = message.ShowType; if (message.ProfitCoin != null && message.hasOwnProperty("ProfitCoin")) if (typeof message.ProfitCoin === "number") object.ProfitCoin = options.longs === String ? String(message.ProfitCoin) : message.ProfitCoin; else object.ProfitCoin = options.longs === String ? $util.Long.prototype.toString.call(message.ProfitCoin) : options.longs === Number ? new $util.LongBits(message.ProfitCoin.low >>> 0, message.ProfitCoin.high >>> 0).toNumber() : message.ProfitCoin; if (message.BetCoin != null && message.hasOwnProperty("BetCoin")) if (typeof message.BetCoin === "number") object.BetCoin = options.longs === String ? String(message.BetCoin) : message.BetCoin; else object.BetCoin = options.longs === String ? $util.Long.prototype.toString.call(message.BetCoin) : options.longs === Number ? new $util.LongBits(message.BetCoin.low >>> 0, message.BetCoin.high >>> 0).toNumber() : message.BetCoin; if (message.FlowCoin != null && message.hasOwnProperty("FlowCoin")) if (typeof message.FlowCoin === "number") object.FlowCoin = options.longs === String ? String(message.FlowCoin) : message.FlowCoin; else object.FlowCoin = options.longs === String ? $util.Long.prototype.toString.call(message.FlowCoin) : options.longs === Number ? new $util.LongBits(message.FlowCoin.low >>> 0, message.FlowCoin.high >>> 0).toNumber() : message.FlowCoin; return object; }; /** * Converts this SCReportForm to JSON. * @function toJSON * @memberof gamehall.SCReportForm * @instance * @returns {Object.} JSON object */ SCReportForm.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCReportForm * @function getTypeUrl * @memberof gamehall.SCReportForm * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCReportForm.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCReportForm"; }; return SCReportForm; })(); gamehall.CSHistoryRecord = (function() { /** * Properties of a CSHistoryRecord. * @memberof gamehall * @interface ICSHistoryRecord * @property {number|null} [PageNo] CSHistoryRecord PageNo */ /** * Constructs a new CSHistoryRecord. * @memberof gamehall * @classdesc Represents a CSHistoryRecord. * @implements ICSHistoryRecord * @constructor * @param {gamehall.ICSHistoryRecord=} [properties] Properties to set */ function CSHistoryRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSHistoryRecord PageNo. * @member {number} PageNo * @memberof gamehall.CSHistoryRecord * @instance */ CSHistoryRecord.prototype.PageNo = 0; /** * Creates a new CSHistoryRecord instance using the specified properties. * @function create * @memberof gamehall.CSHistoryRecord * @static * @param {gamehall.ICSHistoryRecord=} [properties] Properties to set * @returns {gamehall.CSHistoryRecord} CSHistoryRecord instance */ CSHistoryRecord.create = function create(properties) { return new CSHistoryRecord(properties); }; /** * Encodes the specified CSHistoryRecord message. Does not implicitly {@link gamehall.CSHistoryRecord.verify|verify} messages. * @function encode * @memberof gamehall.CSHistoryRecord * @static * @param {gamehall.ICSHistoryRecord} message CSHistoryRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHistoryRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.PageNo); return writer; }; /** * Encodes the specified CSHistoryRecord message, length delimited. Does not implicitly {@link gamehall.CSHistoryRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSHistoryRecord * @static * @param {gamehall.ICSHistoryRecord} message CSHistoryRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHistoryRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHistoryRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.CSHistoryRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSHistoryRecord} CSHistoryRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHistoryRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSHistoryRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.PageNo = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHistoryRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSHistoryRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSHistoryRecord} CSHistoryRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHistoryRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHistoryRecord message. * @function verify * @memberof gamehall.CSHistoryRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHistoryRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; return null; }; /** * Creates a CSHistoryRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSHistoryRecord * @static * @param {Object.} object Plain object * @returns {gamehall.CSHistoryRecord} CSHistoryRecord */ CSHistoryRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSHistoryRecord) return object; var message = new $root.gamehall.CSHistoryRecord(); if (object.PageNo != null) message.PageNo = object.PageNo | 0; return message; }; /** * Creates a plain object from a CSHistoryRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSHistoryRecord * @static * @param {gamehall.CSHistoryRecord} message CSHistoryRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHistoryRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.PageNo = 0; if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; return object; }; /** * Converts this CSHistoryRecord to JSON. * @function toJSON * @memberof gamehall.CSHistoryRecord * @instance * @returns {Object.} JSON object */ CSHistoryRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHistoryRecord * @function getTypeUrl * @memberof gamehall.CSHistoryRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHistoryRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSHistoryRecord"; }; return CSHistoryRecord; })(); gamehall.HistoryRecord = (function() { /** * Properties of a HistoryRecord. * @memberof gamehall * @interface IHistoryRecord * @property {number|Long|null} [Ts] HistoryRecord Ts * @property {number|null} [CodeCoin] HistoryRecord CodeCoin * @property {number|null} [Coin] HistoryRecord Coin * @property {number|null} [ReceiveType] HistoryRecord ReceiveType */ /** * Constructs a new HistoryRecord. * @memberof gamehall * @classdesc Represents a HistoryRecord. * @implements IHistoryRecord * @constructor * @param {gamehall.IHistoryRecord=} [properties] Properties to set */ function HistoryRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * HistoryRecord Ts. * @member {number|Long} Ts * @memberof gamehall.HistoryRecord * @instance */ HistoryRecord.prototype.Ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * HistoryRecord CodeCoin. * @member {number} CodeCoin * @memberof gamehall.HistoryRecord * @instance */ HistoryRecord.prototype.CodeCoin = 0; /** * HistoryRecord Coin. * @member {number} Coin * @memberof gamehall.HistoryRecord * @instance */ HistoryRecord.prototype.Coin = 0; /** * HistoryRecord ReceiveType. * @member {number} ReceiveType * @memberof gamehall.HistoryRecord * @instance */ HistoryRecord.prototype.ReceiveType = 0; /** * Creates a new HistoryRecord instance using the specified properties. * @function create * @memberof gamehall.HistoryRecord * @static * @param {gamehall.IHistoryRecord=} [properties] Properties to set * @returns {gamehall.HistoryRecord} HistoryRecord instance */ HistoryRecord.create = function create(properties) { return new HistoryRecord(properties); }; /** * Encodes the specified HistoryRecord message. Does not implicitly {@link gamehall.HistoryRecord.verify|verify} messages. * @function encode * @memberof gamehall.HistoryRecord * @static * @param {gamehall.IHistoryRecord} message HistoryRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HistoryRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Ts != null && Object.hasOwnProperty.call(message, "Ts")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.Ts); if (message.CodeCoin != null && Object.hasOwnProperty.call(message, "CodeCoin")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.CodeCoin); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Coin); if (message.ReceiveType != null && Object.hasOwnProperty.call(message, "ReceiveType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.ReceiveType); return writer; }; /** * Encodes the specified HistoryRecord message, length delimited. Does not implicitly {@link gamehall.HistoryRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.HistoryRecord * @static * @param {gamehall.IHistoryRecord} message HistoryRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ HistoryRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a HistoryRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.HistoryRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.HistoryRecord} HistoryRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HistoryRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.HistoryRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Ts = reader.int64(); break; } case 2: { message.CodeCoin = reader.int32(); break; } case 3: { message.Coin = reader.int32(); break; } case 4: { message.ReceiveType = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a HistoryRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.HistoryRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.HistoryRecord} HistoryRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ HistoryRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a HistoryRecord message. * @function verify * @memberof gamehall.HistoryRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ HistoryRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Ts != null && message.hasOwnProperty("Ts")) if (!$util.isInteger(message.Ts) && !(message.Ts && $util.isInteger(message.Ts.low) && $util.isInteger(message.Ts.high))) return "Ts: integer|Long expected"; if (message.CodeCoin != null && message.hasOwnProperty("CodeCoin")) if (!$util.isInteger(message.CodeCoin)) return "CodeCoin: integer expected"; if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin)) return "Coin: integer expected"; if (message.ReceiveType != null && message.hasOwnProperty("ReceiveType")) if (!$util.isInteger(message.ReceiveType)) return "ReceiveType: integer expected"; return null; }; /** * Creates a HistoryRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.HistoryRecord * @static * @param {Object.} object Plain object * @returns {gamehall.HistoryRecord} HistoryRecord */ HistoryRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.HistoryRecord) return object; var message = new $root.gamehall.HistoryRecord(); if (object.Ts != null) if ($util.Long) (message.Ts = $util.Long.fromValue(object.Ts)).unsigned = false; else if (typeof object.Ts === "string") message.Ts = parseInt(object.Ts, 10); else if (typeof object.Ts === "number") message.Ts = object.Ts; else if (typeof object.Ts === "object") message.Ts = new $util.LongBits(object.Ts.low >>> 0, object.Ts.high >>> 0).toNumber(); if (object.CodeCoin != null) message.CodeCoin = object.CodeCoin | 0; if (object.Coin != null) message.Coin = object.Coin | 0; if (object.ReceiveType != null) message.ReceiveType = object.ReceiveType | 0; return message; }; /** * Creates a plain object from a HistoryRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.HistoryRecord * @static * @param {gamehall.HistoryRecord} message HistoryRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ HistoryRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.Ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Ts = options.longs === String ? "0" : 0; object.CodeCoin = 0; object.Coin = 0; object.ReceiveType = 0; } if (message.Ts != null && message.hasOwnProperty("Ts")) if (typeof message.Ts === "number") object.Ts = options.longs === String ? String(message.Ts) : message.Ts; else object.Ts = options.longs === String ? $util.Long.prototype.toString.call(message.Ts) : options.longs === Number ? new $util.LongBits(message.Ts.low >>> 0, message.Ts.high >>> 0).toNumber() : message.Ts; if (message.CodeCoin != null && message.hasOwnProperty("CodeCoin")) object.CodeCoin = message.CodeCoin; if (message.Coin != null && message.hasOwnProperty("Coin")) object.Coin = message.Coin; if (message.ReceiveType != null && message.hasOwnProperty("ReceiveType")) object.ReceiveType = message.ReceiveType; return object; }; /** * Converts this HistoryRecord to JSON. * @function toJSON * @memberof gamehall.HistoryRecord * @instance * @returns {Object.} JSON object */ HistoryRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for HistoryRecord * @function getTypeUrl * @memberof gamehall.HistoryRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ HistoryRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.HistoryRecord"; }; return HistoryRecord; })(); gamehall.SCHistoryRecord = (function() { /** * Properties of a SCHistoryRecord. * @memberof gamehall * @interface ISCHistoryRecord * @property {Array.|null} [HistoryRecord] SCHistoryRecord HistoryRecord * @property {number|null} [PageNo] SCHistoryRecord PageNo * @property {number|null} [PageSize] SCHistoryRecord PageSize * @property {number|null} [PageNum] SCHistoryRecord PageNum */ /** * Constructs a new SCHistoryRecord. * @memberof gamehall * @classdesc Represents a SCHistoryRecord. * @implements ISCHistoryRecord * @constructor * @param {gamehall.ISCHistoryRecord=} [properties] Properties to set */ function SCHistoryRecord(properties) { this.HistoryRecord = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCHistoryRecord HistoryRecord. * @member {Array.} HistoryRecord * @memberof gamehall.SCHistoryRecord * @instance */ SCHistoryRecord.prototype.HistoryRecord = $util.emptyArray; /** * SCHistoryRecord PageNo. * @member {number} PageNo * @memberof gamehall.SCHistoryRecord * @instance */ SCHistoryRecord.prototype.PageNo = 0; /** * SCHistoryRecord PageSize. * @member {number} PageSize * @memberof gamehall.SCHistoryRecord * @instance */ SCHistoryRecord.prototype.PageSize = 0; /** * SCHistoryRecord PageNum. * @member {number} PageNum * @memberof gamehall.SCHistoryRecord * @instance */ SCHistoryRecord.prototype.PageNum = 0; /** * Creates a new SCHistoryRecord instance using the specified properties. * @function create * @memberof gamehall.SCHistoryRecord * @static * @param {gamehall.ISCHistoryRecord=} [properties] Properties to set * @returns {gamehall.SCHistoryRecord} SCHistoryRecord instance */ SCHistoryRecord.create = function create(properties) { return new SCHistoryRecord(properties); }; /** * Encodes the specified SCHistoryRecord message. Does not implicitly {@link gamehall.SCHistoryRecord.verify|verify} messages. * @function encode * @memberof gamehall.SCHistoryRecord * @static * @param {gamehall.ISCHistoryRecord} message SCHistoryRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHistoryRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.HistoryRecord != null && message.HistoryRecord.length) for (var i = 0; i < message.HistoryRecord.length; ++i) $root.gamehall.HistoryRecord.encode(message.HistoryRecord[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.PageNo != null && Object.hasOwnProperty.call(message, "PageNo")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.PageNo); if (message.PageSize != null && Object.hasOwnProperty.call(message, "PageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.PageSize); if (message.PageNum != null && Object.hasOwnProperty.call(message, "PageNum")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.PageNum); return writer; }; /** * Encodes the specified SCHistoryRecord message, length delimited. Does not implicitly {@link gamehall.SCHistoryRecord.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCHistoryRecord * @static * @param {gamehall.ISCHistoryRecord} message SCHistoryRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHistoryRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCHistoryRecord message from the specified reader or buffer. * @function decode * @memberof gamehall.SCHistoryRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCHistoryRecord} SCHistoryRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHistoryRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCHistoryRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.HistoryRecord && message.HistoryRecord.length)) message.HistoryRecord = []; message.HistoryRecord.push($root.gamehall.HistoryRecord.decode(reader, reader.uint32())); break; } case 2: { message.PageNo = reader.int32(); break; } case 3: { message.PageSize = reader.int32(); break; } case 4: { message.PageNum = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCHistoryRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCHistoryRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCHistoryRecord} SCHistoryRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHistoryRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCHistoryRecord message. * @function verify * @memberof gamehall.SCHistoryRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCHistoryRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.HistoryRecord != null && message.hasOwnProperty("HistoryRecord")) { if (!Array.isArray(message.HistoryRecord)) return "HistoryRecord: array expected"; for (var i = 0; i < message.HistoryRecord.length; ++i) { var error = $root.gamehall.HistoryRecord.verify(message.HistoryRecord[i]); if (error) return "HistoryRecord." + error; } } if (message.PageNo != null && message.hasOwnProperty("PageNo")) if (!$util.isInteger(message.PageNo)) return "PageNo: integer expected"; if (message.PageSize != null && message.hasOwnProperty("PageSize")) if (!$util.isInteger(message.PageSize)) return "PageSize: integer expected"; if (message.PageNum != null && message.hasOwnProperty("PageNum")) if (!$util.isInteger(message.PageNum)) return "PageNum: integer expected"; return null; }; /** * Creates a SCHistoryRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCHistoryRecord * @static * @param {Object.} object Plain object * @returns {gamehall.SCHistoryRecord} SCHistoryRecord */ SCHistoryRecord.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCHistoryRecord) return object; var message = new $root.gamehall.SCHistoryRecord(); if (object.HistoryRecord) { if (!Array.isArray(object.HistoryRecord)) throw TypeError(".gamehall.SCHistoryRecord.HistoryRecord: array expected"); message.HistoryRecord = []; for (var i = 0; i < object.HistoryRecord.length; ++i) { if (typeof object.HistoryRecord[i] !== "object") throw TypeError(".gamehall.SCHistoryRecord.HistoryRecord: object expected"); message.HistoryRecord[i] = $root.gamehall.HistoryRecord.fromObject(object.HistoryRecord[i]); } } if (object.PageNo != null) message.PageNo = object.PageNo | 0; if (object.PageSize != null) message.PageSize = object.PageSize | 0; if (object.PageNum != null) message.PageNum = object.PageNum | 0; return message; }; /** * Creates a plain object from a SCHistoryRecord message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCHistoryRecord * @static * @param {gamehall.SCHistoryRecord} message SCHistoryRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCHistoryRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.HistoryRecord = []; if (options.defaults) { object.PageNo = 0; object.PageSize = 0; object.PageNum = 0; } if (message.HistoryRecord && message.HistoryRecord.length) { object.HistoryRecord = []; for (var j = 0; j < message.HistoryRecord.length; ++j) object.HistoryRecord[j] = $root.gamehall.HistoryRecord.toObject(message.HistoryRecord[j], options); } if (message.PageNo != null && message.hasOwnProperty("PageNo")) object.PageNo = message.PageNo; if (message.PageSize != null && message.hasOwnProperty("PageSize")) object.PageSize = message.PageSize; if (message.PageNum != null && message.hasOwnProperty("PageNum")) object.PageNum = message.PageNum; return object; }; /** * Converts this SCHistoryRecord to JSON. * @function toJSON * @memberof gamehall.SCHistoryRecord * @instance * @returns {Object.} JSON object */ SCHistoryRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCHistoryRecord * @function getTypeUrl * @memberof gamehall.SCHistoryRecord * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCHistoryRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCHistoryRecord"; }; return SCHistoryRecord; })(); gamehall.CSReceiveCodeCoin = (function() { /** * Properties of a CSReceiveCodeCoin. * @memberof gamehall * @interface ICSReceiveCodeCoin */ /** * Constructs a new CSReceiveCodeCoin. * @memberof gamehall * @classdesc Represents a CSReceiveCodeCoin. * @implements ICSReceiveCodeCoin * @constructor * @param {gamehall.ICSReceiveCodeCoin=} [properties] Properties to set */ function CSReceiveCodeCoin(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSReceiveCodeCoin instance using the specified properties. * @function create * @memberof gamehall.CSReceiveCodeCoin * @static * @param {gamehall.ICSReceiveCodeCoin=} [properties] Properties to set * @returns {gamehall.CSReceiveCodeCoin} CSReceiveCodeCoin instance */ CSReceiveCodeCoin.create = function create(properties) { return new CSReceiveCodeCoin(properties); }; /** * Encodes the specified CSReceiveCodeCoin message. Does not implicitly {@link gamehall.CSReceiveCodeCoin.verify|verify} messages. * @function encode * @memberof gamehall.CSReceiveCodeCoin * @static * @param {gamehall.ICSReceiveCodeCoin} message CSReceiveCodeCoin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReceiveCodeCoin.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSReceiveCodeCoin message, length delimited. Does not implicitly {@link gamehall.CSReceiveCodeCoin.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSReceiveCodeCoin * @static * @param {gamehall.ICSReceiveCodeCoin} message CSReceiveCodeCoin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSReceiveCodeCoin.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSReceiveCodeCoin message from the specified reader or buffer. * @function decode * @memberof gamehall.CSReceiveCodeCoin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSReceiveCodeCoin} CSReceiveCodeCoin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReceiveCodeCoin.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSReceiveCodeCoin(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSReceiveCodeCoin message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSReceiveCodeCoin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSReceiveCodeCoin} CSReceiveCodeCoin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSReceiveCodeCoin.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSReceiveCodeCoin message. * @function verify * @memberof gamehall.CSReceiveCodeCoin * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSReceiveCodeCoin.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSReceiveCodeCoin message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSReceiveCodeCoin * @static * @param {Object.} object Plain object * @returns {gamehall.CSReceiveCodeCoin} CSReceiveCodeCoin */ CSReceiveCodeCoin.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSReceiveCodeCoin) return object; return new $root.gamehall.CSReceiveCodeCoin(); }; /** * Creates a plain object from a CSReceiveCodeCoin message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSReceiveCodeCoin * @static * @param {gamehall.CSReceiveCodeCoin} message CSReceiveCodeCoin * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSReceiveCodeCoin.toObject = function toObject() { return {}; }; /** * Converts this CSReceiveCodeCoin to JSON. * @function toJSON * @memberof gamehall.CSReceiveCodeCoin * @instance * @returns {Object.} JSON object */ CSReceiveCodeCoin.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSReceiveCodeCoin * @function getTypeUrl * @memberof gamehall.CSReceiveCodeCoin * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSReceiveCodeCoin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSReceiveCodeCoin"; }; return CSReceiveCodeCoin; })(); gamehall.SCReceiveCodeCoin = (function() { /** * Properties of a SCReceiveCodeCoin. * @memberof gamehall * @interface ISCReceiveCodeCoin * @property {gamehall.OpResultCode_Hall|null} [OpRetCode] SCReceiveCodeCoin OpRetCode * @property {number|Long|null} [Coin] SCReceiveCodeCoin Coin */ /** * Constructs a new SCReceiveCodeCoin. * @memberof gamehall * @classdesc Represents a SCReceiveCodeCoin. * @implements ISCReceiveCodeCoin * @constructor * @param {gamehall.ISCReceiveCodeCoin=} [properties] Properties to set */ function SCReceiveCodeCoin(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCReceiveCodeCoin OpRetCode. * @member {gamehall.OpResultCode_Hall} OpRetCode * @memberof gamehall.SCReceiveCodeCoin * @instance */ SCReceiveCodeCoin.prototype.OpRetCode = 0; /** * SCReceiveCodeCoin Coin. * @member {number|Long} Coin * @memberof gamehall.SCReceiveCodeCoin * @instance */ SCReceiveCodeCoin.prototype.Coin = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new SCReceiveCodeCoin instance using the specified properties. * @function create * @memberof gamehall.SCReceiveCodeCoin * @static * @param {gamehall.ISCReceiveCodeCoin=} [properties] Properties to set * @returns {gamehall.SCReceiveCodeCoin} SCReceiveCodeCoin instance */ SCReceiveCodeCoin.create = function create(properties) { return new SCReceiveCodeCoin(properties); }; /** * Encodes the specified SCReceiveCodeCoin message. Does not implicitly {@link gamehall.SCReceiveCodeCoin.verify|verify} messages. * @function encode * @memberof gamehall.SCReceiveCodeCoin * @static * @param {gamehall.ISCReceiveCodeCoin} message SCReceiveCodeCoin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReceiveCodeCoin.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpRetCode != null && Object.hasOwnProperty.call(message, "OpRetCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpRetCode); if (message.Coin != null && Object.hasOwnProperty.call(message, "Coin")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.Coin); return writer; }; /** * Encodes the specified SCReceiveCodeCoin message, length delimited. Does not implicitly {@link gamehall.SCReceiveCodeCoin.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCReceiveCodeCoin * @static * @param {gamehall.ISCReceiveCodeCoin} message SCReceiveCodeCoin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCReceiveCodeCoin.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCReceiveCodeCoin message from the specified reader or buffer. * @function decode * @memberof gamehall.SCReceiveCodeCoin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCReceiveCodeCoin} SCReceiveCodeCoin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReceiveCodeCoin.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCReceiveCodeCoin(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpRetCode = reader.int32(); break; } case 2: { message.Coin = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCReceiveCodeCoin message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCReceiveCodeCoin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCReceiveCodeCoin} SCReceiveCodeCoin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCReceiveCodeCoin.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCReceiveCodeCoin message. * @function verify * @memberof gamehall.SCReceiveCodeCoin * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCReceiveCodeCoin.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) switch (message.OpRetCode) { default: return "OpRetCode: enum value expected"; case 0: case 1: case 10008: break; } if (message.Coin != null && message.hasOwnProperty("Coin")) if (!$util.isInteger(message.Coin) && !(message.Coin && $util.isInteger(message.Coin.low) && $util.isInteger(message.Coin.high))) return "Coin: integer|Long expected"; return null; }; /** * Creates a SCReceiveCodeCoin message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCReceiveCodeCoin * @static * @param {Object.} object Plain object * @returns {gamehall.SCReceiveCodeCoin} SCReceiveCodeCoin */ SCReceiveCodeCoin.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCReceiveCodeCoin) return object; var message = new $root.gamehall.SCReceiveCodeCoin(); switch (object.OpRetCode) { default: if (typeof object.OpRetCode === "number") { message.OpRetCode = object.OpRetCode; break; } break; case "OPRC_Sucess_Hall": case 0: message.OpRetCode = 0; break; case "OPRC_Error_Hall": case 1: message.OpRetCode = 1; break; case "OPRC_OnlineReward_Info_FindPlatform_Fail_Hall": case 10008: message.OpRetCode = 10008; break; } if (object.Coin != null) if ($util.Long) (message.Coin = $util.Long.fromValue(object.Coin)).unsigned = false; else if (typeof object.Coin === "string") message.Coin = parseInt(object.Coin, 10); else if (typeof object.Coin === "number") message.Coin = object.Coin; else if (typeof object.Coin === "object") message.Coin = new $util.LongBits(object.Coin.low >>> 0, object.Coin.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a SCReceiveCodeCoin message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCReceiveCodeCoin * @static * @param {gamehall.SCReceiveCodeCoin} message SCReceiveCodeCoin * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCReceiveCodeCoin.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.OpRetCode = options.enums === String ? "OPRC_Sucess_Hall" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Coin = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Coin = options.longs === String ? "0" : 0; } if (message.OpRetCode != null && message.hasOwnProperty("OpRetCode")) object.OpRetCode = options.enums === String ? $root.gamehall.OpResultCode_Hall[message.OpRetCode] === undefined ? message.OpRetCode : $root.gamehall.OpResultCode_Hall[message.OpRetCode] : message.OpRetCode; if (message.Coin != null && message.hasOwnProperty("Coin")) if (typeof message.Coin === "number") object.Coin = options.longs === String ? String(message.Coin) : message.Coin; else object.Coin = options.longs === String ? $util.Long.prototype.toString.call(message.Coin) : options.longs === Number ? new $util.LongBits(message.Coin.low >>> 0, message.Coin.high >>> 0).toNumber() : message.Coin; return object; }; /** * Converts this SCReceiveCodeCoin to JSON. * @function toJSON * @memberof gamehall.SCReceiveCodeCoin * @instance * @returns {Object.} JSON object */ SCReceiveCodeCoin.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCReceiveCodeCoin * @function getTypeUrl * @memberof gamehall.SCReceiveCodeCoin * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCReceiveCodeCoin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCReceiveCodeCoin"; }; return SCReceiveCodeCoin; })(); gamehall.CSGetRankInfo = (function() { /** * Properties of a CSGetRankInfo. * @memberof gamehall * @interface ICSGetRankInfo * @property {string|null} [Plt] CSGetRankInfo Plt * @property {number|null} [GameFreeId] CSGetRankInfo GameFreeId */ /** * Constructs a new CSGetRankInfo. * @memberof gamehall * @classdesc Represents a CSGetRankInfo. * @implements ICSGetRankInfo * @constructor * @param {gamehall.ICSGetRankInfo=} [properties] Properties to set */ function CSGetRankInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSGetRankInfo Plt. * @member {string} Plt * @memberof gamehall.CSGetRankInfo * @instance */ CSGetRankInfo.prototype.Plt = ""; /** * CSGetRankInfo GameFreeId. * @member {number} GameFreeId * @memberof gamehall.CSGetRankInfo * @instance */ CSGetRankInfo.prototype.GameFreeId = 0; /** * Creates a new CSGetRankInfo instance using the specified properties. * @function create * @memberof gamehall.CSGetRankInfo * @static * @param {gamehall.ICSGetRankInfo=} [properties] Properties to set * @returns {gamehall.CSGetRankInfo} CSGetRankInfo instance */ CSGetRankInfo.create = function create(properties) { return new CSGetRankInfo(properties); }; /** * Encodes the specified CSGetRankInfo message. Does not implicitly {@link gamehall.CSGetRankInfo.verify|verify} messages. * @function encode * @memberof gamehall.CSGetRankInfo * @static * @param {gamehall.ICSGetRankInfo} message CSGetRankInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetRankInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Plt != null && Object.hasOwnProperty.call(message, "Plt")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.Plt); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameFreeId); return writer; }; /** * Encodes the specified CSGetRankInfo message, length delimited. Does not implicitly {@link gamehall.CSGetRankInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSGetRankInfo * @static * @param {gamehall.ICSGetRankInfo} message CSGetRankInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetRankInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetRankInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.CSGetRankInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSGetRankInfo} CSGetRankInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetRankInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSGetRankInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Plt = reader.string(); break; } case 2: { message.GameFreeId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetRankInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSGetRankInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSGetRankInfo} CSGetRankInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetRankInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetRankInfo message. * @function verify * @memberof gamehall.CSGetRankInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetRankInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Plt != null && message.hasOwnProperty("Plt")) if (!$util.isString(message.Plt)) return "Plt: string expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; return null; }; /** * Creates a CSGetRankInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSGetRankInfo * @static * @param {Object.} object Plain object * @returns {gamehall.CSGetRankInfo} CSGetRankInfo */ CSGetRankInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSGetRankInfo) return object; var message = new $root.gamehall.CSGetRankInfo(); if (object.Plt != null) message.Plt = String(object.Plt); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; return message; }; /** * Creates a plain object from a CSGetRankInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSGetRankInfo * @static * @param {gamehall.CSGetRankInfo} message CSGetRankInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetRankInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Plt = ""; object.GameFreeId = 0; } if (message.Plt != null && message.hasOwnProperty("Plt")) object.Plt = message.Plt; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; return object; }; /** * Converts this CSGetRankInfo to JSON. * @function toJSON * @memberof gamehall.CSGetRankInfo * @instance * @returns {Object.} JSON object */ CSGetRankInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetRankInfo * @function getTypeUrl * @memberof gamehall.CSGetRankInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetRankInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSGetRankInfo"; }; return CSGetRankInfo; })(); gamehall.RankInfo = (function() { /** * Properties of a RankInfo. * @memberof gamehall * @interface IRankInfo * @property {number|null} [Snid] RankInfo Snid * @property {string|null} [Name] RankInfo Name * @property {number|Long|null} [TotalIn] RankInfo TotalIn * @property {number|Long|null} [TotalOut] RankInfo TotalOut */ /** * Constructs a new RankInfo. * @memberof gamehall * @classdesc Represents a RankInfo. * @implements IRankInfo * @constructor * @param {gamehall.IRankInfo=} [properties] Properties to set */ function RankInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * RankInfo Snid. * @member {number} Snid * @memberof gamehall.RankInfo * @instance */ RankInfo.prototype.Snid = 0; /** * RankInfo Name. * @member {string} Name * @memberof gamehall.RankInfo * @instance */ RankInfo.prototype.Name = ""; /** * RankInfo TotalIn. * @member {number|Long} TotalIn * @memberof gamehall.RankInfo * @instance */ RankInfo.prototype.TotalIn = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * RankInfo TotalOut. * @member {number|Long} TotalOut * @memberof gamehall.RankInfo * @instance */ RankInfo.prototype.TotalOut = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new RankInfo instance using the specified properties. * @function create * @memberof gamehall.RankInfo * @static * @param {gamehall.IRankInfo=} [properties] Properties to set * @returns {gamehall.RankInfo} RankInfo instance */ RankInfo.create = function create(properties) { return new RankInfo(properties); }; /** * Encodes the specified RankInfo message. Does not implicitly {@link gamehall.RankInfo.verify|verify} messages. * @function encode * @memberof gamehall.RankInfo * @static * @param {gamehall.IRankInfo} message RankInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RankInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Snid != null && Object.hasOwnProperty.call(message, "Snid")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Snid); if (message.Name != null && Object.hasOwnProperty.call(message, "Name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.Name); if (message.TotalIn != null && Object.hasOwnProperty.call(message, "TotalIn")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.TotalIn); if (message.TotalOut != null && Object.hasOwnProperty.call(message, "TotalOut")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.TotalOut); return writer; }; /** * Encodes the specified RankInfo message, length delimited. Does not implicitly {@link gamehall.RankInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.RankInfo * @static * @param {gamehall.IRankInfo} message RankInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ RankInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a RankInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.RankInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.RankInfo} RankInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RankInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.RankInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Snid = reader.int32(); break; } case 2: { message.Name = reader.string(); break; } case 3: { message.TotalIn = reader.int64(); break; } case 4: { message.TotalOut = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a RankInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.RankInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.RankInfo} RankInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RankInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a RankInfo message. * @function verify * @memberof gamehall.RankInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RankInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Snid != null && message.hasOwnProperty("Snid")) if (!$util.isInteger(message.Snid)) return "Snid: integer expected"; if (message.Name != null && message.hasOwnProperty("Name")) if (!$util.isString(message.Name)) return "Name: string expected"; if (message.TotalIn != null && message.hasOwnProperty("TotalIn")) if (!$util.isInteger(message.TotalIn) && !(message.TotalIn && $util.isInteger(message.TotalIn.low) && $util.isInteger(message.TotalIn.high))) return "TotalIn: integer|Long expected"; if (message.TotalOut != null && message.hasOwnProperty("TotalOut")) if (!$util.isInteger(message.TotalOut) && !(message.TotalOut && $util.isInteger(message.TotalOut.low) && $util.isInteger(message.TotalOut.high))) return "TotalOut: integer|Long expected"; return null; }; /** * Creates a RankInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.RankInfo * @static * @param {Object.} object Plain object * @returns {gamehall.RankInfo} RankInfo */ RankInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.RankInfo) return object; var message = new $root.gamehall.RankInfo(); if (object.Snid != null) message.Snid = object.Snid | 0; if (object.Name != null) message.Name = String(object.Name); if (object.TotalIn != null) if ($util.Long) (message.TotalIn = $util.Long.fromValue(object.TotalIn)).unsigned = false; else if (typeof object.TotalIn === "string") message.TotalIn = parseInt(object.TotalIn, 10); else if (typeof object.TotalIn === "number") message.TotalIn = object.TotalIn; else if (typeof object.TotalIn === "object") message.TotalIn = new $util.LongBits(object.TotalIn.low >>> 0, object.TotalIn.high >>> 0).toNumber(); if (object.TotalOut != null) if ($util.Long) (message.TotalOut = $util.Long.fromValue(object.TotalOut)).unsigned = false; else if (typeof object.TotalOut === "string") message.TotalOut = parseInt(object.TotalOut, 10); else if (typeof object.TotalOut === "number") message.TotalOut = object.TotalOut; else if (typeof object.TotalOut === "object") message.TotalOut = new $util.LongBits(object.TotalOut.low >>> 0, object.TotalOut.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a RankInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.RankInfo * @static * @param {gamehall.RankInfo} message RankInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ RankInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.Snid = 0; object.Name = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalIn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalIn = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalOut = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalOut = options.longs === String ? "0" : 0; } if (message.Snid != null && message.hasOwnProperty("Snid")) object.Snid = message.Snid; if (message.Name != null && message.hasOwnProperty("Name")) object.Name = message.Name; if (message.TotalIn != null && message.hasOwnProperty("TotalIn")) if (typeof message.TotalIn === "number") object.TotalIn = options.longs === String ? String(message.TotalIn) : message.TotalIn; else object.TotalIn = options.longs === String ? $util.Long.prototype.toString.call(message.TotalIn) : options.longs === Number ? new $util.LongBits(message.TotalIn.low >>> 0, message.TotalIn.high >>> 0).toNumber() : message.TotalIn; if (message.TotalOut != null && message.hasOwnProperty("TotalOut")) if (typeof message.TotalOut === "number") object.TotalOut = options.longs === String ? String(message.TotalOut) : message.TotalOut; else object.TotalOut = options.longs === String ? $util.Long.prototype.toString.call(message.TotalOut) : options.longs === Number ? new $util.LongBits(message.TotalOut.low >>> 0, message.TotalOut.high >>> 0).toNumber() : message.TotalOut; return object; }; /** * Converts this RankInfo to JSON. * @function toJSON * @memberof gamehall.RankInfo * @instance * @returns {Object.} JSON object */ RankInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for RankInfo * @function getTypeUrl * @memberof gamehall.RankInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ RankInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.RankInfo"; }; return RankInfo; })(); gamehall.SCGetRankInfo = (function() { /** * Properties of a SCGetRankInfo. * @memberof gamehall * @interface ISCGetRankInfo * @property {Array.|null} [Info] SCGetRankInfo Info */ /** * Constructs a new SCGetRankInfo. * @memberof gamehall * @classdesc Represents a SCGetRankInfo. * @implements ISCGetRankInfo * @constructor * @param {gamehall.ISCGetRankInfo=} [properties] Properties to set */ function SCGetRankInfo(properties) { this.Info = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCGetRankInfo Info. * @member {Array.} Info * @memberof gamehall.SCGetRankInfo * @instance */ SCGetRankInfo.prototype.Info = $util.emptyArray; /** * Creates a new SCGetRankInfo instance using the specified properties. * @function create * @memberof gamehall.SCGetRankInfo * @static * @param {gamehall.ISCGetRankInfo=} [properties] Properties to set * @returns {gamehall.SCGetRankInfo} SCGetRankInfo instance */ SCGetRankInfo.create = function create(properties) { return new SCGetRankInfo(properties); }; /** * Encodes the specified SCGetRankInfo message. Does not implicitly {@link gamehall.SCGetRankInfo.verify|verify} messages. * @function encode * @memberof gamehall.SCGetRankInfo * @static * @param {gamehall.ISCGetRankInfo} message SCGetRankInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetRankInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Info != null && message.Info.length) for (var i = 0; i < message.Info.length; ++i) $root.gamehall.RankInfo.encode(message.Info[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCGetRankInfo message, length delimited. Does not implicitly {@link gamehall.SCGetRankInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCGetRankInfo * @static * @param {gamehall.ISCGetRankInfo} message SCGetRankInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCGetRankInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCGetRankInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.SCGetRankInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCGetRankInfo} SCGetRankInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetRankInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCGetRankInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.Info && message.Info.length)) message.Info = []; message.Info.push($root.gamehall.RankInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCGetRankInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCGetRankInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCGetRankInfo} SCGetRankInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCGetRankInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCGetRankInfo message. * @function verify * @memberof gamehall.SCGetRankInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCGetRankInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Info != null && message.hasOwnProperty("Info")) { if (!Array.isArray(message.Info)) return "Info: array expected"; for (var i = 0; i < message.Info.length; ++i) { var error = $root.gamehall.RankInfo.verify(message.Info[i]); if (error) return "Info." + error; } } return null; }; /** * Creates a SCGetRankInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCGetRankInfo * @static * @param {Object.} object Plain object * @returns {gamehall.SCGetRankInfo} SCGetRankInfo */ SCGetRankInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCGetRankInfo) return object; var message = new $root.gamehall.SCGetRankInfo(); if (object.Info) { if (!Array.isArray(object.Info)) throw TypeError(".gamehall.SCGetRankInfo.Info: array expected"); message.Info = []; for (var i = 0; i < object.Info.length; ++i) { if (typeof object.Info[i] !== "object") throw TypeError(".gamehall.SCGetRankInfo.Info: object expected"); message.Info[i] = $root.gamehall.RankInfo.fromObject(object.Info[i]); } } return message; }; /** * Creates a plain object from a SCGetRankInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCGetRankInfo * @static * @param {gamehall.SCGetRankInfo} message SCGetRankInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCGetRankInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Info = []; if (message.Info && message.Info.length) { object.Info = []; for (var j = 0; j < message.Info.length; ++j) object.Info[j] = $root.gamehall.RankInfo.toObject(message.Info[j], options); } return object; }; /** * Converts this SCGetRankInfo to JSON. * @function toJSON * @memberof gamehall.SCGetRankInfo * @instance * @returns {Object.} JSON object */ SCGetRankInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCGetRankInfo * @function getTypeUrl * @memberof gamehall.SCGetRankInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCGetRankInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCGetRankInfo"; }; return SCGetRankInfo; })(); /** * ShowRedCode enum. * @name gamehall.ShowRedCode * @enum {number} * @property {number} Mail=0 Mail value * @property {number} Shop=1 Shop value * @property {number} Role=2 Role value * @property {number} Pet=3 Pet value * @property {number} Welfare=4 Welfare value */ gamehall.ShowRedCode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "Mail"] = 0; values[valuesById[1] = "Shop"] = 1; values[valuesById[2] = "Role"] = 2; values[valuesById[3] = "Pet"] = 3; values[valuesById[4] = "Welfare"] = 4; return values; })(); gamehall.ShowRed = (function() { /** * Properties of a ShowRed. * @memberof gamehall * @interface IShowRed * @property {gamehall.ShowRedCode|null} [ShowType] ShowRed ShowType * @property {number|null} [ShowChild] ShowRed ShowChild * @property {number|null} [IsShow] ShowRed IsShow */ /** * Constructs a new ShowRed. * @memberof gamehall * @classdesc Represents a ShowRed. * @implements IShowRed * @constructor * @param {gamehall.IShowRed=} [properties] Properties to set */ function ShowRed(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ShowRed ShowType. * @member {gamehall.ShowRedCode} ShowType * @memberof gamehall.ShowRed * @instance */ ShowRed.prototype.ShowType = 0; /** * ShowRed ShowChild. * @member {number} ShowChild * @memberof gamehall.ShowRed * @instance */ ShowRed.prototype.ShowChild = 0; /** * ShowRed IsShow. * @member {number} IsShow * @memberof gamehall.ShowRed * @instance */ ShowRed.prototype.IsShow = 0; /** * Creates a new ShowRed instance using the specified properties. * @function create * @memberof gamehall.ShowRed * @static * @param {gamehall.IShowRed=} [properties] Properties to set * @returns {gamehall.ShowRed} ShowRed instance */ ShowRed.create = function create(properties) { return new ShowRed(properties); }; /** * Encodes the specified ShowRed message. Does not implicitly {@link gamehall.ShowRed.verify|verify} messages. * @function encode * @memberof gamehall.ShowRed * @static * @param {gamehall.IShowRed} message ShowRed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ShowRed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowType != null && Object.hasOwnProperty.call(message, "ShowType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ShowType); if (message.ShowChild != null && Object.hasOwnProperty.call(message, "ShowChild")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ShowChild); if (message.IsShow != null && Object.hasOwnProperty.call(message, "IsShow")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.IsShow); return writer; }; /** * Encodes the specified ShowRed message, length delimited. Does not implicitly {@link gamehall.ShowRed.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.ShowRed * @static * @param {gamehall.IShowRed} message ShowRed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ShowRed.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ShowRed message from the specified reader or buffer. * @function decode * @memberof gamehall.ShowRed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.ShowRed} ShowRed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShowRed.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.ShowRed(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowType = reader.int32(); break; } case 2: { message.ShowChild = reader.int32(); break; } case 3: { message.IsShow = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ShowRed message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.ShowRed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.ShowRed} ShowRed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShowRed.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ShowRed message. * @function verify * @memberof gamehall.ShowRed * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ShowRed.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowType != null && message.hasOwnProperty("ShowType")) switch (message.ShowType) { default: return "ShowType: enum value expected"; case 0: case 1: case 2: case 3: case 4: break; } if (message.ShowChild != null && message.hasOwnProperty("ShowChild")) if (!$util.isInteger(message.ShowChild)) return "ShowChild: integer expected"; if (message.IsShow != null && message.hasOwnProperty("IsShow")) if (!$util.isInteger(message.IsShow)) return "IsShow: integer expected"; return null; }; /** * Creates a ShowRed message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.ShowRed * @static * @param {Object.} object Plain object * @returns {gamehall.ShowRed} ShowRed */ ShowRed.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.ShowRed) return object; var message = new $root.gamehall.ShowRed(); switch (object.ShowType) { default: if (typeof object.ShowType === "number") { message.ShowType = object.ShowType; break; } break; case "Mail": case 0: message.ShowType = 0; break; case "Shop": case 1: message.ShowType = 1; break; case "Role": case 2: message.ShowType = 2; break; case "Pet": case 3: message.ShowType = 3; break; case "Welfare": case 4: message.ShowType = 4; break; } if (object.ShowChild != null) message.ShowChild = object.ShowChild | 0; if (object.IsShow != null) message.IsShow = object.IsShow | 0; return message; }; /** * Creates a plain object from a ShowRed message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.ShowRed * @static * @param {gamehall.ShowRed} message ShowRed * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ShowRed.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ShowType = options.enums === String ? "Mail" : 0; object.ShowChild = 0; object.IsShow = 0; } if (message.ShowType != null && message.hasOwnProperty("ShowType")) object.ShowType = options.enums === String ? $root.gamehall.ShowRedCode[message.ShowType] === undefined ? message.ShowType : $root.gamehall.ShowRedCode[message.ShowType] : message.ShowType; if (message.ShowChild != null && message.hasOwnProperty("ShowChild")) object.ShowChild = message.ShowChild; if (message.IsShow != null && message.hasOwnProperty("IsShow")) object.IsShow = message.IsShow; return object; }; /** * Converts this ShowRed to JSON. * @function toJSON * @memberof gamehall.ShowRed * @instance * @returns {Object.} JSON object */ ShowRed.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ShowRed * @function getTypeUrl * @memberof gamehall.ShowRed * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ShowRed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.ShowRed"; }; return ShowRed; })(); gamehall.SCShowRed = (function() { /** * Properties of a SCShowRed. * @memberof gamehall * @interface ISCShowRed * @property {gamehall.IShowRed|null} [ShowRed] SCShowRed ShowRed */ /** * Constructs a new SCShowRed. * @memberof gamehall * @classdesc Represents a SCShowRed. * @implements ISCShowRed * @constructor * @param {gamehall.ISCShowRed=} [properties] Properties to set */ function SCShowRed(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCShowRed ShowRed. * @member {gamehall.IShowRed|null|undefined} ShowRed * @memberof gamehall.SCShowRed * @instance */ SCShowRed.prototype.ShowRed = null; /** * Creates a new SCShowRed instance using the specified properties. * @function create * @memberof gamehall.SCShowRed * @static * @param {gamehall.ISCShowRed=} [properties] Properties to set * @returns {gamehall.SCShowRed} SCShowRed instance */ SCShowRed.create = function create(properties) { return new SCShowRed(properties); }; /** * Encodes the specified SCShowRed message. Does not implicitly {@link gamehall.SCShowRed.verify|verify} messages. * @function encode * @memberof gamehall.SCShowRed * @static * @param {gamehall.ISCShowRed} message SCShowRed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCShowRed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ShowRed != null && Object.hasOwnProperty.call(message, "ShowRed")) $root.gamehall.ShowRed.encode(message.ShowRed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCShowRed message, length delimited. Does not implicitly {@link gamehall.SCShowRed.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCShowRed * @static * @param {gamehall.ISCShowRed} message SCShowRed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCShowRed.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCShowRed message from the specified reader or buffer. * @function decode * @memberof gamehall.SCShowRed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCShowRed} SCShowRed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCShowRed.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCShowRed(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ShowRed = $root.gamehall.ShowRed.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCShowRed message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCShowRed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCShowRed} SCShowRed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCShowRed.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCShowRed message. * @function verify * @memberof gamehall.SCShowRed * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCShowRed.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ShowRed != null && message.hasOwnProperty("ShowRed")) { var error = $root.gamehall.ShowRed.verify(message.ShowRed); if (error) return "ShowRed." + error; } return null; }; /** * Creates a SCShowRed message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCShowRed * @static * @param {Object.} object Plain object * @returns {gamehall.SCShowRed} SCShowRed */ SCShowRed.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCShowRed) return object; var message = new $root.gamehall.SCShowRed(); if (object.ShowRed != null) { if (typeof object.ShowRed !== "object") throw TypeError(".gamehall.SCShowRed.ShowRed: object expected"); message.ShowRed = $root.gamehall.ShowRed.fromObject(object.ShowRed); } return message; }; /** * Creates a plain object from a SCShowRed message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCShowRed * @static * @param {gamehall.SCShowRed} message SCShowRed * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCShowRed.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.ShowRed = null; if (message.ShowRed != null && message.hasOwnProperty("ShowRed")) object.ShowRed = $root.gamehall.ShowRed.toObject(message.ShowRed, options); return object; }; /** * Converts this SCShowRed to JSON. * @function toJSON * @memberof gamehall.SCShowRed * @instance * @returns {Object.} JSON object */ SCShowRed.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCShowRed * @function getTypeUrl * @memberof gamehall.SCShowRed * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCShowRed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCShowRed"; }; return SCShowRed; })(); /** * OpResultCode_Hundred enum. * @name gamehall.OpResultCode_Hundred * @enum {number} * @property {number} OPRC_Sucess_Hundred=0 OPRC_Sucess_Hundred value * @property {number} OPRC_Error_Hundred=1 OPRC_Error_Hundred value * @property {number} OPRC_YourResVerIsLow_Hundred=1044 OPRC_YourResVerIsLow_Hundred value * @property {number} OPRC_YourAppVerIsLow_Hundred=1045 OPRC_YourAppVerIsLow_Hundred value * @property {number} OPRC_RoomHadClosed_Hundred=1053 OPRC_RoomHadClosed_Hundred value * @property {number} OPRC_SceneServerMaintain_Hundred=1054 OPRC_SceneServerMaintain_Hundred value * @property {number} OPRC_CoinNotEnough_Hundred=1056 OPRC_CoinNotEnough_Hundred value * @property {number} OPRC_CoinTooMore_Hundred=1058 OPRC_CoinTooMore_Hundred value * @property {number} OPRC_RoomGameTimes_Hundred=1103 OPRC_RoomGameTimes_Hundred value * @property {number} OPRC_MustBindPromoter_Hundred=1113 OPRC_MustBindPromoter_Hundred value */ gamehall.OpResultCode_Hundred = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OPRC_Sucess_Hundred"] = 0; values[valuesById[1] = "OPRC_Error_Hundred"] = 1; values[valuesById[1044] = "OPRC_YourResVerIsLow_Hundred"] = 1044; values[valuesById[1045] = "OPRC_YourAppVerIsLow_Hundred"] = 1045; values[valuesById[1053] = "OPRC_RoomHadClosed_Hundred"] = 1053; values[valuesById[1054] = "OPRC_SceneServerMaintain_Hundred"] = 1054; values[valuesById[1056] = "OPRC_CoinNotEnough_Hundred"] = 1056; values[valuesById[1058] = "OPRC_CoinTooMore_Hundred"] = 1058; values[valuesById[1103] = "OPRC_RoomGameTimes_Hundred"] = 1103; values[valuesById[1113] = "OPRC_MustBindPromoter_Hundred"] = 1113; return values; })(); /** * HundredScenePacketID enum. * @name gamehall.HundredScenePacketID * @enum {number} * @property {number} PACKET_HundredScene_ZERO=0 PACKET_HundredScene_ZERO value * @property {number} PACKET_CS_HUNDREDSCENE_OP=2380 PACKET_CS_HUNDREDSCENE_OP value * @property {number} PACKET_SC_HUNDREDSCENE_OP=2381 PACKET_SC_HUNDREDSCENE_OP value * @property {number} PACKET_CS_HUNDREDSCENE_GETPLAYERNUM=2382 PACKET_CS_HUNDREDSCENE_GETPLAYERNUM value * @property {number} PACKET_SC_HUNDREDSCENE_GETPLAYERNUM=2383 PACKET_SC_HUNDREDSCENE_GETPLAYERNUM value * @property {number} PACKET_CS_GAMEJACKPOT=2384 PACKET_CS_GAMEJACKPOT value * @property {number} PACKET_SC_GAMEJACKPOT=2385 PACKET_SC_GAMEJACKPOT value * @property {number} PACKET_CS_GAMEHISTORYINFO=2386 PACKET_CS_GAMEHISTORYINFO value * @property {number} PACKET_SC_GAMEPLAYERHISTORY=2387 PACKET_SC_GAMEPLAYERHISTORY value * @property {number} PACKET_SC_GAMEBIGWINHISTORY=2388 PACKET_SC_GAMEBIGWINHISTORY value * @property {number} PACKET_BD_GAMEJACKPOT=2389 PACKET_BD_GAMEJACKPOT value */ gamehall.HundredScenePacketID = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "PACKET_HundredScene_ZERO"] = 0; values[valuesById[2380] = "PACKET_CS_HUNDREDSCENE_OP"] = 2380; values[valuesById[2381] = "PACKET_SC_HUNDREDSCENE_OP"] = 2381; values[valuesById[2382] = "PACKET_CS_HUNDREDSCENE_GETPLAYERNUM"] = 2382; values[valuesById[2383] = "PACKET_SC_HUNDREDSCENE_GETPLAYERNUM"] = 2383; values[valuesById[2384] = "PACKET_CS_GAMEJACKPOT"] = 2384; values[valuesById[2385] = "PACKET_SC_GAMEJACKPOT"] = 2385; values[valuesById[2386] = "PACKET_CS_GAMEHISTORYINFO"] = 2386; values[valuesById[2387] = "PACKET_SC_GAMEPLAYERHISTORY"] = 2387; values[valuesById[2388] = "PACKET_SC_GAMEBIGWINHISTORY"] = 2388; values[valuesById[2389] = "PACKET_BD_GAMEJACKPOT"] = 2389; return values; })(); gamehall.CSHundredSceneOp = (function() { /** * Properties of a CSHundredSceneOp. * @memberof gamehall * @interface ICSHundredSceneOp * @property {number|null} [Id] CSHundredSceneOp Id * @property {number|null} [OpType] CSHundredSceneOp OpType * @property {Array.|null} [OpParams] CSHundredSceneOp OpParams * @property {number|null} [ApkVer] CSHundredSceneOp ApkVer * @property {number|null} [ResVer] CSHundredSceneOp ResVer */ /** * Constructs a new CSHundredSceneOp. * @memberof gamehall * @classdesc Represents a CSHundredSceneOp. * @implements ICSHundredSceneOp * @constructor * @param {gamehall.ICSHundredSceneOp=} [properties] Properties to set */ function CSHundredSceneOp(properties) { this.OpParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSHundredSceneOp Id. * @member {number} Id * @memberof gamehall.CSHundredSceneOp * @instance */ CSHundredSceneOp.prototype.Id = 0; /** * CSHundredSceneOp OpType. * @member {number} OpType * @memberof gamehall.CSHundredSceneOp * @instance */ CSHundredSceneOp.prototype.OpType = 0; /** * CSHundredSceneOp OpParams. * @member {Array.} OpParams * @memberof gamehall.CSHundredSceneOp * @instance */ CSHundredSceneOp.prototype.OpParams = $util.emptyArray; /** * CSHundredSceneOp ApkVer. * @member {number} ApkVer * @memberof gamehall.CSHundredSceneOp * @instance */ CSHundredSceneOp.prototype.ApkVer = 0; /** * CSHundredSceneOp ResVer. * @member {number} ResVer * @memberof gamehall.CSHundredSceneOp * @instance */ CSHundredSceneOp.prototype.ResVer = 0; /** * Creates a new CSHundredSceneOp instance using the specified properties. * @function create * @memberof gamehall.CSHundredSceneOp * @static * @param {gamehall.ICSHundredSceneOp=} [properties] Properties to set * @returns {gamehall.CSHundredSceneOp} CSHundredSceneOp instance */ CSHundredSceneOp.create = function create(properties) { return new CSHundredSceneOp(properties); }; /** * Encodes the specified CSHundredSceneOp message. Does not implicitly {@link gamehall.CSHundredSceneOp.verify|verify} messages. * @function encode * @memberof gamehall.CSHundredSceneOp * @static * @param {gamehall.ICSHundredSceneOp} message CSHundredSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneOp.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).int32(message.Id); if (message.OpType != null && Object.hasOwnProperty.call(message, "OpType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.OpType); if (message.OpParams != null && message.OpParams.length) { writer.uint32(/* id 3, wireType 2 =*/26).fork(); for (var i = 0; i < message.OpParams.length; ++i) writer.int32(message.OpParams[i]); writer.ldelim(); } if (message.ApkVer != null && Object.hasOwnProperty.call(message, "ApkVer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.ApkVer); if (message.ResVer != null && Object.hasOwnProperty.call(message, "ResVer")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ResVer); return writer; }; /** * Encodes the specified CSHundredSceneOp message, length delimited. Does not implicitly {@link gamehall.CSHundredSceneOp.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSHundredSceneOp * @static * @param {gamehall.ICSHundredSceneOp} message CSHundredSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneOp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHundredSceneOp message from the specified reader or buffer. * @function decode * @memberof gamehall.CSHundredSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSHundredSceneOp} CSHundredSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneOp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSHundredSceneOp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.Id = reader.int32(); break; } case 2: { message.OpType = reader.int32(); break; } case 3: { if (!(message.OpParams && message.OpParams.length)) message.OpParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OpParams.push(reader.int32()); } else message.OpParams.push(reader.int32()); break; } case 4: { message.ApkVer = reader.int32(); break; } case 5: { message.ResVer = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHundredSceneOp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSHundredSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSHundredSceneOp} CSHundredSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneOp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHundredSceneOp message. * @function verify * @memberof gamehall.CSHundredSceneOp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHundredSceneOp.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)) return "Id: integer expected"; if (message.OpType != null && message.hasOwnProperty("OpType")) if (!$util.isInteger(message.OpType)) return "OpType: integer expected"; if (message.OpParams != null && message.hasOwnProperty("OpParams")) { if (!Array.isArray(message.OpParams)) return "OpParams: array expected"; for (var i = 0; i < message.OpParams.length; ++i) if (!$util.isInteger(message.OpParams[i])) return "OpParams: integer[] expected"; } if (message.ApkVer != null && message.hasOwnProperty("ApkVer")) if (!$util.isInteger(message.ApkVer)) return "ApkVer: integer expected"; if (message.ResVer != null && message.hasOwnProperty("ResVer")) if (!$util.isInteger(message.ResVer)) return "ResVer: integer expected"; return null; }; /** * Creates a CSHundredSceneOp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSHundredSceneOp * @static * @param {Object.} object Plain object * @returns {gamehall.CSHundredSceneOp} CSHundredSceneOp */ CSHundredSceneOp.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSHundredSceneOp) return object; var message = new $root.gamehall.CSHundredSceneOp(); if (object.Id != null) message.Id = object.Id | 0; if (object.OpType != null) message.OpType = object.OpType | 0; if (object.OpParams) { if (!Array.isArray(object.OpParams)) throw TypeError(".gamehall.CSHundredSceneOp.OpParams: array expected"); message.OpParams = []; for (var i = 0; i < object.OpParams.length; ++i) message.OpParams[i] = object.OpParams[i] | 0; } if (object.ApkVer != null) message.ApkVer = object.ApkVer | 0; if (object.ResVer != null) message.ResVer = object.ResVer | 0; return message; }; /** * Creates a plain object from a CSHundredSceneOp message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSHundredSceneOp * @static * @param {gamehall.CSHundredSceneOp} message CSHundredSceneOp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHundredSceneOp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OpParams = []; if (options.defaults) { object.Id = 0; object.OpType = 0; object.ApkVer = 0; object.ResVer = 0; } if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpType != null && message.hasOwnProperty("OpType")) object.OpType = message.OpType; if (message.OpParams && message.OpParams.length) { object.OpParams = []; for (var j = 0; j < message.OpParams.length; ++j) object.OpParams[j] = message.OpParams[j]; } if (message.ApkVer != null && message.hasOwnProperty("ApkVer")) object.ApkVer = message.ApkVer; if (message.ResVer != null && message.hasOwnProperty("ResVer")) object.ResVer = message.ResVer; return object; }; /** * Converts this CSHundredSceneOp to JSON. * @function toJSON * @memberof gamehall.CSHundredSceneOp * @instance * @returns {Object.} JSON object */ CSHundredSceneOp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHundredSceneOp * @function getTypeUrl * @memberof gamehall.CSHundredSceneOp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHundredSceneOp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSHundredSceneOp"; }; return CSHundredSceneOp; })(); gamehall.SCHundredSceneOp = (function() { /** * Properties of a SCHundredSceneOp. * @memberof gamehall * @interface ISCHundredSceneOp * @property {gamehall.OpResultCode_Hundred|null} [OpCode] SCHundredSceneOp OpCode * @property {number|null} [Id] SCHundredSceneOp Id * @property {number|null} [OpType] SCHundredSceneOp OpType * @property {Array.|null} [OpParams] SCHundredSceneOp OpParams * @property {number|null} [MinApkVer] SCHundredSceneOp MinApkVer * @property {number|null} [LatestApkVer] SCHundredSceneOp LatestApkVer * @property {number|null} [MinResVer] SCHundredSceneOp MinResVer * @property {number|null} [LatestResVer] SCHundredSceneOp LatestResVer */ /** * Constructs a new SCHundredSceneOp. * @memberof gamehall * @classdesc Represents a SCHundredSceneOp. * @implements ISCHundredSceneOp * @constructor * @param {gamehall.ISCHundredSceneOp=} [properties] Properties to set */ function SCHundredSceneOp(properties) { this.OpParams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCHundredSceneOp OpCode. * @member {gamehall.OpResultCode_Hundred} OpCode * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.OpCode = 0; /** * SCHundredSceneOp Id. * @member {number} Id * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.Id = 0; /** * SCHundredSceneOp OpType. * @member {number} OpType * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.OpType = 0; /** * SCHundredSceneOp OpParams. * @member {Array.} OpParams * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.OpParams = $util.emptyArray; /** * SCHundredSceneOp MinApkVer. * @member {number} MinApkVer * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.MinApkVer = 0; /** * SCHundredSceneOp LatestApkVer. * @member {number} LatestApkVer * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.LatestApkVer = 0; /** * SCHundredSceneOp MinResVer. * @member {number} MinResVer * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.MinResVer = 0; /** * SCHundredSceneOp LatestResVer. * @member {number} LatestResVer * @memberof gamehall.SCHundredSceneOp * @instance */ SCHundredSceneOp.prototype.LatestResVer = 0; /** * Creates a new SCHundredSceneOp instance using the specified properties. * @function create * @memberof gamehall.SCHundredSceneOp * @static * @param {gamehall.ISCHundredSceneOp=} [properties] Properties to set * @returns {gamehall.SCHundredSceneOp} SCHundredSceneOp instance */ SCHundredSceneOp.create = function create(properties) { return new SCHundredSceneOp(properties); }; /** * Encodes the specified SCHundredSceneOp message. Does not implicitly {@link gamehall.SCHundredSceneOp.verify|verify} messages. * @function encode * @memberof gamehall.SCHundredSceneOp * @static * @param {gamehall.ISCHundredSceneOp} message SCHundredSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHundredSceneOp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.OpCode != null && Object.hasOwnProperty.call(message, "OpCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.OpCode); if (message.Id != null && Object.hasOwnProperty.call(message, "Id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Id); if (message.OpType != null && Object.hasOwnProperty.call(message, "OpType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.OpType); if (message.OpParams != null && message.OpParams.length) { writer.uint32(/* id 4, wireType 2 =*/34).fork(); for (var i = 0; i < message.OpParams.length; ++i) writer.int32(message.OpParams[i]); writer.ldelim(); } if (message.MinApkVer != null && Object.hasOwnProperty.call(message, "MinApkVer")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.MinApkVer); if (message.LatestApkVer != null && Object.hasOwnProperty.call(message, "LatestApkVer")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.LatestApkVer); if (message.MinResVer != null && Object.hasOwnProperty.call(message, "MinResVer")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.MinResVer); if (message.LatestResVer != null && Object.hasOwnProperty.call(message, "LatestResVer")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.LatestResVer); return writer; }; /** * Encodes the specified SCHundredSceneOp message, length delimited. Does not implicitly {@link gamehall.SCHundredSceneOp.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCHundredSceneOp * @static * @param {gamehall.ISCHundredSceneOp} message SCHundredSceneOp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHundredSceneOp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCHundredSceneOp message from the specified reader or buffer. * @function decode * @memberof gamehall.SCHundredSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCHundredSceneOp} SCHundredSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHundredSceneOp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCHundredSceneOp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.OpCode = reader.int32(); break; } case 2: { message.Id = reader.int32(); break; } case 3: { message.OpType = reader.int32(); break; } case 4: { if (!(message.OpParams && message.OpParams.length)) message.OpParams = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.OpParams.push(reader.int32()); } else message.OpParams.push(reader.int32()); break; } case 5: { message.MinApkVer = reader.int32(); break; } case 6: { message.LatestApkVer = reader.int32(); break; } case 7: { message.MinResVer = reader.int32(); break; } case 8: { message.LatestResVer = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCHundredSceneOp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCHundredSceneOp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCHundredSceneOp} SCHundredSceneOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHundredSceneOp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCHundredSceneOp message. * @function verify * @memberof gamehall.SCHundredSceneOp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCHundredSceneOp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.OpCode != null && message.hasOwnProperty("OpCode")) switch (message.OpCode) { default: return "OpCode: enum value expected"; case 0: case 1: case 1044: case 1045: case 1053: case 1054: case 1056: case 1058: case 1103: case 1113: break; } if (message.Id != null && message.hasOwnProperty("Id")) if (!$util.isInteger(message.Id)) return "Id: integer expected"; if (message.OpType != null && message.hasOwnProperty("OpType")) if (!$util.isInteger(message.OpType)) return "OpType: integer expected"; if (message.OpParams != null && message.hasOwnProperty("OpParams")) { if (!Array.isArray(message.OpParams)) return "OpParams: array expected"; for (var i = 0; i < message.OpParams.length; ++i) if (!$util.isInteger(message.OpParams[i])) return "OpParams: integer[] expected"; } if (message.MinApkVer != null && message.hasOwnProperty("MinApkVer")) if (!$util.isInteger(message.MinApkVer)) return "MinApkVer: integer expected"; if (message.LatestApkVer != null && message.hasOwnProperty("LatestApkVer")) if (!$util.isInteger(message.LatestApkVer)) return "LatestApkVer: integer expected"; if (message.MinResVer != null && message.hasOwnProperty("MinResVer")) if (!$util.isInteger(message.MinResVer)) return "MinResVer: integer expected"; if (message.LatestResVer != null && message.hasOwnProperty("LatestResVer")) if (!$util.isInteger(message.LatestResVer)) return "LatestResVer: integer expected"; return null; }; /** * Creates a SCHundredSceneOp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCHundredSceneOp * @static * @param {Object.} object Plain object * @returns {gamehall.SCHundredSceneOp} SCHundredSceneOp */ SCHundredSceneOp.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCHundredSceneOp) return object; var message = new $root.gamehall.SCHundredSceneOp(); switch (object.OpCode) { default: if (typeof object.OpCode === "number") { message.OpCode = object.OpCode; break; } break; case "OPRC_Sucess_Hundred": case 0: message.OpCode = 0; break; case "OPRC_Error_Hundred": case 1: message.OpCode = 1; break; case "OPRC_YourResVerIsLow_Hundred": case 1044: message.OpCode = 1044; break; case "OPRC_YourAppVerIsLow_Hundred": case 1045: message.OpCode = 1045; break; case "OPRC_RoomHadClosed_Hundred": case 1053: message.OpCode = 1053; break; case "OPRC_SceneServerMaintain_Hundred": case 1054: message.OpCode = 1054; break; case "OPRC_CoinNotEnough_Hundred": case 1056: message.OpCode = 1056; break; case "OPRC_CoinTooMore_Hundred": case 1058: message.OpCode = 1058; break; case "OPRC_RoomGameTimes_Hundred": case 1103: message.OpCode = 1103; break; case "OPRC_MustBindPromoter_Hundred": case 1113: message.OpCode = 1113; break; } if (object.Id != null) message.Id = object.Id | 0; if (object.OpType != null) message.OpType = object.OpType | 0; if (object.OpParams) { if (!Array.isArray(object.OpParams)) throw TypeError(".gamehall.SCHundredSceneOp.OpParams: array expected"); message.OpParams = []; for (var i = 0; i < object.OpParams.length; ++i) message.OpParams[i] = object.OpParams[i] | 0; } if (object.MinApkVer != null) message.MinApkVer = object.MinApkVer | 0; if (object.LatestApkVer != null) message.LatestApkVer = object.LatestApkVer | 0; if (object.MinResVer != null) message.MinResVer = object.MinResVer | 0; if (object.LatestResVer != null) message.LatestResVer = object.LatestResVer | 0; return message; }; /** * Creates a plain object from a SCHundredSceneOp message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCHundredSceneOp * @static * @param {gamehall.SCHundredSceneOp} message SCHundredSceneOp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCHundredSceneOp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.OpParams = []; if (options.defaults) { object.OpCode = options.enums === String ? "OPRC_Sucess_Hundred" : 0; object.Id = 0; object.OpType = 0; object.MinApkVer = 0; object.LatestApkVer = 0; object.MinResVer = 0; object.LatestResVer = 0; } if (message.OpCode != null && message.hasOwnProperty("OpCode")) object.OpCode = options.enums === String ? $root.gamehall.OpResultCode_Hundred[message.OpCode] === undefined ? message.OpCode : $root.gamehall.OpResultCode_Hundred[message.OpCode] : message.OpCode; if (message.Id != null && message.hasOwnProperty("Id")) object.Id = message.Id; if (message.OpType != null && message.hasOwnProperty("OpType")) object.OpType = message.OpType; if (message.OpParams && message.OpParams.length) { object.OpParams = []; for (var j = 0; j < message.OpParams.length; ++j) object.OpParams[j] = message.OpParams[j]; } if (message.MinApkVer != null && message.hasOwnProperty("MinApkVer")) object.MinApkVer = message.MinApkVer; if (message.LatestApkVer != null && message.hasOwnProperty("LatestApkVer")) object.LatestApkVer = message.LatestApkVer; if (message.MinResVer != null && message.hasOwnProperty("MinResVer")) object.MinResVer = message.MinResVer; if (message.LatestResVer != null && message.hasOwnProperty("LatestResVer")) object.LatestResVer = message.LatestResVer; return object; }; /** * Converts this SCHundredSceneOp to JSON. * @function toJSON * @memberof gamehall.SCHundredSceneOp * @instance * @returns {Object.} JSON object */ SCHundredSceneOp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCHundredSceneOp * @function getTypeUrl * @memberof gamehall.SCHundredSceneOp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCHundredSceneOp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCHundredSceneOp"; }; return SCHundredSceneOp; })(); gamehall.CSHundredSceneGetPlayerNum = (function() { /** * Properties of a CSHundredSceneGetPlayerNum. * @memberof gamehall * @interface ICSHundredSceneGetPlayerNum * @property {number|null} [GameId] CSHundredSceneGetPlayerNum GameId * @property {number|null} [GameModel] CSHundredSceneGetPlayerNum GameModel */ /** * Constructs a new CSHundredSceneGetPlayerNum. * @memberof gamehall * @classdesc Represents a CSHundredSceneGetPlayerNum. * @implements ICSHundredSceneGetPlayerNum * @constructor * @param {gamehall.ICSHundredSceneGetPlayerNum=} [properties] Properties to set */ function CSHundredSceneGetPlayerNum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSHundredSceneGetPlayerNum GameId. * @member {number} GameId * @memberof gamehall.CSHundredSceneGetPlayerNum * @instance */ CSHundredSceneGetPlayerNum.prototype.GameId = 0; /** * CSHundredSceneGetPlayerNum GameModel. * @member {number} GameModel * @memberof gamehall.CSHundredSceneGetPlayerNum * @instance */ CSHundredSceneGetPlayerNum.prototype.GameModel = 0; /** * Creates a new CSHundredSceneGetPlayerNum instance using the specified properties. * @function create * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {gamehall.ICSHundredSceneGetPlayerNum=} [properties] Properties to set * @returns {gamehall.CSHundredSceneGetPlayerNum} CSHundredSceneGetPlayerNum instance */ CSHundredSceneGetPlayerNum.create = function create(properties) { return new CSHundredSceneGetPlayerNum(properties); }; /** * Encodes the specified CSHundredSceneGetPlayerNum message. Does not implicitly {@link gamehall.CSHundredSceneGetPlayerNum.verify|verify} messages. * @function encode * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {gamehall.ICSHundredSceneGetPlayerNum} message CSHundredSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneGetPlayerNum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.GameModel != null && Object.hasOwnProperty.call(message, "GameModel")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameModel); return writer; }; /** * Encodes the specified CSHundredSceneGetPlayerNum message, length delimited. Does not implicitly {@link gamehall.CSHundredSceneGetPlayerNum.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {gamehall.ICSHundredSceneGetPlayerNum} message CSHundredSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneGetPlayerNum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHundredSceneGetPlayerNum message from the specified reader or buffer. * @function decode * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSHundredSceneGetPlayerNum} CSHundredSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneGetPlayerNum.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSHundredSceneGetPlayerNum(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.GameModel = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHundredSceneGetPlayerNum message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSHundredSceneGetPlayerNum} CSHundredSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneGetPlayerNum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHundredSceneGetPlayerNum message. * @function verify * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHundredSceneGetPlayerNum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.GameModel != null && message.hasOwnProperty("GameModel")) if (!$util.isInteger(message.GameModel)) return "GameModel: integer expected"; return null; }; /** * Creates a CSHundredSceneGetPlayerNum message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {Object.} object Plain object * @returns {gamehall.CSHundredSceneGetPlayerNum} CSHundredSceneGetPlayerNum */ CSHundredSceneGetPlayerNum.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSHundredSceneGetPlayerNum) return object; var message = new $root.gamehall.CSHundredSceneGetPlayerNum(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.GameModel != null) message.GameModel = object.GameModel | 0; return message; }; /** * Creates a plain object from a CSHundredSceneGetPlayerNum message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {gamehall.CSHundredSceneGetPlayerNum} message CSHundredSceneGetPlayerNum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHundredSceneGetPlayerNum.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameId = 0; object.GameModel = 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.GameModel != null && message.hasOwnProperty("GameModel")) object.GameModel = message.GameModel; return object; }; /** * Converts this CSHundredSceneGetPlayerNum to JSON. * @function toJSON * @memberof gamehall.CSHundredSceneGetPlayerNum * @instance * @returns {Object.} JSON object */ CSHundredSceneGetPlayerNum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHundredSceneGetPlayerNum * @function getTypeUrl * @memberof gamehall.CSHundredSceneGetPlayerNum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHundredSceneGetPlayerNum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSHundredSceneGetPlayerNum"; }; return CSHundredSceneGetPlayerNum; })(); gamehall.SCHundredSceneGetPlayerNum = (function() { /** * Properties of a SCHundredSceneGetPlayerNum. * @memberof gamehall * @interface ISCHundredSceneGetPlayerNum * @property {Array.|null} [Nums] SCHundredSceneGetPlayerNum Nums */ /** * Constructs a new SCHundredSceneGetPlayerNum. * @memberof gamehall * @classdesc Represents a SCHundredSceneGetPlayerNum. * @implements ISCHundredSceneGetPlayerNum * @constructor * @param {gamehall.ISCHundredSceneGetPlayerNum=} [properties] Properties to set */ function SCHundredSceneGetPlayerNum(properties) { this.Nums = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCHundredSceneGetPlayerNum Nums. * @member {Array.} Nums * @memberof gamehall.SCHundredSceneGetPlayerNum * @instance */ SCHundredSceneGetPlayerNum.prototype.Nums = $util.emptyArray; /** * Creates a new SCHundredSceneGetPlayerNum instance using the specified properties. * @function create * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {gamehall.ISCHundredSceneGetPlayerNum=} [properties] Properties to set * @returns {gamehall.SCHundredSceneGetPlayerNum} SCHundredSceneGetPlayerNum instance */ SCHundredSceneGetPlayerNum.create = function create(properties) { return new SCHundredSceneGetPlayerNum(properties); }; /** * Encodes the specified SCHundredSceneGetPlayerNum message. Does not implicitly {@link gamehall.SCHundredSceneGetPlayerNum.verify|verify} messages. * @function encode * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {gamehall.ISCHundredSceneGetPlayerNum} message SCHundredSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHundredSceneGetPlayerNum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.Nums != null && message.Nums.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.Nums.length; ++i) writer.int32(message.Nums[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified SCHundredSceneGetPlayerNum message, length delimited. Does not implicitly {@link gamehall.SCHundredSceneGetPlayerNum.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {gamehall.ISCHundredSceneGetPlayerNum} message SCHundredSceneGetPlayerNum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHundredSceneGetPlayerNum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCHundredSceneGetPlayerNum message from the specified reader or buffer. * @function decode * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCHundredSceneGetPlayerNum} SCHundredSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHundredSceneGetPlayerNum.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCHundredSceneGetPlayerNum(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.Nums && message.Nums.length)) message.Nums = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Nums.push(reader.int32()); } else message.Nums.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCHundredSceneGetPlayerNum message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCHundredSceneGetPlayerNum} SCHundredSceneGetPlayerNum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHundredSceneGetPlayerNum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCHundredSceneGetPlayerNum message. * @function verify * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCHundredSceneGetPlayerNum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.Nums != null && message.hasOwnProperty("Nums")) { if (!Array.isArray(message.Nums)) return "Nums: array expected"; for (var i = 0; i < message.Nums.length; ++i) if (!$util.isInteger(message.Nums[i])) return "Nums: integer[] expected"; } return null; }; /** * Creates a SCHundredSceneGetPlayerNum message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {Object.} object Plain object * @returns {gamehall.SCHundredSceneGetPlayerNum} SCHundredSceneGetPlayerNum */ SCHundredSceneGetPlayerNum.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCHundredSceneGetPlayerNum) return object; var message = new $root.gamehall.SCHundredSceneGetPlayerNum(); if (object.Nums) { if (!Array.isArray(object.Nums)) throw TypeError(".gamehall.SCHundredSceneGetPlayerNum.Nums: array expected"); message.Nums = []; for (var i = 0; i < object.Nums.length; ++i) message.Nums[i] = object.Nums[i] | 0; } return message; }; /** * Creates a plain object from a SCHundredSceneGetPlayerNum message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {gamehall.SCHundredSceneGetPlayerNum} message SCHundredSceneGetPlayerNum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCHundredSceneGetPlayerNum.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Nums = []; if (message.Nums && message.Nums.length) { object.Nums = []; for (var j = 0; j < message.Nums.length; ++j) object.Nums[j] = message.Nums[j]; } return object; }; /** * Converts this SCHundredSceneGetPlayerNum to JSON. * @function toJSON * @memberof gamehall.SCHundredSceneGetPlayerNum * @instance * @returns {Object.} JSON object */ SCHundredSceneGetPlayerNum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCHundredSceneGetPlayerNum * @function getTypeUrl * @memberof gamehall.SCHundredSceneGetPlayerNum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCHundredSceneGetPlayerNum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCHundredSceneGetPlayerNum"; }; return SCHundredSceneGetPlayerNum; })(); gamehall.CSHundredSceneGetGameJackpot = (function() { /** * Properties of a CSHundredSceneGetGameJackpot. * @memberof gamehall * @interface ICSHundredSceneGetGameJackpot */ /** * Constructs a new CSHundredSceneGetGameJackpot. * @memberof gamehall * @classdesc Represents a CSHundredSceneGetGameJackpot. * @implements ICSHundredSceneGetGameJackpot * @constructor * @param {gamehall.ICSHundredSceneGetGameJackpot=} [properties] Properties to set */ function CSHundredSceneGetGameJackpot(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new CSHundredSceneGetGameJackpot instance using the specified properties. * @function create * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {gamehall.ICSHundredSceneGetGameJackpot=} [properties] Properties to set * @returns {gamehall.CSHundredSceneGetGameJackpot} CSHundredSceneGetGameJackpot instance */ CSHundredSceneGetGameJackpot.create = function create(properties) { return new CSHundredSceneGetGameJackpot(properties); }; /** * Encodes the specified CSHundredSceneGetGameJackpot message. Does not implicitly {@link gamehall.CSHundredSceneGetGameJackpot.verify|verify} messages. * @function encode * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {gamehall.ICSHundredSceneGetGameJackpot} message CSHundredSceneGetGameJackpot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneGetGameJackpot.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSHundredSceneGetGameJackpot message, length delimited. Does not implicitly {@link gamehall.CSHundredSceneGetGameJackpot.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {gamehall.ICSHundredSceneGetGameJackpot} message CSHundredSceneGetGameJackpot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneGetGameJackpot.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHundredSceneGetGameJackpot message from the specified reader or buffer. * @function decode * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSHundredSceneGetGameJackpot} CSHundredSceneGetGameJackpot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneGetGameJackpot.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSHundredSceneGetGameJackpot(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHundredSceneGetGameJackpot message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSHundredSceneGetGameJackpot} CSHundredSceneGetGameJackpot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneGetGameJackpot.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHundredSceneGetGameJackpot message. * @function verify * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHundredSceneGetGameJackpot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSHundredSceneGetGameJackpot message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {Object.} object Plain object * @returns {gamehall.CSHundredSceneGetGameJackpot} CSHundredSceneGetGameJackpot */ CSHundredSceneGetGameJackpot.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSHundredSceneGetGameJackpot) return object; return new $root.gamehall.CSHundredSceneGetGameJackpot(); }; /** * Creates a plain object from a CSHundredSceneGetGameJackpot message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {gamehall.CSHundredSceneGetGameJackpot} message CSHundredSceneGetGameJackpot * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHundredSceneGetGameJackpot.toObject = function toObject() { return {}; }; /** * Converts this CSHundredSceneGetGameJackpot to JSON. * @function toJSON * @memberof gamehall.CSHundredSceneGetGameJackpot * @instance * @returns {Object.} JSON object */ CSHundredSceneGetGameJackpot.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHundredSceneGetGameJackpot * @function getTypeUrl * @memberof gamehall.CSHundredSceneGetGameJackpot * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHundredSceneGetGameJackpot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSHundredSceneGetGameJackpot"; }; return CSHundredSceneGetGameJackpot; })(); gamehall.GameJackpotFundInfo = (function() { /** * Properties of a GameJackpotFundInfo. * @memberof gamehall * @interface IGameJackpotFundInfo * @property {number|null} [GameFreeId] GameJackpotFundInfo GameFreeId * @property {number|Long|null} [JackPotFund] GameJackpotFundInfo JackPotFund */ /** * Constructs a new GameJackpotFundInfo. * @memberof gamehall * @classdesc Represents a GameJackpotFundInfo. * @implements IGameJackpotFundInfo * @constructor * @param {gamehall.IGameJackpotFundInfo=} [properties] Properties to set */ function GameJackpotFundInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GameJackpotFundInfo GameFreeId. * @member {number} GameFreeId * @memberof gamehall.GameJackpotFundInfo * @instance */ GameJackpotFundInfo.prototype.GameFreeId = 0; /** * GameJackpotFundInfo JackPotFund. * @member {number|Long} JackPotFund * @memberof gamehall.GameJackpotFundInfo * @instance */ GameJackpotFundInfo.prototype.JackPotFund = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new GameJackpotFundInfo instance using the specified properties. * @function create * @memberof gamehall.GameJackpotFundInfo * @static * @param {gamehall.IGameJackpotFundInfo=} [properties] Properties to set * @returns {gamehall.GameJackpotFundInfo} GameJackpotFundInfo instance */ GameJackpotFundInfo.create = function create(properties) { return new GameJackpotFundInfo(properties); }; /** * Encodes the specified GameJackpotFundInfo message. Does not implicitly {@link gamehall.GameJackpotFundInfo.verify|verify} messages. * @function encode * @memberof gamehall.GameJackpotFundInfo * @static * @param {gamehall.IGameJackpotFundInfo} message GameJackpotFundInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameJackpotFundInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameFreeId); if (message.JackPotFund != null && Object.hasOwnProperty.call(message, "JackPotFund")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.JackPotFund); return writer; }; /** * Encodes the specified GameJackpotFundInfo message, length delimited. Does not implicitly {@link gamehall.GameJackpotFundInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.GameJackpotFundInfo * @static * @param {gamehall.IGameJackpotFundInfo} message GameJackpotFundInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameJackpotFundInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GameJackpotFundInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.GameJackpotFundInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.GameJackpotFundInfo} GameJackpotFundInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameJackpotFundInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.GameJackpotFundInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameFreeId = reader.int32(); break; } case 2: { message.JackPotFund = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GameJackpotFundInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.GameJackpotFundInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.GameJackpotFundInfo} GameJackpotFundInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameJackpotFundInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GameJackpotFundInfo message. * @function verify * @memberof gamehall.GameJackpotFundInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GameJackpotFundInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; if (message.JackPotFund != null && message.hasOwnProperty("JackPotFund")) if (!$util.isInteger(message.JackPotFund) && !(message.JackPotFund && $util.isInteger(message.JackPotFund.low) && $util.isInteger(message.JackPotFund.high))) return "JackPotFund: integer|Long expected"; return null; }; /** * Creates a GameJackpotFundInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.GameJackpotFundInfo * @static * @param {Object.} object Plain object * @returns {gamehall.GameJackpotFundInfo} GameJackpotFundInfo */ GameJackpotFundInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.GameJackpotFundInfo) return object; var message = new $root.gamehall.GameJackpotFundInfo(); if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; if (object.JackPotFund != null) if ($util.Long) (message.JackPotFund = $util.Long.fromValue(object.JackPotFund)).unsigned = false; else if (typeof object.JackPotFund === "string") message.JackPotFund = parseInt(object.JackPotFund, 10); else if (typeof object.JackPotFund === "number") message.JackPotFund = object.JackPotFund; else if (typeof object.JackPotFund === "object") message.JackPotFund = new $util.LongBits(object.JackPotFund.low >>> 0, object.JackPotFund.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a GameJackpotFundInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.GameJackpotFundInfo * @static * @param {gamehall.GameJackpotFundInfo} message GameJackpotFundInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GameJackpotFundInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameFreeId = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.JackPotFund = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.JackPotFund = options.longs === String ? "0" : 0; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; if (message.JackPotFund != null && message.hasOwnProperty("JackPotFund")) if (typeof message.JackPotFund === "number") object.JackPotFund = options.longs === String ? String(message.JackPotFund) : message.JackPotFund; else object.JackPotFund = options.longs === String ? $util.Long.prototype.toString.call(message.JackPotFund) : options.longs === Number ? new $util.LongBits(message.JackPotFund.low >>> 0, message.JackPotFund.high >>> 0).toNumber() : message.JackPotFund; return object; }; /** * Converts this GameJackpotFundInfo to JSON. * @function toJSON * @memberof gamehall.GameJackpotFundInfo * @instance * @returns {Object.} JSON object */ GameJackpotFundInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GameJackpotFundInfo * @function getTypeUrl * @memberof gamehall.GameJackpotFundInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GameJackpotFundInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.GameJackpotFundInfo"; }; return GameJackpotFundInfo; })(); gamehall.SCHundredSceneGetGameJackpot = (function() { /** * Properties of a SCHundredSceneGetGameJackpot. * @memberof gamehall * @interface ISCHundredSceneGetGameJackpot * @property {Array.|null} [GameJackpotFund] SCHundredSceneGetGameJackpot GameJackpotFund */ /** * Constructs a new SCHundredSceneGetGameJackpot. * @memberof gamehall * @classdesc Represents a SCHundredSceneGetGameJackpot. * @implements ISCHundredSceneGetGameJackpot * @constructor * @param {gamehall.ISCHundredSceneGetGameJackpot=} [properties] Properties to set */ function SCHundredSceneGetGameJackpot(properties) { this.GameJackpotFund = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCHundredSceneGetGameJackpot GameJackpotFund. * @member {Array.} GameJackpotFund * @memberof gamehall.SCHundredSceneGetGameJackpot * @instance */ SCHundredSceneGetGameJackpot.prototype.GameJackpotFund = $util.emptyArray; /** * Creates a new SCHundredSceneGetGameJackpot instance using the specified properties. * @function create * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {gamehall.ISCHundredSceneGetGameJackpot=} [properties] Properties to set * @returns {gamehall.SCHundredSceneGetGameJackpot} SCHundredSceneGetGameJackpot instance */ SCHundredSceneGetGameJackpot.create = function create(properties) { return new SCHundredSceneGetGameJackpot(properties); }; /** * Encodes the specified SCHundredSceneGetGameJackpot message. Does not implicitly {@link gamehall.SCHundredSceneGetGameJackpot.verify|verify} messages. * @function encode * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {gamehall.ISCHundredSceneGetGameJackpot} message SCHundredSceneGetGameJackpot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHundredSceneGetGameJackpot.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameJackpotFund != null && message.GameJackpotFund.length) for (var i = 0; i < message.GameJackpotFund.length; ++i) $root.gamehall.GameJackpotFundInfo.encode(message.GameJackpotFund[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SCHundredSceneGetGameJackpot message, length delimited. Does not implicitly {@link gamehall.SCHundredSceneGetGameJackpot.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {gamehall.ISCHundredSceneGetGameJackpot} message SCHundredSceneGetGameJackpot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCHundredSceneGetGameJackpot.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCHundredSceneGetGameJackpot message from the specified reader or buffer. * @function decode * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCHundredSceneGetGameJackpot} SCHundredSceneGetGameJackpot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHundredSceneGetGameJackpot.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCHundredSceneGetGameJackpot(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.GameJackpotFund && message.GameJackpotFund.length)) message.GameJackpotFund = []; message.GameJackpotFund.push($root.gamehall.GameJackpotFundInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCHundredSceneGetGameJackpot message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCHundredSceneGetGameJackpot} SCHundredSceneGetGameJackpot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCHundredSceneGetGameJackpot.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCHundredSceneGetGameJackpot message. * @function verify * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCHundredSceneGetGameJackpot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameJackpotFund != null && message.hasOwnProperty("GameJackpotFund")) { if (!Array.isArray(message.GameJackpotFund)) return "GameJackpotFund: array expected"; for (var i = 0; i < message.GameJackpotFund.length; ++i) { var error = $root.gamehall.GameJackpotFundInfo.verify(message.GameJackpotFund[i]); if (error) return "GameJackpotFund." + error; } } return null; }; /** * Creates a SCHundredSceneGetGameJackpot message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {Object.} object Plain object * @returns {gamehall.SCHundredSceneGetGameJackpot} SCHundredSceneGetGameJackpot */ SCHundredSceneGetGameJackpot.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCHundredSceneGetGameJackpot) return object; var message = new $root.gamehall.SCHundredSceneGetGameJackpot(); if (object.GameJackpotFund) { if (!Array.isArray(object.GameJackpotFund)) throw TypeError(".gamehall.SCHundredSceneGetGameJackpot.GameJackpotFund: array expected"); message.GameJackpotFund = []; for (var i = 0; i < object.GameJackpotFund.length; ++i) { if (typeof object.GameJackpotFund[i] !== "object") throw TypeError(".gamehall.SCHundredSceneGetGameJackpot.GameJackpotFund: object expected"); message.GameJackpotFund[i] = $root.gamehall.GameJackpotFundInfo.fromObject(object.GameJackpotFund[i]); } } return message; }; /** * Creates a plain object from a SCHundredSceneGetGameJackpot message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {gamehall.SCHundredSceneGetGameJackpot} message SCHundredSceneGetGameJackpot * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCHundredSceneGetGameJackpot.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.GameJackpotFund = []; if (message.GameJackpotFund && message.GameJackpotFund.length) { object.GameJackpotFund = []; for (var j = 0; j < message.GameJackpotFund.length; ++j) object.GameJackpotFund[j] = $root.gamehall.GameJackpotFundInfo.toObject(message.GameJackpotFund[j], options); } return object; }; /** * Converts this SCHundredSceneGetGameJackpot to JSON. * @function toJSON * @memberof gamehall.SCHundredSceneGetGameJackpot * @instance * @returns {Object.} JSON object */ SCHundredSceneGetGameJackpot.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCHundredSceneGetGameJackpot * @function getTypeUrl * @memberof gamehall.SCHundredSceneGetGameJackpot * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCHundredSceneGetGameJackpot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCHundredSceneGetGameJackpot"; }; return SCHundredSceneGetGameJackpot; })(); gamehall.BroadcastGameJackpot = (function() { /** * Properties of a BroadcastGameJackpot. * @memberof gamehall * @interface IBroadcastGameJackpot * @property {Array.|null} [JackpotFund] BroadcastGameJackpot JackpotFund * @property {number|null} [GameFreeId] BroadcastGameJackpot GameFreeId */ /** * Constructs a new BroadcastGameJackpot. * @memberof gamehall * @classdesc Represents a BroadcastGameJackpot. * @implements IBroadcastGameJackpot * @constructor * @param {gamehall.IBroadcastGameJackpot=} [properties] Properties to set */ function BroadcastGameJackpot(properties) { this.JackpotFund = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * BroadcastGameJackpot JackpotFund. * @member {Array.} JackpotFund * @memberof gamehall.BroadcastGameJackpot * @instance */ BroadcastGameJackpot.prototype.JackpotFund = $util.emptyArray; /** * BroadcastGameJackpot GameFreeId. * @member {number} GameFreeId * @memberof gamehall.BroadcastGameJackpot * @instance */ BroadcastGameJackpot.prototype.GameFreeId = 0; /** * Creates a new BroadcastGameJackpot instance using the specified properties. * @function create * @memberof gamehall.BroadcastGameJackpot * @static * @param {gamehall.IBroadcastGameJackpot=} [properties] Properties to set * @returns {gamehall.BroadcastGameJackpot} BroadcastGameJackpot instance */ BroadcastGameJackpot.create = function create(properties) { return new BroadcastGameJackpot(properties); }; /** * Encodes the specified BroadcastGameJackpot message. Does not implicitly {@link gamehall.BroadcastGameJackpot.verify|verify} messages. * @function encode * @memberof gamehall.BroadcastGameJackpot * @static * @param {gamehall.IBroadcastGameJackpot} message BroadcastGameJackpot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BroadcastGameJackpot.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.JackpotFund != null && message.JackpotFund.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.JackpotFund.length; ++i) writer.int64(message.JackpotFund[i]); writer.ldelim(); } if (message.GameFreeId != null && Object.hasOwnProperty.call(message, "GameFreeId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameFreeId); return writer; }; /** * Encodes the specified BroadcastGameJackpot message, length delimited. Does not implicitly {@link gamehall.BroadcastGameJackpot.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.BroadcastGameJackpot * @static * @param {gamehall.IBroadcastGameJackpot} message BroadcastGameJackpot message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BroadcastGameJackpot.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a BroadcastGameJackpot message from the specified reader or buffer. * @function decode * @memberof gamehall.BroadcastGameJackpot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.BroadcastGameJackpot} BroadcastGameJackpot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BroadcastGameJackpot.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.BroadcastGameJackpot(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.JackpotFund && message.JackpotFund.length)) message.JackpotFund = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.JackpotFund.push(reader.int64()); } else message.JackpotFund.push(reader.int64()); break; } case 2: { message.GameFreeId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a BroadcastGameJackpot message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.BroadcastGameJackpot * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.BroadcastGameJackpot} BroadcastGameJackpot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BroadcastGameJackpot.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a BroadcastGameJackpot message. * @function verify * @memberof gamehall.BroadcastGameJackpot * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BroadcastGameJackpot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.JackpotFund != null && message.hasOwnProperty("JackpotFund")) { if (!Array.isArray(message.JackpotFund)) return "JackpotFund: array expected"; for (var i = 0; i < message.JackpotFund.length; ++i) if (!$util.isInteger(message.JackpotFund[i]) && !(message.JackpotFund[i] && $util.isInteger(message.JackpotFund[i].low) && $util.isInteger(message.JackpotFund[i].high))) return "JackpotFund: integer|Long[] expected"; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) if (!$util.isInteger(message.GameFreeId)) return "GameFreeId: integer expected"; return null; }; /** * Creates a BroadcastGameJackpot message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.BroadcastGameJackpot * @static * @param {Object.} object Plain object * @returns {gamehall.BroadcastGameJackpot} BroadcastGameJackpot */ BroadcastGameJackpot.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.BroadcastGameJackpot) return object; var message = new $root.gamehall.BroadcastGameJackpot(); if (object.JackpotFund) { if (!Array.isArray(object.JackpotFund)) throw TypeError(".gamehall.BroadcastGameJackpot.JackpotFund: array expected"); message.JackpotFund = []; for (var i = 0; i < object.JackpotFund.length; ++i) if ($util.Long) (message.JackpotFund[i] = $util.Long.fromValue(object.JackpotFund[i])).unsigned = false; else if (typeof object.JackpotFund[i] === "string") message.JackpotFund[i] = parseInt(object.JackpotFund[i], 10); else if (typeof object.JackpotFund[i] === "number") message.JackpotFund[i] = object.JackpotFund[i]; else if (typeof object.JackpotFund[i] === "object") message.JackpotFund[i] = new $util.LongBits(object.JackpotFund[i].low >>> 0, object.JackpotFund[i].high >>> 0).toNumber(); } if (object.GameFreeId != null) message.GameFreeId = object.GameFreeId | 0; return message; }; /** * Creates a plain object from a BroadcastGameJackpot message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.BroadcastGameJackpot * @static * @param {gamehall.BroadcastGameJackpot} message BroadcastGameJackpot * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ BroadcastGameJackpot.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.JackpotFund = []; if (options.defaults) object.GameFreeId = 0; if (message.JackpotFund && message.JackpotFund.length) { object.JackpotFund = []; for (var j = 0; j < message.JackpotFund.length; ++j) if (typeof message.JackpotFund[j] === "number") object.JackpotFund[j] = options.longs === String ? String(message.JackpotFund[j]) : message.JackpotFund[j]; else object.JackpotFund[j] = options.longs === String ? $util.Long.prototype.toString.call(message.JackpotFund[j]) : options.longs === Number ? new $util.LongBits(message.JackpotFund[j].low >>> 0, message.JackpotFund[j].high >>> 0).toNumber() : message.JackpotFund[j]; } if (message.GameFreeId != null && message.hasOwnProperty("GameFreeId")) object.GameFreeId = message.GameFreeId; return object; }; /** * Converts this BroadcastGameJackpot to JSON. * @function toJSON * @memberof gamehall.BroadcastGameJackpot * @instance * @returns {Object.} JSON object */ BroadcastGameJackpot.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for BroadcastGameJackpot * @function getTypeUrl * @memberof gamehall.BroadcastGameJackpot * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ BroadcastGameJackpot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.BroadcastGameJackpot"; }; return BroadcastGameJackpot; })(); gamehall.CSHundredSceneGetHistoryInfo = (function() { /** * Properties of a CSHundredSceneGetHistoryInfo. * @memberof gamehall * @interface ICSHundredSceneGetHistoryInfo * @property {number|null} [GameId] CSHundredSceneGetHistoryInfo GameId * @property {number|null} [GameHistoryModel] CSHundredSceneGetHistoryInfo GameHistoryModel */ /** * Constructs a new CSHundredSceneGetHistoryInfo. * @memberof gamehall * @classdesc Represents a CSHundredSceneGetHistoryInfo. * @implements ICSHundredSceneGetHistoryInfo * @constructor * @param {gamehall.ICSHundredSceneGetHistoryInfo=} [properties] Properties to set */ function CSHundredSceneGetHistoryInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * CSHundredSceneGetHistoryInfo GameId. * @member {number} GameId * @memberof gamehall.CSHundredSceneGetHistoryInfo * @instance */ CSHundredSceneGetHistoryInfo.prototype.GameId = 0; /** * CSHundredSceneGetHistoryInfo GameHistoryModel. * @member {number} GameHistoryModel * @memberof gamehall.CSHundredSceneGetHistoryInfo * @instance */ CSHundredSceneGetHistoryInfo.prototype.GameHistoryModel = 0; /** * Creates a new CSHundredSceneGetHistoryInfo instance using the specified properties. * @function create * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {gamehall.ICSHundredSceneGetHistoryInfo=} [properties] Properties to set * @returns {gamehall.CSHundredSceneGetHistoryInfo} CSHundredSceneGetHistoryInfo instance */ CSHundredSceneGetHistoryInfo.create = function create(properties) { return new CSHundredSceneGetHistoryInfo(properties); }; /** * Encodes the specified CSHundredSceneGetHistoryInfo message. Does not implicitly {@link gamehall.CSHundredSceneGetHistoryInfo.verify|verify} messages. * @function encode * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {gamehall.ICSHundredSceneGetHistoryInfo} message CSHundredSceneGetHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneGetHistoryInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.GameId); if (message.GameHistoryModel != null && Object.hasOwnProperty.call(message, "GameHistoryModel")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameHistoryModel); return writer; }; /** * Encodes the specified CSHundredSceneGetHistoryInfo message, length delimited. Does not implicitly {@link gamehall.CSHundredSceneGetHistoryInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {gamehall.ICSHundredSceneGetHistoryInfo} message CSHundredSceneGetHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHundredSceneGetHistoryInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHundredSceneGetHistoryInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.CSHundredSceneGetHistoryInfo} CSHundredSceneGetHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneGetHistoryInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.CSHundredSceneGetHistoryInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameId = reader.int32(); break; } case 2: { message.GameHistoryModel = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHundredSceneGetHistoryInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.CSHundredSceneGetHistoryInfo} CSHundredSceneGetHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHundredSceneGetHistoryInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHundredSceneGetHistoryInfo message. * @function verify * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHundredSceneGetHistoryInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; if (message.GameHistoryModel != null && message.hasOwnProperty("GameHistoryModel")) if (!$util.isInteger(message.GameHistoryModel)) return "GameHistoryModel: integer expected"; return null; }; /** * Creates a CSHundredSceneGetHistoryInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {Object.} object Plain object * @returns {gamehall.CSHundredSceneGetHistoryInfo} CSHundredSceneGetHistoryInfo */ CSHundredSceneGetHistoryInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.CSHundredSceneGetHistoryInfo) return object; var message = new $root.gamehall.CSHundredSceneGetHistoryInfo(); if (object.GameId != null) message.GameId = object.GameId | 0; if (object.GameHistoryModel != null) message.GameHistoryModel = object.GameHistoryModel | 0; return message; }; /** * Creates a plain object from a CSHundredSceneGetHistoryInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {gamehall.CSHundredSceneGetHistoryInfo} message CSHundredSceneGetHistoryInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHundredSceneGetHistoryInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameId = 0; object.GameHistoryModel = 0; } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; if (message.GameHistoryModel != null && message.hasOwnProperty("GameHistoryModel")) object.GameHistoryModel = message.GameHistoryModel; return object; }; /** * Converts this CSHundredSceneGetHistoryInfo to JSON. * @function toJSON * @memberof gamehall.CSHundredSceneGetHistoryInfo * @instance * @returns {Object.} JSON object */ CSHundredSceneGetHistoryInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHundredSceneGetHistoryInfo * @function getTypeUrl * @memberof gamehall.CSHundredSceneGetHistoryInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHundredSceneGetHistoryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.CSHundredSceneGetHistoryInfo"; }; return CSHundredSceneGetHistoryInfo; })(); gamehall.GameHistoryInfo = (function() { /** * Properties of a GameHistoryInfo. * @memberof gamehall * @interface IGameHistoryInfo * @property {string|null} [GameNumber] GameHistoryInfo GameNumber * @property {number|Long|null} [CreatedTime] GameHistoryInfo CreatedTime * @property {number|Long|null} [Multiple] GameHistoryInfo Multiple * @property {string|null} [Hash] GameHistoryInfo Hash */ /** * Constructs a new GameHistoryInfo. * @memberof gamehall * @classdesc Represents a GameHistoryInfo. * @implements IGameHistoryInfo * @constructor * @param {gamehall.IGameHistoryInfo=} [properties] Properties to set */ function GameHistoryInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GameHistoryInfo GameNumber. * @member {string} GameNumber * @memberof gamehall.GameHistoryInfo * @instance */ GameHistoryInfo.prototype.GameNumber = ""; /** * GameHistoryInfo CreatedTime. * @member {number|Long} CreatedTime * @memberof gamehall.GameHistoryInfo * @instance */ GameHistoryInfo.prototype.CreatedTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * GameHistoryInfo Multiple. * @member {number|Long} Multiple * @memberof gamehall.GameHistoryInfo * @instance */ GameHistoryInfo.prototype.Multiple = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * GameHistoryInfo Hash. * @member {string} Hash * @memberof gamehall.GameHistoryInfo * @instance */ GameHistoryInfo.prototype.Hash = ""; /** * Creates a new GameHistoryInfo instance using the specified properties. * @function create * @memberof gamehall.GameHistoryInfo * @static * @param {gamehall.IGameHistoryInfo=} [properties] Properties to set * @returns {gamehall.GameHistoryInfo} GameHistoryInfo instance */ GameHistoryInfo.create = function create(properties) { return new GameHistoryInfo(properties); }; /** * Encodes the specified GameHistoryInfo message. Does not implicitly {@link gamehall.GameHistoryInfo.verify|verify} messages. * @function encode * @memberof gamehall.GameHistoryInfo * @static * @param {gamehall.IGameHistoryInfo} message GameHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameHistoryInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.GameNumber != null && Object.hasOwnProperty.call(message, "GameNumber")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.GameNumber); if (message.CreatedTime != null && Object.hasOwnProperty.call(message, "CreatedTime")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.CreatedTime); if (message.Multiple != null && Object.hasOwnProperty.call(message, "Multiple")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.Multiple); if (message.Hash != null && Object.hasOwnProperty.call(message, "Hash")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.Hash); return writer; }; /** * Encodes the specified GameHistoryInfo message, length delimited. Does not implicitly {@link gamehall.GameHistoryInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.GameHistoryInfo * @static * @param {gamehall.IGameHistoryInfo} message GameHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GameHistoryInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GameHistoryInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.GameHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.GameHistoryInfo} GameHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameHistoryInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.GameHistoryInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.GameNumber = reader.string(); break; } case 2: { message.CreatedTime = reader.int64(); break; } case 3: { message.Multiple = reader.int64(); break; } case 4: { message.Hash = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GameHistoryInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.GameHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.GameHistoryInfo} GameHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GameHistoryInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GameHistoryInfo message. * @function verify * @memberof gamehall.GameHistoryInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GameHistoryInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.GameNumber != null && message.hasOwnProperty("GameNumber")) if (!$util.isString(message.GameNumber)) return "GameNumber: string expected"; if (message.CreatedTime != null && message.hasOwnProperty("CreatedTime")) if (!$util.isInteger(message.CreatedTime) && !(message.CreatedTime && $util.isInteger(message.CreatedTime.low) && $util.isInteger(message.CreatedTime.high))) return "CreatedTime: integer|Long expected"; if (message.Multiple != null && message.hasOwnProperty("Multiple")) if (!$util.isInteger(message.Multiple) && !(message.Multiple && $util.isInteger(message.Multiple.low) && $util.isInteger(message.Multiple.high))) return "Multiple: integer|Long expected"; if (message.Hash != null && message.hasOwnProperty("Hash")) if (!$util.isString(message.Hash)) return "Hash: string expected"; return null; }; /** * Creates a GameHistoryInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.GameHistoryInfo * @static * @param {Object.} object Plain object * @returns {gamehall.GameHistoryInfo} GameHistoryInfo */ GameHistoryInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.GameHistoryInfo) return object; var message = new $root.gamehall.GameHistoryInfo(); if (object.GameNumber != null) message.GameNumber = String(object.GameNumber); if (object.CreatedTime != null) if ($util.Long) (message.CreatedTime = $util.Long.fromValue(object.CreatedTime)).unsigned = false; else if (typeof object.CreatedTime === "string") message.CreatedTime = parseInt(object.CreatedTime, 10); else if (typeof object.CreatedTime === "number") message.CreatedTime = object.CreatedTime; else if (typeof object.CreatedTime === "object") message.CreatedTime = new $util.LongBits(object.CreatedTime.low >>> 0, object.CreatedTime.high >>> 0).toNumber(); if (object.Multiple != null) if ($util.Long) (message.Multiple = $util.Long.fromValue(object.Multiple)).unsigned = false; else if (typeof object.Multiple === "string") message.Multiple = parseInt(object.Multiple, 10); else if (typeof object.Multiple === "number") message.Multiple = object.Multiple; else if (typeof object.Multiple === "object") message.Multiple = new $util.LongBits(object.Multiple.low >>> 0, object.Multiple.high >>> 0).toNumber(); if (object.Hash != null) message.Hash = String(object.Hash); return message; }; /** * Creates a plain object from a GameHistoryInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.GameHistoryInfo * @static * @param {gamehall.GameHistoryInfo} message GameHistoryInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GameHistoryInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.GameNumber = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.CreatedTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.CreatedTime = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Multiple = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Multiple = options.longs === String ? "0" : 0; object.Hash = ""; } if (message.GameNumber != null && message.hasOwnProperty("GameNumber")) object.GameNumber = message.GameNumber; if (message.CreatedTime != null && message.hasOwnProperty("CreatedTime")) if (typeof message.CreatedTime === "number") object.CreatedTime = options.longs === String ? String(message.CreatedTime) : message.CreatedTime; else object.CreatedTime = options.longs === String ? $util.Long.prototype.toString.call(message.CreatedTime) : options.longs === Number ? new $util.LongBits(message.CreatedTime.low >>> 0, message.CreatedTime.high >>> 0).toNumber() : message.CreatedTime; if (message.Multiple != null && message.hasOwnProperty("Multiple")) if (typeof message.Multiple === "number") object.Multiple = options.longs === String ? String(message.Multiple) : message.Multiple; else object.Multiple = options.longs === String ? $util.Long.prototype.toString.call(message.Multiple) : options.longs === Number ? new $util.LongBits(message.Multiple.low >>> 0, message.Multiple.high >>> 0).toNumber() : message.Multiple; if (message.Hash != null && message.hasOwnProperty("Hash")) object.Hash = message.Hash; return object; }; /** * Converts this GameHistoryInfo to JSON. * @function toJSON * @memberof gamehall.GameHistoryInfo * @instance * @returns {Object.} JSON object */ GameHistoryInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GameHistoryInfo * @function getTypeUrl * @memberof gamehall.GameHistoryInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GameHistoryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.GameHistoryInfo"; }; return GameHistoryInfo; })(); gamehall.PlayerHistoryInfo = (function() { /** * Properties of a PlayerHistoryInfo. * @memberof gamehall * @interface IPlayerHistoryInfo * @property {string|null} [SpinID] PlayerHistoryInfo SpinID * @property {number|Long|null} [CreatedTime] PlayerHistoryInfo CreatedTime * @property {number|Long|null} [TotalBetValue] PlayerHistoryInfo TotalBetValue * @property {number|Long|null} [TotalPriceValue] PlayerHistoryInfo TotalPriceValue * @property {boolean|null} [IsFree] PlayerHistoryInfo IsFree * @property {number|Long|null} [TotalBonusValue] PlayerHistoryInfo TotalBonusValue * @property {number|Long|null} [Multiple] PlayerHistoryInfo Multiple */ /** * Constructs a new PlayerHistoryInfo. * @memberof gamehall * @classdesc Represents a PlayerHistoryInfo. * @implements IPlayerHistoryInfo * @constructor * @param {gamehall.IPlayerHistoryInfo=} [properties] Properties to set */ function PlayerHistoryInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * PlayerHistoryInfo SpinID. * @member {string} SpinID * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.SpinID = ""; /** * PlayerHistoryInfo CreatedTime. * @member {number|Long} CreatedTime * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.CreatedTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerHistoryInfo TotalBetValue. * @member {number|Long} TotalBetValue * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.TotalBetValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerHistoryInfo TotalPriceValue. * @member {number|Long} TotalPriceValue * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.TotalPriceValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerHistoryInfo IsFree. * @member {boolean} IsFree * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.IsFree = false; /** * PlayerHistoryInfo TotalBonusValue. * @member {number|Long} TotalBonusValue * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.TotalBonusValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * PlayerHistoryInfo Multiple. * @member {number|Long} Multiple * @memberof gamehall.PlayerHistoryInfo * @instance */ PlayerHistoryInfo.prototype.Multiple = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new PlayerHistoryInfo instance using the specified properties. * @function create * @memberof gamehall.PlayerHistoryInfo * @static * @param {gamehall.IPlayerHistoryInfo=} [properties] Properties to set * @returns {gamehall.PlayerHistoryInfo} PlayerHistoryInfo instance */ PlayerHistoryInfo.create = function create(properties) { return new PlayerHistoryInfo(properties); }; /** * Encodes the specified PlayerHistoryInfo message. Does not implicitly {@link gamehall.PlayerHistoryInfo.verify|verify} messages. * @function encode * @memberof gamehall.PlayerHistoryInfo * @static * @param {gamehall.IPlayerHistoryInfo} message PlayerHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PlayerHistoryInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.SpinID != null && Object.hasOwnProperty.call(message, "SpinID")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.SpinID); if (message.CreatedTime != null && Object.hasOwnProperty.call(message, "CreatedTime")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.CreatedTime); if (message.TotalBetValue != null && Object.hasOwnProperty.call(message, "TotalBetValue")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.TotalBetValue); if (message.TotalPriceValue != null && Object.hasOwnProperty.call(message, "TotalPriceValue")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.TotalPriceValue); if (message.IsFree != null && Object.hasOwnProperty.call(message, "IsFree")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.IsFree); if (message.TotalBonusValue != null && Object.hasOwnProperty.call(message, "TotalBonusValue")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.TotalBonusValue); if (message.Multiple != null && Object.hasOwnProperty.call(message, "Multiple")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.Multiple); return writer; }; /** * Encodes the specified PlayerHistoryInfo message, length delimited. Does not implicitly {@link gamehall.PlayerHistoryInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.PlayerHistoryInfo * @static * @param {gamehall.IPlayerHistoryInfo} message PlayerHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PlayerHistoryInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PlayerHistoryInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.PlayerHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.PlayerHistoryInfo} PlayerHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PlayerHistoryInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.PlayerHistoryInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.SpinID = reader.string(); break; } case 2: { message.CreatedTime = reader.int64(); break; } case 3: { message.TotalBetValue = reader.int64(); break; } case 4: { message.TotalPriceValue = reader.int64(); break; } case 5: { message.IsFree = reader.bool(); break; } case 6: { message.TotalBonusValue = reader.int64(); break; } case 7: { message.Multiple = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PlayerHistoryInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.PlayerHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.PlayerHistoryInfo} PlayerHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PlayerHistoryInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PlayerHistoryInfo message. * @function verify * @memberof gamehall.PlayerHistoryInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PlayerHistoryInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.SpinID != null && message.hasOwnProperty("SpinID")) if (!$util.isString(message.SpinID)) return "SpinID: string expected"; if (message.CreatedTime != null && message.hasOwnProperty("CreatedTime")) if (!$util.isInteger(message.CreatedTime) && !(message.CreatedTime && $util.isInteger(message.CreatedTime.low) && $util.isInteger(message.CreatedTime.high))) return "CreatedTime: integer|Long expected"; if (message.TotalBetValue != null && message.hasOwnProperty("TotalBetValue")) if (!$util.isInteger(message.TotalBetValue) && !(message.TotalBetValue && $util.isInteger(message.TotalBetValue.low) && $util.isInteger(message.TotalBetValue.high))) return "TotalBetValue: integer|Long expected"; if (message.TotalPriceValue != null && message.hasOwnProperty("TotalPriceValue")) if (!$util.isInteger(message.TotalPriceValue) && !(message.TotalPriceValue && $util.isInteger(message.TotalPriceValue.low) && $util.isInteger(message.TotalPriceValue.high))) return "TotalPriceValue: integer|Long expected"; if (message.IsFree != null && message.hasOwnProperty("IsFree")) if (typeof message.IsFree !== "boolean") return "IsFree: boolean expected"; if (message.TotalBonusValue != null && message.hasOwnProperty("TotalBonusValue")) if (!$util.isInteger(message.TotalBonusValue) && !(message.TotalBonusValue && $util.isInteger(message.TotalBonusValue.low) && $util.isInteger(message.TotalBonusValue.high))) return "TotalBonusValue: integer|Long expected"; if (message.Multiple != null && message.hasOwnProperty("Multiple")) if (!$util.isInteger(message.Multiple) && !(message.Multiple && $util.isInteger(message.Multiple.low) && $util.isInteger(message.Multiple.high))) return "Multiple: integer|Long expected"; return null; }; /** * Creates a PlayerHistoryInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.PlayerHistoryInfo * @static * @param {Object.} object Plain object * @returns {gamehall.PlayerHistoryInfo} PlayerHistoryInfo */ PlayerHistoryInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.PlayerHistoryInfo) return object; var message = new $root.gamehall.PlayerHistoryInfo(); if (object.SpinID != null) message.SpinID = String(object.SpinID); if (object.CreatedTime != null) if ($util.Long) (message.CreatedTime = $util.Long.fromValue(object.CreatedTime)).unsigned = false; else if (typeof object.CreatedTime === "string") message.CreatedTime = parseInt(object.CreatedTime, 10); else if (typeof object.CreatedTime === "number") message.CreatedTime = object.CreatedTime; else if (typeof object.CreatedTime === "object") message.CreatedTime = new $util.LongBits(object.CreatedTime.low >>> 0, object.CreatedTime.high >>> 0).toNumber(); if (object.TotalBetValue != null) if ($util.Long) (message.TotalBetValue = $util.Long.fromValue(object.TotalBetValue)).unsigned = false; else if (typeof object.TotalBetValue === "string") message.TotalBetValue = parseInt(object.TotalBetValue, 10); else if (typeof object.TotalBetValue === "number") message.TotalBetValue = object.TotalBetValue; else if (typeof object.TotalBetValue === "object") message.TotalBetValue = new $util.LongBits(object.TotalBetValue.low >>> 0, object.TotalBetValue.high >>> 0).toNumber(); if (object.TotalPriceValue != null) if ($util.Long) (message.TotalPriceValue = $util.Long.fromValue(object.TotalPriceValue)).unsigned = false; else if (typeof object.TotalPriceValue === "string") message.TotalPriceValue = parseInt(object.TotalPriceValue, 10); else if (typeof object.TotalPriceValue === "number") message.TotalPriceValue = object.TotalPriceValue; else if (typeof object.TotalPriceValue === "object") message.TotalPriceValue = new $util.LongBits(object.TotalPriceValue.low >>> 0, object.TotalPriceValue.high >>> 0).toNumber(); if (object.IsFree != null) message.IsFree = Boolean(object.IsFree); if (object.TotalBonusValue != null) if ($util.Long) (message.TotalBonusValue = $util.Long.fromValue(object.TotalBonusValue)).unsigned = false; else if (typeof object.TotalBonusValue === "string") message.TotalBonusValue = parseInt(object.TotalBonusValue, 10); else if (typeof object.TotalBonusValue === "number") message.TotalBonusValue = object.TotalBonusValue; else if (typeof object.TotalBonusValue === "object") message.TotalBonusValue = new $util.LongBits(object.TotalBonusValue.low >>> 0, object.TotalBonusValue.high >>> 0).toNumber(); if (object.Multiple != null) if ($util.Long) (message.Multiple = $util.Long.fromValue(object.Multiple)).unsigned = false; else if (typeof object.Multiple === "string") message.Multiple = parseInt(object.Multiple, 10); else if (typeof object.Multiple === "number") message.Multiple = object.Multiple; else if (typeof object.Multiple === "object") message.Multiple = new $util.LongBits(object.Multiple.low >>> 0, object.Multiple.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a PlayerHistoryInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.PlayerHistoryInfo * @static * @param {gamehall.PlayerHistoryInfo} message PlayerHistoryInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PlayerHistoryInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.SpinID = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.CreatedTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.CreatedTime = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalBetValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalBetValue = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalPriceValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalPriceValue = options.longs === String ? "0" : 0; object.IsFree = false; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalBonusValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalBonusValue = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.Multiple = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.Multiple = options.longs === String ? "0" : 0; } if (message.SpinID != null && message.hasOwnProperty("SpinID")) object.SpinID = message.SpinID; if (message.CreatedTime != null && message.hasOwnProperty("CreatedTime")) if (typeof message.CreatedTime === "number") object.CreatedTime = options.longs === String ? String(message.CreatedTime) : message.CreatedTime; else object.CreatedTime = options.longs === String ? $util.Long.prototype.toString.call(message.CreatedTime) : options.longs === Number ? new $util.LongBits(message.CreatedTime.low >>> 0, message.CreatedTime.high >>> 0).toNumber() : message.CreatedTime; if (message.TotalBetValue != null && message.hasOwnProperty("TotalBetValue")) if (typeof message.TotalBetValue === "number") object.TotalBetValue = options.longs === String ? String(message.TotalBetValue) : message.TotalBetValue; else object.TotalBetValue = options.longs === String ? $util.Long.prototype.toString.call(message.TotalBetValue) : options.longs === Number ? new $util.LongBits(message.TotalBetValue.low >>> 0, message.TotalBetValue.high >>> 0).toNumber() : message.TotalBetValue; if (message.TotalPriceValue != null && message.hasOwnProperty("TotalPriceValue")) if (typeof message.TotalPriceValue === "number") object.TotalPriceValue = options.longs === String ? String(message.TotalPriceValue) : message.TotalPriceValue; else object.TotalPriceValue = options.longs === String ? $util.Long.prototype.toString.call(message.TotalPriceValue) : options.longs === Number ? new $util.LongBits(message.TotalPriceValue.low >>> 0, message.TotalPriceValue.high >>> 0).toNumber() : message.TotalPriceValue; if (message.IsFree != null && message.hasOwnProperty("IsFree")) object.IsFree = message.IsFree; if (message.TotalBonusValue != null && message.hasOwnProperty("TotalBonusValue")) if (typeof message.TotalBonusValue === "number") object.TotalBonusValue = options.longs === String ? String(message.TotalBonusValue) : message.TotalBonusValue; else object.TotalBonusValue = options.longs === String ? $util.Long.prototype.toString.call(message.TotalBonusValue) : options.longs === Number ? new $util.LongBits(message.TotalBonusValue.low >>> 0, message.TotalBonusValue.high >>> 0).toNumber() : message.TotalBonusValue; if (message.Multiple != null && message.hasOwnProperty("Multiple")) if (typeof message.Multiple === "number") object.Multiple = options.longs === String ? String(message.Multiple) : message.Multiple; else object.Multiple = options.longs === String ? $util.Long.prototype.toString.call(message.Multiple) : options.longs === Number ? new $util.LongBits(message.Multiple.low >>> 0, message.Multiple.high >>> 0).toNumber() : message.Multiple; return object; }; /** * Converts this PlayerHistoryInfo to JSON. * @function toJSON * @memberof gamehall.PlayerHistoryInfo * @instance * @returns {Object.} JSON object */ PlayerHistoryInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PlayerHistoryInfo * @function getTypeUrl * @memberof gamehall.PlayerHistoryInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PlayerHistoryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.PlayerHistoryInfo"; }; return PlayerHistoryInfo; })(); gamehall.SCPlayerHistory = (function() { /** * Properties of a SCPlayerHistory. * @memberof gamehall * @interface ISCPlayerHistory * @property {Array.|null} [PlayerHistory] SCPlayerHistory PlayerHistory * @property {Array.|null} [GameHistory] SCPlayerHistory GameHistory */ /** * Constructs a new SCPlayerHistory. * @memberof gamehall * @classdesc Represents a SCPlayerHistory. * @implements ISCPlayerHistory * @constructor * @param {gamehall.ISCPlayerHistory=} [properties] Properties to set */ function SCPlayerHistory(properties) { this.PlayerHistory = []; this.GameHistory = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCPlayerHistory PlayerHistory. * @member {Array.} PlayerHistory * @memberof gamehall.SCPlayerHistory * @instance */ SCPlayerHistory.prototype.PlayerHistory = $util.emptyArray; /** * SCPlayerHistory GameHistory. * @member {Array.} GameHistory * @memberof gamehall.SCPlayerHistory * @instance */ SCPlayerHistory.prototype.GameHistory = $util.emptyArray; /** * Creates a new SCPlayerHistory instance using the specified properties. * @function create * @memberof gamehall.SCPlayerHistory * @static * @param {gamehall.ISCPlayerHistory=} [properties] Properties to set * @returns {gamehall.SCPlayerHistory} SCPlayerHistory instance */ SCPlayerHistory.create = function create(properties) { return new SCPlayerHistory(properties); }; /** * Encodes the specified SCPlayerHistory message. Does not implicitly {@link gamehall.SCPlayerHistory.verify|verify} messages. * @function encode * @memberof gamehall.SCPlayerHistory * @static * @param {gamehall.ISCPlayerHistory} message SCPlayerHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCPlayerHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.PlayerHistory != null && message.PlayerHistory.length) for (var i = 0; i < message.PlayerHistory.length; ++i) $root.gamehall.PlayerHistoryInfo.encode(message.PlayerHistory[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.GameHistory != null && message.GameHistory.length) for (var i = 0; i < message.GameHistory.length; ++i) $root.gamehall.GameHistoryInfo.encode(message.GameHistory[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified SCPlayerHistory message, length delimited. Does not implicitly {@link gamehall.SCPlayerHistory.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCPlayerHistory * @static * @param {gamehall.ISCPlayerHistory} message SCPlayerHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCPlayerHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCPlayerHistory message from the specified reader or buffer. * @function decode * @memberof gamehall.SCPlayerHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCPlayerHistory} SCPlayerHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCPlayerHistory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCPlayerHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.PlayerHistory && message.PlayerHistory.length)) message.PlayerHistory = []; message.PlayerHistory.push($root.gamehall.PlayerHistoryInfo.decode(reader, reader.uint32())); break; } case 2: { if (!(message.GameHistory && message.GameHistory.length)) message.GameHistory = []; message.GameHistory.push($root.gamehall.GameHistoryInfo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCPlayerHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCPlayerHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCPlayerHistory} SCPlayerHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCPlayerHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCPlayerHistory message. * @function verify * @memberof gamehall.SCPlayerHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCPlayerHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.PlayerHistory != null && message.hasOwnProperty("PlayerHistory")) { if (!Array.isArray(message.PlayerHistory)) return "PlayerHistory: array expected"; for (var i = 0; i < message.PlayerHistory.length; ++i) { var error = $root.gamehall.PlayerHistoryInfo.verify(message.PlayerHistory[i]); if (error) return "PlayerHistory." + error; } } if (message.GameHistory != null && message.hasOwnProperty("GameHistory")) { if (!Array.isArray(message.GameHistory)) return "GameHistory: array expected"; for (var i = 0; i < message.GameHistory.length; ++i) { var error = $root.gamehall.GameHistoryInfo.verify(message.GameHistory[i]); if (error) return "GameHistory." + error; } } return null; }; /** * Creates a SCPlayerHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCPlayerHistory * @static * @param {Object.} object Plain object * @returns {gamehall.SCPlayerHistory} SCPlayerHistory */ SCPlayerHistory.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCPlayerHistory) return object; var message = new $root.gamehall.SCPlayerHistory(); if (object.PlayerHistory) { if (!Array.isArray(object.PlayerHistory)) throw TypeError(".gamehall.SCPlayerHistory.PlayerHistory: array expected"); message.PlayerHistory = []; for (var i = 0; i < object.PlayerHistory.length; ++i) { if (typeof object.PlayerHistory[i] !== "object") throw TypeError(".gamehall.SCPlayerHistory.PlayerHistory: object expected"); message.PlayerHistory[i] = $root.gamehall.PlayerHistoryInfo.fromObject(object.PlayerHistory[i]); } } if (object.GameHistory) { if (!Array.isArray(object.GameHistory)) throw TypeError(".gamehall.SCPlayerHistory.GameHistory: array expected"); message.GameHistory = []; for (var i = 0; i < object.GameHistory.length; ++i) { if (typeof object.GameHistory[i] !== "object") throw TypeError(".gamehall.SCPlayerHistory.GameHistory: object expected"); message.GameHistory[i] = $root.gamehall.GameHistoryInfo.fromObject(object.GameHistory[i]); } } return message; }; /** * Creates a plain object from a SCPlayerHistory message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCPlayerHistory * @static * @param {gamehall.SCPlayerHistory} message SCPlayerHistory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCPlayerHistory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.PlayerHistory = []; object.GameHistory = []; } if (message.PlayerHistory && message.PlayerHistory.length) { object.PlayerHistory = []; for (var j = 0; j < message.PlayerHistory.length; ++j) object.PlayerHistory[j] = $root.gamehall.PlayerHistoryInfo.toObject(message.PlayerHistory[j], options); } if (message.GameHistory && message.GameHistory.length) { object.GameHistory = []; for (var j = 0; j < message.GameHistory.length; ++j) object.GameHistory[j] = $root.gamehall.GameHistoryInfo.toObject(message.GameHistory[j], options); } return object; }; /** * Converts this SCPlayerHistory to JSON. * @function toJSON * @memberof gamehall.SCPlayerHistory * @instance * @returns {Object.} JSON object */ SCPlayerHistory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCPlayerHistory * @function getTypeUrl * @memberof gamehall.SCPlayerHistory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCPlayerHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCPlayerHistory"; }; return SCPlayerHistory; })(); gamehall.BigWinHistoryInfo = (function() { /** * Properties of a BigWinHistoryInfo. * @memberof gamehall * @interface IBigWinHistoryInfo * @property {string|null} [SpinID] BigWinHistoryInfo SpinID * @property {number|Long|null} [CreatedTime] BigWinHistoryInfo CreatedTime * @property {number|Long|null} [BaseBet] BigWinHistoryInfo BaseBet * @property {number|Long|null} [PriceValue] BigWinHistoryInfo PriceValue * @property {string|null} [UserName] BigWinHistoryInfo UserName * @property {boolean|null} [IsVirtualData] BigWinHistoryInfo IsVirtualData * @property {number|Long|null} [TotalBet] BigWinHistoryInfo TotalBet * @property {Array.|null} [Cards] BigWinHistoryInfo Cards */ /** * Constructs a new BigWinHistoryInfo. * @memberof gamehall * @classdesc Represents a BigWinHistoryInfo. * @implements IBigWinHistoryInfo * @constructor * @param {gamehall.IBigWinHistoryInfo=} [properties] Properties to set */ function BigWinHistoryInfo(properties) { this.Cards = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * BigWinHistoryInfo SpinID. * @member {string} SpinID * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.SpinID = ""; /** * BigWinHistoryInfo CreatedTime. * @member {number|Long} CreatedTime * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.CreatedTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * BigWinHistoryInfo BaseBet. * @member {number|Long} BaseBet * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.BaseBet = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * BigWinHistoryInfo PriceValue. * @member {number|Long} PriceValue * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.PriceValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * BigWinHistoryInfo UserName. * @member {string} UserName * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.UserName = ""; /** * BigWinHistoryInfo IsVirtualData. * @member {boolean} IsVirtualData * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.IsVirtualData = false; /** * BigWinHistoryInfo TotalBet. * @member {number|Long} TotalBet * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.TotalBet = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * BigWinHistoryInfo Cards. * @member {Array.} Cards * @memberof gamehall.BigWinHistoryInfo * @instance */ BigWinHistoryInfo.prototype.Cards = $util.emptyArray; /** * Creates a new BigWinHistoryInfo instance using the specified properties. * @function create * @memberof gamehall.BigWinHistoryInfo * @static * @param {gamehall.IBigWinHistoryInfo=} [properties] Properties to set * @returns {gamehall.BigWinHistoryInfo} BigWinHistoryInfo instance */ BigWinHistoryInfo.create = function create(properties) { return new BigWinHistoryInfo(properties); }; /** * Encodes the specified BigWinHistoryInfo message. Does not implicitly {@link gamehall.BigWinHistoryInfo.verify|verify} messages. * @function encode * @memberof gamehall.BigWinHistoryInfo * @static * @param {gamehall.IBigWinHistoryInfo} message BigWinHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BigWinHistoryInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.SpinID != null && Object.hasOwnProperty.call(message, "SpinID")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.SpinID); if (message.CreatedTime != null && Object.hasOwnProperty.call(message, "CreatedTime")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.CreatedTime); if (message.BaseBet != null && Object.hasOwnProperty.call(message, "BaseBet")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.BaseBet); if (message.PriceValue != null && Object.hasOwnProperty.call(message, "PriceValue")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.PriceValue); if (message.UserName != null && Object.hasOwnProperty.call(message, "UserName")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.UserName); if (message.IsVirtualData != null && Object.hasOwnProperty.call(message, "IsVirtualData")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.IsVirtualData); if (message.TotalBet != null && Object.hasOwnProperty.call(message, "TotalBet")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.TotalBet); if (message.Cards != null && message.Cards.length) { writer.uint32(/* id 8, wireType 2 =*/66).fork(); for (var i = 0; i < message.Cards.length; ++i) writer.int32(message.Cards[i]); writer.ldelim(); } return writer; }; /** * Encodes the specified BigWinHistoryInfo message, length delimited. Does not implicitly {@link gamehall.BigWinHistoryInfo.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.BigWinHistoryInfo * @static * @param {gamehall.IBigWinHistoryInfo} message BigWinHistoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BigWinHistoryInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a BigWinHistoryInfo message from the specified reader or buffer. * @function decode * @memberof gamehall.BigWinHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.BigWinHistoryInfo} BigWinHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BigWinHistoryInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.BigWinHistoryInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.SpinID = reader.string(); break; } case 2: { message.CreatedTime = reader.int64(); break; } case 3: { message.BaseBet = reader.int64(); break; } case 4: { message.PriceValue = reader.int64(); break; } case 5: { message.UserName = reader.string(); break; } case 6: { message.IsVirtualData = reader.bool(); break; } case 7: { message.TotalBet = reader.int64(); break; } case 8: { if (!(message.Cards && message.Cards.length)) message.Cards = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.Cards.push(reader.int32()); } else message.Cards.push(reader.int32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a BigWinHistoryInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.BigWinHistoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.BigWinHistoryInfo} BigWinHistoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BigWinHistoryInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a BigWinHistoryInfo message. * @function verify * @memberof gamehall.BigWinHistoryInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BigWinHistoryInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.SpinID != null && message.hasOwnProperty("SpinID")) if (!$util.isString(message.SpinID)) return "SpinID: string expected"; if (message.CreatedTime != null && message.hasOwnProperty("CreatedTime")) if (!$util.isInteger(message.CreatedTime) && !(message.CreatedTime && $util.isInteger(message.CreatedTime.low) && $util.isInteger(message.CreatedTime.high))) return "CreatedTime: integer|Long expected"; if (message.BaseBet != null && message.hasOwnProperty("BaseBet")) if (!$util.isInteger(message.BaseBet) && !(message.BaseBet && $util.isInteger(message.BaseBet.low) && $util.isInteger(message.BaseBet.high))) return "BaseBet: integer|Long expected"; if (message.PriceValue != null && message.hasOwnProperty("PriceValue")) if (!$util.isInteger(message.PriceValue) && !(message.PriceValue && $util.isInteger(message.PriceValue.low) && $util.isInteger(message.PriceValue.high))) return "PriceValue: integer|Long expected"; if (message.UserName != null && message.hasOwnProperty("UserName")) if (!$util.isString(message.UserName)) return "UserName: string expected"; if (message.IsVirtualData != null && message.hasOwnProperty("IsVirtualData")) if (typeof message.IsVirtualData !== "boolean") return "IsVirtualData: boolean expected"; if (message.TotalBet != null && message.hasOwnProperty("TotalBet")) if (!$util.isInteger(message.TotalBet) && !(message.TotalBet && $util.isInteger(message.TotalBet.low) && $util.isInteger(message.TotalBet.high))) return "TotalBet: integer|Long expected"; if (message.Cards != null && message.hasOwnProperty("Cards")) { if (!Array.isArray(message.Cards)) return "Cards: array expected"; for (var i = 0; i < message.Cards.length; ++i) if (!$util.isInteger(message.Cards[i])) return "Cards: integer[] expected"; } return null; }; /** * Creates a BigWinHistoryInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.BigWinHistoryInfo * @static * @param {Object.} object Plain object * @returns {gamehall.BigWinHistoryInfo} BigWinHistoryInfo */ BigWinHistoryInfo.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.BigWinHistoryInfo) return object; var message = new $root.gamehall.BigWinHistoryInfo(); if (object.SpinID != null) message.SpinID = String(object.SpinID); if (object.CreatedTime != null) if ($util.Long) (message.CreatedTime = $util.Long.fromValue(object.CreatedTime)).unsigned = false; else if (typeof object.CreatedTime === "string") message.CreatedTime = parseInt(object.CreatedTime, 10); else if (typeof object.CreatedTime === "number") message.CreatedTime = object.CreatedTime; else if (typeof object.CreatedTime === "object") message.CreatedTime = new $util.LongBits(object.CreatedTime.low >>> 0, object.CreatedTime.high >>> 0).toNumber(); if (object.BaseBet != null) if ($util.Long) (message.BaseBet = $util.Long.fromValue(object.BaseBet)).unsigned = false; else if (typeof object.BaseBet === "string") message.BaseBet = parseInt(object.BaseBet, 10); else if (typeof object.BaseBet === "number") message.BaseBet = object.BaseBet; else if (typeof object.BaseBet === "object") message.BaseBet = new $util.LongBits(object.BaseBet.low >>> 0, object.BaseBet.high >>> 0).toNumber(); if (object.PriceValue != null) if ($util.Long) (message.PriceValue = $util.Long.fromValue(object.PriceValue)).unsigned = false; else if (typeof object.PriceValue === "string") message.PriceValue = parseInt(object.PriceValue, 10); else if (typeof object.PriceValue === "number") message.PriceValue = object.PriceValue; else if (typeof object.PriceValue === "object") message.PriceValue = new $util.LongBits(object.PriceValue.low >>> 0, object.PriceValue.high >>> 0).toNumber(); if (object.UserName != null) message.UserName = String(object.UserName); if (object.IsVirtualData != null) message.IsVirtualData = Boolean(object.IsVirtualData); if (object.TotalBet != null) if ($util.Long) (message.TotalBet = $util.Long.fromValue(object.TotalBet)).unsigned = false; else if (typeof object.TotalBet === "string") message.TotalBet = parseInt(object.TotalBet, 10); else if (typeof object.TotalBet === "number") message.TotalBet = object.TotalBet; else if (typeof object.TotalBet === "object") message.TotalBet = new $util.LongBits(object.TotalBet.low >>> 0, object.TotalBet.high >>> 0).toNumber(); if (object.Cards) { if (!Array.isArray(object.Cards)) throw TypeError(".gamehall.BigWinHistoryInfo.Cards: array expected"); message.Cards = []; for (var i = 0; i < object.Cards.length; ++i) message.Cards[i] = object.Cards[i] | 0; } return message; }; /** * Creates a plain object from a BigWinHistoryInfo message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.BigWinHistoryInfo * @static * @param {gamehall.BigWinHistoryInfo} message BigWinHistoryInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ BigWinHistoryInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.Cards = []; if (options.defaults) { object.SpinID = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.CreatedTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.CreatedTime = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.BaseBet = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.BaseBet = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.PriceValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.PriceValue = options.longs === String ? "0" : 0; object.UserName = ""; object.IsVirtualData = false; if ($util.Long) { var long = new $util.Long(0, 0, false); object.TotalBet = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.TotalBet = options.longs === String ? "0" : 0; } if (message.SpinID != null && message.hasOwnProperty("SpinID")) object.SpinID = message.SpinID; if (message.CreatedTime != null && message.hasOwnProperty("CreatedTime")) if (typeof message.CreatedTime === "number") object.CreatedTime = options.longs === String ? String(message.CreatedTime) : message.CreatedTime; else object.CreatedTime = options.longs === String ? $util.Long.prototype.toString.call(message.CreatedTime) : options.longs === Number ? new $util.LongBits(message.CreatedTime.low >>> 0, message.CreatedTime.high >>> 0).toNumber() : message.CreatedTime; if (message.BaseBet != null && message.hasOwnProperty("BaseBet")) if (typeof message.BaseBet === "number") object.BaseBet = options.longs === String ? String(message.BaseBet) : message.BaseBet; else object.BaseBet = options.longs === String ? $util.Long.prototype.toString.call(message.BaseBet) : options.longs === Number ? new $util.LongBits(message.BaseBet.low >>> 0, message.BaseBet.high >>> 0).toNumber() : message.BaseBet; if (message.PriceValue != null && message.hasOwnProperty("PriceValue")) if (typeof message.PriceValue === "number") object.PriceValue = options.longs === String ? String(message.PriceValue) : message.PriceValue; else object.PriceValue = options.longs === String ? $util.Long.prototype.toString.call(message.PriceValue) : options.longs === Number ? new $util.LongBits(message.PriceValue.low >>> 0, message.PriceValue.high >>> 0).toNumber() : message.PriceValue; if (message.UserName != null && message.hasOwnProperty("UserName")) object.UserName = message.UserName; if (message.IsVirtualData != null && message.hasOwnProperty("IsVirtualData")) object.IsVirtualData = message.IsVirtualData; if (message.TotalBet != null && message.hasOwnProperty("TotalBet")) if (typeof message.TotalBet === "number") object.TotalBet = options.longs === String ? String(message.TotalBet) : message.TotalBet; else object.TotalBet = options.longs === String ? $util.Long.prototype.toString.call(message.TotalBet) : options.longs === Number ? new $util.LongBits(message.TotalBet.low >>> 0, message.TotalBet.high >>> 0).toNumber() : message.TotalBet; if (message.Cards && message.Cards.length) { object.Cards = []; for (var j = 0; j < message.Cards.length; ++j) object.Cards[j] = message.Cards[j]; } return object; }; /** * Converts this BigWinHistoryInfo to JSON. * @function toJSON * @memberof gamehall.BigWinHistoryInfo * @instance * @returns {Object.} JSON object */ BigWinHistoryInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for BigWinHistoryInfo * @function getTypeUrl * @memberof gamehall.BigWinHistoryInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ BigWinHistoryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.BigWinHistoryInfo"; }; return BigWinHistoryInfo; })(); gamehall.SCBigWinHistory = (function() { /** * Properties of a SCBigWinHistory. * @memberof gamehall * @interface ISCBigWinHistory * @property {Array.|null} [BigWinHistory] SCBigWinHistory BigWinHistory * @property {number|null} [GameId] SCBigWinHistory GameId */ /** * Constructs a new SCBigWinHistory. * @memberof gamehall * @classdesc Represents a SCBigWinHistory. * @implements ISCBigWinHistory * @constructor * @param {gamehall.ISCBigWinHistory=} [properties] Properties to set */ function SCBigWinHistory(properties) { this.BigWinHistory = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SCBigWinHistory BigWinHistory. * @member {Array.} BigWinHistory * @memberof gamehall.SCBigWinHistory * @instance */ SCBigWinHistory.prototype.BigWinHistory = $util.emptyArray; /** * SCBigWinHistory GameId. * @member {number} GameId * @memberof gamehall.SCBigWinHistory * @instance */ SCBigWinHistory.prototype.GameId = 0; /** * Creates a new SCBigWinHistory instance using the specified properties. * @function create * @memberof gamehall.SCBigWinHistory * @static * @param {gamehall.ISCBigWinHistory=} [properties] Properties to set * @returns {gamehall.SCBigWinHistory} SCBigWinHistory instance */ SCBigWinHistory.create = function create(properties) { return new SCBigWinHistory(properties); }; /** * Encodes the specified SCBigWinHistory message. Does not implicitly {@link gamehall.SCBigWinHistory.verify|verify} messages. * @function encode * @memberof gamehall.SCBigWinHistory * @static * @param {gamehall.ISCBigWinHistory} message SCBigWinHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCBigWinHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.BigWinHistory != null && message.BigWinHistory.length) for (var i = 0; i < message.BigWinHistory.length; ++i) $root.gamehall.BigWinHistoryInfo.encode(message.BigWinHistory[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.GameId != null && Object.hasOwnProperty.call(message, "GameId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.GameId); return writer; }; /** * Encodes the specified SCBigWinHistory message, length delimited. Does not implicitly {@link gamehall.SCBigWinHistory.verify|verify} messages. * @function encodeDelimited * @memberof gamehall.SCBigWinHistory * @static * @param {gamehall.ISCBigWinHistory} message SCBigWinHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SCBigWinHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SCBigWinHistory message from the specified reader or buffer. * @function decode * @memberof gamehall.SCBigWinHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {gamehall.SCBigWinHistory} SCBigWinHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCBigWinHistory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.gamehall.SCBigWinHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.BigWinHistory && message.BigWinHistory.length)) message.BigWinHistory = []; message.BigWinHistory.push($root.gamehall.BigWinHistoryInfo.decode(reader, reader.uint32())); break; } case 2: { message.GameId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SCBigWinHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof gamehall.SCBigWinHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {gamehall.SCBigWinHistory} SCBigWinHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SCBigWinHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SCBigWinHistory message. * @function verify * @memberof gamehall.SCBigWinHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SCBigWinHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.BigWinHistory != null && message.hasOwnProperty("BigWinHistory")) { if (!Array.isArray(message.BigWinHistory)) return "BigWinHistory: array expected"; for (var i = 0; i < message.BigWinHistory.length; ++i) { var error = $root.gamehall.BigWinHistoryInfo.verify(message.BigWinHistory[i]); if (error) return "BigWinHistory." + error; } } if (message.GameId != null && message.hasOwnProperty("GameId")) if (!$util.isInteger(message.GameId)) return "GameId: integer expected"; return null; }; /** * Creates a SCBigWinHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof gamehall.SCBigWinHistory * @static * @param {Object.} object Plain object * @returns {gamehall.SCBigWinHistory} SCBigWinHistory */ SCBigWinHistory.fromObject = function fromObject(object) { if (object instanceof $root.gamehall.SCBigWinHistory) return object; var message = new $root.gamehall.SCBigWinHistory(); if (object.BigWinHistory) { if (!Array.isArray(object.BigWinHistory)) throw TypeError(".gamehall.SCBigWinHistory.BigWinHistory: array expected"); message.BigWinHistory = []; for (var i = 0; i < object.BigWinHistory.length; ++i) { if (typeof object.BigWinHistory[i] !== "object") throw TypeError(".gamehall.SCBigWinHistory.BigWinHistory: object expected"); message.BigWinHistory[i] = $root.gamehall.BigWinHistoryInfo.fromObject(object.BigWinHistory[i]); } } if (object.GameId != null) message.GameId = object.GameId | 0; return message; }; /** * Creates a plain object from a SCBigWinHistory message. Also converts values to other types if specified. * @function toObject * @memberof gamehall.SCBigWinHistory * @static * @param {gamehall.SCBigWinHistory} message SCBigWinHistory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SCBigWinHistory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.BigWinHistory = []; if (options.defaults) object.GameId = 0; if (message.BigWinHistory && message.BigWinHistory.length) { object.BigWinHistory = []; for (var j = 0; j < message.BigWinHistory.length; ++j) object.BigWinHistory[j] = $root.gamehall.BigWinHistoryInfo.toObject(message.BigWinHistory[j], options); } if (message.GameId != null && message.hasOwnProperty("GameId")) object.GameId = message.GameId; return object; }; /** * Converts this SCBigWinHistory to JSON. * @function toJSON * @memberof gamehall.SCBigWinHistory * @instance * @returns {Object.} JSON object */ SCBigWinHistory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SCBigWinHistory * @function getTypeUrl * @memberof gamehall.SCBigWinHistory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SCBigWinHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/gamehall.SCBigWinHistory"; }; return SCBigWinHistory; })(); return gamehall; })(); module.exports = $root;