hxp
2021-05-07 6faea8f62e2c62a03077c73e6370d5fb0bbafdd5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChNetSendPack.py
@@ -274,6 +274,7 @@
                  ("ObjID", c_int),    
                  ("AttackType", c_ubyte),    #爆击, miss
                  ("HurtHP", c_int),    
                  ("HurtHPEx", c_int),
                  ("CurHP", c_int),    
                  ("CurHPEx", c_int),    
                  ]
@@ -292,6 +293,7 @@
        self.ObjID = 0
        self.AttackType = 0
        self.HurtHP = 0
        self.HurtHPEx = 0
        self.CurHP = 0
        self.CurHPEx = 0
        return
@@ -308,6 +310,7 @@
                                ObjID:%d,
                                AttackType:%d,
                                HurtHP:%d,
                                HurtHPEx:%d,
                                CurHP:%d,
                                CurHPEx:%d
                                '''\
@@ -316,6 +319,7 @@
                                self.ObjID,
                                self.AttackType,
                                self.HurtHP,
                                self.HurtHPEx,
                                self.CurHP,
                                self.CurHPEx
                                )
@@ -332,6 +336,7 @@
    PosY = 0    #(WORD PosY)
    HurtCount = 0    #(WORD HurtCount)//伤害数目
    HurtList = list()    #(vector<tagSkillPosHurtObj> HurtList)//size = HurtCount
    SkillElementID = 0    #(WORD SkillElementID)//专精技能ID
    data = None
    def __init__(self):
@@ -354,6 +359,7 @@
            temHurtList = tagSkillPosHurtObj()
            _pos = temHurtList.ReadData(_lpData, _pos)
            self.HurtList.append(temHurtList)
        self.SkillElementID,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
@@ -369,6 +375,7 @@
        self.PosY = 0
        self.HurtCount = 0
        self.HurtList = list()
        self.SkillElementID = 0
        return
    def GetLength(self):
@@ -383,6 +390,7 @@
        length += 2
        for i in range(self.HurtCount):
            length += self.HurtList[i].GetLength()
        length += 2
        return length
@@ -398,6 +406,7 @@
        data = CommFunc.WriteWORD(data, self.HurtCount)
        for i in range(self.HurtCount):
            data = CommFunc.WriteString(data, self.HurtList[i].GetLength(), self.HurtList[i].GetBuffer())
        data = CommFunc.WriteWORD(data, self.SkillElementID)
        return data
    def OutputString(self):
@@ -410,7 +419,8 @@
                                PosX:%d,
                                PosY:%d,
                                HurtCount:%d,
                                HurtList:%s
                                HurtList:%s,
                                SkillElementID:%d
                                '''\
                                %(
                                self.Head.OutputString(),
@@ -421,7 +431,8 @@
                                self.PosX,
                                self.PosY,
                                self.HurtCount,
                                "..."
                                "...",
                                self.SkillElementID
                                )
        return DumpString
@@ -844,7 +855,7 @@
    MaxHP = 0    #(DWORD MaxHP)
    MaxHPEx = 0    #(DWORD MaxHPEx)
    Speed = 0    #(WORD Speed)
    LV = 0    #(BYTE LV)
    LV = 0    #(WORD LV)
    OwnerNameLen = 0    #(BYTE OwnerNameLen)
    OwnerName = ""    #(String OwnerName)//size = OwnerNameLen
    data = None
@@ -869,7 +880,7 @@
        self.MaxHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.MaxHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.Speed,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.LV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.OwnerNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.OwnerName,_pos = CommFunc.ReadString(_lpData, _pos,self.OwnerNameLen)
        return _pos
@@ -909,7 +920,7 @@
        length += 4
        length += 4
        length += 2
        length += 1
        length += 2
        length += 1
        length += len(self.OwnerName)
@@ -929,7 +940,7 @@
        data = CommFunc.WriteDWORD(data, self.MaxHP)
        data = CommFunc.WriteDWORD(data, self.MaxHPEx)
        data = CommFunc.WriteWORD(data, self.Speed)
        data = CommFunc.WriteBYTE(data, self.LV)
        data = CommFunc.WriteWORD(data, self.LV)
        data = CommFunc.WriteBYTE(data, self.OwnerNameLen)
        data = CommFunc.WriteString(data, self.OwnerNameLen, self.OwnerName)
        return data