Closed dsjoerg closed 11 years ago
Aha it seems like you may have already dealt with this in InitDataReader_24764
Indeed. I think the registration callback needs to be modified from:
self.register_reader('replay.initData', readers.InitDataReader_Base(), lambda r: r.expansion=='WoL' or r.build < 24764)
self.register_reader('replay.initData', readers.InitDataReader_24764(), lambda r: r.expansion=='HotS' and r.build >= 24764)
to
self.register_reader('replay.initData', readers.InitDataReader_Base(), lambda r: r.build < 24764)
self.register_reader('replay.initData', readers.InitDataReader_24764(), lambda r: r.build >= 24764)
My only reservation is I am not 100% sure that all 1.x.x WoL builds were less than 24764. If that turns out to be true then this change should fix things.
I am a few steps ahead of you. I verified that all 1.x.x WoL build are less than 24764. To my surprise, the change did not fix things.
The new problem is that the player names in the Details data structure contain clan nonsense now.
I'm pushing a patch that strips the clan name out. Tests all pass, I'll appreciate your review too.
The clan name should be stripped out already here during the player creation step. It'd rather do it here instead of in the reader so that we retain the raw values for later if we need them. From your example I see that the clean-up needs to be updated now though because player names now look like [OTZ]<sp/>Skull
and the <sp/>
needs to be stripped out as well.
Okay great, closing the issue. Re-open if similar issues continue to crop up.
Added a failing py.test to ggtracker/sc2reader
It's a 2v2 with no observers, where two of the players have clan tags.
and yet replay.people is length 6.
replay.people == [Player 1 - Ваня (Zerg), Player 2 - никита (Protoss), Player 3 - Arqen (Zerg), Player 4 - Skull (Terran), Player 5 - Arqen, Player 6 - Skull]
note that Player 3 and Player 5 have similar names except the clantag. Player 5 is listed as an observer, but the inject actions are attached to Player 5.