From 50fdfee4d8677d20494750b72a7d2ce324c28e1a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 31 十月 2025 15:47:26 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(后端废除7号位,通知前端支持通知7号位;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 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 daf0220..4235cf7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -75,6 +75,10 @@
self.beautyObjIDDict = {} # 红颜战斗单位 {位置编号:batObjID, ...}
self.actionNum = ActionNumStart # 行动位置,从1开始
self.totalHurt = 0 # 阵容总输出
+
+ #特殊
+ self.bossID = 0
+ self.bossPosView = 0
return
def getPlayerID(self): return self.turnFight.playerID # 发起的玩家ID
@@ -88,6 +92,8 @@
self.ownerID = lineupInfo.get("PlayerID", 0) # 阵容所属的玩家ID
self.shapeType = lineupInfo.get("ShapeType", 0)
self.fightPower = lineupInfo.get("FightPower", 0)
+ self.bossID = lineupInfo.get("BossID", 0)
+ self.bossPosView = lineupInfo.get("BossPosView", 0)
SummonLineupObjs(self, self.faction, self.num, lineupInfo, self.getPlayerID())
return
@@ -384,7 +390,10 @@
tfObj.MaxHP = batObj.GetMaxHP() % ChConfig.Def_PerPointValue
tfObj.MaxHPEx = batObj.GetMaxHP() / ChConfig.Def_PerPointValue
tfObj.LV = batObj.GetLV()
- tfObj.PosNum = posNum
+ if batLineup.bossPosView and batLineup.bossID == batObj.GetNPCID():
+ tfObj.PosNum = batLineup.bossPosView
+ else:
+ tfObj.PosNum = posNum
tfObj.AngreXP = batObj.GetXP()
tfLineup.ObjList.append(tfObj)
tfLineup.ObjCnt = len(tfLineup.ObjList)
@@ -600,9 +609,11 @@
ipyData = IpyGameDataPY.GetIpyGameData("NPCLineup", lineupID)
if not ipyData:
return {}
+ bossID = ipyData.GetBossID()
+ bossPosView = ipyData.GetBossPosView()
heroDict = {}
- for posNum in range(1, 1 + 10):
+ for posNum in range(1, 1 + 6):
if not hasattr(ipyData, "GetPosNPCID%s" % posNum):
break
npcID = getattr(ipyData, "GetPosNPCID%s" % posNum)()
@@ -613,7 +624,7 @@
continue
heroDict[str(posNum)] = battleDict
- lineupInfo = {"NPCLineupID":lineupID, "Hero":heroDict}
+ lineupInfo = {"NPCLineupID":lineupID, "Hero":heroDict, "BossID":bossID, "BossPosView":bossPosView}
return lineupInfo
def GetNPCBattleDict(lineupIpyData, npcID, strongerLV=0, difficulty=0):
--
Gitblit v1.8.0