From ff8efc0ccf9fa6d66d873673afd07d2adfd87252 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 18 十二月 2024 15:43:33 +0800
Subject: [PATCH] 10297 【越南】【英语】【砍树】【tqxbqy】轮回殿-服务端(增加GM命令: Lunhui)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py
index 8cabede..85f948c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py
@@ -32,6 +32,7 @@
 import SkillShell
 import ChNPC
 import GameObj
+import TurnAttack
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
@@ -62,8 +63,13 @@
 #  @remarks 函数详细说明.
 def GetTagRelation(curPlayer, curTagNormalNPC, skill, tick):
     defenderCampType = NPCCommon.GetFaction(curTagNormalNPC)
+    curFaction = curPlayer.GetFaction()
+    if curFaction and defenderCampType:
+        if curFaction == defenderCampType:
+            return ChConfig.Type_Relation_Friend , ChConfig.Def_PASysMessage_None
+        return ChConfig.Type_Relation_Enemy , ChConfig.Def_PASysMessage_None
     #不攻击正义的需要去保护的 这里有女神和守卫
-    if defenderCampType == ChConfig.CampType_Justice:
+    elif defenderCampType == ChConfig.CampType_Justice:
         return ChConfig.Type_Relation_Friend, ChConfig.Def_PASysMessage_None
     
     #私有木桩只能自己打自己的
@@ -117,6 +123,8 @@
         return
     
     if GameObj.GetHP(curTagNormalNPC) <= 0:
+        if TurnAttack.SetKilled(curTagNormalNPC):
+            return
         if not ChNPC.OnCheckCanDie(curPlayer, curTagNormalNPC, skill, tick):
             return
         #执行击杀NPC逻辑

--
Gitblit v1.8.0