|
|
@@ -121,8 +121,8 @@ end
|
|
|
@param3 = heroIdx -- 对应英雄存档的idx
|
|
|
]]
|
|
|
local function skinOn(human,skinIdx,heroIdx)
|
|
|
- local idx = skinQueryIdxById(human,skinIdx)
|
|
|
- local skin = human.db.skinBag[idx]
|
|
|
+ --local idx = skinQueryIdxById(human,skinIdx)
|
|
|
+ local skin = human.db.skinBag[skinIdx]
|
|
|
-- 当前skin不存在 或者 皮肤已经穿戴
|
|
|
if not skin or skin.state == 1 then
|
|
|
return Broadcast.sendErr(human, skinIdx..":skinOn:"..Lang.SKIN_PARAM_ERR)
|
|
|
@@ -140,7 +140,7 @@ local function skinOn(human,skinIdx,heroIdx)
|
|
|
end
|
|
|
|
|
|
local skinCfg = SkinExcel[skin.id]
|
|
|
- human.db.skinBag[idx].state = 1
|
|
|
+ human.db.skinBag[skinIdx].state = 1
|
|
|
-- 对所有heroId相同的英雄操作
|
|
|
local heroIdxList = HeroLogic.getHeroListById(human,heroId)
|
|
|
for _,idx in ipairs(heroIdxList) do
|
|
|
@@ -365,14 +365,15 @@ function skinUnlock(human,id)
|
|
|
-- 皮肤已经解锁
|
|
|
if isUnlock then
|
|
|
-- 发放皮肤重复物品
|
|
|
- --[[local itemList = {}
|
|
|
+ local itemList = {}
|
|
|
for _,item in pairs(skinCfg.repeated) do
|
|
|
itemList[#itemList+1] = {
|
|
|
item[1],item[2]
|
|
|
}
|
|
|
end
|
|
|
- return BagLogic.addItemList(human,itemList,"skin")]]
|
|
|
- return
|
|
|
+ return BagLogic.addItemList(human,itemList,"skin")
|
|
|
+ --Broadcast.sendErr(human, ":skin repeat:"..Lang.SKIN_REPEAT)
|
|
|
+ --return
|
|
|
end
|
|
|
local now = os.time()
|
|
|
human.db.skinBag[#human.db.skinBag + 1] = {
|