From 3a8d46acaed6c3cc279599835b013f6ff17a0632 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 14 九月 2018 17:34:54 +0800
Subject: [PATCH] 1942 【1.0.15】【主干】队伍在准备阶段时,需要停止自动匹配
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 150 +++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 129 insertions(+), 21 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 8ced94f..79008bf 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -11558,19 +11558,15 @@
#------------------------------------------------------
#A3 0A 副本鼓舞信息通知 #tagMCFBEncourageInfo
-class tagMCFBEncourageInfo(Structure):
+class tagMCFBEncourageCnt(Structure):
_pack_ = 1
_fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("Cnt1", c_ubyte), # 当前铜钱鼓舞次数
- ("Cnt2", c_ubyte), # 当前仙玉鼓舞次数
+ ("MoneyType", c_ubyte), # 金钱类型
+ ("EncourageCnt", c_ubyte), # 当前鼓舞次数
]
def __init__(self):
self.Clear()
- self.Cmd = 0xA3
- self.SubCmd = 0x0A
return
def ReadData(self, stringData, _pos=0, _len=0):
@@ -11579,36 +11575,92 @@
return _pos + self.GetLength()
def Clear(self):
- self.Cmd = 0xA3
- self.SubCmd = 0x0A
- self.Cnt1 = 0
- self.Cnt2 = 0
+ self.MoneyType = 0
+ self.EncourageCnt = 0
return
def GetLength(self):
- return sizeof(tagMCFBEncourageInfo)
+ return sizeof(tagMCFBEncourageCnt)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
DumpString = '''//A3 0A 副本鼓舞信息通知 //tagMCFBEncourageInfo:
- Cmd:%s,
- SubCmd:%s,
- Cnt1:%d,
- Cnt2:%d
+ MoneyType:%d,
+ EncourageCnt:%d
'''\
%(
- self.Cmd,
- self.SubCmd,
- self.Cnt1,
- self.Cnt2
+ self.MoneyType,
+ self.EncourageCnt
+ )
+ return DumpString
+
+
+class tagMCFBEncourageInfo(Structure):
+ Head = tagHead()
+ Cnt = 0 #(BYTE Cnt)//
+ InfoList = list() #(vector<tagMCFBEncourageCnt> InfoList)// 次数信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA3
+ self.Head.SubCmd = 0x0A
+ 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):
+ temInfoList = tagMCFBEncourageCnt()
+ _pos = temInfoList.ReadData(_lpData, _pos)
+ self.InfoList.append(temInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA3
+ self.Head.SubCmd = 0x0A
+ self.Cnt = 0
+ self.InfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.Cnt):
+ length += self.InfoList[i].GetLength()
+
+ 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.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Cnt:%d,
+ InfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Cnt,
+ "..."
)
return DumpString
m_NAtagMCFBEncourageInfo=tagMCFBEncourageInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Cmd,m_NAtagMCFBEncourageInfo.SubCmd))] = m_NAtagMCFBEncourageInfo
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Head.Cmd,m_NAtagMCFBEncourageInfo.Head.SubCmd))] = m_NAtagMCFBEncourageInfo
#------------------------------------------------------
@@ -13827,6 +13879,62 @@
#------------------------------------------------------
+# A3 21 祈福丹药结果 #tagMCPrayElixirResult
+
+class tagMCPrayElixirResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ItemID", c_int), # 物品ID
+ ("PrayCnt", c_ubyte), # 今日祈福次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0x21
+ 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 = 0x21
+ self.ItemID = 0
+ self.PrayCnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCPrayElixirResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 21 祈福丹药结果 //tagMCPrayElixirResult:
+ Cmd:%s,
+ SubCmd:%s,
+ ItemID:%d,
+ PrayCnt:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ItemID,
+ self.PrayCnt
+ )
+ return DumpString
+
+
+m_NAtagMCPrayElixirResult=tagMCPrayElixirResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPrayElixirResult.Cmd,m_NAtagMCPrayElixirResult.SubCmd))] = m_NAtagMCPrayElixirResult
+
+
+#------------------------------------------------------
# A3 49 资源找回次数 #tagMCRecoverNum
class tagMCRecoverNumInfo(Structure):
--
Gitblit v1.8.0