【无尽副本】偶现卡死尝试修改

dev_chengFeng
ZhangBiao 2021-01-04 15:13:21 +08:00
parent dfafed683d
commit 74cec8e7b4
1 changed files with 18 additions and 16 deletions

View File

@ -599,24 +599,26 @@ function this.RefreshFormationProListVal(proId, changeType, _val)
-- 获取当前值 -- 获取当前值
local value = this.formationList[i].allProVal[_proType] local value = this.formationList[i].allProVal[_proType]
--- 加血需要特殊处理 --- 加血需要特殊处理
if _proType == 2 then if value then
-- 判断人物是否死亡,死亡不再加血 if _proType == 2 then
if value > 0 then -- 判断人物是否死亡,死亡不再加血
local maxHp = this.formationList[i].allProVal[GetProIndexByProId(1)] if value > 0 then
if proId == 67 then -- 最大生命值百分比加血 local maxHp = this.formationList[i].allProVal[GetProIndexByProId(1)]
value = value + (_val / 10000 * maxHp) * changeType if proId == 67 then -- 最大生命值百分比加血
elseif proId == 68 then -- 当前剩余血量百分比加血 value = value + (_val / 10000 * maxHp) * changeType
value = value + (_val / 10000 * value) * changeType elseif proId == 68 then -- 当前剩余血量百分比加血
else value = value + (_val / 10000 * value) * changeType
value = value + _val * changeType else
value = value + _val * changeType
end
-- 不能超出最大值
value = value >= maxHp and maxHp or value
-- 不能一下子就死掉了
--value = value <= 0 and 1 or value
end end
-- 不能超出最大值 else
value = value >= maxHp and maxHp or value value = value + _val * changeType
-- 不能一下子就死掉了
--value = value <= 0 and 1 or value
end end
else
value = value + _val * changeType
end end
-- 人物属性不能小于0 -- 人物属性不能小于0
value = value < 0 and 0 or value value = value < 0 and 0 or value