def register_default_readers(self): """Registers factory default readers.""" self.register_reader('replay.details', readers.DetailsReader(), lambda r: True) self.register_reader('replay.initData', readers.InitDataReader_Base(), lambda r: 15405 <= r.base_build < 16561) self.register_reader('replay.initData', readers.InitDataReader_16561(), lambda r: 16561 <= r.base_build < 17326) self.register_reader('replay.initData', readers.InitDataReader_17326(), lambda r: 17326 <= r.base_build < 19132) self.register_reader('replay.initData', readers.InitDataReader_19132(), lambda r: 19132 <= r.base_build < 22612) self.register_reader('replay.initData', readers.InitDataReader_22612(), lambda r: 22612 <= r.base_build < 23925) self.register_reader('replay.initData', readers.InitDataReader_23925(), lambda r: 23925 <= r.base_build < 24764) self.register_reader('replay.initData', readers.InitDataReader_24764(), lambda r: 24764 <= r.base_build < 26490) self.register_reader('replay.initData', readers.InitDataReader_26490(), lambda r: 26490 <= r.base_build) self.register_reader('replay.message.events', readers.MessageEventsReader_Base(), lambda r: r.build < 24247 or r.versions[1] == 1) self.register_reader('replay.message.events', readers.MessageEventsReader_Beta_24247(), lambda r: r.build >= 24247 and r.versions[1] == 2) self.register_reader('replay.attributes.events', readers.AttributesEventsReader_Base(), lambda r: r.build < 17326) self.register_reader('replay.attributes.events', readers.AttributesEventsReader_17326(), lambda r: r.build >= 17326) self.register_reader('replay.game.events', readers.GameEventsReader_15405(), lambda r: 15405 <= r.base_build < 16561) self.register_reader('replay.game.events', readers.GameEventsReader_16561(), lambda r: 16561 <= r.base_build < 17326) self.register_reader('replay.game.events', readers.GameEventsReader_17326(), lambda r: 17326 <= r.base_build < 18574) self.register_reader('replay.game.events', readers.GameEventsReader_18574(), lambda r: 18574 <= r.base_build < 19595) self.register_reader('replay.game.events', readers.GameEventsReader_19595(), lambda r: 19595 <= r.base_build < 22612) self.register_reader('replay.game.events', readers.GameEventsReader_22612(), lambda r: 22612 <= r.base_build < 23260) self.register_reader('replay.game.events', readers.GameEventsReader_23260(), lambda r: 23260 <= r.base_build < 24247) self.register_reader('replay.game.events', readers.GameEventsReader_24247(), lambda r: 24247 <= r.base_build < 26490) self.register_reader('replay.game.events', readers.GameEventsReader_26490(), lambda r: 26490 <= r.base_build) self.register_reader('replay.game.events', readers.GameEventsReader_HotSBeta(), lambda r: r.versions[1] == 2 and r.build < 24247) self.register_reader('replay.tracker.events', readers.TrackerEventsReader_Base(), lambda r: True)
def register_default_readers(self): """Registers factory default readers.""" self.register_reader('replay.details', readers.DetailsReader_Base(), lambda r: r.build < 22612) self.register_reader('replay.details', readers.DetailsReader_22612(), lambda r: r.build >= 22612 and r.versions[1] == 1) self.register_reader('replay.details', readers.DetailsReader_Beta(), lambda r: r.build < 24764 and r.versions[1] == 2) self.register_reader('replay.details', readers.DetailsReader_Beta_24764(), lambda r: r.build >= 24764) self.register_reader('replay.initData', readers.InitDataReader_Base(), lambda r: r.build < 23260) self.register_reader('replay.initData', readers.InitDataReader_23260(), lambda r: r.build >= 23260 and r.build < 24764) self.register_reader('replay.initData', readers.InitDataReader_24764(), lambda r: r.build >= 24764) self.register_reader('replay.message.events', readers.MessageEventsReader_Base(), lambda r: r.build < 24247 or r.versions[1] == 1) self.register_reader('replay.message.events', readers.MessageEventsReader_Beta_24247(), lambda r: r.build >= 24247 and r.versions[1] == 2) self.register_reader('replay.attributes.events', readers.AttributesEventsReader_Base(), lambda r: r.build < 17326) self.register_reader('replay.attributes.events', readers.AttributesEventsReader_17326(), lambda r: r.build >= 17326) self.register_reader('replay.game.events', readers.GameEventsReader_16117(), lambda r: 16117 <= r.build < 16561) self.register_reader('replay.game.events', readers.GameEventsReader_16561(), lambda r: 16561 <= r.build < 18574) self.register_reader('replay.game.events', readers.GameEventsReader_18574(), lambda r: 18574 <= r.build < 19595) self.register_reader('replay.game.events', readers.GameEventsReader_19595(), lambda r: 19595 <= r.build < 22612) self.register_reader( 'replay.game.events', readers.GameEventsReader_22612(), lambda r: r.versions[1] == 1 and 22612 <= r.build) # Last WoL self.register_reader( 'replay.game.events', readers.GameEventsReader_HotS_Beta(), lambda r: r.versions[1] == 2 and r.build < 24247) #HotS Beta self.register_reader( 'replay.game.events', readers.GameEventsReader_HotS(), lambda r: r.versions[1] == 2 and 24247 <= r.build) # First HotS self.register_reader('replay.tracker.events', readers.TrackerEventsReader_Base(), lambda r: True)
'replay.message.events': r.MessageEventsReader(), 'replay.game.events': r.GameEventsReader_16561(), }) readers.add_range( 17326, 18574, { 'replay.initData': r.InitDataReader(), 'replay.details': r.DetailsReader(), 'replay.attributes.events': r.AttributeEventsReader_17326(), 'replay.message.events': r.MessageEventsReader(), 'replay.game.events': r.GameEventsReader_16561(), }) readers.add_range( 18574, 19595, { 'replay.initData': r.InitDataReader(), 'replay.details': r.DetailsReader(), 'replay.attributes.events': r.AttributeEventsReader_17326(), 'replay.message.events': r.MessageEventsReader(), 'replay.game.events': r.GameEventsReader_18574(), }) readers.add_range( 19595, None, { 'replay.initData': r.InitDataReader(), 'replay.details': r.DetailsReader(), 'replay.attributes.events': r.AttributeEventsReader_17326(), 'replay.message.events': r.MessageEventsReader(), 'replay.game.events': r.GameEventsReader_19595(), })