From 2cd5adccba8fa49f4504d449e198ae03641803ab Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期日, 05 五月 2019 16:13:52 +0800 Subject: [PATCH] 860312 争夺模式 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py | 23 +++++++---------------- 1 files changed, 7 insertions(+), 16 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..6e68615 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,28 @@ 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) #这里不验证是否死亡 - curPlayer.SetActionObj(curTag) + curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjID, clientData.ID) + curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjType, clientData.Type) return -- Gitblit v1.8.0