From 23876f36a929f7e8f1fe94ae543b03bc24a61f1e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 25 二月 2025 20:24:08 +0800
Subject: [PATCH] 10263 【越南】【英文】【BT】【GM】【砍树】后端支持NPC仿真实玩家战斗和快速战斗(镜像回收时同步清除地图中缓存的镜像被动buff效果;)
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 150 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 135 insertions(+), 15 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 80940a3..3bffc00 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -8695,6 +8695,7 @@
Job = 0 #(BYTE Job)
Face = 0 #(DWORD Face)
FacePic = 0 #(DWORD FacePic)
+ RobValue = 0 #(DWORD RobValue)// 抢劫敌对值
MineCount = 0 #(BYTE MineCount)
MineItemList = list() #(vector<tagGCMineItem> MineItemList)// 矿物列表
data = None
@@ -8710,6 +8711,7 @@
self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.RobValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.MineCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.MineCount):
temMineItemList = tagGCMineItem()
@@ -8723,6 +8725,7 @@
self.Job = 0
self.Face = 0
self.FacePic = 0
+ self.RobValue = 0
self.MineCount = 0
self.MineItemList = list()
return
@@ -8732,6 +8735,7 @@
length += 4
length += 33
length += 1
+ length += 4
length += 4
length += 4
length += 1
@@ -8747,6 +8751,7 @@
data = CommFunc.WriteBYTE(data, self.Job)
data = CommFunc.WriteDWORD(data, self.Face)
data = CommFunc.WriteDWORD(data, self.FacePic)
+ data = CommFunc.WriteDWORD(data, self.RobValue)
data = CommFunc.WriteBYTE(data, self.MineCount)
for i in range(self.MineCount):
data = CommFunc.WriteString(data, self.MineItemList[i].GetLength(), self.MineItemList[i].GetBuffer())
@@ -8759,6 +8764,7 @@
Job:%d,
Face:%d,
FacePic:%d,
+ RobValue:%d,
MineCount:%d,
MineItemList:%s
'''\
@@ -8768,6 +8774,7 @@
self.Job,
self.Face,
self.FacePic,
+ self.RobValue,
self.MineCount,
"..."
)
@@ -20439,6 +20446,7 @@
("SubCmd", c_ubyte),
("MapID", c_ushort),
("FuncLineID", c_ushort), #功能线路ID
+ ("FuncMapID", c_ushort), #功能地图ID
]
def __init__(self):
@@ -20457,6 +20465,7 @@
self.SubCmd = 0x26
self.MapID = 0
self.FuncLineID = 0
+ self.FuncMapID = 0
return
def GetLength(self):
@@ -20470,13 +20479,15 @@
Cmd:%s,
SubCmd:%s,
MapID:%d,
- FuncLineID:%d
+ FuncLineID:%d,
+ FuncMapID:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.MapID,
- self.FuncLineID
+ self.FuncLineID,
+ self.FuncMapID
)
return DumpString
@@ -20495,6 +20506,7 @@
("SubCmd", c_ubyte),
("MapID", c_int),
("FuncLineID", c_ushort), #功能线路ID
+ ("FuncMapID", c_ushort), #功能地图ID
]
def __init__(self):
@@ -20513,6 +20525,7 @@
self.SubCmd = 0x27
self.MapID = 0
self.FuncLineID = 0
+ self.FuncMapID = 0
return
def GetLength(self):
@@ -20526,13 +20539,15 @@
Cmd:%s,
SubCmd:%s,
MapID:%d,
- FuncLineID:%d
+ FuncLineID:%d,
+ FuncMapID:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.MapID,
- self.FuncLineID
+ self.FuncLineID,
+ self.FuncMapID
)
return DumpString
@@ -25950,7 +25965,8 @@
_pack_ = 1
_fields_ = [
("MfpType", c_ubyte), #模块编号类型
- ("FightPower", c_int), #本模块战斗力
+ ("FightPower", c_int), #本模块战斗力,求余亿部分
+ ("FightPowerEx", c_int), #本模块战斗力,整除亿部分,1代表1亿
]
def __init__(self):
@@ -25965,6 +25981,7 @@
def Clear(self):
self.MfpType = 0
self.FightPower = 0
+ self.FightPowerEx = 0
return
def GetLength(self):
@@ -25976,11 +25993,13 @@
def OutputString(self):
DumpString = '''//A3 A1 各功能模块战斗力信息 //tagMCModuleFightPowerInfo:
MfpType:%d,
- FightPower:%d
+ FightPower:%d,
+ FightPowerEx:%d
'''\
%(
self.MfpType,
- self.FightPower
+ self.FightPower,
+ self.FightPowerEx
)
return DumpString
@@ -29014,6 +29033,7 @@
TreasureType = 0 #(BYTE TreasureType)//寻宝类型
LuckValue = 0 #(WORD LuckValue)//当前幸运值
TreasureCount = 0 #(DWORD TreasureCount)//已寻宝总次数
+ TreasureCountToday = 0 #(DWORD TreasureCountToday)//今日已寻宝总次数
FreeCountToday = 0 #(WORD FreeCountToday)//今日已免费寻宝次数
TreasureCntAward = 0 #(DWORD TreasureCntAward)//累计寻宝次数对应奖励领奖状态,按奖励记录索引二进制记录是否已领取
GridLimitCnt = 0 #(BYTE GridLimitCnt)
@@ -29029,6 +29049,7 @@
self.TreasureType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.LuckValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.TreasureCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.TreasureCountToday,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.FreeCountToday,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.TreasureCntAward,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.GridLimitCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
@@ -29042,6 +29063,7 @@
self.TreasureType = 0
self.LuckValue = 0
self.TreasureCount = 0
+ self.TreasureCountToday = 0
self.FreeCountToday = 0
self.TreasureCntAward = 0
self.GridLimitCnt = 0
@@ -29052,6 +29074,7 @@
length = 0
length += 1
length += 2
+ length += 4
length += 4
length += 2
length += 4
@@ -29066,6 +29089,7 @@
data = CommFunc.WriteBYTE(data, self.TreasureType)
data = CommFunc.WriteWORD(data, self.LuckValue)
data = CommFunc.WriteDWORD(data, self.TreasureCount)
+ data = CommFunc.WriteDWORD(data, self.TreasureCountToday)
data = CommFunc.WriteWORD(data, self.FreeCountToday)
data = CommFunc.WriteDWORD(data, self.TreasureCntAward)
data = CommFunc.WriteBYTE(data, self.GridLimitCnt)
@@ -29078,6 +29102,7 @@
TreasureType:%d,
LuckValue:%d,
TreasureCount:%d,
+ TreasureCountToday:%d,
FreeCountToday:%d,
TreasureCntAward:%d,
GridLimitCnt:%d,
@@ -29087,6 +29112,7 @@
self.TreasureType,
self.LuckValue,
self.TreasureCount,
+ self.TreasureCountToday,
self.FreeCountToday,
self.TreasureCntAward,
self.GridLimitCnt,
@@ -34173,7 +34199,7 @@
_pack_ = 1
_fields_ = [
("ItemIndex", c_int),
- ("BuyCnt", c_ushort), # 今日已购买次数
+ ("BuyCnt", c_int), # 今日已购买次数
("IsReset", c_ubyte), #是否重置
]
@@ -44399,11 +44425,70 @@
return DumpString
+class tagMCCrossActLianqiAwardEx(Structure):
+ NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分
+ Count = 0 #(BYTE Count)// 额外奖励物品数
+ AwardItemList = list() #(vector<tagMCCrossActLianqiItem> AwardItemList)// 额外奖励物品列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Count):
+ temAwardItemList = tagMCCrossActLianqiItem()
+ _pos = temAwardItemList.ReadData(_lpData, _pos)
+ self.AwardItemList.append(temAwardItemList)
+ return _pos
+
+ def Clear(self):
+ self.NeedScore = 0
+ self.Count = 0
+ self.AwardItemList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 1
+ for i in range(self.Count):
+ length += self.AwardItemList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.NeedScore)
+ data = CommFunc.WriteBYTE(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ NeedScore:%d,
+ Count:%d,
+ AwardItemList:%s
+ '''\
+ %(
+ self.NeedScore,
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
class tagMCCrossActLianqiBillard(Structure):
Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
Count = 0 #(BYTE Count)// 奖励物品数
AwardItemList = list() #(vector<tagMCCrossActLianqiItem> AwardItemList)// 奖励物品列表
NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分
+ CountEx = 0 #(BYTE CountEx)// 额外奖励数
+ AwardItemExList = list() #(vector<tagMCCrossActLianqiAwardEx> AwardItemExList)// 额外奖励列表
data = None
def __init__(self):
@@ -44419,6 +44504,11 @@
_pos = temAwardItemList.ReadData(_lpData, _pos)
self.AwardItemList.append(temAwardItemList)
self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.CountEx):
+ temAwardItemExList = tagMCCrossActLianqiAwardEx()
+ _pos = temAwardItemExList.ReadData(_lpData, _pos)
+ self.AwardItemExList.append(temAwardItemExList)
return _pos
def Clear(self):
@@ -44426,6 +44516,8 @@
self.Count = 0
self.AwardItemList = list()
self.NeedScore = 0
+ self.CountEx = 0
+ self.AwardItemExList = list()
return
def GetLength(self):
@@ -44435,6 +44527,9 @@
for i in range(self.Count):
length += self.AwardItemList[i].GetLength()
length += 4
+ length += 1
+ for i in range(self.CountEx):
+ length += self.AwardItemExList[i].GetLength()
return length
@@ -44445,6 +44540,9 @@
for i in range(self.Count):
data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
data = CommFunc.WriteDWORD(data, self.NeedScore)
+ data = CommFunc.WriteBYTE(data, self.CountEx)
+ for i in range(self.CountEx):
+ data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer())
return data
def OutputString(self):
@@ -44452,13 +44550,17 @@
Rank:%d,
Count:%d,
AwardItemList:%s,
- NeedScore:%d
+ NeedScore:%d,
+ CountEx:%d,
+ AwardItemExList:%s
'''\
%(
self.Rank,
self.Count,
"...",
- self.NeedScore
+ self.NeedScore,
+ self.CountEx,
+ "..."
)
return DumpString
@@ -50412,7 +50514,8 @@
("CampaignType", c_ubyte), #奖励类型
("BillAwardRecord", c_ubyte), #排行奖励是否已领取
("TagAwardRecord", c_int), #目标奖励索引位领取记录:0-未领;1-已领
- ("RecordData", c_int), #活动时的记录值
+ ("RecordData", c_int), #活动时的记录值,求余亿部分,为了统一逻辑,其他非战力榜的也使用此规则
+ ("RecordDataEx", c_int), #活动时的记录值,整除亿部分,1代表1亿
]
def __init__(self):
@@ -50429,6 +50532,7 @@
self.BillAwardRecord = 0
self.TagAwardRecord = 0
self.RecordData = 0
+ self.RecordDataEx = 0
return
def GetLength(self):
@@ -50442,13 +50546,15 @@
CampaignType:%d,
BillAwardRecord:%d,
TagAwardRecord:%d,
- RecordData:%d
+ RecordData:%d,
+ RecordDataEx:%d
'''\
%(
self.CampaignType,
self.BillAwardRecord,
self.TagAwardRecord,
- self.RecordData
+ self.RecordData,
+ self.RecordDataEx
)
return DumpString
@@ -51348,11 +51454,13 @@
EnergyUsed = 0 #(WORD EnergyUsed)// 今日已消耗体力
RefreshCount = 0 #(DWORD RefreshCount)// 今日福地刷新物品次数 - 普通刷新
RefreshCountSuper = 0 #(BYTE RefreshCountSuper)// 今日福地刷新物品次数 - 超级刷新
+ RefreshCountRob = 0 #(WORD RefreshCountRob)// 今日福地刷新周围玩家次数
TreasureCount = 0 #(BYTE TreasureCount)// 聚宝盆类型个数,对应类型 0~n
TreasureState = list() #(vector<BYTE> TreasureState)// 聚宝盆是否已激活列表,[类型0是否已激活, ...]
TreasureAward = list() #(vector<BYTE> TreasureAward)// 聚宝盆奖励是否已领取列表,[类型0是否已领取, ...]
TreasureProgress = list() #(vector<BYTE> TreasureProgress)// 聚宝盆进度值列表,[类型0进度值, ...],满进度100
HelpAwardCount = 0 #(BYTE HelpAwardCount)// 今日已帮助别人奖励次数
+ HousekeeperEndTime = 0 #(DWORD HousekeeperEndTime)// 自动管家到期时间戳,有值同时也代表免费试用已使用
data = None
def __init__(self):
@@ -51368,6 +51476,7 @@
self.EnergyUsed,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.RefreshCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.RefreshCountSuper,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.RefreshCountRob,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.TreasureCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.TreasureCount):
value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
@@ -51379,6 +51488,7 @@
value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
self.TreasureProgress.append(value)
self.HelpAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.HousekeeperEndTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -51390,11 +51500,13 @@
self.EnergyUsed = 0
self.RefreshCount = 0
self.RefreshCountSuper = 0
+ self.RefreshCountRob = 0
self.TreasureCount = 0
self.TreasureState = list()
self.TreasureAward = list()
self.TreasureProgress = list()
self.HelpAwardCount = 0
+ self.HousekeeperEndTime = 0
return
def GetLength(self):
@@ -51404,11 +51516,13 @@
length += 2
length += 4
length += 1
+ length += 2
length += 1
length += 1 * self.TreasureCount
length += 1 * self.TreasureCount
length += 1 * self.TreasureCount
length += 1
+ length += 4
return length
@@ -51419,6 +51533,7 @@
data = CommFunc.WriteWORD(data, self.EnergyUsed)
data = CommFunc.WriteDWORD(data, self.RefreshCount)
data = CommFunc.WriteBYTE(data, self.RefreshCountSuper)
+ data = CommFunc.WriteWORD(data, self.RefreshCountRob)
data = CommFunc.WriteBYTE(data, self.TreasureCount)
for i in range(self.TreasureCount):
data = CommFunc.WriteBYTE(data, self.TreasureState[i])
@@ -51427,6 +51542,7 @@
for i in range(self.TreasureCount):
data = CommFunc.WriteBYTE(data, self.TreasureProgress[i])
data = CommFunc.WriteBYTE(data, self.HelpAwardCount)
+ data = CommFunc.WriteDWORD(data, self.HousekeeperEndTime)
return data
def OutputString(self):
@@ -51436,11 +51552,13 @@
EnergyUsed:%d,
RefreshCount:%d,
RefreshCountSuper:%d,
+ RefreshCountRob:%d,
TreasureCount:%d,
TreasureState:%s,
TreasureAward:%s,
TreasureProgress:%s,
- HelpAwardCount:%d
+ HelpAwardCount:%d,
+ HousekeeperEndTime:%d
'''\
%(
self.Head.OutputString(),
@@ -51448,11 +51566,13 @@
self.EnergyUsed,
self.RefreshCount,
self.RefreshCountSuper,
+ self.RefreshCountRob,
self.TreasureCount,
"...",
"...",
"...",
- self.HelpAwardCount
+ self.HelpAwardCount,
+ self.HousekeeperEndTime
)
return DumpString
--
Gitblit v1.8.0