From 223d88c4b42d4541ed743b83cce2bbd4e1bdac59 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 04 一月 2019 21:06:29 +0800
Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(屏蔽部分日志)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
index 0c55f89..037a68c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
@@ -153,6 +153,8 @@
         curPlayer.Sync_TimeTick(ChConfig.tttTowerTake, 0, max(notify_tick, 0), True)
         
     FBCommon.Notify_FBHelp(curPlayer, __GetFBHelpInfo())
+    PlayerControl.DelLimitSuperBuff(curPlayer, tick)
+    PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
     return
 
 def __GetFBHelpInfo():
@@ -196,7 +198,7 @@
     gameFB = GameWorld.GetGameFB()
     fbStep = gameFB.GetFBStep()
     
-    if fbStep <= FB_State_Waiting and fbStep >= FB_State_Leave:
+    if fbStep <= FB_State_Waiting or fbStep >= FB_State_Leave:
         return
     
     leavePlayerID = curPlayer.GetPlayerID()
@@ -316,6 +318,10 @@
         player = copyMapPlayerManager.GetPlayerByIndex(i)
         if player == None or player.IsEmpty():
             continue
+        playerID = player.GetPlayerID()
+        if playerID not in [playerIDA, playerIDB]:
+            GameWorld.ErrLog("副本中玩家不在进入的玩家ID里,不处理! roomID=%s,playerID=%s" % (roomID, playerID))
+            continue
         winner = player
         winnerID = player.GetPlayerID()
         GameWorld.Log("超时结算,玩家在线,直接获胜: roomID=%s,winnerID=%s" % (roomID, winnerID))
@@ -395,7 +401,7 @@
         
         if player.GetPlayerAction() == IPY_GameWorld.paDie or player.GetHP() <= 0:
             GameWorld.DebugLog("复活玩家...", player.GetPlayerID())
-            ChPlayer.PlayerRebornByType(player, ChConfig.rebornType_System, tick)
+            ChPlayer.PlayerRebornByType(player, ChConfig.rebornType_System, tick, isAddSuperBuff=False)
             __ResetPlayerState(gameFB, player, playerID)
         else:
             __ResetPlayerState(gameFB, player, playerID, False)
@@ -472,6 +478,22 @@
     GameWorld.Log("回合结束: roomID=%s,roundNum=%s,winnerID=%s,loserID=%s,updWinCnt=%s" % (roomID, roundNum, winnerID, loserID, updWinCnt))
     isOver = (updWinCnt >= IpyGameDataPY.GetFuncCfg("CrossRealmPKFB", 3))
     if not isOver:
+        if winner:
+            clearDeBuff = False
+            # 胜利者马上清除负面buff,防止死亡导致回合表现异常,如中毒
+            for buffType in [IPY_GameWorld.bfDeBuff, IPY_GameWorld.bfProcessDeBuff, IPY_GameWorld.bfActionBuff]:
+                buffTuple = SkillCommon.GetBuffManagerByBuffType(winner, buffType)
+                if buffTuple:
+                    buffState = buffTuple[0]
+                    buffCount = buffState.GetBuffCount()
+                    if buffCount:
+                        clearDeBuff = True
+                        buffState.Clear()
+                        GameWorld.DebugLog("胜者马上清除 buffType=%s,buffCount=%s" % (buffType, buffCount), winner.GetPlayerID())
+                        
+            if clearDeBuff:
+                PlayerControl.PlayerControl(winner).RefreshAllState()
+                
         FBCommon.SetFBStep(FB_State_Reborn, tick)
         return
     

--
Gitblit v1.8.0