From e1dcfa049cd7f676fb56c91bee6737dce0aed7e4 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 25 四月 2019 13:39:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Fight/Actor/Skill/AttackHandler.cs | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/Fight/Actor/Skill/AttackHandler.cs b/Fight/Actor/Skill/AttackHandler.cs
index f8c3212..96e8c5c 100644
--- a/Fight/Actor/Skill/AttackHandler.cs
+++ b/Fight/Actor/Skill/AttackHandler.cs
@@ -206,10 +206,24 @@
}
else if (target is GA_NpcClientFightNorm)
{
- if ((target as GA_NpcClientFightNorm).NpcConfig.AIType == 198)
+ var _cnpc = target as GA_NpcClientFightNorm;
+ if (_cnpc.NpcConfig.AIType == 198)
{
_doReduceHp = false;
}
+ else if (_cnpc.lockHp > 0)
+ {
+ var _lockHp = (ulong)(target.ActorInfo.RealMaxHp * _cnpc.lockHp);
+ if ((ulong)hurtValue >= target.ActorInfo.Hp)
+ {
+ target.ActorInfo.ResetHp((int)_lockHp);
+ _doReduceHp = false;
+ }
+ else if (target.ActorInfo.Hp - (ulong)hurtValue < _lockHp)
+ {
+ hurtValue = (int)(target.ActorInfo.Hp - _lockHp);
+ }
+ }
}
if (_doReduceHp)
--
Gitblit v1.8.0