Ensure all messages populate the response senderId
Fixed `addClient` and `removeClient` events returning `SLCancelDelay` objects. This shouldn't really make a difference as there are no properties to worry about on one or the other, but it was still incorrect and could cause bugs if stuff was added to those messages in the future.
This commit is contained in:
@ -6,11 +6,16 @@ const MSG_ID = 12530;
|
||||
|
||||
exports.SLSetCircuitStateMessage = class SLSetCircuitStateMessage extends SLMessage {
|
||||
constructor(controllerId, circuitId, circuitState, senderId) {
|
||||
super(senderId, MSG_ID);
|
||||
if (typeof controllerId === 'object') {
|
||||
var size = controllerId.readInt32LE(4) + 8;
|
||||
super(controllerId, MSG_ID, size);
|
||||
} else {
|
||||
super(senderId, MSG_ID);
|
||||
|
||||
this.controllerId = controllerId;
|
||||
this.circuitId = circuitId;
|
||||
this.circuitState = circuitState;
|
||||
this.controllerId = controllerId;
|
||||
this.circuitId = circuitId;
|
||||
this.circuitState = circuitState;
|
||||
}
|
||||
}
|
||||
|
||||
encode() {
|
||||
|
Reference in New Issue
Block a user