diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 033c25a..a6801ca 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -557,8 +557,10 @@ function _M.referRunesRpc(agent, data) end end + local roleId = role:getProperty("id") for cheroId, cIds in pairs(used) do - local chero = role.heros[cheroId] + local heroId = cheroId % (roleId * MAX_HERO_NUM) + local chero = role.heros[heroId] local hrunes = chero:getProperty("rune") for slot, rId in pairs(hrunes:toNumMap()) do if cIds[rId] then -- libgit2 0.21.2