礼物修改提交

dev_one_discount
wangzhenxing 2023-09-15 14:42:17 +08:00
parent acdb5a21cd
commit b368ef5fe0
1 changed files with 34 additions and 37 deletions

View File

@ -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