gitxsm 5 mesi fa
parent
commit
0041a8b19b
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. 2 3
      script/module/combat/CombatBuff.lua

+ 2 - 3
script/module/combat/CombatBuff.lua

@@ -1133,9 +1133,8 @@ end
 
 local function calcCorrectObjCnt(targets, skillConfig, bufferConf, bufferID, attacker, randomVal)
 	local cnt = 0
-	if not targets  then
+	if not targets then
 		return 	cnt
-
 	end
 
 	local statusBuffRate = skillConfig.otherArgs.statusBuffRate
@@ -1349,7 +1348,7 @@ function onHit(attacker, skillTargets, skillConfig, cmdTargets, otherArgs, cmdCh
 						if targetObjCnt <= 0 then
 							arg = 0
 						else
-							local val = CombatObj.getHpMax(attacker) - attacker.hp
+							local val = CombatObj.getValue(attacker, RoleDefine.HURT_COMBAT_NOW)
 							arg = math.floor(val / targetObjCnt)
 						end
 					end