Fix FullContainerName

This commit is contained in:
AkmalFairuz
2025-01-10 20:12:29 +07:00
parent df5ce01724
commit 1eea0360a5
2 changed files with 2 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ func (x *FullContainerName) Marshal(r protocol.IO) {
r.Uint8(&x.ContainerID) r.Uint8(&x.ContainerID)
if IsProtoGTE(r, ID729) { if IsProtoGTE(r, ID729) {
protocol.OptionalFunc(r, &x.DynamicContainerID, r.Uint32) protocol.OptionalFunc(r, &x.DynamicContainerID, r.Uint32)
} else { } else if IsProtoGTE(r, 712) {
dynamicContainerID, _ := x.DynamicContainerID.Value() dynamicContainerID, _ := x.DynamicContainerID.Value()
r.Uint32(&dynamicContainerID) r.Uint32(&dynamicContainerID)
if dynamicContainerID != 0 { if dynamicContainerID != 0 {

View File

@@ -1044,13 +1044,7 @@ func (x *StackRequestSlotInfo) FromLatest(y protocol.StackRequestSlotInfo) Stack
// StackReqSlotInfo reads/writes a StackRequestSlotInfo x using IO r. // StackReqSlotInfo reads/writes a StackRequestSlotInfo x using IO r.
func StackReqSlotInfo(r protocol.IO, x *StackRequestSlotInfo) { func StackReqSlotInfo(r protocol.IO, x *StackRequestSlotInfo) {
if IsProtoGTE(r, ID712) { protocol.Single(r, &x.Container)
protocol.Single(r, &x.Container)
} else {
containerID := x.Container.ContainerID
r.Uint8(&containerID)
x.Container.ContainerID = containerID
}
r.Uint8(&x.Slot) r.Uint8(&x.Slot)
r.Varint32(&x.StackNetworkID) r.Varint32(&x.StackNetworkID)
} }