Jelajahi Sumber

更新皮肤代码

249435196@qq.com 1 tahun lalu
induk
melakukan
c84ce18f97
1 mengubah file dengan 8 tambahan dan 2 penghapusan
  1. 8 2
      script/module/skin/SkinLogic.lua

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

@@ -59,6 +59,7 @@ local function skinListQuery(human)
     local skinBag = human.db.skinBag
     local ret = {}
     for i = 1,#skinBag do 
+        local data = skinBag[i]
         ret[data.id] = {
             idx = i,
             id = data.id,
@@ -309,9 +310,14 @@ end
 -- 皮肤穿戴功能
 function skinOp(human,heroIdx,skinIdx)
     if skinIdx == 0 then 
-        return skinOff(human,heroIdx)
+        skinOff(human,heroIdx)
+    else
+        skinOn(human,skinIdx,heroIdx)
     end
-    return skinOn(human,skinIdx,heroIdx)
+    local retMsg = Msg.gc.GC_SKIN_ON
+    retMsg.heroId = heroIdx
+    retMsg.skinInd = skinIdx
+    Msg.send(msgRet,human.fd)
 end
 
 -- 皮肤解锁