249435196@qq.com 1 год назад
Родитель
Сommit
8ea3827634
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      script/module/skin/SkinLogic.lua

+ 9 - 2
script/module/skin/SkinLogic.lua

@@ -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
         -- 发放皮肤重复物品