Skip to content

Commit 3bc825c

Browse files
committed
handle 3.3.0
1 parent 80ea580 commit 3bc825c

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

sc2reader/readers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def __call__(self, data, replay):
8585
default_ai_build=data.read_bits(8 if replay.base_build >= 38749 else 7) if replay.base_build >= 23925 else None,
8686
cache_handles=[DepotFile(data.read_aligned_bytes(40)) for i in range(data.read_bits(6 if replay.base_build >= 21955 else 4))],
8787
has_extension_mod=data.read_bool() if replay.base_build >= 27950 else None,
88+
has_nonBlizzardExtensionMod=data.read_bool() if replay.base_build >= 42932 else None,
8889
is_blizzardMap=data.read_bool(),
8990
is_premade_ffa=data.read_bool(),
9091
is_coop_mode=data.read_bool() if replay.base_build >= 23925 else None,
@@ -120,6 +121,8 @@ def __call__(self, data, replay):
120121
commander_level=data.read_uint32() if replay.base_build >= 36442 else None,
121122
has_silence_penalty=data.read_bool() if replay.base_build >= 38215 else None,
122123
tandem_id=data.read_bits(4) if replay.base_build >= 39576 and data.read_bool() else None,
124+
commander_mastery_level=data.read_uint32() if replay.base_build >= 42932 else None,
125+
commander_mastery_talents=[data.read_uint32() for i in range(data.read_bits(3))] if replay.base_build >= 42932 else None,
123126
) for i in range(data.read_bits(5))],
124127
random_seed=data.read_uint32(),
125128
host_user_id=data.read_bits(4) if data.read_bool() else None,

test_replays/3.3.0/1.SC2Replay

125 KB
Binary file not shown.

test_replays/3.3.0/2.SC2Replay

37.5 KB
Binary file not shown.

test_replays/3.3.0/3.SC2Replay

70.3 KB
Binary file not shown.

test_replays/3.3.0/4.SC2Replay

74.5 KB
Binary file not shown.

test_replays/test_all.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ def test_32(self):
489489
replay = sc2reader.load_replay("test_replays/3.2.0/1.SC2Replay")
490490
self.assertTrue(replay is not None)
491491

492+
def test_33(self):
493+
for replaynum in range(1,4):
494+
replay = sc2reader.load_replay("test_replays/3.3.0/{}.SC2Replay".format(replaynum))
495+
self.assertTrue(replay is not None)
496+
492497
def test_lotv_time(self):
493498
replay = sc2reader.load_replay("test_replays/lotv/lotv1.SC2Replay")
494499
self.assertEqual(replay.length.seconds, 1002)

0 commit comments

Comments
 (0)