From cb452abc7bcda94073cfe0d136e831252374853d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 07 二月 2026 19:30:57 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(NPC成长表增加等级字段;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py |   43 ++++++++++++++++++++++++++-----------------
 1 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
index 71b9a4b..6ae0ee6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -29,7 +29,6 @@
 import GameWorld
 import PlayerLLMJ
 import PlayerPrestigeSys
-import CrossServerPackLogic
 import DataRecordPack
 import PlayerSuccess
 import IpyGameDataPY
@@ -45,6 +44,7 @@
 import TurnBuff
 import FBCommon
 import CommFunc
+import CrossMsg
 import FBLogic
 
 import random
@@ -436,8 +436,8 @@
                     batObj = batObjMgr.getBatObj(objID)
                     if not batObj:
                         continue
-                    if posNum == ChConfig.TFPosNum_Mingge: # 理论上要都同步,但是前端需要同步修改,等前端要改时再同步
-                        continue
+                    #if posNum == ChConfig.TFPosNum_Mingge: # 理论上要都同步,但是前端需要同步修改,等前端要改时再同步
+                    #    continue
                     tfObj = ChPyNetSendPack.tagSCTurnFightObj()
                     tfObj.ObjID = batObj.GetID()
                     tfObj.NPCID = batObj.GetNPCID()
@@ -692,7 +692,7 @@
     mgSkillLVDict = olPlayer.GetCalcSpecInfo(ChConfig.Def_CalcAttr_Mingge, mgPresetID)
     mgSkillIDList = []
     for skillTypeID, skillLV in mgSkillLVDict.items():
-        skillID = skillTypeID + skillLV - 1
+        skillID = SkillCommon.GetSkillIDBySkillTypeID(skillTypeID, skillLV)
         if skillID not in mgSkillIDList:
             mgSkillIDList.append(skillID)
     #shapeType = 0
@@ -855,7 +855,16 @@
     reModelID = lineupIpyData.GetReModelID()
     lvReIpyData = None
     heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", heroID) if heroID else None
-    npcStronger = IpyGameDataPY.GetIpyGameDataNotLog("NPCStronger", npcID)
+    npcStronger = None
+    npcStrongerList = IpyGameDataPY.GetIpyGameDataListNotLog("NPCStronger", npcID)
+    if npcStrongerList and strongerLV:
+        for strongerData in npcStrongerList:
+            if not strongerData.GetNPCLV() or strongerLV <= strongerData.GetNPCLV():
+                npcStronger = strongerData
+                break
+        if not npcStronger:
+            npcStronger = npcStrongerList[-1] # 找不到时取最后一条
+            
     if npcStronger and strongerLV:
         lvReIpyData = IpyGameDataPY.GetIpyGameData("LVReValue", reModelID, strongerLV)
         if lvReIpyData:
@@ -1279,17 +1288,17 @@
             isMultiMap = True
             
     if isMultiMap:
-        CrossServerPackLogic.SendBattleRequest(reqInfo, guid, mapID, funcLineID, reqPlayerID)
+        CrossMsg.SendBattleRequest(reqInfo, guid, mapID, funcLineID, reqPlayerID)
     else:
-        SSMsg_BattleRequest(reqInfo, fromServerID)
+        S2B_BattleRequest(reqInfo, fromServerID)
     return
 
-def SSMsg_BattleRequest(reqInfo, fromServerID, msgType=""):
+def S2B_BattleRequest(reqInfo, fromServerID, msgType=""):
     ## 请求执行战斗,由本地图或其他服务器地图分配过来的战斗请求
     guid, mapID, funcLineID, lineupDictA, lineupDictB, reqPlayerID, playerServerID, npcLineupIDList, strongerLV, difficulty, reqData = reqInfo
-    if msgType:
-        GameWorld.Log("OnServerReceiveMsg => %s, fromServerID=%s,funcMapID=%s,funcLineID=%s,%s,%s" 
-                      % (msgType, fromServerID, mapID, funcLineID, guid, time.time()), reqPlayerID)
+    #if msgType:
+    #    GameWorld.Log("OnServerReceiveMsg => %s, fromServerID=%s,funcMapID=%s,funcLineID=%s,%s,%s" 
+    #                  % (msgType, fromServerID, mapID, funcLineID, guid, time.time()), reqPlayerID)
         
     if npcLineupIDList:
         turnFight = DoTurnFightPVE(guid, mapID, funcLineID, reqPlayerID, playerServerID, lineupDictA, npcLineupIDList, strongerLV, difficulty)
@@ -1308,20 +1317,20 @@
     
     # 本地图自己处理的
     if fromServerID == GameWorld.GetGameWorld().GetServerID():
-        SSMsg_BattleResult(retInfo, fromServerID)
+        B2S_BattleResult(retInfo, fromServerID)
         
     # 其他服务器地图请求的,发送战斗结果回去
     else:
-        CrossServerPackLogic.SendBattleResult(retInfo, fromServerID, guid, mapID, funcLineID, reqPlayerID)
+        CrossMsg.SendBattleResult(retInfo, fromServerID, guid, mapID, funcLineID, reqPlayerID)
     return
 
-def SSMsg_BattleResult(retInfo, fromServerID, msgType=""):
+def B2S_BattleResult(retInfo, fromServerID, msgType=""):
     ## 收到战斗结果信息
     
     guid, mapID, funcLineID, reqPlayerID, winFaction, statMsg, dateStr, reqData = retInfo
-    if msgType:
-        GameWorld.Log("OnServerReceiveMsg => %s, fromServerID=%s,funcMapID=%s,funcLineID=%s,%s,%s" 
-                      % (msgType, fromServerID, mapID, funcLineID, guid, time.time()), reqPlayerID)
+    #if msgType:
+    #    GameWorld.Log("OnServerReceiveMsg => %s, fromServerID=%s,funcMapID=%s,funcLineID=%s,%s,%s" 
+    #                  % (msgType, fromServerID, mapID, funcLineID, guid, time.time()), reqPlayerID)
         
     curPlayer = None
     if reqPlayerID:

--
Gitblit v1.8.0