6603 【后端】【2.0】增加新版的sp和被动技能 - 增加前端用的印记包
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 0D 战斗印记 #tagCMYinji
|
| | |
|
| | | class tagCMYinji(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Count", c_ubyte), |
| | | ("Type", c_ubyte), # 0 加,1减
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x0D
|
| | | 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 = 0x0D
|
| | | self.Count = 0
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMYinji)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 0D 战斗印记 //tagCMYinji:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Count:%d,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Count,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMYinji=tagCMYinji()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMYinji.Cmd,m_NAtagCMYinji.SubCmd))] = m_NAtagCMYinji
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B4 03 吸引NPC仇恨 #tagNPCAttention
|
| | |
|
| | | class tagNPCAttention(Structure):
|
| | |
| | | PacketSubCMD_4=0x16
|
| | | PacketCallFunc_4=OnSelectSkillElement
|
| | |
|
| | |
|
| | | ;印记
|
| | | [yinji]
|
| | | ScriptName = Player\PlayerYinji.py
|
| | | Writer = Alee
|
| | | Releaser = Alee
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0xB4
|
| | | PacketSubCMD_1=0x0D
|
| | | PacketCallFunc_1=OnYinji
|
| | |
|
| | |
|
| | |
|
| | | ;交易所
|
| | | [PlayerBourseTube]
|
| | | ScriptName = Player\PlayerBourseTube.py
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 0D 战斗印记 #tagCMYinji
|
| | |
|
| | | class tagCMYinji(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Count", c_ubyte), |
| | | ("Type", c_ubyte), # 0 加,1减
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x0D
|
| | | 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 = 0x0D
|
| | | self.Count = 0
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMYinji)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 0D 战斗印记 //tagCMYinji:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Count:%d,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Count,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMYinji=tagCMYinji()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMYinji.Cmd,m_NAtagCMYinji.SubCmd))] = m_NAtagCMYinji
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B4 03 吸引NPC仇恨 #tagNPCAttention
|
| | |
|
| | | class tagNPCAttention(Structure):
|
| | |
| | | curPlayer.SetDict(Def_LastYinji_Tick, GameWorld.GetGameWorld().GetTick())
|
| | | pack = ChPyNetSendPack.tagMCYinjiStartTime()
|
| | |
|
| | | NetPackCommon.SendFakePack(curPlayer, pack) |
| | | NetPackCommon.SendFakePack(curPlayer, pack)
|
| | | |
| | | |
| | | #===============================================================================
|
| | | # // B4 0D 战斗印记 #tagCMYinji
|
| | | # |
| | | # struct tagCMYinji
|
| | | # {
|
| | | # tagHead Head;
|
| | | # BYTE Count;
|
| | | # BYTE Type; // 0 加,1减
|
| | | # };
|
| | | #===============================================================================
|
| | | def OnYinji(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | if curPlayer.GetLV() > 100:
|
| | | # 只是为了前期前端战斗的使用
|
| | | return
|
| | | |
| | | if clientData.Type == 0:
|
| | | AddYinji(curPlayer, clientData.Count)
|
| | | elif clientData.Type == 1:
|
| | | SubYinji(curPlayer, clientData.Count)
|
| | | return
|
| | |
|
| | |
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 使用技能后减少印记数量 消耗模式0:固定个数,1.大于1小于限制个数可释放
|
| | | # @todo: 使用技能后减少印记数量 消耗模式0:固定个数,1.大于1可释放,消耗个数大于1小于等于限制个数
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2019-4-26 下午05:52:27
|