@@ -47,7 +47,7 @@ def __call__(self, data, replay):
4747 random_races = data .read_bool (),
4848 battle_net = data .read_bool (),
4949 amm = data .read_bool (),
50- ranked = data .read_bool () if replay .base_build >= 34784 else None ,
50+ ranked = data .read_bool () if replay .base_build >= 34784 and replay . base_build < 38215 else None ,
5151 competitive = data .read_bool (),
5252 practice = data .read_bool () if replay .base_build >= 34784 else None ,
5353 cooperative = data .read_bool () if replay .base_build >= 34784 else None ,
@@ -1726,6 +1726,31 @@ def control_group_update_event(self, data):
17261726
17271727class GameEventsReader_38215 (GameEventsReader_36442 ):
17281728
1729+ def __init__ (self ):
1730+ super (GameEventsReader_38215 , self ).__init__ ()
1731+
1732+ self .EVENT_DISPATCH .update ({
1733+ 76 : (None , self .trigger_command_error_event ),
1734+ 92 : (None , self .trigger_mousewheel_event ), # 172 in protocol38125.py
1735+ })
1736+
1737+ def trigger_command_error_event (self , data ):
1738+ return dict (
1739+ error = data .read_uint32 () - 2147483648 ,
1740+ ability = dict (
1741+ ability_link = data .read_uint16 (),
1742+ ability_command_index = data .read_bits (5 ),
1743+ ability_command_data = data .read_uint8 () if data .read_bool () else None ,
1744+ ) if data .read_bool () else None ,
1745+ )
1746+
1747+ def trigger_mousewheel_event (self , data ):
1748+ # 172 in protocol38125.py
1749+ return dict (
1750+ wheelspin = data .read_uint16 ()- 32768 , # 171 in protocol38125.py
1751+ flags = data .read_uint8 () - 128 , # 112 in protocol38125.py
1752+ )
1753+
17291754 def command_event (self , data ):
17301755 # this function is exactly the same as command_event() from GameEventsReader_36442
17311756 # with the only change being that flags now has 25 bits instead of 23.
@@ -1766,7 +1791,27 @@ def command_event(self, data):
17661791 other_unit_tag = data .read_uint32 () if data .read_bool () else None ,
17671792 unit_group = data .read_uint32 () if data .read_bool () else None ,
17681793 )
1769-
1794+
1795+ def user_options_event (self , data ):
1796+ # only change: removes starting_rally
1797+ return dict (
1798+ game_fully_downloaded = data .read_bool (),
1799+ development_cheats_enabled = data .read_bool (),
1800+ test_cheats_enabled = data .read_bool (),
1801+ multiplayer_cheats_enabled = data .read_bool (),
1802+ sync_checksumming_enabled = data .read_bool (),
1803+ is_map_to_map_transition = data .read_bool (),
1804+ debug_pause_enabled = data .read_bool (),
1805+ use_galaxy_asserts = data .read_bool (),
1806+ platform_mac = data .read_bool (),
1807+ camera_follow = data .read_bool (),
1808+ base_build_num = data .read_uint32 (),
1809+ build_num = data .read_uint32 (),
1810+ version_flags = data .read_uint32 (),
1811+ hotkey_profile = data .read_aligned_string (data .read_bits (9 )),
1812+ use_ai_beacons = None ,
1813+ )
1814+
17701815
17711816class TrackerEventsReader (object ):
17721817
0 commit comments