From 43a9e6c87a5a4980902e86eb0470d885b1a3fb8f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 22 十月 2018 21:23:02 +0800
Subject: [PATCH] 4282 【主干】【1.1.0】【后端】新增物品效果:获得X法宝X经验

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 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 730bdcd..8fa3d9f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -1501,7 +1501,8 @@
     if relation[0] == ChConfig.Type_Relation_Enemy :
         return True
     
-    AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
+    if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_FbSkill:
+        AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
     return False
 
 ##玩家释放有目标技能, 检查目标对象是否符合要求, 可攻击怪物
@@ -1534,7 +1535,8 @@
     if relation[0] == ChConfig.Type_Relation_Friend :
         return True
     
-    AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
+    if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_FbSkill:
+        AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
     return False
 
 #---------------------------------------------------------------------
@@ -3424,9 +3426,11 @@
 
     if skillAim == ChConfig.Def_UseSkillAim_None:
         if curSkill.GetSkillType() in ChConfig.Def_CanAttackSkill_List:
-            if target and target.GetGameObjType() == IPY_GameWorld.gotNPC and target.GetType() == IPY_GameWorld.ntElf:
-                # 有害技能特殊处理,不能对自己的召唤物释放
-                target = None
+            if target and target.GetGameObjType() == IPY_GameWorld.gotNPC and target.GetGameNPCObjType() == IPY_GameWorld.gnotSummon:
+                owner = NPCCommon.GetNpcObjOwnerDetail(target)
+                if owner and owner.GetID() == attacker.GetID():
+                    # 有害技能特殊处理,不能对自己的召唤物释放
+                    target = None
                 
             result = DoLogic_UseSkill(attacker, target, curSkill, tick, attacker.GetPosX(), attacker.GetPosY(), isEnhanceSkill=isEnhanceSkill)
         else:

--
Gitblit v1.8.0