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/IpyGameDataPY.py | 6 +++---
PySysDB/PySysDBPY.h | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py | 17 ++++++++++++++---
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 1a339b5..4156ee0 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -344,8 +344,8 @@
DWORD PosNPCID4; //4号位NPCID
DWORD PosNPCID5; //5号位NPCID
DWORD PosNPCID6; //6号位NPCID
- DWORD PosNPCID7; //7号位NPCID
DWORD BossID; // 本阵容的BossID,没有boss时为0
+ BYTE BossPosView; //Boss通知站位
list SkillIDExList; // boss附加技能列表
BYTE SkillExCnt; //随机附加技能数,0为所有
};
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):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index ad3240d..bc2c88c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -332,8 +332,8 @@
("DWORD", "PosNPCID4", 0),
("DWORD", "PosNPCID5", 0),
("DWORD", "PosNPCID6", 0),
- ("DWORD", "PosNPCID7", 0),
("DWORD", "BossID", 0),
+ ("BYTE", "BossPosView", 0),
("list", "SkillIDExList", 0),
("BYTE", "SkillExCnt", 0),
),
@@ -2816,8 +2816,8 @@
def GetPosNPCID4(self): return self.attrTuple[4] # 4号位NPCID DWORD
def GetPosNPCID5(self): return self.attrTuple[5] # 5号位NPCID DWORD
def GetPosNPCID6(self): return self.attrTuple[6] # 6号位NPCID DWORD
- def GetPosNPCID7(self): return self.attrTuple[7] # 7号位NPCID DWORD
- def GetBossID(self): return self.attrTuple[8] # 本阵容的BossID,没有boss时为0 DWORD
+ def GetBossID(self): return self.attrTuple[7] # 本阵容的BossID,没有boss时为0 DWORD
+ def GetBossPosView(self): return self.attrTuple[8] # Boss通知站位 BYTE
def GetSkillIDExList(self): return self.attrTuple[9] # boss附加技能列表 list
def GetSkillExCnt(self): return self.attrTuple[10] # 随机附加技能数,0为所有 BYTE
--
Gitblit v1.8.0