ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
@@ -14,65 +14,6 @@
#-------------------------------------------------------------------------------
#"""Version = 2018-12-21 18:00"""
#-------------------------------------------------------------------------------
import GameWorld
import MirrorAttack
import PlayerCrossRealmPK
import GameObj
###处理副本中杀死玩家逻辑
def DoFBOnKill_Player(atkobj, defender, tick):
    GameWorld.DebugLog("镜像切磋击杀玩家: defID=%s" % (defender.GetID()), atkobj.GetID())
    return True
def OnMirrorBattleRequest(curPlayer, mapID, funcLineID):
    ## 镜像战斗请求
    if not PlayerCrossRealmPK.CheckCanMatch(curPlayer):
        return
    if not PlayerCrossRealmPK.CheckHavePKCount(curPlayer):
        return
    return True
def OnMirrorBattleOver(battleID):
    ## 镜像战斗结束
    battle = MirrorAttack.GetMirrorBattleByID(battleID)
    if not battle:
        return
    isLogout = battle.isLogout
    mapID = battle.mapID
    funcLineID = battle.funcLineID
    winFaction = battle.winFaction
    curPlayerID = battle.requestID # 副本所属玩家ID,该玩家不一定参与实际战斗
    curIsWin = 0
    tagPlayerID = 0
    GameWorld.DebugLog("镜像战斗结算: mapID=%s,funcLineID=%s,winFaction=%s,isLogout=%s" % (mapID, funcLineID, winFaction, isLogout), battleID)
    playerMgr = GameWorld.GetMapCopyPlayerManager()
    for playerID, faction in battle.playerFactionDict.items():
        curPlayer = playerMgr.FindPlayerByID(playerID)
        if not curPlayer:
            continue
        realPlayerID = curPlayer.GetRealPlayerID()
        isWin = (faction == winFaction)
        GameWorld.DebugLog("剩余血量: %s/%s,playerID=%s,realPlayerID=%s,faction=%s,isWin=%s"
                           % (GameObj.GetHP(curPlayer), GameObj.GetMaxHP(curPlayer), playerID, realPlayerID, faction, isWin), battleID)
        if isWin and faction == 1:
            curIsWin = 1
        if faction != 1 and not tagPlayerID:
            tagPlayerID = realPlayerID
    if not curPlayerID:
        return
    curPlayer = playerMgr.FindPlayerByID(curPlayerID)
    if not curPlayer:
        return
    PlayerCrossRealmPK.SendPKOver(curPlayer, tagPlayerID, curIsWin)
    return
#
# 改为使用镜像PK,逻辑统一放 GameLogic_MirrorBattle
#