From affca29e7500fc8e2e65cf15d19496a370f6329e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 27 十二月 2018 16:22:58 +0800
Subject: [PATCH] 860312 机器人

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 2444a95..93ebc5c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -99,6 +99,13 @@
     coolDownTime = curSkill.GetCoolDownTime()
     remainTime = coolDownTime
     if isPassiveSkill(curSkill):
+        if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
+            # 天赋有减CD效果
+            reduceSkillCDPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, None, curSkill, ChConfig.TriggerType_GiftReduceCD)
+            # 减CD比率
+            if reduceSkillCDPer > 0:
+                remainTime = int(remainTime * max(0, ShareDefine.Def_MaxRateValue - reduceSkillCDPer) / ShareDefine.Def_MaxRateValue)
+                
         # 被动技能的处理和主动技能区分
         curSkill.SetRemainTime(remainTime)
         return
@@ -108,7 +115,6 @@
     #    remainTime = skillData.GetCoolDownTime()
     
     reduceSkillCDPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, None, curSkill, ChConfig.TriggerType_ReduceCD)
-
     # 减CD比率
     if reduceSkillCDPer > 0:
         remainTime = int(remainTime * max(0, ShareDefine.Def_MaxRateValue - reduceSkillCDPer) / ShareDefine.Def_MaxRateValue)
@@ -214,11 +220,12 @@
 def PlayerLoginMergeServerSkillLogic(curPlayer, tick):
     playerID = curPlayer.GetPlayerID()
 
-    if not GameWorld.IsMergeServer():
+    if not GameWorld.IsCrossServer():
         GameWorld.DebugLog("非跨服服务器上线不清除buff...", playerID)
         return
     
-    ClearBuffSkillTypeIDList = ReadChConfig.GetEvalChConfig("ClearBuffSkillTypeID")
+    #ClearBuffSkillTypeIDList = ReadChConfig.GetEvalChConfig("ClearBuffSkillTypeID")
+    ClearBuffSkillTypeIDList = []
     # 跨服服务器上线清除增益/减益buff
     GameWorld.Log("跨服服务器上线清除buff...", playerID)
     clearBuffList = [] # 先汇总再清除,不然索引会变更
@@ -273,6 +280,15 @@
             curSkill.SetRemainTime(0)
             GameWorld.DebugLog("        SetRemainTime 0 skillName=%s,skillTypeID=%s" 
                                % (curSkill.GetSkillName(), curSkill.GetSkillTypeID()), playerID)
+    return
+
+def ResetAllSkillCD(curPlayer):
+    skillManager = curPlayer.GetSkillManager()
+    for i in xrange(skillManager.GetSkillCount()):
+        skill = skillManager.GetSkillByIndex(i)
+        if skill.GetRemainTime() != 0:
+            skill.SetRemainTime(0)
+            skill.Sync_Skill()
     return
 
 ## 刷新玩家所有技能的剩余时间(上线)
@@ -625,10 +641,10 @@
 # @param curNPC NPC实例
 # @param summonID 召唤兽的NPCID
 # @return 召唤兽数量
-def GetSummonCountByNPCID(curNPC, summonID):
+def GetSummonCountByNPCID(gameObj, summonID):
     count = 0
-    for i in range(0, curNPC.GetSummonCount()):
-        summonNPC = curNPC.GetSummonNPCAt(i)
+    for i in range(0, gameObj.GetSummonCount()):
+        summonNPC = gameObj.GetSummonNPCAt(i)
         
         if not summonNPC:
             continue
@@ -1200,6 +1216,11 @@
         GameWorld.Log('###技能伤害血量异常,数值错误 = %s,技能类型ID = %s' % (lostValue, skillTypeID))
         return
     
+    if not curObj.GetCanAttack():
+        # 无敌不掉血
+        ## 后续有其他情况也应考虑进来,如镖车是否某状态不掉血
+        return
+    
     #lostValue = GetGoblinLostHP(curObj, lostValue)
     curObjType = curObj.GetGameObjType()
     curSkill = GameWorld.GetGameData().FindSkillByType(skillTypeID, 1)
@@ -1213,8 +1234,8 @@
     curObjHP_BeforeAttack = GameObj.GetHP(curObj)
     
     if reduceHP :
+        lostValue = AttackCommon.CalcAtkProDef(buffOwner, curObj, lostValue, curSkill, tick)
         # 血盾 
-
         lostValue = AttackCommon.CalcBloodShield(buffOwner, curObj, lostValue)
         
         #剩余血量
@@ -1246,7 +1267,7 @@
     
     #无法找到Buff拥有者
     if not buffOwner:
-        AttackCommon.DoLogic_ObjDead(curObj)
+        AttackCommon.DoLogic_ObjDead(None, curObj, curSkill, tick)
         return
         
     #NPC需要手动添加伤血和仇恨, 因为无调用DoAttack

--
Gitblit v1.8.0