hxp
2019-05-31 3bc111d39530eca57909ff49ff7355c87f06a451
6805 【后端】【2.0】副本前端化(增加回收木桩支持)
4个文件已修改
132 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -14514,6 +14514,58 @@
#------------------------------------------------------
# B4 0F 回收私有专属木桩怪 #tagCMRecyclePriWoodPile
class  tagCMRecyclePriWoodPile(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ObjID", c_int),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB4
        self.SubCmd = 0x0F
        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 = 0xB4
        self.SubCmd = 0x0F
        self.ObjID = 0
        return
    def GetLength(self):
        return sizeof(tagCMRecyclePriWoodPile)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B4 0F 回收私有专属木桩怪 //tagCMRecyclePriWoodPile:
                                Cmd:%s,
                                SubCmd:%s,
                                ObjID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ObjID
                                )
        return DumpString
m_NAtagCMRecyclePriWoodPile=tagCMRecyclePriWoodPile()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRecyclePriWoodPile.Cmd,m_NAtagCMRecyclePriWoodPile.SubCmd))] = m_NAtagCMRecyclePriWoodPile
#------------------------------------------------------
# B4 0E 玩家掉血 #tagCMRoleLostHP
class  tagCMRoleLostHP(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -751,7 +751,7 @@
Writer = hxp
Releaser = hxp
RegType = 0
RegisterPackCount = 5
RegisterPackCount = 6
PacketCMD_1=0xA5
PacketSubCMD_1=0x52
@@ -773,6 +773,10 @@
PacketSubCMD_5=0x0C
PacketCallFunc_5=OnSummonPriWoodPile
PacketCMD_6=0xB4
PacketSubCMD_6=0x0F
PacketCallFunc_6=OnRecyclePriWoodPile
;资源找回
[PlayerRecover]
ScriptName = Player\PlayerRecover.py
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -14514,6 +14514,58 @@
#------------------------------------------------------
# B4 0F 回收私有专属木桩怪 #tagCMRecyclePriWoodPile
class  tagCMRecyclePriWoodPile(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ObjID", c_int),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB4
        self.SubCmd = 0x0F
        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 = 0xB4
        self.SubCmd = 0x0F
        self.ObjID = 0
        return
    def GetLength(self):
        return sizeof(tagCMRecyclePriWoodPile)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B4 0F 回收私有专属木桩怪 //tagCMRecyclePriWoodPile:
                                Cmd:%s,
                                SubCmd:%s,
                                ObjID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ObjID
                                )
        return DumpString
m_NAtagCMRecyclePriWoodPile=tagCMRecyclePriWoodPile()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRecyclePriWoodPile.Cmd,m_NAtagCMRecyclePriWoodPile.SubCmd))] = m_NAtagCMRecyclePriWoodPile
#------------------------------------------------------
# B4 0E 玩家掉血 #tagCMRoleLostHP
class  tagCMRoleLostHP(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -2003,6 +2003,28 @@
        
    return
#// B4 0F 回收私有专属木桩怪 #tagCMRecyclePriWoodPile
#
#struct    tagCMRecyclePriWoodPile
#{
#    tagHead        Head;
#    DWORD        ObjID;
#};
def OnRecyclePriWoodPile(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    objID = clientData.ObjID
    curNPC = GameWorld.FindNPCByID(objID)
    if not curNPC:
        return
    if curNPC.GetType() not in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
        return
    summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PriWoodPilePlayerID)
    if curPlayer.GetPlayerID() != summonPlayerID:
        #GameWorld.DebugLog("非玩家私有木桩...")
        return
    SetDeadEx(curNPC)
    return
#// B4 0C 召唤私有专属木桩怪 #tagCMSummonPriWoodPile
#
#struct    tagCMSummonPriWoodPile