From 861e1ad98f9e8d56f3d97691eac02da1e900eb1c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 13 五月 2024 16:08:28 +0800
Subject: [PATCH] 10156 副本功能玩法关联回合战斗表现(竞技场战斗改为回合制,功能玩法不变,配置不变;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ArenaBattle.py |   64 +++++++++++++++++++++-----------
 1 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ArenaBattle.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ArenaBattle.py
index c71d235..6ac443e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ArenaBattle.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ArenaBattle.py
@@ -10,34 +10,54 @@
 # @version 1.0
 #
 # 详细描述: 竞技场战斗,目前主要做自定义副本流程桥梁吧,暂时没什么额外逻辑,战斗过程前端自行处理,后端只处理击杀木桩后结算
+#            砍树版本改为回合战斗
 #
 #-------------------------------------------------------------------------------
 #"""Version = 2020-12-07 19:30"""
 #-------------------------------------------------------------------------------
 
+import ChConfig
+import GameWorld
+import PlayerControl
 import PlayerArena
 
-## 是否能够通过活动查询进入
-def OnEnterFBEvent(curPlayer, mapID, lineID, tick):
+def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
+    ## 回合战斗请求 - 地图验证
+    
+    playerID = curPlayer.GetPlayerID()
+    if not PlayerArena.CheckArenaBattleCount(curPlayer):
+        GameWorld.DebugLog("竞技场已经没有对战次数!", playerID)
+        return
+    
+    if not valueList:
+        GameWorld.DebugLog("竞技场没有发送回合战斗的PlayerID,在valueList里,索引0的值为PlayerID!", playerID)
+        return
+    tagPlayerID = valueList[0]
+    GameWorld.DebugLog("竞技场请求对战! tagType=%s,tagID=%s,tagPlayerID=%s" % (tagType, tagID, tagPlayerID), playerID)
+    
     return True
 
-## 是否需要做进入副本通用检查条件逻辑,默认需要检查
-def OnNeedCheckCanEnterFBComm(curPlayer, mapID, lineID):
-    ## 进行中的不需要重复检查,防止断线重连被禁止进入
-    return False
-
-## 客户端进入自定义场景
-def OnEnterCustomScene(curPlayer, mapID, lineID):
-    return
-
-## 判断可否召唤木桩怪
-def OnCanSummonPriWoodPile(curPlayer, mapID, lineID, npcID, count):
-    return True
-
-## 自定义场景副本击杀NPC
-def DoCustomScene_Player_KillNPC(curPlayer, curNPC, mapID, lineID):
-    PlayerArena.OnKillBattleNPC(curPlayer, curNPC)
-    return
-
-
-
+def OnTurnFightOver(curPlayer, mapID, funcLineID, tagType, tagID, valueList, fightRet):
+    ## 回合战斗结束
+    # @return: 是否需要同步GameServer, 奖励列表, 同步结果信息
+    needSendGameServer = False
+    awardItemList = []
+    overInfoEx = {}
+    isWin = fightRet[0]
+    
+    playerID = curPlayer.GetPlayerID()
+    if not valueList:
+        return
+    tagPlayerID = valueList[0]
+        
+    if not PlayerArena.CheckArenaBattleCount(curPlayer):
+        return
+    
+    playerLV = curPlayer.GetLV()
+    playerScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaScore)
+    msgInfo = str(["BattleResult", {"tagPlayerID":tagPlayerID, "isWin":isWin, "playerLV":playerLV, "playerScore":playerScore, 
+                                    "realmLV":curPlayer.GetOfficialRank(), "fightPower":PlayerControl.GetFightPower(curPlayer)}])
+    GameWorld.DebugLog("竞技场发送GameServer结算: %s" % msgInfo, playerID)
+    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, "Arena", msgInfo, len(msgInfo))
+    
+    return needSendGameServer, awardItemList, overInfoEx

--
Gitblit v1.8.0