6805 【后端】【2.0】副本前端化(增加回收木桩支持)
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|
| | |
| | | Writer = hxp
|
| | | Releaser = hxp
|
| | | RegType = 0
|
| | | RegisterPackCount = 5
|
| | | RegisterPackCount = 6
|
| | |
|
| | | PacketCMD_1=0xA5
|
| | | PacketSubCMD_1=0x52
|
| | |
| | | PacketSubCMD_5=0x0C
|
| | | PacketCallFunc_5=OnSummonPriWoodPile
|
| | |
|
| | | PacketCMD_6=0xB4
|
| | | PacketSubCMD_6=0x0F
|
| | | PacketCallFunc_6=OnRecyclePriWoodPile
|
| | |
|
| | | ;资源找回
|
| | | [PlayerRecover]
|
| | | ScriptName = Player\PlayerRecover.py
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|
| | |
| | |
|
| | | 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
|