@@ -47,7 +47,7 @@ def __call__(self, data, replay):
47
47
random_races = data .read_bool (),
48
48
battle_net = data .read_bool (),
49
49
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 ,
51
51
competitive = data .read_bool (),
52
52
practice = data .read_bool () if replay .base_build >= 34784 else None ,
53
53
cooperative = data .read_bool () if replay .base_build >= 34784 else None ,
@@ -1726,6 +1726,31 @@ def control_group_update_event(self, data):
1726
1726
1727
1727
class GameEventsReader_38215 (GameEventsReader_36442 ):
1728
1728
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
+
1729
1754
def command_event (self , data ):
1730
1755
# this function is exactly the same as command_event() from GameEventsReader_36442
1731
1756
# with the only change being that flags now has 25 bits instead of 23.
@@ -1766,7 +1791,27 @@ def command_event(self, data):
1766
1791
other_unit_tag = data .read_uint32 () if data .read_bool () else None ,
1767
1792
unit_group = data .read_uint32 () if data .read_bool () else None ,
1768
1793
)
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
+
1770
1815
1771
1816
class TrackerEventsReader (object ):
1772
1817
0 commit comments