10130 【后端】福地争夺资源功能(福地记录信息增加同步目标玩家名等信息)
3个文件已修改
116 ■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -8079,48 +8079,74 @@
# B0 35 福地记录信息 #tagGCMineAreaRecordInfo
class  tagGCMineAreaRecord(Structure):
    _pack_ = 1
    _fields_ = [
                  ("RecordType", c_ubyte),    # 记录类型;1-自己拉物品;2-物品被人抢
                  ("TagPlayerID", c_int),    # 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
                  ("RecordTime", c_int),    # 记录时间戳
                  ("MineID", c_ushort),    # 矿物ID,对应福地采集表中ID
                  ]
    RecordType = 0    #(BYTE RecordType)// 记录类型;1-自己拉物品;2-物品被人抢
    TagPlayerID = 0    #(DWORD TagPlayerID)// 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
    RecordTime = 0    #(DWORD RecordTime)// 记录时间戳
    MineID = 0    #(WORD MineID)// 矿物ID,对应福地采集表中ID
    TagPlayerName = ""    #(char TagPlayerName[33])
    TagFace = 0    #(DWORD TagFace)
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, stringData, _pos=0, _len=0):
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
        self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TagPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RecordTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.MineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
        self.TagFace,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.RecordType = 0
        self.TagPlayerID = 0
        self.RecordTime = 0
        self.MineID = 0
        self.TagPlayerName = ""
        self.TagFace = 0
        return
    def GetLength(self):
        return sizeof(tagGCMineAreaRecord)
        length = 0
        length += 1
        length += 4
        length += 4
        length += 2
        length += 33
        length += 4
        return length
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
        data = ''
        data = CommFunc.WriteBYTE(data, self.RecordType)
        data = CommFunc.WriteDWORD(data, self.TagPlayerID)
        data = CommFunc.WriteDWORD(data, self.RecordTime)
        data = CommFunc.WriteWORD(data, self.MineID)
        data = CommFunc.WriteString(data, 33, self.TagPlayerName)
        data = CommFunc.WriteDWORD(data, self.TagFace)
        return data
    def OutputString(self):
        DumpString = '''// B0 35 福地记录信息 //tagGCMineAreaRecordInfo:
        DumpString = '''
                                RecordType:%d,
                                TagPlayerID:%d,
                                RecordTime:%d,
                                MineID:%d
                                MineID:%d,
                                TagPlayerName:%s,
                                TagFace:%d
                                '''\
                                %(
                                self.RecordType,
                                self.TagPlayerID,
                                self.RecordTime,
                                self.MineID
                                self.MineID,
                                self.TagPlayerName,
                                self.TagFace
                                )
        return DumpString
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py
@@ -1262,6 +1262,10 @@
        recordInfo.TagPlayerID = recData.TagPlayerID
        recordInfo.RecordTime = recData.RecordTime
        recordInfo.MineID = recData.MineID
        if playerID != recordInfo.TagPlayerID and recordInfo.TagPlayerID > Def_FakeAreaCount:
            tagCacheDict = PlayerViewCache.GetCachePropDataDict(PlayerViewCache.FindViewCache(recordInfo.TagPlayerID))
            recordInfo.TagPlayerName = tagCacheDict.get("Name", "")
            recordInfo.TagFace = tagCacheDict.get("Face", 0)
        clientPack.AreaRecordList.append(recordInfo)
    clientPack.RecordCount = len(clientPack.AreaRecordList)
    NetPackCommon.SendFakePack(curPlayer, clientPack)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -8079,48 +8079,74 @@
# B0 35 福地记录信息 #tagGCMineAreaRecordInfo
class  tagGCMineAreaRecord(Structure):
    _pack_ = 1
    _fields_ = [
                  ("RecordType", c_ubyte),    # 记录类型;1-自己拉物品;2-物品被人抢
                  ("TagPlayerID", c_int),    # 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
                  ("RecordTime", c_int),    # 记录时间戳
                  ("MineID", c_ushort),    # 矿物ID,对应福地采集表中ID
                  ]
    RecordType = 0    #(BYTE RecordType)// 记录类型;1-自己拉物品;2-物品被人抢
    TagPlayerID = 0    #(DWORD TagPlayerID)// 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
    RecordTime = 0    #(DWORD RecordTime)// 记录时间戳
    MineID = 0    #(WORD MineID)// 矿物ID,对应福地采集表中ID
    TagPlayerName = ""    #(char TagPlayerName[33])
    TagFace = 0    #(DWORD TagFace)
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, stringData, _pos=0, _len=0):
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
        self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.TagPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RecordTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.MineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
        self.TagFace,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.RecordType = 0
        self.TagPlayerID = 0
        self.RecordTime = 0
        self.MineID = 0
        self.TagPlayerName = ""
        self.TagFace = 0
        return
    def GetLength(self):
        return sizeof(tagGCMineAreaRecord)
        length = 0
        length += 1
        length += 4
        length += 4
        length += 2
        length += 33
        length += 4
        return length
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
        data = ''
        data = CommFunc.WriteBYTE(data, self.RecordType)
        data = CommFunc.WriteDWORD(data, self.TagPlayerID)
        data = CommFunc.WriteDWORD(data, self.RecordTime)
        data = CommFunc.WriteWORD(data, self.MineID)
        data = CommFunc.WriteString(data, 33, self.TagPlayerName)
        data = CommFunc.WriteDWORD(data, self.TagFace)
        return data
    def OutputString(self):
        DumpString = '''// B0 35 福地记录信息 //tagGCMineAreaRecordInfo:
        DumpString = '''
                                RecordType:%d,
                                TagPlayerID:%d,
                                RecordTime:%d,
                                MineID:%d
                                MineID:%d,
                                TagPlayerName:%s,
                                TagFace:%d
                                '''\
                                %(
                                self.RecordType,
                                self.TagPlayerID,
                                self.RecordTime,
                                self.MineID
                                self.MineID,
                                self.TagPlayerName,
                                self.TagFace
                                )
        return DumpString