Closed dsjoerg closed 11 years ago
and sc2gears and drop.sc also think they're on the same team.
In sc2reader (and sc2gears I would guess) we get the team from replay.attributes.events using the 2002-2018 attributes:
2002: [{'attrid': 2002, 'namespace': 999, 'value': 'T2'}],
2003: [{'attrid': 2003, 'namespace': 999, 'value': 'T2'}],
2004: [{'attrid': 2004, 'namespace': 999, 'value': 'T2'}],
2005: [{'attrid': 2005, 'namespace': 999, 'value': 'T2'}],
2006: [{'attrid': 2006, 'namespace': 999, 'value': 'T2'}],
2007: [{'attrid': 2007, 'namespace': 999, 'value': 'T2'}],
2008: [{'attrid': 2008, 'namespace': 999, 'value': 'T2'}],
2011: [{'attrid': 2011, 'namespace': 999, 'value': 'T2'}],
2018: [{'attrid': 2018, 'namespace': 999, 'value': 'T2'}],
Each of these attributes has an entry for each player and in my experience the value after the T has always been the team number. In the attached replays it seems to not be the case.
We should switch to using the teamId from the details file, I wasn't aware that there was such a field in there until just now.
This might not actually work like we thought it did @dsjoerg. See Blizzard/s2protocol#17
It seems that the team assignment might work and that the result field is misleading but I'm going to leave this open until we have some resolution.
Actually, teams definitely doesn't seem to work as expected. Pushed a test to demonstrate the issue (2140fab2dbbce3e441b794224ecb8042c37ddcac).
Very strange!
And yet s2protocol confirms that they're on different teams:
This is not so important for GGTracker, it caused 18 replay processing failures in the past month, out of >100k. However, if it's a bug, fixing it might have beneficial repercussions elsewhere.
(Replays attached here as image, just rename them)