1942 lines
81 KiB
JavaScript
1942 lines
81 KiB
JavaScript
/*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 = protobuf//require("protobufjs/minimal");
|
|
|
|
// Common aliases
|
|
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
|
|
|
// Exported root namespace
|
|
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
|
|
|
$root.hallproto = (function() {
|
|
|
|
/**
|
|
* Namespace hallproto.
|
|
* @exports hallproto
|
|
* @namespace
|
|
*/
|
|
var hallproto = {};
|
|
|
|
/**
|
|
* ENUM_C2S_ID enum.
|
|
* @name hallproto.ENUM_C2S_ID
|
|
* @enum {number}
|
|
* @property {number} GET_GAMEINFO=1 GET_GAMEINFO value
|
|
* @property {number} UPTO_GAMEINFO=2 UPTO_GAMEINFO value
|
|
*/
|
|
hallproto.ENUM_C2S_ID = (function() {
|
|
var valuesById = {}, values = Object.create(valuesById);
|
|
values[valuesById[1] = "GET_GAMEINFO"] = 1;
|
|
values[valuesById[2] = "UPTO_GAMEINFO"] = 2;
|
|
return values;
|
|
})();
|
|
|
|
/**
|
|
* ENUM_S2C_ID enum.
|
|
* @name hallproto.ENUM_S2C_ID
|
|
* @enum {number}
|
|
* @property {number} USERINFO_RESP=101 USERINFO_RESP value
|
|
*/
|
|
hallproto.ENUM_S2C_ID = (function() {
|
|
var valuesById = {}, values = Object.create(valuesById);
|
|
values[valuesById[101] = "USERINFO_RESP"] = 101;
|
|
return values;
|
|
})();
|
|
|
|
hallproto.MeansProp = (function() {
|
|
|
|
/**
|
|
* Properties of a MeansProp.
|
|
* @memberof hallproto
|
|
* @interface IMeansProp
|
|
* @property {number|Long|null} [num] MeansProp num
|
|
* @property {boolean|null} [bUnlock] MeansProp bUnlock
|
|
* @property {number|null} [unlockfee] MeansProp unlockfee
|
|
* @property {number|null} [level] MeansProp level
|
|
* @property {Array.<number>|null} [catchFishes] MeansProp catchFishes
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new MeansProp.
|
|
* @memberof hallproto
|
|
* @classdesc Represents a MeansProp.
|
|
* @implements IMeansProp
|
|
* @constructor
|
|
* @param {hallproto.IMeansProp=} [properties] Properties to set
|
|
*/
|
|
function MeansProp(properties) {
|
|
this.catchFishes = [];
|
|
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]];
|
|
}
|
|
|
|
/**
|
|
* MeansProp num.
|
|
* @member {number|Long} num
|
|
* @memberof hallproto.MeansProp
|
|
* @instance
|
|
*/
|
|
MeansProp.prototype.num = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
|
|
/**
|
|
* MeansProp bUnlock.
|
|
* @member {boolean} bUnlock
|
|
* @memberof hallproto.MeansProp
|
|
* @instance
|
|
*/
|
|
MeansProp.prototype.bUnlock = false;
|
|
|
|
/**
|
|
* MeansProp unlockfee.
|
|
* @member {number} unlockfee
|
|
* @memberof hallproto.MeansProp
|
|
* @instance
|
|
*/
|
|
MeansProp.prototype.unlockfee = 0;
|
|
|
|
/**
|
|
* MeansProp level.
|
|
* @member {number} level
|
|
* @memberof hallproto.MeansProp
|
|
* @instance
|
|
*/
|
|
MeansProp.prototype.level = 0;
|
|
|
|
/**
|
|
* MeansProp catchFishes.
|
|
* @member {Array.<number>} catchFishes
|
|
* @memberof hallproto.MeansProp
|
|
* @instance
|
|
*/
|
|
MeansProp.prototype.catchFishes = $util.emptyArray;
|
|
|
|
/**
|
|
* Creates a new MeansProp instance using the specified properties.
|
|
* @function create
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {hallproto.IMeansProp=} [properties] Properties to set
|
|
* @returns {hallproto.MeansProp} MeansProp instance
|
|
*/
|
|
MeansProp.create = function create(properties) {
|
|
return new MeansProp(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified MeansProp message. Does not implicitly {@link hallproto.MeansProp.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {hallproto.IMeansProp} message MeansProp message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
MeansProp.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.num != null && Object.hasOwnProperty.call(message, "num"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.num);
|
|
if (message.bUnlock != null && Object.hasOwnProperty.call(message, "bUnlock"))
|
|
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.bUnlock);
|
|
if (message.unlockfee != null && Object.hasOwnProperty.call(message, "unlockfee"))
|
|
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.unlockfee);
|
|
if (message.level != null && Object.hasOwnProperty.call(message, "level"))
|
|
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.level);
|
|
if (message.catchFishes != null && message.catchFishes.length) {
|
|
writer.uint32(/* id 5, wireType 2 =*/42).fork();
|
|
for (var i = 0; i < message.catchFishes.length; ++i)
|
|
writer.uint32(message.catchFishes[i]);
|
|
writer.ldelim();
|
|
}
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified MeansProp message, length delimited. Does not implicitly {@link hallproto.MeansProp.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {hallproto.IMeansProp} message MeansProp message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
MeansProp.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a MeansProp message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {hallproto.MeansProp} MeansProp
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
MeansProp.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.hallproto.MeansProp();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.num = reader.uint64();
|
|
break;
|
|
case 2:
|
|
message.bUnlock = reader.bool();
|
|
break;
|
|
case 3:
|
|
message.unlockfee = reader.uint32();
|
|
break;
|
|
case 4:
|
|
message.level = reader.uint32();
|
|
break;
|
|
case 5:
|
|
if (!(message.catchFishes && message.catchFishes.length))
|
|
message.catchFishes = [];
|
|
if ((tag & 7) === 2) {
|
|
var end2 = reader.uint32() + reader.pos;
|
|
while (reader.pos < end2)
|
|
message.catchFishes.push(reader.uint32());
|
|
} else
|
|
message.catchFishes.push(reader.uint32());
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a MeansProp message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {hallproto.MeansProp} MeansProp
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
MeansProp.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a MeansProp message.
|
|
* @function verify
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
MeansProp.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.num != null && message.hasOwnProperty("num"))
|
|
if (!$util.isInteger(message.num) && !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high)))
|
|
return "num: integer|Long expected";
|
|
if (message.bUnlock != null && message.hasOwnProperty("bUnlock"))
|
|
if (typeof message.bUnlock !== "boolean")
|
|
return "bUnlock: boolean expected";
|
|
if (message.unlockfee != null && message.hasOwnProperty("unlockfee"))
|
|
if (!$util.isInteger(message.unlockfee))
|
|
return "unlockfee: integer expected";
|
|
if (message.level != null && message.hasOwnProperty("level"))
|
|
if (!$util.isInteger(message.level))
|
|
return "level: integer expected";
|
|
if (message.catchFishes != null && message.hasOwnProperty("catchFishes")) {
|
|
if (!Array.isArray(message.catchFishes))
|
|
return "catchFishes: array expected";
|
|
for (var i = 0; i < message.catchFishes.length; ++i)
|
|
if (!$util.isInteger(message.catchFishes[i]))
|
|
return "catchFishes: integer[] expected";
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a MeansProp message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {hallproto.MeansProp} MeansProp
|
|
*/
|
|
MeansProp.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.hallproto.MeansProp)
|
|
return object;
|
|
var message = new $root.hallproto.MeansProp();
|
|
if (object.num != null)
|
|
if ($util.Long)
|
|
(message.num = $util.Long.fromValue(object.num)).unsigned = true;
|
|
else if (typeof object.num === "string")
|
|
message.num = parseInt(object.num, 10);
|
|
else if (typeof object.num === "number")
|
|
message.num = object.num;
|
|
else if (typeof object.num === "object")
|
|
message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber(true);
|
|
if (object.bUnlock != null)
|
|
message.bUnlock = Boolean(object.bUnlock);
|
|
if (object.unlockfee != null)
|
|
message.unlockfee = object.unlockfee >>> 0;
|
|
if (object.level != null)
|
|
message.level = object.level >>> 0;
|
|
if (object.catchFishes) {
|
|
if (!Array.isArray(object.catchFishes))
|
|
throw TypeError(".hallproto.MeansProp.catchFishes: array expected");
|
|
message.catchFishes = [];
|
|
for (var i = 0; i < object.catchFishes.length; ++i)
|
|
message.catchFishes[i] = object.catchFishes[i] >>> 0;
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a MeansProp message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof hallproto.MeansProp
|
|
* @static
|
|
* @param {hallproto.MeansProp} message MeansProp
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
MeansProp.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.catchFishes = [];
|
|
if (options.defaults) {
|
|
if ($util.Long) {
|
|
var long = new $util.Long(0, 0, true);
|
|
object.num = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
} else
|
|
object.num = options.longs === String ? "0" : 0;
|
|
object.bUnlock = false;
|
|
object.unlockfee = 0;
|
|
object.level = 0;
|
|
}
|
|
if (message.num != null && message.hasOwnProperty("num"))
|
|
if (typeof message.num === "number")
|
|
object.num = options.longs === String ? String(message.num) : message.num;
|
|
else
|
|
object.num = options.longs === String ? $util.Long.prototype.toString.call(message.num) : options.longs === Number ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber(true) : message.num;
|
|
if (message.bUnlock != null && message.hasOwnProperty("bUnlock"))
|
|
object.bUnlock = message.bUnlock;
|
|
if (message.unlockfee != null && message.hasOwnProperty("unlockfee"))
|
|
object.unlockfee = message.unlockfee;
|
|
if (message.level != null && message.hasOwnProperty("level"))
|
|
object.level = message.level;
|
|
if (message.catchFishes && message.catchFishes.length) {
|
|
object.catchFishes = [];
|
|
for (var j = 0; j < message.catchFishes.length; ++j)
|
|
object.catchFishes[j] = message.catchFishes[j];
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this MeansProp to JSON.
|
|
* @function toJSON
|
|
* @memberof hallproto.MeansProp
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
MeansProp.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return MeansProp;
|
|
})();
|
|
|
|
hallproto.MeansData = (function() {
|
|
|
|
/**
|
|
* Properties of a MeansData.
|
|
* @memberof hallproto
|
|
* @interface IMeansData
|
|
* @property {number|null} [id] MeansData id
|
|
* @property {hallproto.IMeansProp|null} [prop] MeansData prop
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new MeansData.
|
|
* @memberof hallproto
|
|
* @classdesc Represents a MeansData.
|
|
* @implements IMeansData
|
|
* @constructor
|
|
* @param {hallproto.IMeansData=} [properties] Properties to set
|
|
*/
|
|
function MeansData(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]];
|
|
}
|
|
|
|
/**
|
|
* MeansData id.
|
|
* @member {number} id
|
|
* @memberof hallproto.MeansData
|
|
* @instance
|
|
*/
|
|
MeansData.prototype.id = 0;
|
|
|
|
/**
|
|
* MeansData prop.
|
|
* @member {hallproto.IMeansProp|null|undefined} prop
|
|
* @memberof hallproto.MeansData
|
|
* @instance
|
|
*/
|
|
MeansData.prototype.prop = null;
|
|
|
|
/**
|
|
* Creates a new MeansData instance using the specified properties.
|
|
* @function create
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {hallproto.IMeansData=} [properties] Properties to set
|
|
* @returns {hallproto.MeansData} MeansData instance
|
|
*/
|
|
MeansData.create = function create(properties) {
|
|
return new MeansData(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified MeansData message. Does not implicitly {@link hallproto.MeansData.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {hallproto.IMeansData} message MeansData message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
MeansData.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.prop != null && Object.hasOwnProperty.call(message, "prop"))
|
|
$root.hallproto.MeansProp.encode(message.prop, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified MeansData message, length delimited. Does not implicitly {@link hallproto.MeansData.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {hallproto.IMeansData} message MeansData message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
MeansData.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a MeansData message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {hallproto.MeansData} MeansData
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
MeansData.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.hallproto.MeansData();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.id = reader.int32();
|
|
break;
|
|
case 2:
|
|
message.prop = $root.hallproto.MeansProp.decode(reader, reader.uint32());
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a MeansData message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {hallproto.MeansData} MeansData
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
MeansData.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a MeansData message.
|
|
* @function verify
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
MeansData.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.prop != null && message.hasOwnProperty("prop")) {
|
|
var error = $root.hallproto.MeansProp.verify(message.prop);
|
|
if (error)
|
|
return "prop." + error;
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a MeansData message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {hallproto.MeansData} MeansData
|
|
*/
|
|
MeansData.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.hallproto.MeansData)
|
|
return object;
|
|
var message = new $root.hallproto.MeansData();
|
|
if (object.id != null)
|
|
message.id = object.id | 0;
|
|
if (object.prop != null) {
|
|
if (typeof object.prop !== "object")
|
|
throw TypeError(".hallproto.MeansData.prop: object expected");
|
|
message.prop = $root.hallproto.MeansProp.fromObject(object.prop);
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a MeansData message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof hallproto.MeansData
|
|
* @static
|
|
* @param {hallproto.MeansData} message MeansData
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
MeansData.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.id = 0;
|
|
object.prop = null;
|
|
}
|
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
object.id = message.id;
|
|
if (message.prop != null && message.hasOwnProperty("prop"))
|
|
object.prop = $root.hallproto.MeansProp.toObject(message.prop, options);
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this MeansData to JSON.
|
|
* @function toJSON
|
|
* @memberof hallproto.MeansData
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
MeansData.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return MeansData;
|
|
})();
|
|
|
|
hallproto.SingInData = (function() {
|
|
|
|
/**
|
|
* Properties of a SingInData.
|
|
* @memberof hallproto
|
|
* @interface ISingInData
|
|
* @property {number|Long|null} [weekOnetime] SingInData weekOnetime
|
|
* @property {Array.<hallproto.SingInData.IsingIn>|null} [singInlist] SingInData singInlist
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new SingInData.
|
|
* @memberof hallproto
|
|
* @classdesc Represents a SingInData.
|
|
* @implements ISingInData
|
|
* @constructor
|
|
* @param {hallproto.ISingInData=} [properties] Properties to set
|
|
*/
|
|
function SingInData(properties) {
|
|
this.singInlist = [];
|
|
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]];
|
|
}
|
|
|
|
/**
|
|
* SingInData weekOnetime.
|
|
* @member {number|Long} weekOnetime
|
|
* @memberof hallproto.SingInData
|
|
* @instance
|
|
*/
|
|
SingInData.prototype.weekOnetime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
|
|
/**
|
|
* SingInData singInlist.
|
|
* @member {Array.<hallproto.SingInData.IsingIn>} singInlist
|
|
* @memberof hallproto.SingInData
|
|
* @instance
|
|
*/
|
|
SingInData.prototype.singInlist = $util.emptyArray;
|
|
|
|
/**
|
|
* Creates a new SingInData instance using the specified properties.
|
|
* @function create
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {hallproto.ISingInData=} [properties] Properties to set
|
|
* @returns {hallproto.SingInData} SingInData instance
|
|
*/
|
|
SingInData.create = function create(properties) {
|
|
return new SingInData(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified SingInData message. Does not implicitly {@link hallproto.SingInData.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {hallproto.ISingInData} message SingInData message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
SingInData.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.weekOnetime != null && Object.hasOwnProperty.call(message, "weekOnetime"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.weekOnetime);
|
|
if (message.singInlist != null && message.singInlist.length)
|
|
for (var i = 0; i < message.singInlist.length; ++i)
|
|
$root.hallproto.SingInData.singIn.encode(message.singInlist[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified SingInData message, length delimited. Does not implicitly {@link hallproto.SingInData.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {hallproto.ISingInData} message SingInData message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
SingInData.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a SingInData message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {hallproto.SingInData} SingInData
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
SingInData.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.hallproto.SingInData();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.weekOnetime = reader.uint64();
|
|
break;
|
|
case 2:
|
|
if (!(message.singInlist && message.singInlist.length))
|
|
message.singInlist = [];
|
|
message.singInlist.push($root.hallproto.SingInData.singIn.decode(reader, reader.uint32()));
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a SingInData message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {hallproto.SingInData} SingInData
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
SingInData.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a SingInData message.
|
|
* @function verify
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
SingInData.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.weekOnetime != null && message.hasOwnProperty("weekOnetime"))
|
|
if (!$util.isInteger(message.weekOnetime) && !(message.weekOnetime && $util.isInteger(message.weekOnetime.low) && $util.isInteger(message.weekOnetime.high)))
|
|
return "weekOnetime: integer|Long expected";
|
|
if (message.singInlist != null && message.hasOwnProperty("singInlist")) {
|
|
if (!Array.isArray(message.singInlist))
|
|
return "singInlist: array expected";
|
|
for (var i = 0; i < message.singInlist.length; ++i) {
|
|
var error = $root.hallproto.SingInData.singIn.verify(message.singInlist[i]);
|
|
if (error)
|
|
return "singInlist." + error;
|
|
}
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a SingInData message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {hallproto.SingInData} SingInData
|
|
*/
|
|
SingInData.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.hallproto.SingInData)
|
|
return object;
|
|
var message = new $root.hallproto.SingInData();
|
|
if (object.weekOnetime != null)
|
|
if ($util.Long)
|
|
(message.weekOnetime = $util.Long.fromValue(object.weekOnetime)).unsigned = true;
|
|
else if (typeof object.weekOnetime === "string")
|
|
message.weekOnetime = parseInt(object.weekOnetime, 10);
|
|
else if (typeof object.weekOnetime === "number")
|
|
message.weekOnetime = object.weekOnetime;
|
|
else if (typeof object.weekOnetime === "object")
|
|
message.weekOnetime = new $util.LongBits(object.weekOnetime.low >>> 0, object.weekOnetime.high >>> 0).toNumber(true);
|
|
if (object.singInlist) {
|
|
if (!Array.isArray(object.singInlist))
|
|
throw TypeError(".hallproto.SingInData.singInlist: array expected");
|
|
message.singInlist = [];
|
|
for (var i = 0; i < object.singInlist.length; ++i) {
|
|
if (typeof object.singInlist[i] !== "object")
|
|
throw TypeError(".hallproto.SingInData.singInlist: object expected");
|
|
message.singInlist[i] = $root.hallproto.SingInData.singIn.fromObject(object.singInlist[i]);
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a SingInData message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof hallproto.SingInData
|
|
* @static
|
|
* @param {hallproto.SingInData} message SingInData
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
SingInData.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.singInlist = [];
|
|
if (options.defaults)
|
|
if ($util.Long) {
|
|
var long = new $util.Long(0, 0, true);
|
|
object.weekOnetime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
} else
|
|
object.weekOnetime = options.longs === String ? "0" : 0;
|
|
if (message.weekOnetime != null && message.hasOwnProperty("weekOnetime"))
|
|
if (typeof message.weekOnetime === "number")
|
|
object.weekOnetime = options.longs === String ? String(message.weekOnetime) : message.weekOnetime;
|
|
else
|
|
object.weekOnetime = options.longs === String ? $util.Long.prototype.toString.call(message.weekOnetime) : options.longs === Number ? new $util.LongBits(message.weekOnetime.low >>> 0, message.weekOnetime.high >>> 0).toNumber(true) : message.weekOnetime;
|
|
if (message.singInlist && message.singInlist.length) {
|
|
object.singInlist = [];
|
|
for (var j = 0; j < message.singInlist.length; ++j)
|
|
object.singInlist[j] = $root.hallproto.SingInData.singIn.toObject(message.singInlist[j], options);
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this SingInData to JSON.
|
|
* @function toJSON
|
|
* @memberof hallproto.SingInData
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
SingInData.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
SingInData.singIn = (function() {
|
|
|
|
/**
|
|
* Properties of a singIn.
|
|
* @memberof hallproto.SingInData
|
|
* @interface IsingIn
|
|
* @property {number|null} [weekDay] singIn weekDay
|
|
* @property {number|null} [sInType] singIn sInType
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new singIn.
|
|
* @memberof hallproto.SingInData
|
|
* @classdesc Represents a singIn.
|
|
* @implements IsingIn
|
|
* @constructor
|
|
* @param {hallproto.SingInData.IsingIn=} [properties] Properties to set
|
|
*/
|
|
function singIn(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]];
|
|
}
|
|
|
|
/**
|
|
* singIn weekDay.
|
|
* @member {number} weekDay
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @instance
|
|
*/
|
|
singIn.prototype.weekDay = 0;
|
|
|
|
/**
|
|
* singIn sInType.
|
|
* @member {number} sInType
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @instance
|
|
*/
|
|
singIn.prototype.sInType = 0;
|
|
|
|
/**
|
|
* Creates a new singIn instance using the specified properties.
|
|
* @function create
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {hallproto.SingInData.IsingIn=} [properties] Properties to set
|
|
* @returns {hallproto.SingInData.singIn} singIn instance
|
|
*/
|
|
singIn.create = function create(properties) {
|
|
return new singIn(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified singIn message. Does not implicitly {@link hallproto.SingInData.singIn.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {hallproto.SingInData.IsingIn} message singIn message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
singIn.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.weekDay != null && Object.hasOwnProperty.call(message, "weekDay"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.weekDay);
|
|
if (message.sInType != null && Object.hasOwnProperty.call(message, "sInType"))
|
|
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.sInType);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified singIn message, length delimited. Does not implicitly {@link hallproto.SingInData.singIn.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {hallproto.SingInData.IsingIn} message singIn message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
singIn.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a singIn message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {hallproto.SingInData.singIn} singIn
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
singIn.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.hallproto.SingInData.singIn();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.weekDay = reader.uint32();
|
|
break;
|
|
case 2:
|
|
message.sInType = reader.uint32();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a singIn message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {hallproto.SingInData.singIn} singIn
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
singIn.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a singIn message.
|
|
* @function verify
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
singIn.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.weekDay != null && message.hasOwnProperty("weekDay"))
|
|
if (!$util.isInteger(message.weekDay))
|
|
return "weekDay: integer expected";
|
|
if (message.sInType != null && message.hasOwnProperty("sInType"))
|
|
if (!$util.isInteger(message.sInType))
|
|
return "sInType: integer expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a singIn message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {hallproto.SingInData.singIn} singIn
|
|
*/
|
|
singIn.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.hallproto.SingInData.singIn)
|
|
return object;
|
|
var message = new $root.hallproto.SingInData.singIn();
|
|
if (object.weekDay != null)
|
|
message.weekDay = object.weekDay >>> 0;
|
|
if (object.sInType != null)
|
|
message.sInType = object.sInType >>> 0;
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a singIn message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @static
|
|
* @param {hallproto.SingInData.singIn} message singIn
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
singIn.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.weekDay = 0;
|
|
object.sInType = 0;
|
|
}
|
|
if (message.weekDay != null && message.hasOwnProperty("weekDay"))
|
|
object.weekDay = message.weekDay;
|
|
if (message.sInType != null && message.hasOwnProperty("sInType"))
|
|
object.sInType = message.sInType;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this singIn to JSON.
|
|
* @function toJSON
|
|
* @memberof hallproto.SingInData.singIn
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
singIn.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return singIn;
|
|
})();
|
|
|
|
return SingInData;
|
|
})();
|
|
|
|
hallproto.CMD_GAMEINFO = (function() {
|
|
|
|
/**
|
|
* Properties of a CMD_GAMEINFO.
|
|
* @memberof hallproto
|
|
* @interface ICMD_GAMEINFO
|
|
* @property {number|null} [userId] CMD_GAMEINFO userId
|
|
* @property {Array.<hallproto.IMeansData>|null} [meansData] CMD_GAMEINFO meansData
|
|
* @property {hallproto.ISingInData|null} [singInData] CMD_GAMEINFO singInData
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CMD_GAMEINFO.
|
|
* @memberof hallproto
|
|
* @classdesc Represents a CMD_GAMEINFO.
|
|
* @implements ICMD_GAMEINFO
|
|
* @constructor
|
|
* @param {hallproto.ICMD_GAMEINFO=} [properties] Properties to set
|
|
*/
|
|
function CMD_GAMEINFO(properties) {
|
|
this.meansData = [];
|
|
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]];
|
|
}
|
|
|
|
/**
|
|
* CMD_GAMEINFO userId.
|
|
* @member {number} userId
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @instance
|
|
*/
|
|
CMD_GAMEINFO.prototype.userId = 0;
|
|
|
|
/**
|
|
* CMD_GAMEINFO meansData.
|
|
* @member {Array.<hallproto.IMeansData>} meansData
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @instance
|
|
*/
|
|
CMD_GAMEINFO.prototype.meansData = $util.emptyArray;
|
|
|
|
/**
|
|
* CMD_GAMEINFO singInData.
|
|
* @member {hallproto.ISingInData|null|undefined} singInData
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @instance
|
|
*/
|
|
CMD_GAMEINFO.prototype.singInData = null;
|
|
|
|
/**
|
|
* Creates a new CMD_GAMEINFO instance using the specified properties.
|
|
* @function create
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {hallproto.ICMD_GAMEINFO=} [properties] Properties to set
|
|
* @returns {hallproto.CMD_GAMEINFO} CMD_GAMEINFO instance
|
|
*/
|
|
CMD_GAMEINFO.create = function create(properties) {
|
|
return new CMD_GAMEINFO(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_GAMEINFO message. Does not implicitly {@link hallproto.CMD_GAMEINFO.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {hallproto.ICMD_GAMEINFO} message CMD_GAMEINFO message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_GAMEINFO.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId);
|
|
if (message.meansData != null && message.meansData.length)
|
|
for (var i = 0; i < message.meansData.length; ++i)
|
|
$root.hallproto.MeansData.encode(message.meansData[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
if (message.singInData != null && Object.hasOwnProperty.call(message, "singInData"))
|
|
$root.hallproto.SingInData.encode(message.singInData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_GAMEINFO message, length delimited. Does not implicitly {@link hallproto.CMD_GAMEINFO.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {hallproto.ICMD_GAMEINFO} message CMD_GAMEINFO message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_GAMEINFO.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_GAMEINFO message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {hallproto.CMD_GAMEINFO} CMD_GAMEINFO
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_GAMEINFO.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.hallproto.CMD_GAMEINFO();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.userId = reader.uint32();
|
|
break;
|
|
case 2:
|
|
if (!(message.meansData && message.meansData.length))
|
|
message.meansData = [];
|
|
message.meansData.push($root.hallproto.MeansData.decode(reader, reader.uint32()));
|
|
break;
|
|
case 3:
|
|
message.singInData = $root.hallproto.SingInData.decode(reader, reader.uint32());
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_GAMEINFO message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {hallproto.CMD_GAMEINFO} CMD_GAMEINFO
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_GAMEINFO.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CMD_GAMEINFO message.
|
|
* @function verify
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CMD_GAMEINFO.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
if (!$util.isInteger(message.userId))
|
|
return "userId: integer expected";
|
|
if (message.meansData != null && message.hasOwnProperty("meansData")) {
|
|
if (!Array.isArray(message.meansData))
|
|
return "meansData: array expected";
|
|
for (var i = 0; i < message.meansData.length; ++i) {
|
|
var error = $root.hallproto.MeansData.verify(message.meansData[i]);
|
|
if (error)
|
|
return "meansData." + error;
|
|
}
|
|
}
|
|
if (message.singInData != null && message.hasOwnProperty("singInData")) {
|
|
var error = $root.hallproto.SingInData.verify(message.singInData);
|
|
if (error)
|
|
return "singInData." + error;
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CMD_GAMEINFO message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {hallproto.CMD_GAMEINFO} CMD_GAMEINFO
|
|
*/
|
|
CMD_GAMEINFO.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.hallproto.CMD_GAMEINFO)
|
|
return object;
|
|
var message = new $root.hallproto.CMD_GAMEINFO();
|
|
if (object.userId != null)
|
|
message.userId = object.userId >>> 0;
|
|
if (object.meansData) {
|
|
if (!Array.isArray(object.meansData))
|
|
throw TypeError(".hallproto.CMD_GAMEINFO.meansData: array expected");
|
|
message.meansData = [];
|
|
for (var i = 0; i < object.meansData.length; ++i) {
|
|
if (typeof object.meansData[i] !== "object")
|
|
throw TypeError(".hallproto.CMD_GAMEINFO.meansData: object expected");
|
|
message.meansData[i] = $root.hallproto.MeansData.fromObject(object.meansData[i]);
|
|
}
|
|
}
|
|
if (object.singInData != null) {
|
|
if (typeof object.singInData !== "object")
|
|
throw TypeError(".hallproto.CMD_GAMEINFO.singInData: object expected");
|
|
message.singInData = $root.hallproto.SingInData.fromObject(object.singInData);
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CMD_GAMEINFO message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @static
|
|
* @param {hallproto.CMD_GAMEINFO} message CMD_GAMEINFO
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CMD_GAMEINFO.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.meansData = [];
|
|
if (options.defaults) {
|
|
object.userId = 0;
|
|
object.singInData = null;
|
|
}
|
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
object.userId = message.userId;
|
|
if (message.meansData && message.meansData.length) {
|
|
object.meansData = [];
|
|
for (var j = 0; j < message.meansData.length; ++j)
|
|
object.meansData[j] = $root.hallproto.MeansData.toObject(message.meansData[j], options);
|
|
}
|
|
if (message.singInData != null && message.hasOwnProperty("singInData"))
|
|
object.singInData = $root.hallproto.SingInData.toObject(message.singInData, options);
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CMD_GAMEINFO to JSON.
|
|
* @function toJSON
|
|
* @memberof hallproto.CMD_GAMEINFO
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CMD_GAMEINFO.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return CMD_GAMEINFO;
|
|
})();
|
|
|
|
return hallproto;
|
|
})();
|
|
|
|
$root.tokenproto = (function() {
|
|
|
|
/**
|
|
* Namespace tokenproto.
|
|
* @exports tokenproto
|
|
* @namespace
|
|
*/
|
|
var tokenproto = {};
|
|
|
|
/**
|
|
* ENUM_C2S_ID enum.
|
|
* @name tokenproto.ENUM_C2S_ID
|
|
* @enum {number}
|
|
* @property {number} TOKEN_BY_CLIENT=1 TOKEN_BY_CLIENT value
|
|
* @property {number} TOKEN_BY_ACCOUNT=2 TOKEN_BY_ACCOUNT value
|
|
* @property {number} TOKEN_BY_PLATFORM=3 TOKEN_BY_PLATFORM value
|
|
*/
|
|
tokenproto.ENUM_C2S_ID = (function() {
|
|
var valuesById = {}, values = Object.create(valuesById);
|
|
values[valuesById[1] = "TOKEN_BY_CLIENT"] = 1;
|
|
values[valuesById[2] = "TOKEN_BY_ACCOUNT"] = 2;
|
|
values[valuesById[3] = "TOKEN_BY_PLATFORM"] = 3;
|
|
return values;
|
|
})();
|
|
|
|
/**
|
|
* ENUM_S2C_ID enum.
|
|
* @name tokenproto.ENUM_S2C_ID
|
|
* @enum {number}
|
|
* @property {number} TOKEN_RESP=100 TOKEN_RESP value
|
|
*/
|
|
tokenproto.ENUM_S2C_ID = (function() {
|
|
var valuesById = {}, values = Object.create(valuesById);
|
|
values[valuesById[100] = "TOKEN_RESP"] = 100;
|
|
return values;
|
|
})();
|
|
|
|
tokenproto.CMD_C2S_CLIENTINFO = (function() {
|
|
|
|
/**
|
|
* Properties of a CMD_C2S_CLIENTINFO.
|
|
* @memberof tokenproto
|
|
* @interface ICMD_C2S_CLIENTINFO
|
|
* @property {string|null} [uuid] CMD_C2S_CLIENTINFO uuid
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CMD_C2S_CLIENTINFO.
|
|
* @memberof tokenproto
|
|
* @classdesc Represents a CMD_C2S_CLIENTINFO.
|
|
* @implements ICMD_C2S_CLIENTINFO
|
|
* @constructor
|
|
* @param {tokenproto.ICMD_C2S_CLIENTINFO=} [properties] Properties to set
|
|
*/
|
|
function CMD_C2S_CLIENTINFO(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]];
|
|
}
|
|
|
|
/**
|
|
* CMD_C2S_CLIENTINFO uuid.
|
|
* @member {string} uuid
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @instance
|
|
*/
|
|
CMD_C2S_CLIENTINFO.prototype.uuid = "";
|
|
|
|
/**
|
|
* Creates a new CMD_C2S_CLIENTINFO instance using the specified properties.
|
|
* @function create
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {tokenproto.ICMD_C2S_CLIENTINFO=} [properties] Properties to set
|
|
* @returns {tokenproto.CMD_C2S_CLIENTINFO} CMD_C2S_CLIENTINFO instance
|
|
*/
|
|
CMD_C2S_CLIENTINFO.create = function create(properties) {
|
|
return new CMD_C2S_CLIENTINFO(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_C2S_CLIENTINFO message. Does not implicitly {@link tokenproto.CMD_C2S_CLIENTINFO.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {tokenproto.ICMD_C2S_CLIENTINFO} message CMD_C2S_CLIENTINFO message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_C2S_CLIENTINFO.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_C2S_CLIENTINFO message, length delimited. Does not implicitly {@link tokenproto.CMD_C2S_CLIENTINFO.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {tokenproto.ICMD_C2S_CLIENTINFO} message CMD_C2S_CLIENTINFO message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_C2S_CLIENTINFO.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_C2S_CLIENTINFO message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {tokenproto.CMD_C2S_CLIENTINFO} CMD_C2S_CLIENTINFO
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_C2S_CLIENTINFO.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.tokenproto.CMD_C2S_CLIENTINFO();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.uuid = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_C2S_CLIENTINFO message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {tokenproto.CMD_C2S_CLIENTINFO} CMD_C2S_CLIENTINFO
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_C2S_CLIENTINFO.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CMD_C2S_CLIENTINFO message.
|
|
* @function verify
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CMD_C2S_CLIENTINFO.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.uuid != null && message.hasOwnProperty("uuid"))
|
|
if (!$util.isString(message.uuid))
|
|
return "uuid: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CMD_C2S_CLIENTINFO message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {tokenproto.CMD_C2S_CLIENTINFO} CMD_C2S_CLIENTINFO
|
|
*/
|
|
CMD_C2S_CLIENTINFO.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.tokenproto.CMD_C2S_CLIENTINFO)
|
|
return object;
|
|
var message = new $root.tokenproto.CMD_C2S_CLIENTINFO();
|
|
if (object.uuid != null)
|
|
message.uuid = String(object.uuid);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CMD_C2S_CLIENTINFO message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @static
|
|
* @param {tokenproto.CMD_C2S_CLIENTINFO} message CMD_C2S_CLIENTINFO
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CMD_C2S_CLIENTINFO.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults)
|
|
object.uuid = "";
|
|
if (message.uuid != null && message.hasOwnProperty("uuid"))
|
|
object.uuid = message.uuid;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CMD_C2S_CLIENTINFO to JSON.
|
|
* @function toJSON
|
|
* @memberof tokenproto.CMD_C2S_CLIENTINFO
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CMD_C2S_CLIENTINFO.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return CMD_C2S_CLIENTINFO;
|
|
})();
|
|
|
|
tokenproto.CMD_C2S_ACCOUNT = (function() {
|
|
|
|
/**
|
|
* Properties of a CMD_C2S_ACCOUNT.
|
|
* @memberof tokenproto
|
|
* @interface ICMD_C2S_ACCOUNT
|
|
* @property {string|null} [account] CMD_C2S_ACCOUNT account
|
|
* @property {string|null} [code] CMD_C2S_ACCOUNT code
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CMD_C2S_ACCOUNT.
|
|
* @memberof tokenproto
|
|
* @classdesc Represents a CMD_C2S_ACCOUNT.
|
|
* @implements ICMD_C2S_ACCOUNT
|
|
* @constructor
|
|
* @param {tokenproto.ICMD_C2S_ACCOUNT=} [properties] Properties to set
|
|
*/
|
|
function CMD_C2S_ACCOUNT(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]];
|
|
}
|
|
|
|
/**
|
|
* CMD_C2S_ACCOUNT account.
|
|
* @member {string} account
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @instance
|
|
*/
|
|
CMD_C2S_ACCOUNT.prototype.account = "";
|
|
|
|
/**
|
|
* CMD_C2S_ACCOUNT code.
|
|
* @member {string} code
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @instance
|
|
*/
|
|
CMD_C2S_ACCOUNT.prototype.code = "";
|
|
|
|
/**
|
|
* Creates a new CMD_C2S_ACCOUNT instance using the specified properties.
|
|
* @function create
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {tokenproto.ICMD_C2S_ACCOUNT=} [properties] Properties to set
|
|
* @returns {tokenproto.CMD_C2S_ACCOUNT} CMD_C2S_ACCOUNT instance
|
|
*/
|
|
CMD_C2S_ACCOUNT.create = function create(properties) {
|
|
return new CMD_C2S_ACCOUNT(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_C2S_ACCOUNT message. Does not implicitly {@link tokenproto.CMD_C2S_ACCOUNT.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {tokenproto.ICMD_C2S_ACCOUNT} message CMD_C2S_ACCOUNT message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_C2S_ACCOUNT.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.account != null && Object.hasOwnProperty.call(message, "account"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.account);
|
|
if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.code);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_C2S_ACCOUNT message, length delimited. Does not implicitly {@link tokenproto.CMD_C2S_ACCOUNT.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {tokenproto.ICMD_C2S_ACCOUNT} message CMD_C2S_ACCOUNT message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_C2S_ACCOUNT.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_C2S_ACCOUNT message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {tokenproto.CMD_C2S_ACCOUNT} CMD_C2S_ACCOUNT
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_C2S_ACCOUNT.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.tokenproto.CMD_C2S_ACCOUNT();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 2:
|
|
message.account = reader.string();
|
|
break;
|
|
case 3:
|
|
message.code = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_C2S_ACCOUNT message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {tokenproto.CMD_C2S_ACCOUNT} CMD_C2S_ACCOUNT
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_C2S_ACCOUNT.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CMD_C2S_ACCOUNT message.
|
|
* @function verify
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CMD_C2S_ACCOUNT.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.account != null && message.hasOwnProperty("account"))
|
|
if (!$util.isString(message.account))
|
|
return "account: string expected";
|
|
if (message.code != null && message.hasOwnProperty("code"))
|
|
if (!$util.isString(message.code))
|
|
return "code: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CMD_C2S_ACCOUNT message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {tokenproto.CMD_C2S_ACCOUNT} CMD_C2S_ACCOUNT
|
|
*/
|
|
CMD_C2S_ACCOUNT.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.tokenproto.CMD_C2S_ACCOUNT)
|
|
return object;
|
|
var message = new $root.tokenproto.CMD_C2S_ACCOUNT();
|
|
if (object.account != null)
|
|
message.account = String(object.account);
|
|
if (object.code != null)
|
|
message.code = String(object.code);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CMD_C2S_ACCOUNT message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @static
|
|
* @param {tokenproto.CMD_C2S_ACCOUNT} message CMD_C2S_ACCOUNT
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CMD_C2S_ACCOUNT.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.account = "";
|
|
object.code = "";
|
|
}
|
|
if (message.account != null && message.hasOwnProperty("account"))
|
|
object.account = message.account;
|
|
if (message.code != null && message.hasOwnProperty("code"))
|
|
object.code = message.code;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CMD_C2S_ACCOUNT to JSON.
|
|
* @function toJSON
|
|
* @memberof tokenproto.CMD_C2S_ACCOUNT
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CMD_C2S_ACCOUNT.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return CMD_C2S_ACCOUNT;
|
|
})();
|
|
|
|
tokenproto.CMD_S2C_TOKEN_INFO = (function() {
|
|
|
|
/**
|
|
* Properties of a CMD_S2C_TOKEN_INFO.
|
|
* @memberof tokenproto
|
|
* @interface ICMD_S2C_TOKEN_INFO
|
|
* @property {number|null} [code] CMD_S2C_TOKEN_INFO code
|
|
* @property {string|null} [tokenStr] CMD_S2C_TOKEN_INFO tokenStr
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CMD_S2C_TOKEN_INFO.
|
|
* @memberof tokenproto
|
|
* @classdesc Represents a CMD_S2C_TOKEN_INFO.
|
|
* @implements ICMD_S2C_TOKEN_INFO
|
|
* @constructor
|
|
* @param {tokenproto.ICMD_S2C_TOKEN_INFO=} [properties] Properties to set
|
|
*/
|
|
function CMD_S2C_TOKEN_INFO(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]];
|
|
}
|
|
|
|
/**
|
|
* CMD_S2C_TOKEN_INFO code.
|
|
* @member {number} code
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @instance
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.prototype.code = 0;
|
|
|
|
/**
|
|
* CMD_S2C_TOKEN_INFO tokenStr.
|
|
* @member {string} tokenStr
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @instance
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.prototype.tokenStr = "";
|
|
|
|
/**
|
|
* Creates a new CMD_S2C_TOKEN_INFO instance using the specified properties.
|
|
* @function create
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {tokenproto.ICMD_S2C_TOKEN_INFO=} [properties] Properties to set
|
|
* @returns {tokenproto.CMD_S2C_TOKEN_INFO} CMD_S2C_TOKEN_INFO instance
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.create = function create(properties) {
|
|
return new CMD_S2C_TOKEN_INFO(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_S2C_TOKEN_INFO message. Does not implicitly {@link tokenproto.CMD_S2C_TOKEN_INFO.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {tokenproto.ICMD_S2C_TOKEN_INFO} message CMD_S2C_TOKEN_INFO message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code);
|
|
if (message.tokenStr != null && Object.hasOwnProperty.call(message, "tokenStr"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.tokenStr);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CMD_S2C_TOKEN_INFO message, length delimited. Does not implicitly {@link tokenproto.CMD_S2C_TOKEN_INFO.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {tokenproto.ICMD_S2C_TOKEN_INFO} message CMD_S2C_TOKEN_INFO message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_S2C_TOKEN_INFO message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {tokenproto.CMD_S2C_TOKEN_INFO} CMD_S2C_TOKEN_INFO
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.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.tokenproto.CMD_S2C_TOKEN_INFO();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.code = reader.uint32();
|
|
break;
|
|
case 2:
|
|
message.tokenStr = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CMD_S2C_TOKEN_INFO message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {tokenproto.CMD_S2C_TOKEN_INFO} CMD_S2C_TOKEN_INFO
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CMD_S2C_TOKEN_INFO message.
|
|
* @function verify
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.code != null && message.hasOwnProperty("code"))
|
|
if (!$util.isInteger(message.code))
|
|
return "code: integer expected";
|
|
if (message.tokenStr != null && message.hasOwnProperty("tokenStr"))
|
|
if (!$util.isString(message.tokenStr))
|
|
return "tokenStr: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CMD_S2C_TOKEN_INFO message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {tokenproto.CMD_S2C_TOKEN_INFO} CMD_S2C_TOKEN_INFO
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.tokenproto.CMD_S2C_TOKEN_INFO)
|
|
return object;
|
|
var message = new $root.tokenproto.CMD_S2C_TOKEN_INFO();
|
|
if (object.code != null)
|
|
message.code = object.code >>> 0;
|
|
if (object.tokenStr != null)
|
|
message.tokenStr = String(object.tokenStr);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CMD_S2C_TOKEN_INFO message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @static
|
|
* @param {tokenproto.CMD_S2C_TOKEN_INFO} message CMD_S2C_TOKEN_INFO
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.code = 0;
|
|
object.tokenStr = "";
|
|
}
|
|
if (message.code != null && message.hasOwnProperty("code"))
|
|
object.code = message.code;
|
|
if (message.tokenStr != null && message.hasOwnProperty("tokenStr"))
|
|
object.tokenStr = message.tokenStr;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CMD_S2C_TOKEN_INFO to JSON.
|
|
* @function toJSON
|
|
* @memberof tokenproto.CMD_S2C_TOKEN_INFO
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CMD_S2C_TOKEN_INFO.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return CMD_S2C_TOKEN_INFO;
|
|
})();
|
|
|
|
return tokenproto;
|
|
})();
|
|
|
|
module.exports = $root;
|