From 82ca2dd1656364f93523af726ac81b7823cbc3d2 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 06 十月 2019 21:20:08 +0800
Subject: [PATCH] 8298 【恺英】【开发】基础套装极/仙/神进阶(神、仙、极传奇属性支持)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
index 4a7be2c..ab6a1bb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
@@ -298,37 +298,32 @@
     PlayerControl.ExitPlayerConfronting(curPlayer)
     return
 
-
-##没有了对峙,需要设置选中
+# 目标死亡和消失时发包取消对象,人物死亡取消选中
+##增加锁定模式amContest,锁定情况下只能攻击目标 
 # @param None
 # @return None
 def SelectObj(index, clientData, tick):
     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    if curPlayer.GetPlayerAction() == IPY_GameWorld.paEvent:
+    if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
         return
     
     if clientData.isSelect == 0:
-        curPlayer.SetActionObj(None)
-        if curPlayer.GetPlayerAction() == IPY_GameWorld.paPreparing:
-            PlayerControl.ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
+        curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjID, 0)
+        curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjType, 0)
         return
     
     curTag = GameWorld.GetObj(clientData.ID, clientData.Type)
     if curTag == None or curTag.IsEmpty():
         return
     
-    if curPlayer.GetPlayerAction() not in ChConfig.Def_PlayerCanEnterConfronting:
-        #GameWorld.Log("状态不对%s"%curPlayer.GetPlayerAction())
-        return
-    
-    tagObj = curPlayer.GetActionObj()
-    if tagObj:
-        if curPlayer.GetPlayerAction() == IPY_GameWorld.paPreparing:
-            if tagObj.GetGameObjType() != clientData.Type or tagObj.GetID() != clientData.ID:
-                PlayerControl.ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
-            
+    if curPlayer.GetAttackMode() == IPY_GameWorld.amContest and curTag.GetGameObjType() == IPY_GameWorld.gotPlayer:
+        if curPlayer.GetTeamID() and curPlayer.GetTeamID() == curTag.GetTeamID():
+            #GameWorld.DebugLog("锁定模式不锁定队友")
+            return
+        
     #这里不验证是否死亡
-    curPlayer.SetActionObj(curTag)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjID, clientData.ID)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjType, clientData.Type)
     
     return
 

--
Gitblit v1.8.0