Fix command output
This commit is contained in:
@@ -40,16 +40,17 @@ func (pk *CommandOutput) Marshal(io protocol.IO) {
|
|||||||
proto.CommandOriginData(io, &pk.CommandOrigin)
|
proto.CommandOriginData(io, &pk.CommandOrigin)
|
||||||
if proto.IsProtoGTE(io, proto.ID898) {
|
if proto.IsProtoGTE(io, proto.ID898) {
|
||||||
io.String(&pk.OutputType)
|
io.String(&pk.OutputType)
|
||||||
|
io.Uint32(&pk.SuccessCount)
|
||||||
} else {
|
} else {
|
||||||
v := getLegacyCommandOutputType(pk.OutputType)
|
v := getLegacyCommandOutputType(pk.OutputType)
|
||||||
io.Uint8(&v)
|
io.Uint8(&v)
|
||||||
pk.OutputType = getLatestCommandOutputType(v)
|
pk.OutputType = getLatestCommandOutputType(v)
|
||||||
|
io.Varuint32(&pk.SuccessCount)
|
||||||
}
|
}
|
||||||
io.Uint32(&pk.SuccessCount)
|
|
||||||
protocol.Slice(io, &pk.OutputMessages)
|
protocol.Slice(io, &pk.OutputMessages)
|
||||||
if proto.IsProtoGTE(io, proto.ID898) {
|
if proto.IsProtoGTE(io, proto.ID898) {
|
||||||
protocol.OptionalFunc(io, &pk.DataSet, io.String)
|
protocol.OptionalFunc(io, &pk.DataSet, io.String)
|
||||||
} else {
|
} else if pk.OutputType == "dataset" {
|
||||||
v, _ := pk.DataSet.Value()
|
v, _ := pk.DataSet.Value()
|
||||||
io.String(&v)
|
io.String(&v)
|
||||||
if v != "" {
|
if v != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user