From b368ef5fe0a90729ff2460835a8af12ffcbbce6a Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Fri, 15 Sep 2023 14:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BC=E7=89=A9=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Gem/GiftManager.lua | 71 +++++++++---------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua b/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua index c83a964515..857ce36cbf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua @@ -122,46 +122,43 @@ end --获取主角礼物增加的属性 function this.GetPlayerGiftAddPro() local data={} - -- if #this.playerGifts==0 then - -- return data - -- end - for i=1,#this.playerGifts do - local id=this.playerGifts[i] - local pro = equipConfig[id].PlayerProperty - if pro and #pro>0 then - for k = 1, #pro do - local key=pro[k][1] - local value= pro[k][2] - if tonumber(key) ~=nil and tonumber(key)~=0 then - if key~=0 and key~=nil then - if not data[key] then - data[key] = 0 - end - data[key] = data[key] + value - end - end - end - end + -- for i=1,#this.playerGifts do + -- local id=this.playerGifts[i] + -- local pro = equipConfig[id].PlayerProperty + -- if pro and #pro>0 then + -- for k = 1, #pro do + -- local key=pro[k][1] + -- local value= pro[k][2] + -- if tonumber(key) ~=nil and tonumber(key)~=0 then + -- if key~=0 and key~=nil then + -- if not data[key] then + -- data[key] = 0 + -- end + -- data[key] = data[key] + value + -- end + -- end + -- end + -- end - local pro2 = equipConfig[id].Property - if pro2 and #pro2>0 and pro2[1][1]~=0 and pro2[1][1]~=nil then - for k = 1, #pro2 do - local key=pro2[k][1] - local value=pro2[k][2] - if tonumber(key) ~=nil and tonumber(key)~=0 then - if not data[key] then - data[key] = 0 - end - if value and value~=0 then - LogError("pro2[k][1]==="..key.." value=="..value) - data[key] = data[key] + value - end - end + -- local pro2 = equipConfig[id].Property + -- if pro2 and #pro2>0 and pro2[1][1]~=0 and pro2[1][1]~=nil then + -- for k = 1, #pro2 do + -- local key=pro2[k][1] + -- local value=pro2[k][2] + -- if tonumber(key) ~=nil and tonumber(key)~=0 then + -- if not data[key] then + -- data[key] = 0 + -- end + -- if value and value~=0 then + -- LogError("pro2[k][1]==="..key.." value=="..value) + -- data[key] = data[key] + value + -- end + -- end - end - end + -- end + -- end - end + -- end return data end