8585 【主干】【BT2】【BT3】【后端】竞技场(修改为胜负全部由前端发包决定;查看玩家增加同步攻击回血属性)
2个文件已修改
33 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
@@ -194,13 +194,12 @@
        return
    
    isWin = 1 if result == 1 else 0
    # 木桩被击杀,后端判断,其他前端同步
    if isWin:
        GameWorld.ErrLog("前端不能同步竞技场胜利状态!", playerID)
        return
#    # 木桩被击杀,后端判断,其他前端同步
#    if isWin:
#        GameWorld.ErrLog("前端不能同步竞技场胜利状态!", playerID)
#        return
    
    recTagPlayerID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaBattleTagID)
    GameWorld.DebugLog("竞技场被对手击杀! tagPlayerID=%s,recTagPlayerID=%s" % (tagPlayerID, recTagPlayerID), playerID)
    if tagPlayerID != recTagPlayerID:
        GameWorld.ErrLog("竞技场结算时对手ID不一致! tagPlayerID(%s) != recTagPlayerID(%s)" % (tagPlayerID, recTagPlayerID), playerID)
        __DoArenaBattleOver(curPlayer)
@@ -211,17 +210,17 @@
    return
def OnKillBattleNPC(curPlayer, curNPC):
    ## 击杀对手,前端本,使用木桩NPC作为对手
    if curNPC.GetGameObjType() != IPY_GameWorld.gotNPC or curNPC.GetType() not in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
        GameWorld.DebugLog("击杀非木桩NPC,不结算!")
        return
    # 胜利结算入口:后端验证击杀对手
    tagPlayerID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaBattleTagID)
    GameWorld.DebugLog("竞技场击杀对手! tagPlayerID=%s" % tagPlayerID, curPlayer.GetPlayerID())
    isWin = 1
    SendGameServer_ArenaBattleOver(curPlayer, isWin)
#    ## 击杀对手,前端本,使用木桩NPC作为对手
#
#    if curNPC.GetGameObjType() != IPY_GameWorld.gotNPC or curNPC.GetType() not in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
#        GameWorld.DebugLog("击杀非木桩NPC,不结算!")
#        return
#
#    # 胜利结算入口:后端验证击杀对手
#    tagPlayerID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaBattleTagID)
#    GameWorld.DebugLog("竞技场击杀对手! tagPlayerID=%s" % tagPlayerID, curPlayer.GetPlayerID())
#    isWin = 1
#    SendGameServer_ArenaBattleOver(curPlayer, isWin)
    return
def SendGameServer_ArenaBattleOver(curPlayer, isWin):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
@@ -211,6 +211,8 @@
    curPlayerPropDict["OnlyFinalHurt"] = PlayerControl.GetOnlyFinalHurt(curPlayer) # 额外输出伤害
    curPlayerPropDict["DamChanceDef"] = PlayerControl.GetDamChanceDef(curPlayer) # 20%的概率抵御伤害比率
    curPlayerPropDict["NPCHurtAddPer"] = PlayerControl.GetNPCHurtAddPer(curPlayer) # 对怪物伤害加成
    curPlayerPropDict["AtkBackHPPer"] = PlayerControl.GetAtkBackHPPer(curPlayer) # 攻击回复血量固定值
    curPlayerPropDict["PVPAtkBackHP"] = PlayerControl.GetPVPAtkBackHP(curPlayer) # PVP攻击回血
    
    #推送提醒
    curPlayerPropDict[ChConfig.Def_PDict_GeTuiSet] = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GeTuiSet)