From 2520d0018ef346caf176f748dc1afd9360b6376c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 十一月 2021 15:22:38 +0800
Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(优化情缘系统 主干冲突)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py      |    4 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py     |    7 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  668 ++++++++++++++++++++--------
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                          |    7 
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py                      |  668 ++++++++++++++++++++--------
 5 files changed, 970 insertions(+), 384 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 9956b8f..2123d87 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -7467,37 +7467,109 @@
 
 
 #------------------------------------------------------
-# B3 28 收到离婚信息 #tagGCMarryBreakInfo
+# B3 19 魅力贡献榜 #tagGCCharmOfferBillboardDataList
 
-class  tagGCMarryBreakInfo(Structure):
-    Head = tagHead()
-    PlayerID = 0    #(DWORD PlayerID)
+class  tagGCCharmOfferBillboardData(Structure):
+    OrderIndex = 0    #(DWORD OrderIndex)//名次索引,0代表第一名
+    PlayerID = 0    #(DWORD PlayerID)// 玩家ID - 贡献者
     NameLen = 0    #(BYTE NameLen)
     PlayerName = ""    #(String PlayerName)
+    CharmValue = 0    #(DWORD CharmValue)//贡献魅力值
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.OrderIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.CharmValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.OrderIndex = 0
+        self.PlayerID = 0
+        self.NameLen = 0
+        self.PlayerName = ""
+        self.CharmValue = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 4
+        length += 4
+        length += 1
+        length += len(self.PlayerName)
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteDWORD(data, self.OrderIndex)
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
+        data = CommFunc.WriteDWORD(data, self.CharmValue)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                OrderIndex:%d,
+                                PlayerID:%d,
+                                NameLen:%d,
+                                PlayerName:%s,
+                                CharmValue:%d
+                                '''\
+                                %(
+                                self.OrderIndex,
+                                self.PlayerID,
+                                self.NameLen,
+                                self.PlayerName,
+                                self.CharmValue
+                                )
+        return DumpString
+
+
+class  tagGCCharmOfferBillboardDataList(Structure):
+    Head = tagHead()
+    PlayerID = 0    #(DWORD PlayerID)// 魅力玩家ID
+    QueryType = 0    #(BYTE QueryType)// 查看类型: 1-总榜,2-周榜,3-日榜
+    DataCount = 0    #(BYTE DataCount)
+    OfferBillboardDataList = list()    #(vector<tagGCCharmOfferBillboardData> OfferBillboardDataList)
     data = None
 
     def __init__(self):
         self.Clear()
         self.Head.Cmd = 0xB3
-        self.Head.SubCmd = 0x28
+        self.Head.SubCmd = 0x19
         return
 
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
-        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.QueryType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.DataCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.DataCount):
+            temOfferBillboardDataList = tagGCCharmOfferBillboardData()
+            _pos = temOfferBillboardDataList.ReadData(_lpData, _pos)
+            self.OfferBillboardDataList.append(temOfferBillboardDataList)
         return _pos
 
     def Clear(self):
         self.Head = tagHead()
         self.Head.Clear()
         self.Head.Cmd = 0xB3
-        self.Head.SubCmd = 0x28
+        self.Head.SubCmd = 0x19
         self.PlayerID = 0
-        self.NameLen = 0
-        self.PlayerName = ""
+        self.QueryType = 0
+        self.DataCount = 0
+        self.OfferBillboardDataList = list()
         return
 
     def GetLength(self):
@@ -7505,7 +7577,9 @@
         length += self.Head.GetLength()
         length += 4
         length += 1
-        length += len(self.PlayerName)
+        length += 1
+        for i in range(self.DataCount):
+            length += self.OfferBillboardDataList[i].GetLength()
 
         return length
 
@@ -7513,28 +7587,145 @@
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
         data = CommFunc.WriteDWORD(data, self.PlayerID)
-        data = CommFunc.WriteBYTE(data, self.NameLen)
-        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
+        data = CommFunc.WriteBYTE(data, self.QueryType)
+        data = CommFunc.WriteBYTE(data, self.DataCount)
+        for i in range(self.DataCount):
+            data = CommFunc.WriteString(data, self.OfferBillboardDataList[i].GetLength(), self.OfferBillboardDataList[i].GetBuffer())
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
                                 PlayerID:%d,
-                                NameLen:%d,
-                                PlayerName:%s
+                                QueryType:%d,
+                                DataCount:%d,
+                                OfferBillboardDataList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
                                 self.PlayerID,
-                                self.NameLen,
-                                self.PlayerName
+                                self.QueryType,
+                                self.DataCount,
+                                "..."
                                 )
         return DumpString
 
 
-m_NAtagGCMarryBreakInfo=tagGCMarryBreakInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryBreakInfo.Head.Cmd,m_NAtagGCMarryBreakInfo.Head.SubCmd))] = m_NAtagGCMarryBreakInfo
+m_NAtagGCCharmOfferBillboardDataList=tagGCCharmOfferBillboardDataList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCharmOfferBillboardDataList.Head.Cmd,m_NAtagGCCharmOfferBillboardDataList.Head.SubCmd))] = m_NAtagGCCharmOfferBillboardDataList
+
+
+#------------------------------------------------------
+# B3 26 伴侣信息 #tagGCCoupleInfo
+
+class  tagGCCoupleInfo(Structure):
+    Head = tagHead()
+    CoupleID = 0    #(DWORD CoupleID)// 伴侣玩家ID,一定是好友,社交信息从好友系统中获取
+    NameLen = 0    #(BYTE NameLen)
+    CoupleName = ""    #(String CoupleName)
+    NewMarryTime = 0    #(DWORD NewMarryTime)// 新婚时间戳, 秒,计算结婚天数按该时间计算
+    MarryTime = 0    #(DWORD MarryTime)// 最近一次提亲成功时间戳, 秒,计算可离婚时间按该时间计算
+    BridePriceState = 0    #(DWORD BridePriceState)// 聘礼状态,按位存储已购买次数,如205代表ID1买了5次,ID2买了0次,ID3买了2次,最高9次
+    BreakRequestID = 0    #(DWORD BreakRequestID)// 当前请求中的和离时间戳 - 请求方ID,0代表没人发起请求
+    BreakRequestTime = 0    #(DWORD BreakRequestTime)// 当前请求中的和离时间戳, 秒,用于计算和离回应有效期
+    PlayerBreakRequestTime = 0    #(DWORD PlayerBreakRequestTime)// 玩家最近一次和离请求时间戳, 秒,用于计算自身的请求和离CD
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x26
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.CoupleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.CoupleName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.NewMarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.BridePriceState,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.BreakRequestID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.BreakRequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.PlayerBreakRequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x26
+        self.CoupleID = 0
+        self.NameLen = 0
+        self.CoupleName = ""
+        self.NewMarryTime = 0
+        self.MarryTime = 0
+        self.BridePriceState = 0
+        self.BreakRequestID = 0
+        self.BreakRequestTime = 0
+        self.PlayerBreakRequestTime = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 4
+        length += 1
+        length += len(self.CoupleName)
+        length += 4
+        length += 4
+        length += 4
+        length += 4
+        length += 4
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.CoupleID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.CoupleName)
+        data = CommFunc.WriteDWORD(data, self.NewMarryTime)
+        data = CommFunc.WriteDWORD(data, self.MarryTime)
+        data = CommFunc.WriteDWORD(data, self.BridePriceState)
+        data = CommFunc.WriteDWORD(data, self.BreakRequestID)
+        data = CommFunc.WriteDWORD(data, self.BreakRequestTime)
+        data = CommFunc.WriteDWORD(data, self.PlayerBreakRequestTime)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                CoupleID:%d,
+                                NameLen:%d,
+                                CoupleName:%s,
+                                NewMarryTime:%d,
+                                MarryTime:%d,
+                                BridePriceState:%d,
+                                BreakRequestID:%d,
+                                BreakRequestTime:%d,
+                                PlayerBreakRequestTime:%d
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.CoupleID,
+                                self.NameLen,
+                                self.CoupleName,
+                                self.NewMarryTime,
+                                self.MarryTime,
+                                self.BridePriceState,
+                                self.BreakRequestID,
+                                self.BreakRequestTime,
+                                self.PlayerBreakRequestTime
+                                )
+        return DumpString
+
+
+m_NAtagGCCoupleInfo=tagGCCoupleInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCoupleInfo.Head.Cmd,m_NAtagGCCoupleInfo.Head.SubCmd))] = m_NAtagGCCoupleInfo
 
 
 #------------------------------------------------------
@@ -7763,14 +7954,145 @@
 
 
 #------------------------------------------------------
-# B3 20 送花成功通知 #tagGCSendFlowersOK
+# B3 25 玩家魅力值信息 #tagGCPlayerCharmValueInfo
 
-class  tagGCSendFlowersOK(Structure):
-    Head = tagHead()
-    NameLen = 0    #(BYTE NameLen)// 赠送方玩家名
-    Name = ""    #(String Name)//size = SrcNameLen
+class  tagGCPlayerCharmValueInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("CharmValueTotal", c_int),    #当前魅力值 - 总
+                  ("CharmValueWeek", c_int),    #当前魅力值 - 周
+                  ("CharmValueDay", c_int),    #当前魅力值 - 日
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB3
+        self.SubCmd = 0x25
+        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 = 0xB3
+        self.SubCmd = 0x25
+        self.CharmValueTotal = 0
+        self.CharmValueWeek = 0
+        self.CharmValueDay = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagGCPlayerCharmValueInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B3 25 玩家魅力值信息 //tagGCPlayerCharmValueInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                CharmValueTotal:%d,
+                                CharmValueWeek:%d,
+                                CharmValueDay:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.CharmValueTotal,
+                                self.CharmValueWeek,
+                                self.CharmValueDay
+                                )
+        return DumpString
+
+
+m_NAtagGCPlayerCharmValueInfo=tagGCPlayerCharmValueInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerCharmValueInfo.Cmd,m_NAtagGCPlayerCharmValueInfo.SubCmd))] = m_NAtagGCPlayerCharmValueInfo
+
+
+#------------------------------------------------------
+# B3 20 送礼物成功通知 #tagGCSendGiftsOKList
+
+class  tagGCSendGiftsOK(Structure):
+    NameLen = 0    #(BYTE NameLen)
+    Name = ""    #(String Name)// 赠送方玩家名
     PlayerID = 0    #(DWORD PlayerID)// 赠送方玩家ID
-    FlowerCount = 0    #(DWORD FlowerCount)// 赠送花数量
+    GiftNum = 0    #(WORD GiftNum)// 赠送礼物编号
+    GiftCount = 0    #(DWORD GiftCount)// 赠送礼物数量
+    SendTime = 0    #(DWORD SendTime)// 赠送时间戳
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.GiftNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.GiftCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.SendTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.NameLen = 0
+        self.Name = ""
+        self.PlayerID = 0
+        self.GiftNum = 0
+        self.GiftCount = 0
+        self.SendTime = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += len(self.Name)
+        length += 4
+        length += 2
+        length += 4
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.Name)
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteWORD(data, self.GiftNum)
+        data = CommFunc.WriteDWORD(data, self.GiftCount)
+        data = CommFunc.WriteDWORD(data, self.SendTime)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                NameLen:%d,
+                                Name:%s,
+                                PlayerID:%d,
+                                GiftNum:%d,
+                                GiftCount:%d,
+                                SendTime:%d
+                                '''\
+                                %(
+                                self.NameLen,
+                                self.Name,
+                                self.PlayerID,
+                                self.GiftNum,
+                                self.GiftCount,
+                                self.SendTime
+                                )
+        return DumpString
+
+
+class  tagGCSendGiftsOKList(Structure):
+    Head = tagHead()
+    Count = 0    #(WORD Count)
+    SendGiftsOKList = list()    #(vector<tagGCSendGiftsOK> SendGiftsOKList)
     data = None
 
     def __init__(self):
@@ -7782,10 +8104,11 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
-        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
-        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
-        self.FlowerCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        for i in range(self.Count):
+            temSendGiftsOKList = tagGCSendGiftsOK()
+            _pos = temSendGiftsOKList.ReadData(_lpData, _pos)
+            self.SendGiftsOKList.append(temSendGiftsOKList)
         return _pos
 
     def Clear(self):
@@ -7793,51 +8116,151 @@
         self.Head.Clear()
         self.Head.Cmd = 0xB3
         self.Head.SubCmd = 0x20
-        self.NameLen = 0
-        self.Name = ""
-        self.PlayerID = 0
-        self.FlowerCount = 0
+        self.Count = 0
+        self.SendGiftsOKList = list()
         return
 
     def GetLength(self):
         length = 0
         length += self.Head.GetLength()
-        length += 1
-        length += len(self.Name)
-        length += 4
-        length += 4
+        length += 2
+        for i in range(self.Count):
+            length += self.SendGiftsOKList[i].GetLength()
 
         return length
 
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.NameLen)
-        data = CommFunc.WriteString(data, self.NameLen, self.Name)
-        data = CommFunc.WriteDWORD(data, self.PlayerID)
-        data = CommFunc.WriteDWORD(data, self.FlowerCount)
+        data = CommFunc.WriteWORD(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteString(data, self.SendGiftsOKList[i].GetLength(), self.SendGiftsOKList[i].GetBuffer())
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
-                                NameLen:%d,
-                                Name:%s,
-                                PlayerID:%d,
-                                FlowerCount:%d
+                                Count:%d,
+                                SendGiftsOKList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
-                                self.NameLen,
-                                self.Name,
-                                self.PlayerID,
-                                self.FlowerCount
+                                self.Count,
+                                "..."
                                 )
         return DumpString
 
 
-m_NAtagGCSendFlowersOK=tagGCSendFlowersOK()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendFlowersOK.Head.Cmd,m_NAtagGCSendFlowersOK.Head.SubCmd))] = m_NAtagGCSendFlowersOK
+m_NAtagGCSendGiftsOKList=tagGCSendGiftsOKList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendGiftsOKList.Head.Cmd,m_NAtagGCSendGiftsOKList.Head.SubCmd))] = m_NAtagGCSendGiftsOKList
+
+
+#------------------------------------------------------
+# B3 14 社交人群伴侣信息 #tagGCSocialCouples
+
+class  tagGCSocialCouple(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("PlayerID", c_int),    
+                  ("CoupleID", c_int),    #伴侣ID
+                  ]
+
+    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.PlayerID = 0
+        self.CoupleID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagGCSocialCouple)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B3 14 社交人群伴侣信息 //tagGCSocialCouples:
+                                PlayerID:%d,
+                                CoupleID:%d
+                                '''\
+                                %(
+                                self.PlayerID,
+                                self.CoupleID
+                                )
+        return DumpString
+
+
+class  tagGCSocialCouples(Structure):
+    Head = tagHead()
+    Count = 0    #(WORD Count)
+    Player = list()    #(vector<tagGCSocialCouple> Player)//size = Count
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x14
+        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):
+            temPlayer = tagGCSocialCouple()
+            _pos = temPlayer.ReadData(_lpData, _pos)
+            self.Player.append(temPlayer)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x14
+        self.Count = 0
+        self.Player = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 2
+        for i in range(self.Count):
+            length += self.Player[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.Player[i].GetLength(), self.Player[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                Player:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCSocialCouples=tagGCSocialCouples()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSocialCouples.Head.Cmd,m_NAtagGCSocialCouples.Head.SubCmd))] = m_NAtagGCSocialCouples
 
 
 #------------------------------------------------------
@@ -8072,7 +8495,6 @@
     LV = 0    #(WORD LV)//等级
     RealmLV = 0    #(WORD RealmLV)//境界
     OnlineType = 0    #(BYTE OnlineType)//0不在线 1在线 2脱机在线
-    CoupleID = 0    #(DWORD CoupleID)//伴侣ID
     data = None
 
     def __init__(self):
@@ -8087,7 +8509,6 @@
         self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.CoupleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -8097,7 +8518,6 @@
         self.LV = 0
         self.RealmLV = 0
         self.OnlineType = 0
-        self.CoupleID = 0
         return
 
     def GetLength(self):
@@ -8108,7 +8528,6 @@
         length += 2
         length += 2
         length += 1
-        length += 4
 
         return length
 
@@ -8120,7 +8539,6 @@
         data = CommFunc.WriteWORD(data, self.LV)
         data = CommFunc.WriteWORD(data, self.RealmLV)
         data = CommFunc.WriteBYTE(data, self.OnlineType)
-        data = CommFunc.WriteDWORD(data, self.CoupleID)
         return data
 
     def OutputString(self):
@@ -8130,8 +8548,7 @@
                                 Job:%d,
                                 LV:%d,
                                 RealmLV:%d,
-                                OnlineType:%d,
-                                CoupleID:%d
+                                OnlineType:%d
                                 '''\
                                 %(
                                 self.PlayerID,
@@ -8139,8 +8556,7 @@
                                 self.Job,
                                 self.LV,
                                 self.RealmLV,
-                                self.OnlineType,
-                                self.CoupleID
+                                self.OnlineType
                                 )
         return DumpString
 
@@ -8218,8 +8634,7 @@
     _pack_ = 1
     _fields_ = [
                   ("PlayerID", c_int),    
-                  ("SortValue", c_int),    
-                  ("Intimacy", c_int),    #亲密度 - 好友组才有值
+                  ("SortValue", c_int),    # 亲密组时为亲密度
                   ]
 
     def __init__(self):
@@ -8234,7 +8649,6 @@
     def Clear(self):
         self.PlayerID = 0
         self.SortValue = 0
-        self.Intimacy = 0
         return
 
     def GetLength(self):
@@ -8246,20 +8660,18 @@
     def OutputString(self):
         DumpString = '''//B3 08 通知玩家分组信息 //tagGCGroupPlayers:
                                 PlayerID:%d,
-                                SortValue:%d,
-                                Intimacy:%d
+                                SortValue:%d
                                 '''\
                                 %(
                                 self.PlayerID,
-                                self.SortValue,
-                                self.Intimacy
+                                self.SortValue
                                 )
         return DumpString
 
 
 class  tagGCGroupPlayers(Structure):
     Head = tagHead()
-    GroupType = 0    #(BYTE GroupType)// 分组 1 最近联系人 2 好友 3 仇人 4 黑名单
+    GroupType = 0    #(BYTE GroupType)// 分组 1 最近联系人 2 好友 3 仇人 4 黑名单 5亲密组
     Count = 0    #(WORD Count)
     Players = list()    #(vector<tagGCGroupPlayer> Players)//size = Count
     data = None
@@ -12854,126 +13266,6 @@
 
 m_NAtagGCCrossRealmPKStartMatch=tagGCCrossRealmPKStartMatch()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKStartMatch.Cmd,m_NAtagGCCrossRealmPKStartMatch.SubCmd))] = m_NAtagGCCrossRealmPKStartMatch
-
-
-#------------------------------------------------------
-# B3 25 魅力值信息 #tagMCCharmInfo
-
-class  tagMCCharmInfo(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("CharmTotal", c_int),    # 魅力值 - 总
-                  ("CharmToday", c_int),    # 魅力值 - 今日
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xB3
-        self.SubCmd = 0x25
-        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 = 0xB3
-        self.SubCmd = 0x25
-        self.CharmTotal = 0
-        self.CharmToday = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCCharmInfo)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// B3 25 魅力值信息 //tagMCCharmInfo:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                CharmTotal:%d,
-                                CharmToday:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.CharmTotal,
-                                self.CharmToday
-                                )
-        return DumpString
-
-
-m_NAtagMCCharmInfo=tagMCCharmInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCharmInfo.Cmd,m_NAtagMCCharmInfo.SubCmd))] = m_NAtagMCCharmInfo
-
-
-#------------------------------------------------------
-# B3 26 伴侣信息 #tagMCCoupleInfo
-
-class  tagMCCoupleInfo(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("CoupleID", c_int),    # 伴侣玩家ID,一定是好友,社交信息从好友系统中获取
-                  ("NewMarryTime", c_int),    # 新婚时间戳, 秒,计算结婚天数按该时间计算
-                  ("MarryTime", c_int),    # 最近一次提亲成功时间戳, 秒,计算可离婚时间按该时间计算
-                  ("BridePriceState", c_int),    # 聘礼状态,按二进制位存储是否已购买
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xB3
-        self.SubCmd = 0x26
-        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 = 0xB3
-        self.SubCmd = 0x26
-        self.CoupleID = 0
-        self.NewMarryTime = 0
-        self.MarryTime = 0
-        self.BridePriceState = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCCoupleInfo)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// B3 26 伴侣信息 //tagMCCoupleInfo:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                CoupleID:%d,
-                                NewMarryTime:%d,
-                                MarryTime:%d,
-                                BridePriceState:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.CoupleID,
-                                self.NewMarryTime,
-                                self.MarryTime,
-                                self.BridePriceState
-                                )
-        return DumpString
-
-
-m_NAtagMCCoupleInfo=tagMCCoupleInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCoupleInfo.Cmd,m_NAtagMCCoupleInfo.SubCmd))] = m_NAtagMCCoupleInfo
 
 
 #------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 49db479..54357ae 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -98,7 +98,6 @@
 import PlayerFamilyParty
 import GameWorldFamilyWar
 import GameWorldArena
-import PlayerSocial
 import AuctionHouse
 import PlayerXMZZ
 import PlayerLove
@@ -106,6 +105,7 @@
 import PyGameData
 import CrossBoss
 import ChPlayer
+import PyDataManager
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
@@ -1450,7 +1450,7 @@
     #缥缈仙域
     PlayerFairyDomain.OnMapServerInitOK()
     #情侣信息
-    PlayerSocial.SendMapServerCoupleInfo()
+    PyDataManager.GetDBPyCoupleManager().SendMapServerCoupleInfo()
     # 记录服务器是否正常开启完毕
     getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl") + "?Type=MapInit&MapCount=%s"%GameWorld.GetGameWorld().GetGameMapManager().GetCount()
     GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 2ba5892..db7e583 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -729,11 +729,12 @@
     Def_BT_SkyTower,                          #天星塔榜
     Def_BT_Arena,                             #竞技场榜
     Def_BT_Environment,                       #环保榜 (垃圾分类活动)
-    Def_BT_Charm, #魅力总榜 30
+    Def_BT_CharmTotal, #魅力总榜 30
+    Def_BT_CharmWeek, #魅力周榜
     Def_BT_CharmDay, #魅力日榜
     
     Def_BT_Max, #排行榜最大类型
-) = range(0, 31 + 2) 
+) = range(0, 32 + 2) 
 
 ''' 跨服排行榜类型, 从 150 开始
 与本服榜单存储的是不一样的数据库表格,理论上类型可以和本服榜单类型重复,为了做下区分防误导,跨服榜单从 150 开始
@@ -754,7 +755,7 @@
 #排行榜Value1存储境界信息的榜单列表
 BTValue1_OfficialRankList = [Def_BT_FightPower, Def_BT_FightPower_Warrior, Def_BT_FightPower_Wizard, Def_BT_FightPower_Assassin, 
                              Def_BT_LV, Def_BT_FightPower_Horse, Def_BT_FightPower_Pet, Def_BT_TrialTower, Def_BT_OffLineEfficient,
-                             Def_BT_SkyTower,
+                             Def_BT_SkyTower, Def_BT_CharmTotal, Def_BT_CharmWeek, Def_BT_CharmDay
                              ]
 
 ##---比率---
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 9956b8f..2123d87 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -7467,37 +7467,109 @@
 
 
 #------------------------------------------------------
-# B3 28 收到离婚信息 #tagGCMarryBreakInfo
+# B3 19 魅力贡献榜 #tagGCCharmOfferBillboardDataList
 
-class  tagGCMarryBreakInfo(Structure):
-    Head = tagHead()
-    PlayerID = 0    #(DWORD PlayerID)
+class  tagGCCharmOfferBillboardData(Structure):
+    OrderIndex = 0    #(DWORD OrderIndex)//名次索引,0代表第一名
+    PlayerID = 0    #(DWORD PlayerID)// 玩家ID - 贡献者
     NameLen = 0    #(BYTE NameLen)
     PlayerName = ""    #(String PlayerName)
+    CharmValue = 0    #(DWORD CharmValue)//贡献魅力值
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.OrderIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.CharmValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.OrderIndex = 0
+        self.PlayerID = 0
+        self.NameLen = 0
+        self.PlayerName = ""
+        self.CharmValue = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 4
+        length += 4
+        length += 1
+        length += len(self.PlayerName)
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteDWORD(data, self.OrderIndex)
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
+        data = CommFunc.WriteDWORD(data, self.CharmValue)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                OrderIndex:%d,
+                                PlayerID:%d,
+                                NameLen:%d,
+                                PlayerName:%s,
+                                CharmValue:%d
+                                '''\
+                                %(
+                                self.OrderIndex,
+                                self.PlayerID,
+                                self.NameLen,
+                                self.PlayerName,
+                                self.CharmValue
+                                )
+        return DumpString
+
+
+class  tagGCCharmOfferBillboardDataList(Structure):
+    Head = tagHead()
+    PlayerID = 0    #(DWORD PlayerID)// 魅力玩家ID
+    QueryType = 0    #(BYTE QueryType)// 查看类型: 1-总榜,2-周榜,3-日榜
+    DataCount = 0    #(BYTE DataCount)
+    OfferBillboardDataList = list()    #(vector<tagGCCharmOfferBillboardData> OfferBillboardDataList)
     data = None
 
     def __init__(self):
         self.Clear()
         self.Head.Cmd = 0xB3
-        self.Head.SubCmd = 0x28
+        self.Head.SubCmd = 0x19
         return
 
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
-        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.QueryType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.DataCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.DataCount):
+            temOfferBillboardDataList = tagGCCharmOfferBillboardData()
+            _pos = temOfferBillboardDataList.ReadData(_lpData, _pos)
+            self.OfferBillboardDataList.append(temOfferBillboardDataList)
         return _pos
 
     def Clear(self):
         self.Head = tagHead()
         self.Head.Clear()
         self.Head.Cmd = 0xB3
-        self.Head.SubCmd = 0x28
+        self.Head.SubCmd = 0x19
         self.PlayerID = 0
-        self.NameLen = 0
-        self.PlayerName = ""
+        self.QueryType = 0
+        self.DataCount = 0
+        self.OfferBillboardDataList = list()
         return
 
     def GetLength(self):
@@ -7505,7 +7577,9 @@
         length += self.Head.GetLength()
         length += 4
         length += 1
-        length += len(self.PlayerName)
+        length += 1
+        for i in range(self.DataCount):
+            length += self.OfferBillboardDataList[i].GetLength()
 
         return length
 
@@ -7513,28 +7587,145 @@
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
         data = CommFunc.WriteDWORD(data, self.PlayerID)
-        data = CommFunc.WriteBYTE(data, self.NameLen)
-        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
+        data = CommFunc.WriteBYTE(data, self.QueryType)
+        data = CommFunc.WriteBYTE(data, self.DataCount)
+        for i in range(self.DataCount):
+            data = CommFunc.WriteString(data, self.OfferBillboardDataList[i].GetLength(), self.OfferBillboardDataList[i].GetBuffer())
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
                                 PlayerID:%d,
-                                NameLen:%d,
-                                PlayerName:%s
+                                QueryType:%d,
+                                DataCount:%d,
+                                OfferBillboardDataList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
                                 self.PlayerID,
-                                self.NameLen,
-                                self.PlayerName
+                                self.QueryType,
+                                self.DataCount,
+                                "..."
                                 )
         return DumpString
 
 
-m_NAtagGCMarryBreakInfo=tagGCMarryBreakInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryBreakInfo.Head.Cmd,m_NAtagGCMarryBreakInfo.Head.SubCmd))] = m_NAtagGCMarryBreakInfo
+m_NAtagGCCharmOfferBillboardDataList=tagGCCharmOfferBillboardDataList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCharmOfferBillboardDataList.Head.Cmd,m_NAtagGCCharmOfferBillboardDataList.Head.SubCmd))] = m_NAtagGCCharmOfferBillboardDataList
+
+
+#------------------------------------------------------
+# B3 26 伴侣信息 #tagGCCoupleInfo
+
+class  tagGCCoupleInfo(Structure):
+    Head = tagHead()
+    CoupleID = 0    #(DWORD CoupleID)// 伴侣玩家ID,一定是好友,社交信息从好友系统中获取
+    NameLen = 0    #(BYTE NameLen)
+    CoupleName = ""    #(String CoupleName)
+    NewMarryTime = 0    #(DWORD NewMarryTime)// 新婚时间戳, 秒,计算结婚天数按该时间计算
+    MarryTime = 0    #(DWORD MarryTime)// 最近一次提亲成功时间戳, 秒,计算可离婚时间按该时间计算
+    BridePriceState = 0    #(DWORD BridePriceState)// 聘礼状态,按位存储已购买次数,如205代表ID1买了5次,ID2买了0次,ID3买了2次,最高9次
+    BreakRequestID = 0    #(DWORD BreakRequestID)// 当前请求中的和离时间戳 - 请求方ID,0代表没人发起请求
+    BreakRequestTime = 0    #(DWORD BreakRequestTime)// 当前请求中的和离时间戳, 秒,用于计算和离回应有效期
+    PlayerBreakRequestTime = 0    #(DWORD PlayerBreakRequestTime)// 玩家最近一次和离请求时间戳, 秒,用于计算自身的请求和离CD
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x26
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.CoupleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.CoupleName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.NewMarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.BridePriceState,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.BreakRequestID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.BreakRequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.PlayerBreakRequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x26
+        self.CoupleID = 0
+        self.NameLen = 0
+        self.CoupleName = ""
+        self.NewMarryTime = 0
+        self.MarryTime = 0
+        self.BridePriceState = 0
+        self.BreakRequestID = 0
+        self.BreakRequestTime = 0
+        self.PlayerBreakRequestTime = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 4
+        length += 1
+        length += len(self.CoupleName)
+        length += 4
+        length += 4
+        length += 4
+        length += 4
+        length += 4
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.CoupleID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.CoupleName)
+        data = CommFunc.WriteDWORD(data, self.NewMarryTime)
+        data = CommFunc.WriteDWORD(data, self.MarryTime)
+        data = CommFunc.WriteDWORD(data, self.BridePriceState)
+        data = CommFunc.WriteDWORD(data, self.BreakRequestID)
+        data = CommFunc.WriteDWORD(data, self.BreakRequestTime)
+        data = CommFunc.WriteDWORD(data, self.PlayerBreakRequestTime)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                CoupleID:%d,
+                                NameLen:%d,
+                                CoupleName:%s,
+                                NewMarryTime:%d,
+                                MarryTime:%d,
+                                BridePriceState:%d,
+                                BreakRequestID:%d,
+                                BreakRequestTime:%d,
+                                PlayerBreakRequestTime:%d
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.CoupleID,
+                                self.NameLen,
+                                self.CoupleName,
+                                self.NewMarryTime,
+                                self.MarryTime,
+                                self.BridePriceState,
+                                self.BreakRequestID,
+                                self.BreakRequestTime,
+                                self.PlayerBreakRequestTime
+                                )
+        return DumpString
+
+
+m_NAtagGCCoupleInfo=tagGCCoupleInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCoupleInfo.Head.Cmd,m_NAtagGCCoupleInfo.Head.SubCmd))] = m_NAtagGCCoupleInfo
 
 
 #------------------------------------------------------
@@ -7763,14 +7954,145 @@
 
 
 #------------------------------------------------------
-# B3 20 送花成功通知 #tagGCSendFlowersOK
+# B3 25 玩家魅力值信息 #tagGCPlayerCharmValueInfo
 
-class  tagGCSendFlowersOK(Structure):
-    Head = tagHead()
-    NameLen = 0    #(BYTE NameLen)// 赠送方玩家名
-    Name = ""    #(String Name)//size = SrcNameLen
+class  tagGCPlayerCharmValueInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("CharmValueTotal", c_int),    #当前魅力值 - 总
+                  ("CharmValueWeek", c_int),    #当前魅力值 - 周
+                  ("CharmValueDay", c_int),    #当前魅力值 - 日
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB3
+        self.SubCmd = 0x25
+        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 = 0xB3
+        self.SubCmd = 0x25
+        self.CharmValueTotal = 0
+        self.CharmValueWeek = 0
+        self.CharmValueDay = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagGCPlayerCharmValueInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B3 25 玩家魅力值信息 //tagGCPlayerCharmValueInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                CharmValueTotal:%d,
+                                CharmValueWeek:%d,
+                                CharmValueDay:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.CharmValueTotal,
+                                self.CharmValueWeek,
+                                self.CharmValueDay
+                                )
+        return DumpString
+
+
+m_NAtagGCPlayerCharmValueInfo=tagGCPlayerCharmValueInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerCharmValueInfo.Cmd,m_NAtagGCPlayerCharmValueInfo.SubCmd))] = m_NAtagGCPlayerCharmValueInfo
+
+
+#------------------------------------------------------
+# B3 20 送礼物成功通知 #tagGCSendGiftsOKList
+
+class  tagGCSendGiftsOK(Structure):
+    NameLen = 0    #(BYTE NameLen)
+    Name = ""    #(String Name)// 赠送方玩家名
     PlayerID = 0    #(DWORD PlayerID)// 赠送方玩家ID
-    FlowerCount = 0    #(DWORD FlowerCount)// 赠送花数量
+    GiftNum = 0    #(WORD GiftNum)// 赠送礼物编号
+    GiftCount = 0    #(DWORD GiftCount)// 赠送礼物数量
+    SendTime = 0    #(DWORD SendTime)// 赠送时间戳
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.GiftNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.GiftCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.SendTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.NameLen = 0
+        self.Name = ""
+        self.PlayerID = 0
+        self.GiftNum = 0
+        self.GiftCount = 0
+        self.SendTime = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += len(self.Name)
+        length += 4
+        length += 2
+        length += 4
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.Name)
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteWORD(data, self.GiftNum)
+        data = CommFunc.WriteDWORD(data, self.GiftCount)
+        data = CommFunc.WriteDWORD(data, self.SendTime)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                NameLen:%d,
+                                Name:%s,
+                                PlayerID:%d,
+                                GiftNum:%d,
+                                GiftCount:%d,
+                                SendTime:%d
+                                '''\
+                                %(
+                                self.NameLen,
+                                self.Name,
+                                self.PlayerID,
+                                self.GiftNum,
+                                self.GiftCount,
+                                self.SendTime
+                                )
+        return DumpString
+
+
+class  tagGCSendGiftsOKList(Structure):
+    Head = tagHead()
+    Count = 0    #(WORD Count)
+    SendGiftsOKList = list()    #(vector<tagGCSendGiftsOK> SendGiftsOKList)
     data = None
 
     def __init__(self):
@@ -7782,10 +8104,11 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
-        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
-        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
-        self.FlowerCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        for i in range(self.Count):
+            temSendGiftsOKList = tagGCSendGiftsOK()
+            _pos = temSendGiftsOKList.ReadData(_lpData, _pos)
+            self.SendGiftsOKList.append(temSendGiftsOKList)
         return _pos
 
     def Clear(self):
@@ -7793,51 +8116,151 @@
         self.Head.Clear()
         self.Head.Cmd = 0xB3
         self.Head.SubCmd = 0x20
-        self.NameLen = 0
-        self.Name = ""
-        self.PlayerID = 0
-        self.FlowerCount = 0
+        self.Count = 0
+        self.SendGiftsOKList = list()
         return
 
     def GetLength(self):
         length = 0
         length += self.Head.GetLength()
-        length += 1
-        length += len(self.Name)
-        length += 4
-        length += 4
+        length += 2
+        for i in range(self.Count):
+            length += self.SendGiftsOKList[i].GetLength()
 
         return length
 
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.NameLen)
-        data = CommFunc.WriteString(data, self.NameLen, self.Name)
-        data = CommFunc.WriteDWORD(data, self.PlayerID)
-        data = CommFunc.WriteDWORD(data, self.FlowerCount)
+        data = CommFunc.WriteWORD(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteString(data, self.SendGiftsOKList[i].GetLength(), self.SendGiftsOKList[i].GetBuffer())
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
-                                NameLen:%d,
-                                Name:%s,
-                                PlayerID:%d,
-                                FlowerCount:%d
+                                Count:%d,
+                                SendGiftsOKList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
-                                self.NameLen,
-                                self.Name,
-                                self.PlayerID,
-                                self.FlowerCount
+                                self.Count,
+                                "..."
                                 )
         return DumpString
 
 
-m_NAtagGCSendFlowersOK=tagGCSendFlowersOK()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendFlowersOK.Head.Cmd,m_NAtagGCSendFlowersOK.Head.SubCmd))] = m_NAtagGCSendFlowersOK
+m_NAtagGCSendGiftsOKList=tagGCSendGiftsOKList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendGiftsOKList.Head.Cmd,m_NAtagGCSendGiftsOKList.Head.SubCmd))] = m_NAtagGCSendGiftsOKList
+
+
+#------------------------------------------------------
+# B3 14 社交人群伴侣信息 #tagGCSocialCouples
+
+class  tagGCSocialCouple(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("PlayerID", c_int),    
+                  ("CoupleID", c_int),    #伴侣ID
+                  ]
+
+    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.PlayerID = 0
+        self.CoupleID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagGCSocialCouple)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B3 14 社交人群伴侣信息 //tagGCSocialCouples:
+                                PlayerID:%d,
+                                CoupleID:%d
+                                '''\
+                                %(
+                                self.PlayerID,
+                                self.CoupleID
+                                )
+        return DumpString
+
+
+class  tagGCSocialCouples(Structure):
+    Head = tagHead()
+    Count = 0    #(WORD Count)
+    Player = list()    #(vector<tagGCSocialCouple> Player)//size = Count
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x14
+        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):
+            temPlayer = tagGCSocialCouple()
+            _pos = temPlayer.ReadData(_lpData, _pos)
+            self.Player.append(temPlayer)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB3
+        self.Head.SubCmd = 0x14
+        self.Count = 0
+        self.Player = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 2
+        for i in range(self.Count):
+            length += self.Player[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.Player[i].GetLength(), self.Player[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                Player:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCSocialCouples=tagGCSocialCouples()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSocialCouples.Head.Cmd,m_NAtagGCSocialCouples.Head.SubCmd))] = m_NAtagGCSocialCouples
 
 
 #------------------------------------------------------
@@ -8072,7 +8495,6 @@
     LV = 0    #(WORD LV)//等级
     RealmLV = 0    #(WORD RealmLV)//境界
     OnlineType = 0    #(BYTE OnlineType)//0不在线 1在线 2脱机在线
-    CoupleID = 0    #(DWORD CoupleID)//伴侣ID
     data = None
 
     def __init__(self):
@@ -8087,7 +8509,6 @@
         self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.CoupleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -8097,7 +8518,6 @@
         self.LV = 0
         self.RealmLV = 0
         self.OnlineType = 0
-        self.CoupleID = 0
         return
 
     def GetLength(self):
@@ -8108,7 +8528,6 @@
         length += 2
         length += 2
         length += 1
-        length += 4
 
         return length
 
@@ -8120,7 +8539,6 @@
         data = CommFunc.WriteWORD(data, self.LV)
         data = CommFunc.WriteWORD(data, self.RealmLV)
         data = CommFunc.WriteBYTE(data, self.OnlineType)
-        data = CommFunc.WriteDWORD(data, self.CoupleID)
         return data
 
     def OutputString(self):
@@ -8130,8 +8548,7 @@
                                 Job:%d,
                                 LV:%d,
                                 RealmLV:%d,
-                                OnlineType:%d,
-                                CoupleID:%d
+                                OnlineType:%d
                                 '''\
                                 %(
                                 self.PlayerID,
@@ -8139,8 +8556,7 @@
                                 self.Job,
                                 self.LV,
                                 self.RealmLV,
-                                self.OnlineType,
-                                self.CoupleID
+                                self.OnlineType
                                 )
         return DumpString
 
@@ -8218,8 +8634,7 @@
     _pack_ = 1
     _fields_ = [
                   ("PlayerID", c_int),    
-                  ("SortValue", c_int),    
-                  ("Intimacy", c_int),    #亲密度 - 好友组才有值
+                  ("SortValue", c_int),    # 亲密组时为亲密度
                   ]
 
     def __init__(self):
@@ -8234,7 +8649,6 @@
     def Clear(self):
         self.PlayerID = 0
         self.SortValue = 0
-        self.Intimacy = 0
         return
 
     def GetLength(self):
@@ -8246,20 +8660,18 @@
     def OutputString(self):
         DumpString = '''//B3 08 通知玩家分组信息 //tagGCGroupPlayers:
                                 PlayerID:%d,
-                                SortValue:%d,
-                                Intimacy:%d
+                                SortValue:%d
                                 '''\
                                 %(
                                 self.PlayerID,
-                                self.SortValue,
-                                self.Intimacy
+                                self.SortValue
                                 )
         return DumpString
 
 
 class  tagGCGroupPlayers(Structure):
     Head = tagHead()
-    GroupType = 0    #(BYTE GroupType)// 分组 1 最近联系人 2 好友 3 仇人 4 黑名单
+    GroupType = 0    #(BYTE GroupType)// 分组 1 最近联系人 2 好友 3 仇人 4 黑名单 5亲密组
     Count = 0    #(WORD Count)
     Players = list()    #(vector<tagGCGroupPlayer> Players)//size = Count
     data = None
@@ -12854,126 +13266,6 @@
 
 m_NAtagGCCrossRealmPKStartMatch=tagGCCrossRealmPKStartMatch()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKStartMatch.Cmd,m_NAtagGCCrossRealmPKStartMatch.SubCmd))] = m_NAtagGCCrossRealmPKStartMatch
-
-
-#------------------------------------------------------
-# B3 25 魅力值信息 #tagMCCharmInfo
-
-class  tagMCCharmInfo(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("CharmTotal", c_int),    # 魅力值 - 总
-                  ("CharmToday", c_int),    # 魅力值 - 今日
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xB3
-        self.SubCmd = 0x25
-        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 = 0xB3
-        self.SubCmd = 0x25
-        self.CharmTotal = 0
-        self.CharmToday = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCCharmInfo)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// B3 25 魅力值信息 //tagMCCharmInfo:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                CharmTotal:%d,
-                                CharmToday:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.CharmTotal,
-                                self.CharmToday
-                                )
-        return DumpString
-
-
-m_NAtagMCCharmInfo=tagMCCharmInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCharmInfo.Cmd,m_NAtagMCCharmInfo.SubCmd))] = m_NAtagMCCharmInfo
-
-
-#------------------------------------------------------
-# B3 26 伴侣信息 #tagMCCoupleInfo
-
-class  tagMCCoupleInfo(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("CoupleID", c_int),    # 伴侣玩家ID,一定是好友,社交信息从好友系统中获取
-                  ("NewMarryTime", c_int),    # 新婚时间戳, 秒,计算结婚天数按该时间计算
-                  ("MarryTime", c_int),    # 最近一次提亲成功时间戳, 秒,计算可离婚时间按该时间计算
-                  ("BridePriceState", c_int),    # 聘礼状态,按二进制位存储是否已购买
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xB3
-        self.SubCmd = 0x26
-        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 = 0xB3
-        self.SubCmd = 0x26
-        self.CoupleID = 0
-        self.NewMarryTime = 0
-        self.MarryTime = 0
-        self.BridePriceState = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCCoupleInfo)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// B3 26 伴侣信息 //tagMCCoupleInfo:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                CoupleID:%d,
-                                NewMarryTime:%d,
-                                MarryTime:%d,
-                                BridePriceState:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.CoupleID,
-                                self.NewMarryTime,
-                                self.MarryTime,
-                                self.BridePriceState
-                                )
-        return DumpString
-
-
-m_NAtagMCCoupleInfo=tagMCCoupleInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCoupleInfo.Cmd,m_NAtagMCCoupleInfo.SubCmd))] = m_NAtagMCCoupleInfo
 
 
 #------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 2ba5892..db7e583 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -729,11 +729,12 @@
     Def_BT_SkyTower,                          #天星塔榜
     Def_BT_Arena,                             #竞技场榜
     Def_BT_Environment,                       #环保榜 (垃圾分类活动)
-    Def_BT_Charm, #魅力总榜 30
+    Def_BT_CharmTotal, #魅力总榜 30
+    Def_BT_CharmWeek, #魅力周榜
     Def_BT_CharmDay, #魅力日榜
     
     Def_BT_Max, #排行榜最大类型
-) = range(0, 31 + 2) 
+) = range(0, 32 + 2) 
 
 ''' 跨服排行榜类型, 从 150 开始
 与本服榜单存储的是不一样的数据库表格,理论上类型可以和本服榜单类型重复,为了做下区分防误导,跨服榜单从 150 开始
@@ -754,7 +755,7 @@
 #排行榜Value1存储境界信息的榜单列表
 BTValue1_OfficialRankList = [Def_BT_FightPower, Def_BT_FightPower_Warrior, Def_BT_FightPower_Wizard, Def_BT_FightPower_Assassin, 
                              Def_BT_LV, Def_BT_FightPower_Horse, Def_BT_FightPower_Pet, Def_BT_TrialTower, Def_BT_OffLineEfficient,
-                             Def_BT_SkyTower,
+                             Def_BT_SkyTower, Def_BT_CharmTotal, Def_BT_CharmWeek, Def_BT_CharmDay
                              ]
 
 ##---比率---

--
Gitblit v1.8.0