hxp
2024-11-18 831e286b614f05db6979369e465591e299963f4b
ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
@@ -171,7 +171,7 @@
        ('ID', ctypes.c_ulong),
        ('ID2', ctypes.c_ulong),
        ('Name1', ctypes.c_char * 33),
        ('Name2', ctypes.c_char * 33),
        ('Name2', ctypes.c_char * 65),
        ('Type2', ctypes.c_ubyte),
        ('Value1', ctypes.c_ulong),
        ('Value2', ctypes.c_ulong),
@@ -228,7 +228,7 @@
        self.ID, pos = CommFunc.ReadDWORD(buf, pos)
        self.ID2, pos = CommFunc.ReadDWORD(buf, pos)
        self.Name1, pos = CommFunc.ReadString(buf, pos, 33)
        self.Name2, pos = CommFunc.ReadString(buf, pos, 33)
        self.Name2, pos = CommFunc.ReadString(buf, pos, 65)
        self.Type2, pos = CommFunc.ReadBYTE(buf, pos)
        self.Value1, pos = CommFunc.ReadDWORD(buf, pos)
        self.Value2, pos = CommFunc.ReadDWORD(buf, pos)
@@ -254,7 +254,7 @@
        buf = CommFunc.WriteDWORD(buf, self.ID)
        buf = CommFunc.WriteDWORD(buf, self.ID2)
        buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.Name1)
        buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.Name2)
        buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 65, self.Name2)
        buf = CommFunc.WriteBYTE(buf, self.Type2)
        buf = CommFunc.WriteDWORD(buf, self.Value1)
        buf = CommFunc.WriteDWORD(buf, self.Value2)
@@ -279,7 +279,7 @@
        length += sizeof(ctypes.c_ulong)
        length += sizeof(ctypes.c_ulong)
        length += sizeof(ctypes.c_char) * 33
        length += sizeof(ctypes.c_char) * 33
        length += sizeof(ctypes.c_char) * 65
        length += sizeof(ctypes.c_ubyte)
        length += sizeof(ctypes.c_ulong)
        length += sizeof(ctypes.c_ulong)
@@ -354,10 +354,10 @@
            self.Name1 = Str[:33]
            
    def SetName2(self,Str):
        if len(Str)<=33:
        if len(Str)<=65:
            self.Name2 = Str
        else:
            self.Name2 = Str[:33]
            self.Name2 = Str[:65]
            
@@ -1672,6 +1672,8 @@
        ('PKScore', ctypes.c_ulong),
        ('DanLV', ctypes.c_ubyte),
        ('Time', ctypes.c_ulong),
        ('Face', ctypes.c_ulong),
        ('FacePic', ctypes.c_ulong),
        ('ADOResult', ctypes.c_ulong),
    ]
@@ -1699,6 +1701,8 @@
        self.PKScore, pos = CommFunc.ReadDWORD(buf, pos)
        self.DanLV, pos = CommFunc.ReadBYTE(buf, pos)
        self.Time, pos = CommFunc.ReadDWORD(buf, pos)
        self.Face, pos = CommFunc.ReadDWORD(buf, pos)
        self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
        return self.getLength()
@@ -1722,6 +1726,8 @@
            PKScore = %s,
            DanLV = %s,
            Time = %s,
            Face = %s,
            FacePic = %s,
            ADOResult = %s,
            '''%(
                self.ZoneID,
@@ -1734,6 +1740,8 @@
                self.PKScore,
                self.DanLV,
                self.Time,
                self.Face,
                self.FacePic,
                self.ADOResult,
            )
        return output
@@ -2400,6 +2408,7 @@
        ('OnlineType', ctypes.c_ubyte),
        ('RefCount', ctypes.c_ulong),
        ('Face', ctypes.c_ulong),
        ('FacePic', ctypes.c_ulong),
        ('ADOResult', ctypes.c_ulong),
    ]
@@ -2425,6 +2434,7 @@
        self.OnlineType, pos = CommFunc.ReadBYTE(buf, pos)
        self.RefCount, pos = CommFunc.ReadDWORD(buf, pos)
        self.Face, pos = CommFunc.ReadDWORD(buf, pos)
        self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
        return self.getLength()
@@ -2446,6 +2456,7 @@
            OnlineType = %s,
            RefCount = %s,
            Face = %s,
            FacePic = %s,
            ADOResult = %s,
            '''%(
                self.PlayerID,
@@ -2456,6 +2467,7 @@
                self.OnlineType,
                self.RefCount,
                self.Face,
                self.FacePic,
                self.ADOResult,
            )
        return output