Closed mrhappyasthma closed 3 years ago
By calling self:QuickStatsMod_OnPlayerStatsMatchListResult(_matchList)
inside of function Player_Stats_V2:OnPlayerStatsMatchListResult(...)
with the following implementation:
function Player_Stats_V2:QuickStatsMod_OnPlayerStatsMatchListResult(matchlist)
for i=1, math.min(7, #matchlist) do
local match = matchlist[i]
local heroname = string.lower(string.sub(match['heroname'], 6, -1))
local iconPath = GetHeroIconPath(heroname)
local result = '^522Lose'
if match['result'] == '1' then
result = '^884Win'
end
local KDA = '^g'..match['kills']..'^*/^r'..match['deaths']..'^*/^y'..match['assists']
println(iconPath .. ':' .. result .. ':' .. KDA)
end
end
I get the following output, which is what we want
I just need to figure out how to best call this trigger from my widget. Also the parameters do not include the hero name, so making sure that we can fetch this for only the current user may require checking the mouse hover param.
The form is PlayerStatsMatchList
.
SubmitForm('PlayerStatsMatchList', 'f', 'match_history_overview', 'nickname', StripClanTag(<nickName>), 'cookie', Client.GetCookie(), 'table', 'campaign' , 'num', '7', 'curseason', '0')
Seems like this can be populated using
OnPlayerStatsMatchListResult
andPlayerStatsMatchListResult
.This populates the
_matchList
local variable. The data we need is in the following:We may need to do some modification for
heroname
andresult
to get it to match the expected input for the panel. Also the heroname needs to be resolved usingGetHeroIconPath
.