From e4003a189bbf7533f679f3eea4d300a8ff61ce2b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 22 十月 2025 19:39:31 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(TurnFight命令增加发起战斗支持)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/TurnFight.py |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/TurnFight.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/TurnFight.py
index a989353..1b854b5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/TurnFight.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/TurnFight.py
@@ -17,6 +17,7 @@
 
 import ChConfig
 import GameWorld
+import ChPyNetPack
 import ChPyNetSendPack
 import NetPackCommon
 import TurnAttack
@@ -32,6 +33,7 @@
 #  @remarks 函数详细说明.
 def OnExec(curPlayer, msgList):
     if not msgList:
+        GameWorld.DebugAnswer(curPlayer, "发起战斗: TurnFight mapID [lineID 玩家ID]")
         GameWorld.DebugAnswer(curPlayer, "设置属性: TurnFight a 属性ID 值 [阵营 位置] ")
         GameWorld.DebugAnswer(curPlayer, "击杀目标: TurnFight k 阵营 [位置 ...] ")
         GameWorld.DebugAnswer(curPlayer, "添加buff: TurnFight b 阵营  位置 buff技能ID")
@@ -50,7 +52,22 @@
         __doAddBuff(curPlayer, msgList)
     elif value == "p":
         __printInfo(curPlayer, msgList)
-        
+    elif value > 0 and value != ChConfig.Def_FBMapID_Main:
+        __reqTurnFight(curPlayer, msgList)
+    return
+
+def __reqTurnFight(curPlayer, msgList):
+    mapID = msgList[0]
+    funcLineID = msgList[1] if len(msgList) > 1 else 0
+    tagPlayerID = msgList[2] if len(msgList) > 2 else 0
+    clientData = ChPyNetPack.tagCMTurnFight()
+    clientData.MapID = mapID
+    clientData.FuncLineID = funcLineID
+    clientData.TagType = 0 if not tagPlayerID else 1
+    clientData.TagID = tagPlayerID
+    index = curPlayer.GetIndex()
+    tick = GameWorld.GetGameWorld().GetTick()
+    TurnAttack.OnTurnFight(index, clientData, tick)
     return
 
 def __doSetAttr(curPlayer, msgList):

--
Gitblit v1.8.0