From 14661edf6156dbc38b2fe4bdf0a15cceacc52897 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 31 五月 2019 16:04:19 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(去除木桩非自定义场景召唤限制,最大同时存在木桩数改为3个,设置玩家血量改为玩家掉血)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 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 3d5775a..1319532 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -974,16 +974,18 @@
         if not curTag:
             continue
         
-        if curSkillUseTag == ChConfig.Def_UseSkillTag_CanAttackNPC:
-            if NPCCommon.GetNpcObjOwnerIsPlayer(curTag):
-                #npc主人是玩家不能攻击
+        #非自定义场景才需要判断
+        if not attacker.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
+            if curSkillUseTag == ChConfig.Def_UseSkillTag_CanAttackNPC:
+                if NPCCommon.GetNpcObjOwnerIsPlayer(curTag):
+                    #npc主人是玩家不能攻击
+                    continue
+            
+            if GameWorld.GetDist(curTag.GetPosX(), curTag.GetPosY(), attacker.GetPosX(), attacker.GetPosY()) > attacker.GetSight():
+                # 最远距离防范
+                GameWorld.DebugLog("#--- 最远距离防范[%s-%s]"%(attacker.GetID(), curTag.GetID()))
                 continue
-    
-        if GameWorld.GetDist(curTag.GetPosX(), curTag.GetPosY(), attacker.GetPosX(), attacker.GetPosY()) > attacker.GetSight():
-            # 最远距离防范
-            GameWorld.DebugLog("#--- 最远距离防范[%s-%s]"%(attacker.GetID(), curTag.GetID()))
-            continue
-    
+            
         if CheckFunc != None:
             #检查是否受影响
             if not CheckFunc(attacker, curTag, curSkill, tick):
@@ -1095,6 +1097,9 @@
     if curObjType not in hurtTypeList:
         return None, None
     
+    if attacker.GetSightLevel() != curObj.GetSightLevel():
+        return None, None
+    
     #攻击对象
     if not curTag:
         curTag = GameWorld.GetObj(curObj.GetID(), curObjType)

--
Gitblit v1.8.0