From 3b9b7247c741523fa17227fb3fc4429c035417c3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 30 十二月 2018 16:35:14 +0800
Subject: [PATCH] 5642 【后端】【1.4】跨服匹配回合结束清除所有Debuff

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 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 af93e5a..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
@@ -478,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