From 03f14ad4e3576ba4b9ce186e91d9763be7f13b08 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期五, 23 十一月 2018 23:41:49 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 521 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 509 insertions(+), 12 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index bc2648f..5360ea9 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -5197,6 +5197,7 @@ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d Multiple = 0 #(BYTE Multiple)// 倍数 LimitLV = 0 #(WORD LimitLV)// 限制等级 + LimitPoint = 0 #(DWORD LimitPoint)// 限制获得修行点 data = None def __init__(self): @@ -5212,6 +5213,7 @@ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.Multiple,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LimitPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -5223,6 +5225,7 @@ self.EndtDate = "" self.Multiple = 0 self.LimitLV = 0 + self.LimitPoint = 0 return def GetLength(self): @@ -5232,6 +5235,7 @@ length += 10 length += 1 length += 2 + length += 4 return length @@ -5242,6 +5246,7 @@ data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteBYTE(data, self.Multiple) data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteDWORD(data, self.LimitPoint) return data def OutputString(self): @@ -5250,14 +5255,16 @@ StartDate:%s, EndtDate:%s, Multiple:%d, - LimitLV:%d + LimitLV:%d, + LimitPoint:%d '''\ %( self.Head.OutputString(), self.StartDate, self.EndtDate, self.Multiple, - self.LimitLV + self.LimitLV, + self.LimitPoint ) return DumpString @@ -10506,8 +10513,8 @@ _pack_ = 1 _fields_ = [ ("BossType", c_ubyte), #编号类型0-世界boss 1-boss之家 - ("KillCnt", c_ubyte), #击杀次数 - ("ItemAddCnt", c_ubyte), #物品增加次数 + ("KillCnt", c_int), #击杀次数 + ("ItemAddCnt", c_int), #物品增加次数 ] def __init__(self): @@ -11089,6 +11096,7 @@ ("RealmPoint", c_int), # 可领取修行点 ("StageIndex", c_ubyte), # 当前阶段索引 ("AwardRecord", c_int), # 领奖记录 按位存储 + ("ExtraPoint", c_int), # 多倍活动获得的额外修行点 ] def __init__(self): @@ -11109,6 +11117,7 @@ self.RealmPoint = 0 self.StageIndex = 0 self.AwardRecord = 0 + self.ExtraPoint = 0 return def GetLength(self): @@ -11124,7 +11133,8 @@ CurValue:%d, RealmPoint:%d, StageIndex:%d, - AwardRecord:%d + AwardRecord:%d, + ExtraPoint:%d '''\ %( self.Cmd, @@ -11132,7 +11142,8 @@ self.CurValue, self.RealmPoint, self.StageIndex, - self.AwardRecord + self.AwardRecord, + self.ExtraPoint ) return DumpString @@ -12705,6 +12716,7 @@ ("LV", c_ubyte), ("Exp", c_int), ("State", c_ubyte), #是否点击法宝认主 + ("FBPassLV", c_ubyte), #副本关卡 ] def __init__(self): @@ -12721,6 +12733,7 @@ self.LV = 0 self.Exp = 0 self.State = 0 + self.FBPassLV = 0 return def GetLength(self): @@ -12734,13 +12747,15 @@ MWID:%d, LV:%d, Exp:%d, - State:%d + State:%d, + FBPassLV:%d '''\ %( self.MWID, self.LV, self.Exp, - self.State + self.State, + self.FBPassLV ) return DumpString @@ -18648,6 +18663,114 @@ #------------------------------------------------------ +# A8 06 通知神秘限购商品时间 #tagMCMysticalShopTimeInfo + +class tagMCMysticalShopTime(Structure): + _pack_ = 1 + _fields_ = [ + ("GoodsID", c_int), # 商品ID + ("StartTime", c_int), # 开卖时间 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.GoodsID = 0 + self.StartTime = 0 + return + + def GetLength(self): + return sizeof(tagMCMysticalShopTime) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A8 06 通知神秘限购商品时间 //tagMCMysticalShopTimeInfo: + GoodsID:%d, + StartTime:%d + '''\ + %( + self.GoodsID, + self.StartTime + ) + return DumpString + + +class tagMCMysticalShopTimeInfo(Structure): + Head = tagHead() + Count = 0 #(WORD Count)// 商品数 + ShopTimeList = list() #(vector<tagMCMysticalShopTime> ShopTimeList)// 商品开卖信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x06 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temShopTimeList = tagMCMysticalShopTime() + _pos = temShopTimeList.ReadData(_lpData, _pos) + self.ShopTimeList.append(temShopTimeList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x06 + self.Count = 0 + self.ShopTimeList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.Count): + length += self.ShopTimeList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ShopTimeList[i].GetLength(), self.ShopTimeList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + ShopTimeList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCMysticalShopTimeInfo=tagMCMysticalShopTimeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMysticalShopTimeInfo.Head.Cmd,m_NAtagMCMysticalShopTimeInfo.Head.SubCmd))] = m_NAtagMCMysticalShopTimeInfo + + +#------------------------------------------------------ # A8 10 通知获得物品 #tagMCNotifyUseItemGetItem class tagMCNotifyUseItemGetItem(Structure): @@ -19677,6 +19800,7 @@ ("ItemCnt", c_ushort), # 物品数量 ("IsBind", c_ubyte), # 是否绑定 ("Mark", c_int), # 排序标识 + ("Rare", c_ubyte), # 珍稀值 ] def __init__(self): @@ -19693,6 +19817,7 @@ self.ItemCnt = 0 self.IsBind = 0 self.Mark = 0 + self.Rare = 0 return def GetLength(self): @@ -19706,13 +19831,15 @@ ItemID:%d, ItemCnt:%d, IsBind:%d, - Mark:%d + Mark:%d, + Rare:%d '''\ %( self.ItemID, self.ItemCnt, self.IsBind, - self.Mark + self.Mark, + self.Rare ) return DumpString @@ -24654,6 +24781,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("IsDouble", c_ubyte), #是否双倍 + ("OldDouble", c_ubyte), #是否曾经允许双倍 ] def __init__(self): @@ -24671,6 +24799,7 @@ self.Cmd = 0xB2 self.SubCmd = 0x01 self.IsDouble = 0 + self.OldDouble = 0 return def GetLength(self): @@ -24683,12 +24812,14 @@ DumpString = '''// B2 01 通知封魔坛双倍击杀状态 //tagMCFMTDoubleState: Cmd:%s, SubCmd:%s, - IsDouble:%d + IsDouble:%d, + OldDouble:%d '''\ %( self.Cmd, self.SubCmd, - self.IsDouble + self.IsDouble, + self.OldDouble ) return DumpString @@ -24698,6 +24829,372 @@ #------------------------------------------------------ +# B2 06 助战召唤结果 #tagMCHelpBattleCallResult + +class tagMCHelpBattleCallResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ObjID", c_int), # 助战实例ID + ("PlayerID", c_int), # 助战镜像ID,大于1小于100代表机器人,如果是机器人前端按顺序自己记录对应实例ID代表已召唤 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x06 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB2 + self.SubCmd = 0x06 + self.ObjID = 0 + self.PlayerID = 0 + return + + def GetLength(self): + return sizeof(tagMCHelpBattleCallResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 06 助战召唤结果 //tagMCHelpBattleCallResult: + Cmd:%s, + SubCmd:%s, + ObjID:%d, + PlayerID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ObjID, + self.PlayerID + ) + return DumpString + + +m_NAtagMCHelpBattleCallResult=tagMCHelpBattleCallResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCallResult.Cmd,m_NAtagMCHelpBattleCallResult.SubCmd))] = m_NAtagMCHelpBattleCallResult + + +#------------------------------------------------------ +# B2 05 助战登记结果 #tagMCHelpBattleCheckInResult + +class tagMCHelpBattleCheckInResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("IsOK", c_ubyte), #是否成功 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x05 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB2 + self.SubCmd = 0x05 + self.IsOK = 0 + return + + def GetLength(self): + return sizeof(tagMCHelpBattleCheckInResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 05 助战登记结果 //tagMCHelpBattleCheckInResult: + Cmd:%s, + SubCmd:%s, + IsOK:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.IsOK + ) + return DumpString + + +m_NAtagMCHelpBattleCheckInResult=tagMCHelpBattleCheckInResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCheckInResult.Cmd,m_NAtagMCHelpBattleCheckInResult.SubCmd))] = m_NAtagMCHelpBattleCheckInResult + + +#------------------------------------------------------ +# B2 07 助战机器人列表 #tagMCHelpBattleList + +class tagMCHelpBattlePlayer(Structure): + ObjID = 0 #(DWORD ObjID)// 实例ID, 0代表未召唤 + PlayerID = 0 #(DWORD PlayerID)// 助战镜像ID, 大于1小于100代表机器人,如果是机器人,没有以下信息,相关信息自己读配置 + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)// 玩家名,size = NameLen + LV = 0 #(WORD LV)// 玩家等级 + Job = 0 #(BYTE Job)// 玩家职业, 如果是机器人,则职业有值,服务端控制 + RealmLV = 0 #(WORD RealmLV)// 玩家境界等级 + FightPower = 0 #(DWORD FightPower)// 玩家战力 + IsNeedGold = 0 #(BYTE IsNeedGold)// 是否需要仙玉召唤 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.IsNeedGold,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.ObjID = 0 + self.PlayerID = 0 + self.NameLen = 0 + self.Name = "" + self.LV = 0 + self.Job = 0 + self.RealmLV = 0 + self.FightPower = 0 + self.IsNeedGold = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 1 + length += len(self.Name) + length += 2 + length += 1 + length += 2 + length += 4 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.ObjID) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.RealmLV) + data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteBYTE(data, self.IsNeedGold) + return data + + def OutputString(self): + DumpString = ''' + ObjID:%d, + PlayerID:%d, + NameLen:%d, + Name:%s, + LV:%d, + Job:%d, + RealmLV:%d, + FightPower:%d, + IsNeedGold:%d + '''\ + %( + self.ObjID, + self.PlayerID, + self.NameLen, + self.Name, + self.LV, + self.Job, + self.RealmLV, + self.FightPower, + self.IsNeedGold + ) + return DumpString + + +class tagMCHelpBattleList(Structure): + Head = tagHead() + RefreshCount = 0 #(BYTE RefreshCount)// 已刷新次数 + HelpCount = 0 #(BYTE HelpCount)// 助战个数 + HelpPlayerList = list() #(vector<tagMCHelpBattlePlayer> HelpPlayerList)// 助战镜像信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x07 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.HelpCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.HelpCount): + temHelpPlayerList = tagMCHelpBattlePlayer() + _pos = temHelpPlayerList.ReadData(_lpData, _pos) + self.HelpPlayerList.append(temHelpPlayerList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x07 + self.RefreshCount = 0 + self.HelpCount = 0 + self.HelpPlayerList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.HelpCount): + length += self.HelpPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RefreshCount) + data = CommFunc.WriteBYTE(data, self.HelpCount) + for i in range(self.HelpCount): + data = CommFunc.WriteString(data, self.HelpPlayerList[i].GetLength(), self.HelpPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RefreshCount:%d, + HelpCount:%d, + HelpPlayerList:%s + '''\ + %( + self.Head.OutputString(), + self.RefreshCount, + self.HelpCount, + "..." + ) + return DumpString + + +m_NAtagMCHelpBattleList=tagMCHelpBattleList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleList.Head.Cmd,m_NAtagMCHelpBattleList.Head.SubCmd))] = m_NAtagMCHelpBattleList + + +#------------------------------------------------------ +# B2 04 冰晶矿脉信息通知 #tagMCIceLodeInfo + +class tagMCIceLodeInfo(Structure): + Head = tagHead() + Cnt = 0 #(BYTE Cnt)// 今日玩法数量 + LineList = list() #(vector<BYTE> LineList)// 玩法列表 + AwardRecord = 0 #(DWORD AwardRecord)// 领奖记录 + HasSweep = 0 #(BYTE HasSweep)// 是否已扫荡 + DayLV = 0 #(WORD DayLV)// 今日等级 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x04 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Cnt): + value,_pos=CommFunc.ReadBYTE(_lpData,_pos) + self.LineList.append(value) + self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.HasSweep,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.DayLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x04 + self.Cnt = 0 + self.LineList = list() + self.AwardRecord = 0 + self.HasSweep = 0 + self.DayLV = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 * self.Cnt + length += 4 + length += 1 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Cnt) + for i in range(self.Cnt): + data = CommFunc.WriteBYTE(data, self.LineList[i]) + data = CommFunc.WriteDWORD(data, self.AwardRecord) + data = CommFunc.WriteBYTE(data, self.HasSweep) + data = CommFunc.WriteWORD(data, self.DayLV) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Cnt:%d, + LineList:%s, + AwardRecord:%d, + HasSweep:%d, + DayLV:%d + '''\ + %( + self.Head.OutputString(), + self.Cnt, + "...", + self.AwardRecord, + self.HasSweep, + self.DayLV + ) + return DumpString + + +m_NAtagMCIceLodeInfo=tagMCIceLodeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCIceLodeInfo.Head.Cmd,m_NAtagMCIceLodeInfo.Head.SubCmd))] = m_NAtagMCIceLodeInfo + + +#------------------------------------------------------ # B2 03 公共副本扫荡信息 #tagMCPubFBSweepData class tagMCPubFBSweep(Structure): -- Gitblit v1.8.0