web
web copied to clipboard
Death of Radiant's courier being counted as Dire's in Match Story
Current Behavior In a parsed match, "Story" tab, the couriers kills lines shows "Dire's courier was killed." where a bunch of those were Radiant's courier.
Expected behavior/code Death of couriers not being counted as Dire's courier when they aren't.
Console Output Sorry my console output seems not working
please paste console output in here
Environment
- Chrome Version 90.0.4430.93 (Official Build) (64-bit)
- Windows 10
Possible Solution
Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.
Context : I just played a match were I was playing dire and killed some Radiant's courier in the bot lane during the laning phase, but all the courier kills listed in the match Story tab are : "Dire's courier was killed.". I watched the replay to confirm, the 1st courier to die during the laning phase was a Dire one, but all those dying next are Radiants. Here's the match ID : https://www.opendota.com/matches/5972513229/story
I'm looking into this issue:
The problem is that the CHAT_MESSAGE_COURIER_LOST
type has a key team
that actually refers to the player's slot of the player who killed the courier:
Currently we're checking obj.team === 2
to see if it's radiant or dire, but we should be doing obj.team <= 4
to check for the player's slot.
Although there's another thing I need to verify: In a game I played earlier a courier had been killed by the dire creeps, and the kill was assigned to slot -1
(see last log on the above screenshot). Do you know if -1
is considered anything else not player-related (radiant/dire creeps/towers/fountain, neutral creeps, roshan)?
Once I have this figured out, I'll PR the fix.
I was looking into this issue and it seems like the OD API is just returning the wrong value in the team field. The API returns the player's slot that killed the courier. It would make more sense if it was the player's slot who lost the courier, since that is the data that's being rendered. I would fix this, but I don't know where the API definition is. If anyone knows I will look at it.
Closed via https://github.com/odota/web/commit/00e10a143be59c24319674d6d03f9aff86cbc4eb