|
|
@@ -315,12 +315,19 @@ end
|
|
|
function skinUnlock(human,id)
|
|
|
local skinCfg = assert(SkinExcel[id],"invalid skinId is ",id)
|
|
|
local isUnlock = false
|
|
|
- for _,skin in pairs(human.db.skinBag) do
|
|
|
+ for i = 1,#human.db.skinBag do
|
|
|
+ local skin = human.db.skinBag[i]
|
|
|
if skin.id == id then
|
|
|
isUnlock =true
|
|
|
break
|
|
|
- end
|
|
|
+ end
|
|
|
end
|
|
|
+ --[[for _,skin in pairs(human.db.skinBag) do
|
|
|
+ if skin.id == id then
|
|
|
+ isUnlock =true
|
|
|
+ break
|
|
|
+ end
|
|
|
+ end]]
|
|
|
-- 皮肤已经解锁
|
|
|
if isUnlock then
|
|
|
-- 发放皮肤重复物品
|