Leaguepedia | League of Legends Esports Wiki
Advertisement
Leaguepedia | League of Legends Esports Wiki

Documentation for this module may be created at Module:RiotUtil/doc

local p = {}

function p.setMhIdFields(tbl, mh)
	if not mh then return end
	local riotPlatform, riotGame = mh:match('match%-details/([^/]+)/([^/?]+)')
	if not riotPlatform then return end
	local riotHash = mh:match('gameHash=([^&]*)') -- nil if live server
	tbl.RiotPlatformId = riotPlatform
	tbl.RiotGameId = riotGame
	tbl.RiotHash = riotHash
	tbl.RiotPlatformGameId = ('%s_%s'):format(riotPlatform, riotGame)
end

return p
Advertisement