From 0ef7cd13abea0010fb9cb1f75738fd7421626da8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 29 一月 2026 18:21:00 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(修复属性触发击晕时没有通知buff问题;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/TurnFight.py |   50 +++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 41 insertions(+), 9 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 9458607..80940c1 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
@@ -42,6 +42,7 @@
         GameWorld.DebugAnswer(curPlayer, "位置: 1~6号位")
         GameWorld.DebugAnswer(curPlayer, "属性ID: 6-攻,7-防,8-HPMax,9-HP,12-怒")
         GameWorld.DebugAnswer(curPlayer, "测试战斗: TurnFight f 是否满技能 [武将ID ...]")
+        GameWorld.DebugAnswer(curPlayer, "测试战斗: TurnFight fp [playerID]")
         return
     
     value = msgList[0]
@@ -55,6 +56,9 @@
         __printInfo(curPlayer, msgList)
     elif value == "f":
         __doFightTest(curPlayer, msgList)
+    elif value == "fp":
+        costTime = TurnAttack.GMTestPVP(curPlayer, msgList[1] if len(msgList) > 1 else 0)
+        GameWorld.DebugAnswer(curPlayer, "GMTestPVP: %s" % costTime)
     elif value > 0 and value != ChConfig.Def_FBMapID_Main:
         __reqTurnFight(curPlayer, msgList)
     return
@@ -102,9 +106,10 @@
             continue
         batFaction = turnFight.getBatFaction(faction)
         batLineup = batFaction.getBatlineup(1)
-        posNumList = [pNum] if pNum else batLineup.posObjIDDict.keys()
+        posObjIDDict = batLineup.getPosObjIDDict()
+        posNumList = [pNum] if pNum else posObjIDDict.keys()
         for posNum in posNumList:
-            objID = batLineup.posObjIDDict.get(posNum)
+            objID = posObjIDDict.get(posNum)
             batObj = batObjMgr.getBatObj(objID)
             if not batObj:
                 GameWorld.DebugAnswer(curPlayer, "对象不存在:阵营:%s,位置:%s" % (faction, posNum))
@@ -140,8 +145,9 @@
     batObjMgr = BattleObj.GetBatObjMgr()
     batFaction = turnFight.getBatFaction(faction)
     batLineup = batFaction.getBatlineup(1)
+    posObjIDDict = batLineup.getPosObjIDDict()
     for posNum in posNumList:
-        objID = batLineup.posObjIDDict.get(posNum)
+        objID = posObjIDDict.get(posNum)
         if not objID:
             continue
         batObj = batObjMgr.getBatObj(objID)
@@ -178,7 +184,7 @@
     batObjMgr = BattleObj.GetBatObjMgr()
     batFaction = turnFight.getBatFaction(faction)
     batLineup = batFaction.getBatlineup(1)
-    objID = batLineup.posObjIDDict.get(posNum)
+    objID = batLineup.getPosObjIDDict().get(posNum)
     batObj = batObjMgr.getBatObj(objID)
     if not batObj:
         GameWorld.DebugAnswer(curPlayer, "对象不存在:阵营:%s,位置:%s" % (faction, posNum))
@@ -189,7 +195,7 @@
     
     ownerFaction = turnFight.getBatFaction(ownerFaction)
     ownerLineup = ownerFaction.getBatlineup(1)
-    ownerID = ownerLineup.posObjIDDict.get(ownerPosNum)
+    ownerID = ownerLineup.getPosObjIDDict().get(ownerPosNum)
     buffOwner = batObjMgr.getBatObj(ownerID)
     if not buffOwner:
         GameWorld.DebugAnswer(curPlayer, "对象不存在:阵营:%s,位置:%s" % (ownerFaction, ownerPosNum))
@@ -226,8 +232,26 @@
         GameWorld.DebugAnswer(curPlayer, "---------- 【阵营%s】 ----------" % faction)
         batFaction = turnFight.getBatFaction(faction)
         batLineup = batFaction.getBatlineup(1)
+        mgObj = batLineup.getMinggeObj()
+        if mgObj:
+            objName = "命格 ID:%s" % mgObj.GetID()
+            GameWorld.DebugAnswer(curPlayer, "--- %s" % objName)
+            skillMgr = mgObj.GetSkillManager()
+            skillIDList = skillMgr.GetSkillIDList()
+            GameWorld.DebugAnswer(curPlayer, "技能: %s,%s" % (len(skillIDList), skillIDList))
+            buffMgr = mgObj.GetBuffManager()
+            GameWorld.DebugAnswer(curPlayer, "Buff: %s" % buffMgr.GetBuffCount())
+            for index in range(buffMgr.GetBuffCount()):
+                buff = buffMgr.GetBuffByIndex(index)
+                buffName = GameWorld.CodeToGbk(buff.GetSkillData().GetSkillName())
+                GameWorld.DebugAnswer(curPlayer, "ID:%s,%s(%s),回合:%s,层:%s,V:%s,来源:%s,光环:%s" 
+                                      % (buff.GetBuffID(), buffName, buff.GetSkillID(), buff.GetRemainTime(), buff.GetLayer(), 
+                                         [buff.GetValue1(), buff.GetValue2(), buff.GetValue3()], buff.GetOwnerID(), buff.GetHaloObjIDList()
+                                         ))
+                
+        posObjIDDict = batLineup.getPosObjIDDict()
         for posNum in posNumList:
-            objID = batLineup.posObjIDDict.get(posNum)
+            objID = posObjIDDict.get(posNum)
             if not objID:
                 continue
             batObj = batObjMgr.getBatObj(objID)
@@ -235,8 +259,15 @@
             GameWorld.DebugAnswer(curPlayer, "--- %s%s" % (objName, "" if batObj.IsAlive() else " [被击杀]"))
             GameWorld.DebugAnswer(curPlayer, "HP:%s/%s" % (batObj.GetHP(), batObj.GetMaxHP()))
             GameWorld.DebugAnswer(curPlayer, "攻:%s,防:%s,怒:%s" % (batObj.GetAtk(), batObj.GetDef(), batObj.GetXP()))
+            attrStr = ""
             attrDict = batObj.GetBatAttrDict()
-            GameWorld.DebugAnswer(curPlayer, "属性:%s" % attrDict)
+            attrIDList = attrDict.keys()
+            attrIDList.sort()
+            for attrID in attrIDList:
+                attrValue = attrDict[attrID]
+                if attrValue:
+                    attrStr += "%s=%s;" % (attrID, attrValue)
+            GameWorld.DebugAnswer(curPlayer, "属性:%s" % attrStr)
             skillMgr = batObj.GetSkillManager()
             skillIDList = skillMgr.GetSkillIDList()
             GameWorld.DebugAnswer(curPlayer, "技能: %s,%s" % (len(skillIDList), skillIDList))
@@ -244,8 +275,9 @@
             GameWorld.DebugAnswer(curPlayer, "Buff: %s" % buffMgr.GetBuffCount())
             for index in range(buffMgr.GetBuffCount()):
                 buff = buffMgr.GetBuffByIndex(index)
-                GameWorld.DebugAnswer(curPlayer, "ID:%s,SkillID:%s,回合:%s,层:%s,V:%s,来源:%s,光环:%s" 
-                                      % (buff.GetBuffID(), buff.GetSkillID(), buff.GetRemainTime(), buff.GetLayer(), 
+                buffName = GameWorld.CodeToGbk(buff.GetSkillData().GetSkillName())
+                GameWorld.DebugAnswer(curPlayer, "ID:%s,%s(%s),回合:%s,层:%s,V:%s,来源:%s,光环:%s" 
+                                      % (buff.GetBuffID(), buffName, buff.GetSkillID(), buff.GetRemainTime(), buff.GetLayer(), 
                                          [buff.GetValue1(), buff.GetValue2(), buff.GetValue3()], buff.GetOwnerID(), buff.GetHaloObjIDList()
                                          ))
                 

--
Gitblit v1.8.0