Commit 6b7ee7b14b9cb393a4fe1e90bb39dcf6f2f730a2
1 parent
3552b8db
铭文替换服务器报错
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/actions/HeroAction.lua
... | ... | @@ -557,8 +557,10 @@ function _M.referRunesRpc(agent, data) |
557 | 557 | end |
558 | 558 | end |
559 | 559 | |
560 | + local roleId = role:getProperty("id") | |
560 | 561 | for cheroId, cIds in pairs(used) do |
561 | - local chero = role.heros[cheroId] | |
562 | + local heroId = cheroId % (roleId * MAX_HERO_NUM) | |
563 | + local chero = role.heros[heroId] | |
562 | 564 | local hrunes = chero:getProperty("rune") |
563 | 565 | for slot, rId in pairs(hrunes:toNumMap()) do |
564 | 566 | if cIds[rId] then | ... | ... |