From c41b83ce17fe0623a6392ecb8b4bcfd35ed98770 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 20 六月 2019 17:36:47 +0800
Subject: [PATCH] 7394 【2.0】【后端】雷罚BOSS

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index c645db3..d707b68 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -55,6 +55,7 @@
 
 # 记录客户端伤害 {(objID, objType):[HurtHP, AttackType]}
 g_ClientHurtDict = collections.OrderedDict()
+g_UseSkillPlayerID = 0  # 全服攻击为单线程 记录的是当前使用技能的玩家 用于判断g_ClientHurtDict的归属
 
 #---------------------------------------------------------------------
 ##C++调用函数, 重新读取所有技能
@@ -92,6 +93,10 @@
 def GetSkillFireAim(curSkill):
     return curSkill.GetTag()%10
 
+# 当前释放主动技能的玩家
+def GetUseSkillPlayerID():
+    global g_UseSkillPlayerID
+    return g_UseSkillPlayerID
 
 # 客户端伤血列表,修改了遍历对象和计算血量
 def GetClientHurtDict():
@@ -100,7 +105,9 @@
 
 def ClearClientHurtDict(curPlayer):
     global g_ClientHurtDict
+    global g_UseSkillPlayerID
     g_ClientHurtDict = collections.OrderedDict()
+    g_UseSkillPlayerID = 0
     
     
 def GetClientHurtByObj(objID, objType):
@@ -122,6 +129,7 @@
 # 技能开始初始化客户端伤血列表
 def InitClientHurtDict(curPlayer, curSkill, hurtList):
     global g_ClientHurtDict
+    global g_UseSkillPlayerID
     ClearClientHurtDict(curPlayer)
     
     #技能攻击最大数量
@@ -157,7 +165,8 @@
             return False
         
         g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurobj.HurtHP, hurobj.AttackType]
-        
+    
+    g_UseSkillPlayerID = curPlayer.GetID()
     return True
 #---------------------------------------------------------------------    
 # 非客户端玩家释放的技能
@@ -169,11 +178,16 @@
         # 玩家普通也是技能,正常是不会走到这边
         return False
     
+    if GetUseSkillPlayerID() != attacker.GetID():
+        # 非释放者
+        return False
+    
     useSkillData = attacker.GetUseSkill()
     if useSkillData and curSkill.GetSkillTypeID() != useSkillData.GetSkillTypeID():
         # 默认群攻附加触发buff的对象与攻击对象一致
         if not SkillCommon.IsBuff(curSkill):
             return False
+    
     
     if not GetClientHurtDict():
         return False
@@ -3262,7 +3276,8 @@
     #--- 1. 先取得触发技能---
     
     #先检查数据库有没该类技能,如果最高等级不一样会找不到
-    exSkill = GameWorld.GetGameData().FindSkillByType(skillEnhanceID, skillLV)
+    #exSkill = GameWorld.GetGameData().FindSkillByType(skillEnhanceID, skillLV)
+    exSkill = GameWorld.GetGameData().GetSkillBySkillID(skillEnhanceID)
     #异常
     if not exSkill:
         GameWorld.ErrLog("对象 = %s, 找不到附加技能ID = %s, skillLv = %s"%(attacker.GetID() , skillEnhanceID , useSkill.GetSkillLV()))

--
Gitblit v1.8.0