From 63d429647aae8b63517b2fd67977a2fb7692462a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 十一月 2021 12:07:33 +0800
Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(主干冲突 补充)
---
ServerPython/CoreServerGroup/GameServer/PyNetPack.ini | 15
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 10
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py | 11
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 812 +++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 4
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 8
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 13
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 812 +++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 21
11 files changed, 1,707 insertions(+), 18 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini b/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
index 91ced3a..a5898de 100644
--- a/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
+++ b/ServerPython/CoreServerGroup/GameServer/PyNetPack.ini
@@ -443,6 +443,21 @@
PacketSubCMD_4=0x15
PacketCallFunc_4=OnGetAssistThanksGift
+[PlayerLove]
+ScriptName = Player\PlayerLove.py
+Writer = hxp
+Releaser = hxp
+RegType = 0
+RegisterPackCount = 2
+
+PacketCMD_1=0xB3
+PacketSubCMD_1=0x12
+PacketCallFunc_1=OnMarryResponse
+
+PacketCMD_2=0xB3
+PacketSubCMD_2=0x16
+PacketCallFunc_2=OnMarryBreakResponse
+
[PlayerTalk]
ScriptName = Player\PlayerTalk.py
Writer = alee
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index d7a20ed..9956b8f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -7276,6 +7276,571 @@
#------------------------------------------------------
+# B3 24 喜糖列表 #tagGCCandyList
+
+class tagGCCandyInfo(Structure):
+ PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方
+ NameALen = 0 #(BYTE NameALen)
+ PlayerNameA = "" #(String PlayerNameA)
+ PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方
+ NameBLen = 0 #(BYTE NameBLen)
+ PlayerNameB = "" #(String PlayerNameB)
+ BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID
+ MarryTime = 0 #(DWORD MarryTime)// 成亲时间戳,秒
+ EndTime = 0 #(DWORD EndTime)// 结束时间戳,秒
+ Prosperity = 0 #(DWORD Prosperity)// 当前繁荣度
+ FireworksTotalBuyCount = 0 #(BYTE FireworksTotalBuyCount)// 烟花总已购买次数
+ FireworksPlayerBuyCount = 0 #(BYTE FireworksPlayerBuyCount)// 烟花玩家已购买次数
+ PlayerFreeEatCandyCount = 0 #(BYTE PlayerFreeEatCandyCount)// 玩家已免费吃该喜糖总次数,包含免费次数、烟花赠送次数
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen)
+ self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen)
+ self.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.EndTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Prosperity,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.FireworksTotalBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.FireworksPlayerBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerFreeEatCandyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.PlayerIDA = 0
+ self.NameALen = 0
+ self.PlayerNameA = ""
+ self.PlayerIDB = 0
+ self.NameBLen = 0
+ self.PlayerNameB = ""
+ self.BridePriceID = 0
+ self.MarryTime = 0
+ self.EndTime = 0
+ self.Prosperity = 0
+ self.FireworksTotalBuyCount = 0
+ self.FireworksPlayerBuyCount = 0
+ self.PlayerFreeEatCandyCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 1
+ length += len(self.PlayerNameA)
+ length += 4
+ length += 1
+ length += len(self.PlayerNameB)
+ length += 1
+ length += 4
+ length += 4
+ length += 4
+ length += 1
+ length += 1
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.PlayerIDA)
+ data = CommFunc.WriteBYTE(data, self.NameALen)
+ data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA)
+ data = CommFunc.WriteDWORD(data, self.PlayerIDB)
+ data = CommFunc.WriteBYTE(data, self.NameBLen)
+ data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB)
+ data = CommFunc.WriteBYTE(data, self.BridePriceID)
+ data = CommFunc.WriteDWORD(data, self.MarryTime)
+ data = CommFunc.WriteDWORD(data, self.EndTime)
+ data = CommFunc.WriteDWORD(data, self.Prosperity)
+ data = CommFunc.WriteBYTE(data, self.FireworksTotalBuyCount)
+ data = CommFunc.WriteBYTE(data, self.FireworksPlayerBuyCount)
+ data = CommFunc.WriteBYTE(data, self.PlayerFreeEatCandyCount)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ PlayerIDA:%d,
+ NameALen:%d,
+ PlayerNameA:%s,
+ PlayerIDB:%d,
+ NameBLen:%d,
+ PlayerNameB:%s,
+ BridePriceID:%d,
+ MarryTime:%d,
+ EndTime:%d,
+ Prosperity:%d,
+ FireworksTotalBuyCount:%d,
+ FireworksPlayerBuyCount:%d,
+ PlayerFreeEatCandyCount:%d
+ '''\
+ %(
+ self.PlayerIDA,
+ self.NameALen,
+ self.PlayerNameA,
+ self.PlayerIDB,
+ self.NameBLen,
+ self.PlayerNameB,
+ self.BridePriceID,
+ self.MarryTime,
+ self.EndTime,
+ self.Prosperity,
+ self.FireworksTotalBuyCount,
+ self.FireworksPlayerBuyCount,
+ self.PlayerFreeEatCandyCount
+ )
+ return DumpString
+
+
+class tagGCCandyList(Structure):
+ Head = tagHead()
+ CandyCount = 0 #(WORD CandyCount)
+ CandyInfoList = list() #(vector<tagGCCandyInfo> CandyInfoList)// 可吃喜糖列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x24
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.CandyCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ for i in range(self.CandyCount):
+ temCandyInfoList = tagGCCandyInfo()
+ _pos = temCandyInfoList.ReadData(_lpData, _pos)
+ self.CandyInfoList.append(temCandyInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x24
+ self.CandyCount = 0
+ self.CandyInfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 2
+ for i in range(self.CandyCount):
+ length += self.CandyInfoList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteWORD(data, self.CandyCount)
+ for i in range(self.CandyCount):
+ data = CommFunc.WriteString(data, self.CandyInfoList[i].GetLength(), self.CandyInfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ CandyCount:%d,
+ CandyInfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.CandyCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCCandyList=tagGCCandyList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCandyList.Head.Cmd,m_NAtagGCCandyList.Head.SubCmd))] = m_NAtagGCCandyList
+
+
+#------------------------------------------------------
+# B3 28 收到离婚信息 #tagGCMarryBreakInfo
+
+class tagGCMarryBreakInfo(Structure):
+ Head = tagHead()
+ PlayerID = 0 #(DWORD PlayerID)
+ NameLen = 0 #(BYTE NameLen)
+ PlayerName = "" #(String PlayerName)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x28
+ 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)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x28
+ self.PlayerID = 0
+ self.NameLen = 0
+ self.PlayerName = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += len(self.PlayerName)
+
+ return length
+
+ def GetBuffer(self):
+ 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)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerID:%d,
+ NameLen:%d,
+ PlayerName:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerID,
+ self.NameLen,
+ self.PlayerName
+ )
+ return DumpString
+
+
+m_NAtagGCMarryBreakInfo=tagGCMarryBreakInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryBreakInfo.Head.Cmd,m_NAtagGCMarryBreakInfo.Head.SubCmd))] = m_NAtagGCMarryBreakInfo
+
+
+#------------------------------------------------------
+# B3 22 收到提亲信息 #tagGCMarryReqInfo
+
+class tagGCMarryReqInfo(Structure):
+ Head = tagHead()
+ PlayerID = 0 #(DWORD PlayerID)// 同一个玩家ID多次提亲时可能同步多次,前端覆盖数据即可
+ NameLen = 0 #(BYTE NameLen)
+ PlayerName = "" #(String PlayerName)
+ BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x22
+ 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.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x22
+ self.PlayerID = 0
+ self.NameLen = 0
+ self.PlayerName = ""
+ self.BridePriceID = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += len(self.PlayerName)
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ 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.BridePriceID)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerID:%d,
+ NameLen:%d,
+ PlayerName:%s,
+ BridePriceID:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerID,
+ self.NameLen,
+ self.PlayerName,
+ self.BridePriceID
+ )
+ return DumpString
+
+
+m_NAtagGCMarryReqInfo=tagGCMarryReqInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqInfo.Head.Cmd,m_NAtagGCMarryReqInfo.Head.SubCmd))] = m_NAtagGCMarryReqInfo
+
+
+#------------------------------------------------------
+# B3 21 提亲发送成功 #tagGCMarryReqOK
+
+class tagGCMarryReqOK(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB3
+ 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 = 0xB3
+ self.SubCmd = 0x21
+ return
+
+ def GetLength(self):
+ return sizeof(tagGCMarryReqOK)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B3 21 提亲发送成功 //tagGCMarryReqOK:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagGCMarryReqOK=tagGCMarryReqOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqOK.Cmd,m_NAtagGCMarryReqOK.SubCmd))] = m_NAtagGCMarryReqOK
+
+
+#------------------------------------------------------
+# B3 23 提亲回应结果 #tagGCMarryResponseRet
+
+class tagGCMarryResponseRet(Structure):
+ Head = tagHead()
+ PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方
+ NameALen = 0 #(BYTE NameALen)
+ PlayerNameA = "" #(String PlayerNameA)
+ PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方
+ NameBLen = 0 #(BYTE NameBLen)
+ PlayerNameB = "" #(String PlayerNameB)
+ IsOK = 0 #(BYTE IsOK)// 是否同意,0-否,1-是; 如果同意则双方都会收到该包,根据玩家ID判断自己是请求或接受方,显示不同的同意结果界面;不同意只有请求方会收到
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x23
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen)
+ self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen)
+ self.IsOK,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x23
+ self.PlayerIDA = 0
+ self.NameALen = 0
+ self.PlayerNameA = ""
+ self.PlayerIDB = 0
+ self.NameBLen = 0
+ self.PlayerNameB = ""
+ self.IsOK = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += len(self.PlayerNameA)
+ length += 4
+ length += 1
+ length += len(self.PlayerNameB)
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteDWORD(data, self.PlayerIDA)
+ data = CommFunc.WriteBYTE(data, self.NameALen)
+ data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA)
+ data = CommFunc.WriteDWORD(data, self.PlayerIDB)
+ data = CommFunc.WriteBYTE(data, self.NameBLen)
+ data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB)
+ data = CommFunc.WriteBYTE(data, self.IsOK)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerIDA:%d,
+ NameALen:%d,
+ PlayerNameA:%s,
+ PlayerIDB:%d,
+ NameBLen:%d,
+ PlayerNameB:%s,
+ IsOK:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerIDA,
+ self.NameALen,
+ self.PlayerNameA,
+ self.PlayerIDB,
+ self.NameBLen,
+ self.PlayerNameB,
+ self.IsOK
+ )
+ return DumpString
+
+
+m_NAtagGCMarryResponseRet=tagGCMarryResponseRet()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryResponseRet.Head.Cmd,m_NAtagGCMarryResponseRet.Head.SubCmd))] = m_NAtagGCMarryResponseRet
+
+
+#------------------------------------------------------
+# B3 20 送花成功通知 #tagGCSendFlowersOK
+
+class tagGCSendFlowersOK(Structure):
+ Head = tagHead()
+ NameLen = 0 #(BYTE NameLen)// 赠送方玩家名
+ Name = "" #(String Name)//size = SrcNameLen
+ PlayerID = 0 #(DWORD PlayerID)// 赠送方玩家ID
+ FlowerCount = 0 #(DWORD FlowerCount)// 赠送花数量
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x20
+ return
+
+ 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)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x20
+ self.NameLen = 0
+ self.Name = ""
+ self.PlayerID = 0
+ self.FlowerCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += len(self.Name)
+ length += 4
+ length += 4
+
+ 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)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ NameLen:%d,
+ Name:%s,
+ PlayerID:%d,
+ FlowerCount:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.NameLen,
+ self.Name,
+ self.PlayerID,
+ self.FlowerCount
+ )
+ return DumpString
+
+
+m_NAtagGCSendFlowersOK=tagGCSendFlowersOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendFlowersOK.Head.Cmd,m_NAtagGCSendFlowersOK.Head.SubCmd))] = m_NAtagGCSendFlowersOK
+
+
+#------------------------------------------------------
#B3 01 添加社交对象 #tagGCAddSocialPlayer
class tagGCAddSocialPlayer(Structure):
@@ -7507,6 +8072,7 @@
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):
@@ -7521,6 +8087,7 @@
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):
@@ -7530,6 +8097,7 @@
self.LV = 0
self.RealmLV = 0
self.OnlineType = 0
+ self.CoupleID = 0
return
def GetLength(self):
@@ -7540,6 +8108,7 @@
length += 2
length += 2
length += 1
+ length += 4
return length
@@ -7551,6 +8120,7 @@
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):
@@ -7560,7 +8130,8 @@
Job:%d,
LV:%d,
RealmLV:%d,
- OnlineType:%d
+ OnlineType:%d,
+ CoupleID:%d
'''\
%(
self.PlayerID,
@@ -7568,7 +8139,8 @@
self.Job,
self.LV,
self.RealmLV,
- self.OnlineType
+ self.OnlineType,
+ self.CoupleID
)
return DumpString
@@ -7647,6 +8219,7 @@
_fields_ = [
("PlayerID", c_int),
("SortValue", c_int),
+ ("Intimacy", c_int), #亲密度 - 好友组才有值
]
def __init__(self):
@@ -7661,6 +8234,7 @@
def Clear(self):
self.PlayerID = 0
self.SortValue = 0
+ self.Intimacy = 0
return
def GetLength(self):
@@ -7672,11 +8246,13 @@
def OutputString(self):
DumpString = '''//B3 08 通知玩家分组信息 //tagGCGroupPlayers:
PlayerID:%d,
- SortValue:%d
+ SortValue:%d,
+ Intimacy:%d
'''\
%(
self.PlayerID,
- self.SortValue
+ self.SortValue,
+ self.Intimacy
)
return DumpString
@@ -12281,6 +12857,234 @@
#------------------------------------------------------
+# 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
+
+
+#------------------------------------------------------
+# B3 27 情戒信息 #tagMCLoveRingInfo
+
+class tagMCLoveRingInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ClassLV", c_ubyte), # 阶
+ ("StarLV", c_ubyte), # 星
+ ("EatCount", c_int), # 本星已淬炼道具数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB3
+ self.SubCmd = 0x27
+ 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 = 0x27
+ self.ClassLV = 0
+ self.StarLV = 0
+ self.EatCount = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCLoveRingInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B3 27 情戒信息 //tagMCLoveRingInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ ClassLV:%d,
+ StarLV:%d,
+ EatCount:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ClassLV,
+ self.StarLV,
+ self.EatCount
+ )
+ return DumpString
+
+
+m_NAtagMCLoveRingInfo=tagMCLoveRingInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingInfo.Cmd,m_NAtagMCLoveRingInfo.SubCmd))] = m_NAtagMCLoveRingInfo
+
+
+#------------------------------------------------------
+# B3 29 情戒解锁成功 #tagMCLoveRingUnlockOK
+
+class tagMCLoveRingUnlockOK(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB3
+ self.SubCmd = 0x29
+ 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 = 0x29
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCLoveRingUnlockOK)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B3 29 情戒解锁成功 //tagMCLoveRingUnlockOK:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagMCLoveRingUnlockOK=tagMCLoveRingUnlockOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingUnlockOK.Cmd,m_NAtagMCLoveRingUnlockOK.SubCmd))] = m_NAtagMCLoveRingUnlockOK
+
+
+#------------------------------------------------------
#A1 25 请求切换地图失败#tagMCChangeMapFail
class tagMCChangeMapFail(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 7c78d32..49db479 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -98,8 +98,10 @@
import PlayerFamilyParty
import GameWorldFamilyWar
import GameWorldArena
+import PlayerSocial
import AuctionHouse
import PlayerXMZZ
+import PlayerLove
import PlayerTeam
import PyGameData
import CrossBoss
@@ -171,6 +173,8 @@
PlayerBourse.OverTimeItemsDeal()
# 仙盟联赛
GameWorldFamilyWar.DoOnDay()
+ # 情缘
+ PlayerLove.DoOnDay()
return
def OnDayEx(tick):
@@ -308,6 +312,9 @@
#拍卖行
AuctionHouse.OnAuctionItemTimeProcess(curTime, tick)
+
+ #情缘
+ PlayerLove.OnTimeProcess(curTime, tick)
#每整分钟处理一次
curDateTime = datetime.datetime.today()
@@ -1442,6 +1449,8 @@
PlayerFamily.RandomFakeFamily()
#缥缈仙域
PlayerFairyDomain.OnMapServerInitOK()
+ #情侣信息
+ PlayerSocial.SendMapServerCoupleInfo()
# 记录服务器是否正常开启完毕
getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl") + "?Type=MapInit&MapCount=%s"%GameWorld.GetGameWorld().GetGameMapManager().GetCount()
GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
@@ -1943,6 +1952,7 @@
CrossActionControl.OnServerClose()
PlayerFamilyRedPacket.OnServerClose()
GameWorldArena.OnServerClose()
+ PlayerLove.OnServerClose()
GameWorld.Log("通知C++关服!")
GameWorld.GetGameWorld().OnServerClose()
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 02d43f0..80ab4f7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -66,6 +66,7 @@
import AuctionHouse
import PlayerAssist
import PlayerFB
+import PlayerLove
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -211,7 +212,8 @@
if not PlayerControl.GetIsTJG(curPlayer):
#家族副本boss状态通知
PlayerFamilyBoss.OnLogin(curPlayer)
-
+ #情缘
+ PlayerLove.OnPlayerLogin(curPlayer)
return
@@ -683,7 +685,7 @@
elif packType == IPY_GameServer.CDBPlayerRefresh_LV:
curPlayer.SetLV(packValue)
- PlayerSocial.UpdateSocialInfo(curPlayer, packType, packValue)
+ PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
#玩家等级记录
playerID = curPlayer.GetID()
if playerID in PyGameData.g_todayPlayerLVDict:
@@ -730,7 +732,7 @@
elif packType == IPY_GameServer.CDBPlayerRefresh_OfficialRank:
curPlayer.SetOfficialRank(packValue)
- PlayerSocial.UpdateSocialInfo(curPlayer, packType, packValue)
+ PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
#更新排行榜的境界
PlayerBillboard.UpdateBillboardRealm(curPlayer)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
index 6aac47a..6159577 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
@@ -78,6 +78,7 @@
import GameWorldArena
import GameWorldItem
import PlayerAssist
+import PlayerLove
import time
import datetime
@@ -955,6 +956,16 @@
ret = GameWorldArena.MapServer_Arena(curPlayer, eval(resultName))
resultName = '%s' % ret if ret != None else '' # 需要重置间隔,每次都回复
+ # 情缘
+ if callName =="Love":
+ curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
+ if not curPlayer:
+ return
+ ret = PlayerLove.MapServer_Love(curPlayer, eval(resultName))
+ if ret == None:
+ return
+ resultName = '%s' % ret
+
# 天星塔
if callName == "SkyTower":
ret = GameWorldSkyTower.MapServer_SkyTowerInfo(eval(resultName))
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 7c5f6c2..2ba5892 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -200,6 +200,8 @@
Def_Notify_WorldKey_AssistBoss = "AssistBoss" # 协助boss
+Def_Notify_WorldKey_CoupleInfo = "CoupleInfo" # 伴侣信息
+
#活动类型定义
ActTypeList = (
ActType_OpenComm, # 开服及常规运营活动 1
@@ -727,9 +729,11 @@
Def_BT_SkyTower, #天星塔榜
Def_BT_Arena, #竞技场榜
Def_BT_Environment, #环保榜 (垃圾分类活动)
+ Def_BT_Charm, #魅力总榜 30
+ Def_BT_CharmDay, #魅力日榜
Def_BT_Max, #排行榜最大类型
-) = range(0, 29 + 2)
+) = range(0, 31 + 2)
''' 跨服排行榜类型, 从 150 开始
与本服榜单存储的是不一样的数据库表格,理论上类型可以和本服榜单类型重复,为了做下区分防误导,跨服榜单从 150 开始
@@ -1483,7 +1487,7 @@
)=range(5)
# 战斗力模块类型
-Def_MFPType_Max = 26
+Def_MFPType_Max = 27
ModuleFightPowerTypeList = (
Def_MFPType_Role, # 角色 0
Def_MFPType_Equip, # 装备(装备本身) 1
@@ -1510,6 +1514,7 @@
Def_MFPType_GatherSoul, # 聚魂 22
Def_MFPType_MagicWeapon4, # 王者法宝 23
Def_MFPType_Coat, # 时装 24
+Def_MFPType_Love, # 情缘 25
Def_MFPType_Other, # 其他
) = range(Def_MFPType_Max)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 45b323d..38c8385 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -2250,6 +2250,7 @@
1000 * 1, # 限时抢购
1000 * 5, # 请求协助间隔
1000 * 10, # 竞技场间隔
+ 1000 * 5, # 情缘
]
TYPE_Player_Tick_Count = len(TYPE_Player_Tick_Time)
@@ -2325,6 +2326,7 @@
TYPE_Player_Tick_FlashSale, #限时抢购
TYPE_Player_Tick_RequestAssist, #请求协助间隔
TYPE_Player_Tick_Arena, #竞技场间隔
+TYPE_Player_Tick_Love, #情缘
) = range(0, TYPE_Player_Tick_Count)
#---------------------------------------------------------------------
@@ -4166,6 +4168,16 @@
Def_PDict_FuncSysPrivilegeActTime = "FuncSysPrivilegeActTime_%s" # 系统功能特权激活时间戳,参数(系统功能ID)
Def_PDict_FuncSysPrivilegeAward = "FuncSysPrivilegeAward_%s" # 系统功能特权领奖记录,参数(系统功能ID)
+#情缘
+Def_PDict_LoveCharmTotal = "LoveCharmTotal" # 魅力值 - 总
+Def_PDict_LoveCharmToday = "LoveCharmToday" # 魅力值 - 今日
+Def_PDict_LoveNewMarryTime = "LoveNewMarryTime" # 成亲时间 - 新婚时间
+Def_PDict_LoveMarryTime = "LoveMarryTime" # 成亲时间 - 最近一次提亲成功时间
+Def_PDict_LoveBridePriceState = "LoveBridePriceState" # 聘礼状态,按聘礼ID位存储每种聘礼已购买次数
+Def_PDict_LoveBridePriceMaxID = "LoveBridePriceMaxID" # 提亲最大聘礼ID,用于决定伴侣昵称颜色等
+Def_PDict_LoveRingClassLV = "LoveRingClassLV" # 情戒 - 阶级
+Def_PDict_LoveRingStarLV = "LoveRingStarLV" # 情戒 - 星级
+Def_PDict_LoveRingEatCount = "LoveRingEatCount" # 情戒 - 本星已淬炼道具数
#-------------------------------------------------------------------------------
#可以从07 41封包购买的背包类型,和对应字典{背包类型:[字典key, 默认格子数]}
@@ -4645,7 +4657,9 @@
Def_CalcAttrFunc_PeerlessWeaponTrain, # 灭世培养 46
Def_CalcAttrFunc_PeerlessWeapon2Train, # 噬魂培养 47
Def_CalcAttrFunc_FaQi, # 法器 48
-) = range(49)
+Def_CalcAttrFunc_LoveRing, # 情戒基础 49
+Def_CalcAttrFunc_LoveRingCouple, # 情戒仙侣 50
+) = range(51)
# 技能功能点列表 - 默认不算战力,不享受百分比加成,技能功能点暂时配置,之后优化技能属性逻辑后可去掉
CalcAttrFuncSkillList = [Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_PetSkill, Def_CalcAttrFunc_DogzBattleSkill]
@@ -4668,6 +4682,7 @@
ShareDefine.Def_MFPType_Horse:[Def_CalcAttrFunc_Horse, Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_HorseSkin, Def_CalcAttrFunc_HorseTarin],
ShareDefine.Def_MFPType_HorseSoul:[Def_CalcAttrFunc_HorseSoul],
ShareDefine.Def_MFPType_FaQi:[Def_CalcAttrFunc_FaQi],
+ ShareDefine.Def_MFPType_Love:[Def_CalcAttrFunc_LoveRing, Def_CalcAttrFunc_LoveRingCouple],
ShareDefine.Def_MFPType_Prestige:[Def_CalcAttrFunc_Prestige],
ShareDefine.Def_MFPType_GodWeapon:[Def_CalcAttrFunc_GodWeapon],
ShareDefine.Def_MFPType_Dienstgrad:[Def_CalcAttrFunc_Dienstgrad],
@@ -4888,6 +4903,7 @@
Def_Cost_EquipStar, #装备升星
Def_Cost_ActivityPlace, #活跃放置 50
Def_Cost_FaQi, # 法器
+Def_Cost_Love, # 情缘
#-----------以下为暂时没用的,先不删除,如有新增消费点则放在这些之前------------
Def_Cost_RefreshArrestTask, # 刷新悬赏任务
Def_Cost_OffLineExp, # 兑换离线经验
@@ -4900,7 +4916,7 @@
Def_Cost_Trade, # 交易
Def_Cost_Rename, # 改名
Def_Cost_SkillLvUp, # 技能升级
-) = range(2000, 2000 + 63)
+) = range(2000, 2000 + 64)
Def_Cost_Reason_SonKey = "reason_name_son" # 消费点原因子类说明key
@@ -4985,6 +5001,7 @@
Def_Cost_EquipStar:"EquipStar",
Def_Cost_ActivityPlace:"ActivityPlace",
Def_Cost_FaQi:"FaQi",
+Def_Cost_Love:"Love",
}
## -----------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index d7a20ed..9956b8f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -7276,6 +7276,571 @@
#------------------------------------------------------
+# B3 24 喜糖列表 #tagGCCandyList
+
+class tagGCCandyInfo(Structure):
+ PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方
+ NameALen = 0 #(BYTE NameALen)
+ PlayerNameA = "" #(String PlayerNameA)
+ PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方
+ NameBLen = 0 #(BYTE NameBLen)
+ PlayerNameB = "" #(String PlayerNameB)
+ BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID
+ MarryTime = 0 #(DWORD MarryTime)// 成亲时间戳,秒
+ EndTime = 0 #(DWORD EndTime)// 结束时间戳,秒
+ Prosperity = 0 #(DWORD Prosperity)// 当前繁荣度
+ FireworksTotalBuyCount = 0 #(BYTE FireworksTotalBuyCount)// 烟花总已购买次数
+ FireworksPlayerBuyCount = 0 #(BYTE FireworksPlayerBuyCount)// 烟花玩家已购买次数
+ PlayerFreeEatCandyCount = 0 #(BYTE PlayerFreeEatCandyCount)// 玩家已免费吃该喜糖总次数,包含免费次数、烟花赠送次数
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen)
+ self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen)
+ self.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.EndTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Prosperity,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.FireworksTotalBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.FireworksPlayerBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerFreeEatCandyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.PlayerIDA = 0
+ self.NameALen = 0
+ self.PlayerNameA = ""
+ self.PlayerIDB = 0
+ self.NameBLen = 0
+ self.PlayerNameB = ""
+ self.BridePriceID = 0
+ self.MarryTime = 0
+ self.EndTime = 0
+ self.Prosperity = 0
+ self.FireworksTotalBuyCount = 0
+ self.FireworksPlayerBuyCount = 0
+ self.PlayerFreeEatCandyCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 1
+ length += len(self.PlayerNameA)
+ length += 4
+ length += 1
+ length += len(self.PlayerNameB)
+ length += 1
+ length += 4
+ length += 4
+ length += 4
+ length += 1
+ length += 1
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.PlayerIDA)
+ data = CommFunc.WriteBYTE(data, self.NameALen)
+ data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA)
+ data = CommFunc.WriteDWORD(data, self.PlayerIDB)
+ data = CommFunc.WriteBYTE(data, self.NameBLen)
+ data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB)
+ data = CommFunc.WriteBYTE(data, self.BridePriceID)
+ data = CommFunc.WriteDWORD(data, self.MarryTime)
+ data = CommFunc.WriteDWORD(data, self.EndTime)
+ data = CommFunc.WriteDWORD(data, self.Prosperity)
+ data = CommFunc.WriteBYTE(data, self.FireworksTotalBuyCount)
+ data = CommFunc.WriteBYTE(data, self.FireworksPlayerBuyCount)
+ data = CommFunc.WriteBYTE(data, self.PlayerFreeEatCandyCount)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ PlayerIDA:%d,
+ NameALen:%d,
+ PlayerNameA:%s,
+ PlayerIDB:%d,
+ NameBLen:%d,
+ PlayerNameB:%s,
+ BridePriceID:%d,
+ MarryTime:%d,
+ EndTime:%d,
+ Prosperity:%d,
+ FireworksTotalBuyCount:%d,
+ FireworksPlayerBuyCount:%d,
+ PlayerFreeEatCandyCount:%d
+ '''\
+ %(
+ self.PlayerIDA,
+ self.NameALen,
+ self.PlayerNameA,
+ self.PlayerIDB,
+ self.NameBLen,
+ self.PlayerNameB,
+ self.BridePriceID,
+ self.MarryTime,
+ self.EndTime,
+ self.Prosperity,
+ self.FireworksTotalBuyCount,
+ self.FireworksPlayerBuyCount,
+ self.PlayerFreeEatCandyCount
+ )
+ return DumpString
+
+
+class tagGCCandyList(Structure):
+ Head = tagHead()
+ CandyCount = 0 #(WORD CandyCount)
+ CandyInfoList = list() #(vector<tagGCCandyInfo> CandyInfoList)// 可吃喜糖列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x24
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.CandyCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ for i in range(self.CandyCount):
+ temCandyInfoList = tagGCCandyInfo()
+ _pos = temCandyInfoList.ReadData(_lpData, _pos)
+ self.CandyInfoList.append(temCandyInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x24
+ self.CandyCount = 0
+ self.CandyInfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 2
+ for i in range(self.CandyCount):
+ length += self.CandyInfoList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteWORD(data, self.CandyCount)
+ for i in range(self.CandyCount):
+ data = CommFunc.WriteString(data, self.CandyInfoList[i].GetLength(), self.CandyInfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ CandyCount:%d,
+ CandyInfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.CandyCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCCandyList=tagGCCandyList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCandyList.Head.Cmd,m_NAtagGCCandyList.Head.SubCmd))] = m_NAtagGCCandyList
+
+
+#------------------------------------------------------
+# B3 28 收到离婚信息 #tagGCMarryBreakInfo
+
+class tagGCMarryBreakInfo(Structure):
+ Head = tagHead()
+ PlayerID = 0 #(DWORD PlayerID)
+ NameLen = 0 #(BYTE NameLen)
+ PlayerName = "" #(String PlayerName)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x28
+ 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)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x28
+ self.PlayerID = 0
+ self.NameLen = 0
+ self.PlayerName = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += len(self.PlayerName)
+
+ return length
+
+ def GetBuffer(self):
+ 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)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerID:%d,
+ NameLen:%d,
+ PlayerName:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerID,
+ self.NameLen,
+ self.PlayerName
+ )
+ return DumpString
+
+
+m_NAtagGCMarryBreakInfo=tagGCMarryBreakInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryBreakInfo.Head.Cmd,m_NAtagGCMarryBreakInfo.Head.SubCmd))] = m_NAtagGCMarryBreakInfo
+
+
+#------------------------------------------------------
+# B3 22 收到提亲信息 #tagGCMarryReqInfo
+
+class tagGCMarryReqInfo(Structure):
+ Head = tagHead()
+ PlayerID = 0 #(DWORD PlayerID)// 同一个玩家ID多次提亲时可能同步多次,前端覆盖数据即可
+ NameLen = 0 #(BYTE NameLen)
+ PlayerName = "" #(String PlayerName)
+ BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x22
+ 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.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x22
+ self.PlayerID = 0
+ self.NameLen = 0
+ self.PlayerName = ""
+ self.BridePriceID = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += len(self.PlayerName)
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ 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.BridePriceID)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerID:%d,
+ NameLen:%d,
+ PlayerName:%s,
+ BridePriceID:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerID,
+ self.NameLen,
+ self.PlayerName,
+ self.BridePriceID
+ )
+ return DumpString
+
+
+m_NAtagGCMarryReqInfo=tagGCMarryReqInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqInfo.Head.Cmd,m_NAtagGCMarryReqInfo.Head.SubCmd))] = m_NAtagGCMarryReqInfo
+
+
+#------------------------------------------------------
+# B3 21 提亲发送成功 #tagGCMarryReqOK
+
+class tagGCMarryReqOK(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB3
+ 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 = 0xB3
+ self.SubCmd = 0x21
+ return
+
+ def GetLength(self):
+ return sizeof(tagGCMarryReqOK)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B3 21 提亲发送成功 //tagGCMarryReqOK:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagGCMarryReqOK=tagGCMarryReqOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqOK.Cmd,m_NAtagGCMarryReqOK.SubCmd))] = m_NAtagGCMarryReqOK
+
+
+#------------------------------------------------------
+# B3 23 提亲回应结果 #tagGCMarryResponseRet
+
+class tagGCMarryResponseRet(Structure):
+ Head = tagHead()
+ PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方
+ NameALen = 0 #(BYTE NameALen)
+ PlayerNameA = "" #(String PlayerNameA)
+ PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方
+ NameBLen = 0 #(BYTE NameBLen)
+ PlayerNameB = "" #(String PlayerNameB)
+ IsOK = 0 #(BYTE IsOK)// 是否同意,0-否,1-是; 如果同意则双方都会收到该包,根据玩家ID判断自己是请求或接受方,显示不同的同意结果界面;不同意只有请求方会收到
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x23
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen)
+ self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen)
+ self.IsOK,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x23
+ self.PlayerIDA = 0
+ self.NameALen = 0
+ self.PlayerNameA = ""
+ self.PlayerIDB = 0
+ self.NameBLen = 0
+ self.PlayerNameB = ""
+ self.IsOK = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += len(self.PlayerNameA)
+ length += 4
+ length += 1
+ length += len(self.PlayerNameB)
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteDWORD(data, self.PlayerIDA)
+ data = CommFunc.WriteBYTE(data, self.NameALen)
+ data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA)
+ data = CommFunc.WriteDWORD(data, self.PlayerIDB)
+ data = CommFunc.WriteBYTE(data, self.NameBLen)
+ data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB)
+ data = CommFunc.WriteBYTE(data, self.IsOK)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerIDA:%d,
+ NameALen:%d,
+ PlayerNameA:%s,
+ PlayerIDB:%d,
+ NameBLen:%d,
+ PlayerNameB:%s,
+ IsOK:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerIDA,
+ self.NameALen,
+ self.PlayerNameA,
+ self.PlayerIDB,
+ self.NameBLen,
+ self.PlayerNameB,
+ self.IsOK
+ )
+ return DumpString
+
+
+m_NAtagGCMarryResponseRet=tagGCMarryResponseRet()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryResponseRet.Head.Cmd,m_NAtagGCMarryResponseRet.Head.SubCmd))] = m_NAtagGCMarryResponseRet
+
+
+#------------------------------------------------------
+# B3 20 送花成功通知 #tagGCSendFlowersOK
+
+class tagGCSendFlowersOK(Structure):
+ Head = tagHead()
+ NameLen = 0 #(BYTE NameLen)// 赠送方玩家名
+ Name = "" #(String Name)//size = SrcNameLen
+ PlayerID = 0 #(DWORD PlayerID)// 赠送方玩家ID
+ FlowerCount = 0 #(DWORD FlowerCount)// 赠送花数量
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x20
+ return
+
+ 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)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB3
+ self.Head.SubCmd = 0x20
+ self.NameLen = 0
+ self.Name = ""
+ self.PlayerID = 0
+ self.FlowerCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += len(self.Name)
+ length += 4
+ length += 4
+
+ 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)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ NameLen:%d,
+ Name:%s,
+ PlayerID:%d,
+ FlowerCount:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.NameLen,
+ self.Name,
+ self.PlayerID,
+ self.FlowerCount
+ )
+ return DumpString
+
+
+m_NAtagGCSendFlowersOK=tagGCSendFlowersOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendFlowersOK.Head.Cmd,m_NAtagGCSendFlowersOK.Head.SubCmd))] = m_NAtagGCSendFlowersOK
+
+
+#------------------------------------------------------
#B3 01 添加社交对象 #tagGCAddSocialPlayer
class tagGCAddSocialPlayer(Structure):
@@ -7507,6 +8072,7 @@
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):
@@ -7521,6 +8087,7 @@
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):
@@ -7530,6 +8097,7 @@
self.LV = 0
self.RealmLV = 0
self.OnlineType = 0
+ self.CoupleID = 0
return
def GetLength(self):
@@ -7540,6 +8108,7 @@
length += 2
length += 2
length += 1
+ length += 4
return length
@@ -7551,6 +8120,7 @@
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):
@@ -7560,7 +8130,8 @@
Job:%d,
LV:%d,
RealmLV:%d,
- OnlineType:%d
+ OnlineType:%d,
+ CoupleID:%d
'''\
%(
self.PlayerID,
@@ -7568,7 +8139,8 @@
self.Job,
self.LV,
self.RealmLV,
- self.OnlineType
+ self.OnlineType,
+ self.CoupleID
)
return DumpString
@@ -7647,6 +8219,7 @@
_fields_ = [
("PlayerID", c_int),
("SortValue", c_int),
+ ("Intimacy", c_int), #亲密度 - 好友组才有值
]
def __init__(self):
@@ -7661,6 +8234,7 @@
def Clear(self):
self.PlayerID = 0
self.SortValue = 0
+ self.Intimacy = 0
return
def GetLength(self):
@@ -7672,11 +8246,13 @@
def OutputString(self):
DumpString = '''//B3 08 通知玩家分组信息 //tagGCGroupPlayers:
PlayerID:%d,
- SortValue:%d
+ SortValue:%d,
+ Intimacy:%d
'''\
%(
self.PlayerID,
- self.SortValue
+ self.SortValue,
+ self.Intimacy
)
return DumpString
@@ -12281,6 +12857,234 @@
#------------------------------------------------------
+# 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
+
+
+#------------------------------------------------------
+# B3 27 情戒信息 #tagMCLoveRingInfo
+
+class tagMCLoveRingInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ClassLV", c_ubyte), # 阶
+ ("StarLV", c_ubyte), # 星
+ ("EatCount", c_int), # 本星已淬炼道具数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB3
+ self.SubCmd = 0x27
+ 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 = 0x27
+ self.ClassLV = 0
+ self.StarLV = 0
+ self.EatCount = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCLoveRingInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B3 27 情戒信息 //tagMCLoveRingInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ ClassLV:%d,
+ StarLV:%d,
+ EatCount:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ClassLV,
+ self.StarLV,
+ self.EatCount
+ )
+ return DumpString
+
+
+m_NAtagMCLoveRingInfo=tagMCLoveRingInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingInfo.Cmd,m_NAtagMCLoveRingInfo.SubCmd))] = m_NAtagMCLoveRingInfo
+
+
+#------------------------------------------------------
+# B3 29 情戒解锁成功 #tagMCLoveRingUnlockOK
+
+class tagMCLoveRingUnlockOK(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB3
+ self.SubCmd = 0x29
+ 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 = 0x29
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCLoveRingUnlockOK)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B3 29 情戒解锁成功 //tagMCLoveRingUnlockOK:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagMCLoveRingUnlockOK=tagMCLoveRingUnlockOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingUnlockOK.Cmd,m_NAtagMCLoveRingUnlockOK.SubCmd))] = m_NAtagMCLoveRingUnlockOK
+
+
+#------------------------------------------------------
#A1 25 请求切换地图失败#tagMCChangeMapFail
class tagMCChangeMapFail(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 7786314..5f609af 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -136,6 +136,7 @@
import PlayerFaQi
import SkillShell
import PlayerYinji
+import PlayerLove
import GameObj
import datetime
@@ -685,6 +686,9 @@
#成就
PlayerSuccess.SuccOnLogin(curPlayer)
+ #情缘
+ PlayerLove.DoPlayerLogin(curPlayer)
+
#同步自动战斗配置记录
# Sync_AutoFightSetting(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
index 5fdb102..0b2cd6f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -107,6 +107,7 @@
import PlayerFairyDomain
import CrossPlayerData
import PlayerVip
+import PlayerLove
import PlayerDiceEx
import IpyGameDataPY
import FamilyRobBoss
@@ -542,7 +543,8 @@
if shareGameAwardState:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShareGameAwardState, 0)
ChPlayer.Sync_RewardGetRecordInfo(curPlayer, ChConfig.Def_RewardType_ShareGame, 0)
-
+ #情缘
+ PlayerLove.DoPlayerOnDay(curPlayer)
# 特殊时间点X点过天
elif onEventType == ShareDefine.Def_OnEventTypeEx:
# 资源找回
@@ -1345,6 +1347,15 @@
PyGameData.g_fairyDomainLimit = limitList
return
+ if key == ShareDefine.Def_Notify_WorldKey_CoupleInfo:
+ syncCoupleInfo = eval(msgValue)
+ for playerID, coupleInfo in syncCoupleInfo.items():
+ if not coupleInfo:
+ PyGameData.g_coupleInfo.pop(playerID, None)
+ else:
+ PyGameData.g_coupleInfo[playerID] = coupleInfo
+ return
+
if key.startswith(ShareDefine.Def_Notify_WorldKey_OperationActionInfo[:-2]):
keyHead = ShareDefine.Def_Notify_WorldKey_OperationActionInfo[:-2]
actionName = key[len(keyHead):]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 63705cf..2ba5892 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -200,6 +200,8 @@
Def_Notify_WorldKey_AssistBoss = "AssistBoss" # 协助boss
+Def_Notify_WorldKey_CoupleInfo = "CoupleInfo" # 伴侣信息
+
#活动类型定义
ActTypeList = (
ActType_OpenComm, # 开服及常规运营活动 1
@@ -727,9 +729,11 @@
Def_BT_SkyTower, #天星塔榜
Def_BT_Arena, #竞技场榜
Def_BT_Environment, #环保榜 (垃圾分类活动)
+ Def_BT_Charm, #魅力总榜 30
+ Def_BT_CharmDay, #魅力日榜
Def_BT_Max, #排行榜最大类型
-) = range(0, 29 + 2)
+) = range(0, 31 + 2)
''' 跨服排行榜类型, 从 150 开始
与本服榜单存储的是不一样的数据库表格,理论上类型可以和本服榜单类型重复,为了做下区分防误导,跨服榜单从 150 开始
@@ -1378,6 +1382,7 @@
ClientServerMsg_CollectNPC = "CollectNPC" # 采集NPC
ClientServerMsg_EnterFB = "EnterFB" # 请求进入跨服副本
ClientServerMsg_AddBuff = "AddBuff" # 添加BUFF
+ClientServerMsg_LuckyCloudBuy = "LuckyCloudBuy" # 幸运云购
#跨服广播类型定义
CrossNotify_CrossAct = "CrossAct"
@@ -1482,7 +1487,7 @@
)=range(5)
# 战斗力模块类型
-Def_MFPType_Max = 26
+Def_MFPType_Max = 27
ModuleFightPowerTypeList = (
Def_MFPType_Role, # 角色 0
Def_MFPType_Equip, # 装备(装备本身) 1
@@ -1509,6 +1514,7 @@
Def_MFPType_GatherSoul, # 聚魂 22
Def_MFPType_MagicWeapon4, # 王者法宝 23
Def_MFPType_Coat, # 时装 24
+Def_MFPType_Love, # 情缘 25
Def_MFPType_Other, # 其他
) = range(Def_MFPType_Max)
--
Gitblit v1.8.0