@@ -540,8 +540,8 @@ def _parse(cls, stream: BytesIO, ctx: OrderedDict):
540
540
# world_id 1
541
541
d ["celestial_coordinates" ] = CelestialCoordinates .parse (stream ,
542
542
ctx )
543
- flag = Byte .parse (stream , ctx )
544
- if flag == 1 :
543
+ d [ "is_teleporter" ] = Byte .parse (stream , ctx )
544
+ if d [ "is_teleporter" ] == 1 :
545
545
d ["teleporter" ] = StarString .parse (stream , ctx )
546
546
elif world_id == WarpWorldType .PLAYER_WORLD :
547
547
# world_id 2
@@ -553,10 +553,15 @@ def _parse(cls, stream: BytesIO, ctx: OrderedDict):
553
553
elif world_id == WarpWorldType .UNIQUE_WORLD :
554
554
# world_id 3
555
555
d ["world_name" ] = StarString .parse (stream , ctx )
556
- d ["instance_flag" ] = Byte .parse (stream , ctx )
557
- d ["instance_id" ] = UUID .parse (stream , ctx )
558
- d ["teleporter_flag" ] = Byte .parse (stream , ctx )
559
- d ["teleporter" ] = StarString .parse (stream , ctx )
556
+ d ["is_instance" ] = Byte .parse (stream , ctx )
557
+ if d ["is_instance" ] == 1 :
558
+ d ["instance_id" ] = UUID .parse (stream , ctx )
559
+ d ["is_something" ] = Byte .parse (stream , ctx )
560
+ if d ["is_something" ] == 1 :
561
+ d ["something" ] = BFloat32 .parse (stream , ctx )
562
+ d ["is_teleporter" ] = Byte .parse (stream , ctx )
563
+ if d ["is_teleporter" ] == 1 :
564
+ d ["teleporter" ] = StarString .parse (stream , ctx )
560
565
elif world_id == WarpWorldType .MISSION_WORLD :
561
566
# world_id 4
562
567
d ["world_name" ] = StarString .parse (stream , ctx )
@@ -592,10 +597,15 @@ def _build(cls, obj, ctx: OrderedDotDict):
592
597
res += Byte .build (0 )
593
598
elif obj ["world_id" ] == WarpWorldType .UNIQUE_WORLD :
594
599
res += StarString .build (obj ["world_name" ])
595
- res += Byte .build (obj ["instance_flag" ])
596
- res += UUID .build (binascii .unhexlify (obj ["instance_id" ]))
597
- res += Byte .build (obj ["teleporter_flag" ])
598
- res += StarString .build (obj ["teleporter" ])
600
+ res += Byte .build (obj ["is_instance" ])
601
+ if obj ["is_instance" ] == 1 :
602
+ res += UUID .build (binascii .unhexlify (obj ["instance_id" ]))
603
+ res += Byte .build (obj ["is_something" ])
604
+ if obj ["is_something" ] == 1 :
605
+ res += BFloat32 .build (obj ["something" ])
606
+ res += Byte .build (obj ["is_teleporter" ])
607
+ if obj ["is_teleporter" ] == 1 :
608
+ res += StarString .build (obj ["teleporter" ])
599
609
res += Byte .build (0 )
600
610
elif obj ["world_id" ] == WarpWorldType .MISSION_WORLD :
601
611
res += StarString .build (obj ["world_name" ])
0 commit comments