|
|
@@ -160,12 +160,13 @@ local function skinOff(human,heroIdx)
|
|
|
end
|
|
|
local skinIdx = nil
|
|
|
for idx,skin in pairs(human.db.skinBag) do
|
|
|
- if skin.id == skinId then
|
|
|
+ if idx > 0 and skin.id == skinId then
|
|
|
skinIdx = idx
|
|
|
human.db.skinBag[idx].state = 0
|
|
|
break
|
|
|
end
|
|
|
end
|
|
|
+ assert(skinIdx,"param error")
|
|
|
-- 对所有heroId相同的英雄操作
|
|
|
local heroIdxList = HeroLogic.getHeroListById(human,heroId)
|
|
|
for _,idx in ipairs(heroIdxList) do
|
|
|
@@ -317,7 +318,7 @@ function skinOp(human,heroIdx,skinIdx)
|
|
|
local retMsg = Msg.gc.GC_SKIN_ON
|
|
|
retMsg.heroId = heroIdx
|
|
|
retMsg.skinInd = skinIdx
|
|
|
- Msg.send(msgRet,human.fd)
|
|
|
+ Msg.send(retMsg,human.fd)
|
|
|
end
|
|
|
|
|
|
-- 皮肤解锁
|