From eb6b42ffb57cdc0826afb4be8dc7131f2124f090 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 21 六月 2019 12:12:17 +0800
Subject: [PATCH] 7394 【2.0】【后端】雷罚BOSS(删除诛仙装备)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 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 285d51c..b4a96fb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -47,7 +47,6 @@
 import IpyGameDataPY
 import PyGameData
 import EventShell
-#import EquipZhuXian
 #---------------------------------------------------------------------
 GameWorld.ImportAll("Script\\Skill\\" , "GameSkills")
 GameWorld.ImportAll("Script\\Skill\\" , "GameBuffs")
@@ -55,6 +54,7 @@
 
 # 记录客户端伤害 {(objID, objType):[HurtHP, AttackType]}
 g_ClientHurtDict = collections.OrderedDict()
+g_UseSkillPlayerID = 0  # 全服攻击为单线程 记录的是当前使用技能的玩家 用于判断g_ClientHurtDict的归属
 
 #---------------------------------------------------------------------
 ##C++调用函数, 重新读取所有技能
@@ -92,6 +92,10 @@
 def GetSkillFireAim(curSkill):
     return curSkill.GetTag()%10
 
+# 当前释放主动技能的玩家
+def GetUseSkillPlayerID():
+    global g_UseSkillPlayerID
+    return g_UseSkillPlayerID
 
 # 客户端伤血列表,修改了遍历对象和计算血量
 def GetClientHurtDict():
@@ -100,7 +104,9 @@
 
 def ClearClientHurtDict(curPlayer):
     global g_ClientHurtDict
+    global g_UseSkillPlayerID
     g_ClientHurtDict = collections.OrderedDict()
+    g_UseSkillPlayerID = 0
     
     
 def GetClientHurtByObj(objID, objType):
@@ -122,6 +128,7 @@
 # 技能开始初始化客户端伤血列表
 def InitClientHurtDict(curPlayer, curSkill, hurtList):
     global g_ClientHurtDict
+    global g_UseSkillPlayerID
     ClearClientHurtDict(curPlayer)
     
     #技能攻击最大数量
@@ -157,7 +164,8 @@
             return False
         
         g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurobj.HurtHP, hurobj.AttackType]
-        
+    
+    g_UseSkillPlayerID = curPlayer.GetID()
     return True
 #---------------------------------------------------------------------    
 # 非客户端玩家释放的技能
@@ -169,11 +177,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
@@ -1903,10 +1916,6 @@
     if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
         if not PlayerGreatMaster.GetGreatMasterFreeSkillPoint(curPlayer):
             return False
-    #诛仙技能学习判断
-    #if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_ZhuXian:
-    #    if not EquipZhuXian.CheckLearnZhuXianSkill(curPlayer, curSkillTypeID):
-    #        return False
         
     #经验检测
     skillLvUpNeedExp = upSkill.GetLVUpCostExp()
@@ -2110,9 +2119,9 @@
         #可升级则激活升一级
         EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, skillElementType, updSelectSkillLV)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SkillElementLV % selectSkillID, updSelectSkillLV)
-#        if not curElementSkillID or curElementSkillID == selectSkillID:
-#            #正在使用的专精技能,则立即生效
-#            isChangeSkill = True
+        if curElementSkillID == selectSkillID:
+            #正在使用的专精技能,则立即生效
+            isChangeSkill = True
     else: # 使用
         if not activeSkillLV:
             #未激活不能使用
@@ -3262,7 +3271,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