Commit 6b7ee7b14b9cb393a4fe1e90bb39dcf6f2f730a2

Authored by chenyueqi
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,8 +557,10 @@ function _M.referRunesRpc(agent, data)
557 end 557 end
558 end 558 end
559 559
  560 + local roleId = role:getProperty("id")
560 for cheroId, cIds in pairs(used) do 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 local hrunes = chero:getProperty("rune") 564 local hrunes = chero:getProperty("rune")
563 for slot, rId in pairs(hrunes:toNumMap()) do 565 for slot, rId in pairs(hrunes:toNumMap()) do
564 if cIds[rId] then 566 if cIds[rId] then