From 3d214c60456c914be4fde1b3c07e30d6729e6315 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 21 八月 2018 15:02:20 +0800 Subject: [PATCH] fix:【2728】新增任务接口 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 128 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 120 insertions(+), 8 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py index c126dd8..a49e731 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -10662,6 +10662,114 @@ #------------------------------------------------------ +# A3 C1 神兽助战状态刷新 #tagMCDogzHelpbattleState + +class tagMCDogzHelpbattleState(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("DogzID", c_ubyte), # 神兽ID + ("BatteState", c_ubyte), #是否已助战, 0否1是 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0xC1 + 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 = 0xA3 + self.SubCmd = 0xC1 + self.DogzID = 0 + self.BatteState = 0 + return + + def GetLength(self): + return sizeof(tagMCDogzHelpbattleState) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 C1 神兽助战状态刷新 //tagMCDogzHelpbattleState: + Cmd:%s, + SubCmd:%s, + DogzID:%d, + BatteState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.DogzID, + self.BatteState + ) + return DumpString + + +m_NAtagMCDogzHelpbattleState=tagMCDogzHelpbattleState() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDogzHelpbattleState.Cmd,m_NAtagMCDogzHelpbattleState.SubCmd))] = m_NAtagMCDogzHelpbattleState + + +#------------------------------------------------------ +# A3 C0 神兽信息 #tagMCDogzInfo + +class tagMCDogzInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BuyHelpbattleCount", c_ubyte), #额外购买的助战数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0xC0 + 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 = 0xA3 + self.SubCmd = 0xC0 + self.BuyHelpbattleCount = 0 + return + + def GetLength(self): + return sizeof(tagMCDogzInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 C0 神兽信息 //tagMCDogzInfo: + Cmd:%s, + SubCmd:%s, + BuyHelpbattleCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BuyHelpbattleCount + ) + return DumpString + + +m_NAtagMCDogzInfo=tagMCDogzInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDogzInfo.Cmd,m_NAtagMCDogzInfo.SubCmd))] = m_NAtagMCDogzInfo + + +#------------------------------------------------------ # A3 1C 通知装备分解信息 #tagMCEquipDecomposeInfo class tagMCEquipDecomposeInfo(Structure): @@ -12629,6 +12737,7 @@ _pack_ = 1 _fields_ = [ ("PriID", c_int), # 特权ID + ("State", c_ubyte), #激活状态 ("CurValue", c_int), #当前总进度 ("GotValue", c_int), #已领取进度 ("ItemAwardState", c_ubyte), #物品奖励是否已领取 @@ -12645,6 +12754,7 @@ def Clear(self): self.PriID = 0 + self.State = 0 self.CurValue = 0 self.GotValue = 0 self.ItemAwardState = 0 @@ -12659,12 +12769,14 @@ def OutputString(self): DumpString = '''// A3 53 法宝特权数据 //tagMCMWPrivilegeDataInfo: PriID:%d, + State:%d, CurValue:%d, GotValue:%d, ItemAwardState:%d '''\ %( self.PriID, + self.State, self.CurValue, self.GotValue, self.ItemAwardState @@ -18740,6 +18852,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("FirstGoldRewardState", c_ubyte), #首充奖励是否已领奖 + ("FirstGoldTry", c_ubyte), #首充试用状态0-不可试用 1-可试用 2-已试用 ] def __init__(self): @@ -18757,6 +18870,7 @@ self.Cmd = 0xAA self.SubCmd = 0x02 self.FirstGoldRewardState = 0 + self.FirstGoldTry = 0 return def GetLength(self): @@ -18769,12 +18883,14 @@ DumpString = '''// AA 02 首充信息 //tagMCFirstGoldInfo: Cmd:%s, SubCmd:%s, - FirstGoldRewardState:%d + FirstGoldRewardState:%d, + FirstGoldTry:%d '''\ %( self.Cmd, self.SubCmd, - self.FirstGoldRewardState + self.FirstGoldRewardState, + self.FirstGoldTry ) return DumpString @@ -18792,7 +18908,6 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("FirstGoldRemainTime", c_int), #首充提示剩余时间 - ("FirstGoldTry", c_ubyte), #首充试用状态0-不可试用 1-可试用 2-已试用 ] def __init__(self): @@ -18810,7 +18925,6 @@ self.Cmd = 0xAA self.SubCmd = 0x08 self.FirstGoldRemainTime = 0 - self.FirstGoldTry = 0 return def GetLength(self): @@ -18823,14 +18937,12 @@ DumpString = '''// AA 08 首充提示剩余时间 //tagMCFirstGoldTime: Cmd:%s, SubCmd:%s, - FirstGoldRemainTime:%d, - FirstGoldTry:%d + FirstGoldRemainTime:%d '''\ %( self.Cmd, self.SubCmd, - self.FirstGoldRemainTime, - self.FirstGoldTry + self.FirstGoldRemainTime ) return DumpString -- Gitblit v1.8.0