From d41a44a9fd316c021c4e85bde9cb0fab4c2e0be1 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 15 三月 2019 17:23:43 +0800
Subject: [PATCH] 2683 子 天赋技能和新增双职业各两个技能 / 【后端】天赋技能

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
index 4edf89d..d70b3fb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -1499,9 +1499,10 @@
         curPlayerSkill = curPlayer.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
         
         if curPlayerSkill:
-
-            #设置玩家所学技能冷却CD
-            SkillCommon.SetSkillRemainTime(curPlayerSkill, PlayerControl.GetReduceSkillCDPer(curPlayer), tick, curPlayer)
+            
+            if not IsSkipSkillCD:
+                #设置玩家所学技能冷却CD
+                SkillCommon.SetSkillRemainTime(curPlayerSkill, PlayerControl.GetReduceSkillCDPer(curPlayer), tick, curPlayer)
             #调用任务触发器
             #EventShell.EventRespons_UseSkillOK(curPlayer, skillTypeID)
             #执行连环被动技能处理
@@ -1516,6 +1517,27 @@
     # 普攻和对敌技能
     UseSkillOver(curPlayer, target, curSkill, tick)
     return True
+
+# 无冷却状态
+def IsSkipSkillCD(curPlayer, target, curSkill, tick):
+    # 暴击情况下
+    isSuperHit = False
+    for i in xrange(g_skillHurtList.GetHurtCount()):
+        hurtObj = g_skillHurtList.GetHurtAt(i)
+        if not hurtObj:
+            continue
+        
+        if hurtObj.GetAttackType() == ChConfig.Def_HurtType_SuperHit:
+            isSuperHit = True
+            break
+    
+    if isSuperHit:
+        if PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(curPlayer, None, curSkill, ChConfig.TriggerType_SuperHitSkipCD):
+            return True
+        if PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(curPlayer, None, curSkill, ChConfig.TriggerType_SuperHitSkipCD):
+            return True
+    return False
+    
     
 # 根据伤血类型触发技能,群攻只触发一次,放在伤血列表被清之前
 def OnHurtTypeTriggerSkill(attacker, target, curSkill, tick):

--
Gitblit v1.8.0