6373 【后端】【2.0】删除无用功能代码、封包、配置(页游天梯)
| | |
| | | PacketCallFunc_2=OnQueryBourseItemOnSale
|
| | |
|
| | |
|
| | |
|
| | | ;天梯竞技场
|
| | | [HighLadder]
|
| | | ScriptName = Player\HighLadder.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 2
|
| | |
|
| | | PacketCMD_1=0x1A
|
| | | PacketSubCMD_1=0x11
|
| | | PacketCallFunc_1=OnHightLadderTopPlayerQuery
|
| | |
|
| | | PacketCMD_2=0x1A
|
| | | PacketSubCMD_2=0x12
|
| | | PacketCallFunc_2=OnHightLadderCanFightPlayerQuery
|
| | | ;----------------------------------------------
|
| | | ;世界服务器Py解析Client包
|
| | | ;---------------------------------------------- |
| | |
| | | PacketSubCMD_5=0x05
|
| | | PacketCallFunc_5=OnMGPlayerRecaptureBourseItem
|
| | |
|
| | | ;天梯竞技场
|
| | | [HighLadder]
|
| | | ScriptName = Player\HighLadder.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | |
|
| | | PacketCMD_1=0x03
|
| | | PacketSubCMD_1=0x02
|
| | | PacketCallFunc_1=OnMGHighLadderChallenge
|
| | |
|
| | | ;GM补偿
|
| | | [Compensation]
|
| | | ScriptName = Player\PlayerCompensation
|
| | |
| | | ShareDefine.Def_BT_NewFCCostGold : 5, #消费排行榜(仙界盛典)
|
| | | ShareDefine.Def_BT_FBHelpBattle : 100, #助战次数榜
|
| | | ShareDefine.Def_BT_ZhuXianTower : 100, #诛仙塔榜
|
| | | ShareDefine.Def_BT_HighLadder : 1000, #玩家天梯竞技场排行
|
| | | ShareDefine.Def_BT_HighLadder_Yester : 1000, #玩家天梯竞技场昨日排行
|
| | | }
|
| | |
|
| | | #排行榜保存类型(和BillboardType匹配), 默认保存, 如果不保存,可配置进去
|
| | |
| | | Def_GiveMoney_Warehouse, # 仓库
|
| | | Def_GiveMoney_SellPackItem, # 出售背包物品
|
| | | Def_GiveMoney_CollectNPC, # 采集NPC
|
| | | Def_GiveMoney_HighLadder, # 天梯竞技场 20
|
| | | Def_GiveMoney_20,
|
| | | Def_GiveMoney_StallItem, # 摆摊
|
| | | Def_GiveMoney_Trade, # 交易
|
| | | Def_GiveMoney_Truck, # 运镖
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #03 01 天梯竞技场玩家挑战结果同步#tagGMHighLadderChallengeReuslt
|
| | |
|
| | | class tagGMHighLadderChallengeReuslt(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)//玩家ID
|
| | | Result = 0 #(BYTE Result)//结果
|
| | | PlusInfoSize = 0 #(WORD PlusInfoSize)
|
| | | PlusInfo = "" #(String PlusInfo)//附带信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PlusInfoSize,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PlusInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusInfoSize)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x01
|
| | | self.PlayerID = 0
|
| | | self.Result = 0
|
| | | self.PlusInfoSize = 0
|
| | | self.PlusInfo = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.PlusInfo)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Result)
|
| | | data = CommFunc.WriteWORD(data, self.PlusInfoSize)
|
| | | data = CommFunc.WriteString(data, self.PlusInfoSize, self.PlusInfo)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerID:%d,
|
| | | Result:%d,
|
| | | PlusInfoSize:%d,
|
| | | PlusInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerID,
|
| | | self.Result,
|
| | | self.PlusInfoSize,
|
| | | self.PlusInfo
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGMHighLadderChallengeReuslt=tagGMHighLadderChallengeReuslt()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMHighLadderChallengeReuslt.Head.Cmd,m_NAtagGMHighLadderChallengeReuslt.Head.SubCmd))] = m_NAtagGMHighLadderChallengeReuslt
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #02 01 查询玩家是否可以添加交易所物品结果#tagGMCheckAddPlayerBourseItemResult
|
| | |
|
| | | class tagGMCheckAddPlayerBourseItemResult(Structure):
|
| | |
| | | PlusDataSize = 0 #(DWORD PlusDataSize)
|
| | | PlusData = "" #(String PlusData)//扩展记录
|
| | | IsLogouting = 0 #(BYTE IsLogouting)//本次是否为下线同步
|
| | | OffTime = 0 #(DWORD OffTime)// 下线时间戳
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize)
|
| | | self.IsLogouting,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.OffTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.PlusDataSize = 0
|
| | | self.PlusData = ""
|
| | | self.IsLogouting = 0
|
| | | self.OffTime = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 4
|
| | | length += len(self.PlusData)
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.PlusDataSize)
|
| | | data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData)
|
| | | data = CommFunc.WriteBYTE(data, self.IsLogouting)
|
| | | data = CommFunc.WriteDWORD(data, self.OffTime)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | ItemData:%s,
|
| | | PlusDataSize:%d,
|
| | | PlusData:%s,
|
| | | IsLogouting:%d,
|
| | | OffTime:%d
|
| | | IsLogouting:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.ItemData,
|
| | | self.PlusDataSize,
|
| | | self.PlusData,
|
| | | self.IsLogouting,
|
| | | self.OffTime
|
| | | self.IsLogouting
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | m_NAtagMGAddFamilyDetail=tagMGAddFamilyDetail()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGAddFamilyDetail.Cmd,m_NAtagMGAddFamilyDetail.SubCmd))] = m_NAtagMGAddFamilyDetail
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #03 02 天梯竞技场玩家发起挑战#tagMGHighLadderChallenge
|
| | |
|
| | | class tagHightLadderItemInfo(Structure):
|
| | | ItemTypeID = 0 #(DWORD ItemTypeID)//物品ID
|
| | | ItemPlaceType = 0 #(BYTE ItemPlaceType)//物品位置的背包类型
|
| | | ItemPlaceIndex = 0 #(BYTE ItemPlaceIndex)//物品所在的索引
|
| | | Count = 0 #(WORD Count)//单组数量
|
| | | ItemStarLV = 0 #(BYTE ItemStarLV)//装备星级
|
| | | IdentifyPar = 0 #(BYTE IdentifyPar)//鉴定参数
|
| | | CurDurg = 0 #(DWORD CurDurg)//当前耐久
|
| | | MaxDurg = 0 #(DWORD MaxDurg)//最大耐久
|
| | | CanPlaceStoneCount = 0 #(BYTE CanPlaceStoneCount)//可镶嵌宝石数0表示不可以镶嵌宝石
|
| | | ItemProperty = 0 #(BYTE ItemProperty)//装备五行
|
| | | SoulProperty = 0 #(WORD SoulProperty)//灵魂属性属性
|
| | | Maker = 0 #(DWORD Maker)//制作者ID
|
| | | MakerName = "" #(char MakerName[33])//制造者名字
|
| | | Stone1 = 0 #(DWORD Stone1)//镶嵌宝石1
|
| | | Stone2 = 0 #(DWORD Stone2)//镶嵌宝石
|
| | | Stone3 = 0 #(DWORD Stone3)//镶嵌宝石
|
| | | Stone4 = 0 #(DWORD Stone4)//镶嵌宝石
|
| | | Stone5 = 0 #(DWORD Stone5)//镶嵌宝石
|
| | | Stone6 = 0 #(DWORD Stone6)//镶嵌宝石
|
| | | Stone7 = 0 #(DWORD Stone7)//镶嵌宝石
|
| | | Stone8 = 0 #(DWORD Stone8)//镶嵌宝石
|
| | | Stone9 = 0 #(DWORD Stone9)//镶嵌宝石
|
| | | IsRenZhu = 0 #(BYTE IsRenZhu)//是否认主
|
| | | EquipDefenseValue = 0 #(DWORD EquipDefenseValue)//用于记录装备的防御值
|
| | | EquipMinAtkValue = 0 #(DWORD EquipMinAtkValue)//用于记录装备的最小伤害值
|
| | | EquipMaxAtkValue = 0 #(DWORD EquipMaxAtkValue)//用于记录装备的最大伤害值
|
| | | UserDataLen = 0 #(DWORD UserDataLen)
|
| | | UserData = "" #(String UserData)//自定义数据
|
| | | FitLV = 0 #(BYTE FitLV)//物品契合等级
|
| | | Proficiency = 0 #(DWORD Proficiency)//熟练度
|
| | | IsSuite = 0 #(BYTE IsSuite)//是否已经套装化
|
| | | BaseHP = 0 #(DWORD BaseHP)// HP基础值
|
| | | BaseMagicDef = 0 #(DWORD BaseMagicDef)//内防基础值
|
| | | MaxAddSkillCnt = 0 #(BYTE MaxAddSkillCnt)// 最大附魔次数
|
| | | PetID = 0 #(DWORD PetID)//装备该装备的宠物ID,为0则未装备
|
| | | EquipMagicDefValue = 0 #(DWORD EquipMagicDefValue)//装备内防值
|
| | | EquipMinMagicAtkValue = 0 #(DWORD EquipMinMagicAtkValue)//装备最小内攻
|
| | | EquipMaxMagicAtkValue = 0 #(DWORD EquipMaxMagicAtkValue)//装备最大内攻
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.ItemTypeID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ItemPlaceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemPlaceIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ItemStarLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IdentifyPar,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CurDurg,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MaxDurg,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.CanPlaceStoneCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemProperty,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SoulProperty,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Maker,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MakerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.Stone1,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone2,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone3,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone4,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone5,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone6,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone7,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone8,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone9,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.IsRenZhu,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.EquipDefenseValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMinAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMaxAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.UserDataLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen)
|
| | | self.FitLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Proficiency,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.IsSuite,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.BaseHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.BaseMagicDef,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MaxAddSkillCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PetID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMagicDefValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMinMagicAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMaxMagicAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.ItemTypeID = 0
|
| | | self.ItemPlaceType = 0
|
| | | self.ItemPlaceIndex = 0
|
| | | self.Count = 0
|
| | | self.ItemStarLV = 0
|
| | | self.IdentifyPar = 0
|
| | | self.CurDurg = 0
|
| | | self.MaxDurg = 0
|
| | | self.CanPlaceStoneCount = 0
|
| | | self.ItemProperty = 0
|
| | | self.SoulProperty = 0
|
| | | self.Maker = 0
|
| | | self.MakerName = ""
|
| | | self.Stone1 = 0
|
| | | self.Stone2 = 0
|
| | | self.Stone3 = 0
|
| | | self.Stone4 = 0
|
| | | self.Stone5 = 0
|
| | | self.Stone6 = 0
|
| | | self.Stone7 = 0
|
| | | self.Stone8 = 0
|
| | | self.Stone9 = 0
|
| | | self.IsRenZhu = 0
|
| | | self.EquipDefenseValue = 0
|
| | | self.EquipMinAtkValue = 0
|
| | | self.EquipMaxAtkValue = 0
|
| | | self.UserDataLen = 0
|
| | | self.UserData = ""
|
| | | self.FitLV = 0
|
| | | self.Proficiency = 0
|
| | | self.IsSuite = 0
|
| | | self.BaseHP = 0
|
| | | self.BaseMagicDef = 0
|
| | | self.MaxAddSkillCnt = 0
|
| | | self.PetID = 0
|
| | | self.EquipMagicDefValue = 0
|
| | | self.EquipMinMagicAtkValue = 0
|
| | | self.EquipMaxMagicAtkValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 33
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += len(self.UserData)
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.ItemTypeID)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemPlaceType)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemPlaceIndex)
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemStarLV)
|
| | | data = CommFunc.WriteBYTE(data, self.IdentifyPar)
|
| | | data = CommFunc.WriteDWORD(data, self.CurDurg)
|
| | | data = CommFunc.WriteDWORD(data, self.MaxDurg)
|
| | | data = CommFunc.WriteBYTE(data, self.CanPlaceStoneCount)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemProperty)
|
| | | data = CommFunc.WriteWORD(data, self.SoulProperty)
|
| | | data = CommFunc.WriteDWORD(data, self.Maker)
|
| | | data = CommFunc.WriteString(data, 33, self.MakerName)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone1)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone2)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone3)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone4)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone5)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone6)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone7)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone8)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone9)
|
| | | data = CommFunc.WriteBYTE(data, self.IsRenZhu)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipDefenseValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMinAtkValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMaxAtkValue)
|
| | | data = CommFunc.WriteDWORD(data, self.UserDataLen)
|
| | | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData)
|
| | | data = CommFunc.WriteBYTE(data, self.FitLV)
|
| | | data = CommFunc.WriteDWORD(data, self.Proficiency)
|
| | | data = CommFunc.WriteBYTE(data, self.IsSuite)
|
| | | data = CommFunc.WriteDWORD(data, self.BaseHP)
|
| | | data = CommFunc.WriteDWORD(data, self.BaseMagicDef)
|
| | | data = CommFunc.WriteBYTE(data, self.MaxAddSkillCnt)
|
| | | data = CommFunc.WriteDWORD(data, self.PetID)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMagicDefValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMinMagicAtkValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMaxMagicAtkValue)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | ItemTypeID:%d,
|
| | | ItemPlaceType:%d,
|
| | | ItemPlaceIndex:%d,
|
| | | Count:%d,
|
| | | ItemStarLV:%d,
|
| | | IdentifyPar:%d,
|
| | | CurDurg:%d,
|
| | | MaxDurg:%d,
|
| | | CanPlaceStoneCount:%d,
|
| | | ItemProperty:%d,
|
| | | SoulProperty:%d,
|
| | | Maker:%d,
|
| | | MakerName:%s,
|
| | | Stone1:%d,
|
| | | Stone2:%d,
|
| | | Stone3:%d,
|
| | | Stone4:%d,
|
| | | Stone5:%d,
|
| | | Stone6:%d,
|
| | | Stone7:%d,
|
| | | Stone8:%d,
|
| | | Stone9:%d,
|
| | | IsRenZhu:%d,
|
| | | EquipDefenseValue:%d,
|
| | | EquipMinAtkValue:%d,
|
| | | EquipMaxAtkValue:%d,
|
| | | UserDataLen:%d,
|
| | | UserData:%s,
|
| | | FitLV:%d,
|
| | | Proficiency:%d,
|
| | | IsSuite:%d,
|
| | | BaseHP:%d,
|
| | | BaseMagicDef:%d,
|
| | | MaxAddSkillCnt:%d,
|
| | | PetID:%d,
|
| | | EquipMagicDefValue:%d,
|
| | | EquipMinMagicAtkValue:%d,
|
| | | EquipMaxMagicAtkValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemTypeID,
|
| | | self.ItemPlaceType,
|
| | | self.ItemPlaceIndex,
|
| | | self.Count,
|
| | | self.ItemStarLV,
|
| | | self.IdentifyPar,
|
| | | self.CurDurg,
|
| | | self.MaxDurg,
|
| | | self.CanPlaceStoneCount,
|
| | | self.ItemProperty,
|
| | | self.SoulProperty,
|
| | | self.Maker,
|
| | | self.MakerName,
|
| | | self.Stone1,
|
| | | self.Stone2,
|
| | | self.Stone3,
|
| | | self.Stone4,
|
| | | self.Stone5,
|
| | | self.Stone6,
|
| | | self.Stone7,
|
| | | self.Stone8,
|
| | | self.Stone9,
|
| | | self.IsRenZhu,
|
| | | self.EquipDefenseValue,
|
| | | self.EquipMinAtkValue,
|
| | | self.EquipMaxAtkValue,
|
| | | self.UserDataLen,
|
| | | self.UserData,
|
| | | self.FitLV,
|
| | | self.Proficiency,
|
| | | self.IsSuite,
|
| | | self.BaseHP,
|
| | | self.BaseMagicDef,
|
| | | self.MaxAddSkillCnt,
|
| | | self.PetID,
|
| | | self.EquipMagicDefValue,
|
| | | self.EquipMinMagicAtkValue,
|
| | | self.EquipMaxMagicAtkValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMGHighLadderChallenge(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)//玩家ID
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | PlayerLV = 0 #(WORD PlayerLV)
|
| | | FightPower = 0 #(DWORD FightPower)
|
| | | FightPropertyDataLen = 0 #(DWORD FightPropertyDataLen)
|
| | | FightPropertyData = "" #(String FightPropertyData)//Python自定义数据
|
| | | EquipCount = 0 #(BYTE EquipCount)
|
| | | EquipList = list() #(vector<tagHightLadderItemInfo> EquipList)//装备信息列表
|
| | | VSOrder = 0 #(WORD VSOrder)//要挑战的排位
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FightPropertyDataLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FightPropertyData,_pos = CommFunc.ReadString(_lpData, _pos,self.FightPropertyDataLen)
|
| | | self.EquipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.EquipCount):
|
| | | temEquipList = tagHightLadderItemInfo()
|
| | | _pos = temEquipList.ReadData(_lpData, _pos)
|
| | | self.EquipList.append(temEquipList)
|
| | | self.VSOrder,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x02
|
| | | self.PlayerID = 0
|
| | | self.PlayerName = ""
|
| | | self.PlayerLV = 0
|
| | | self.FightPower = 0
|
| | | self.FightPropertyDataLen = 0
|
| | | self.FightPropertyData = ""
|
| | | self.EquipCount = 0
|
| | | self.EquipList = list()
|
| | | self.VSOrder = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 33
|
| | | length += 2
|
| | | length += 4
|
| | | length += 4
|
| | | length += len(self.FightPropertyData)
|
| | | length += 1
|
| | | for i in range(self.EquipCount):
|
| | | length += self.EquipList[i].GetLength()
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | | data = CommFunc.WriteWORD(data, self.PlayerLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPropertyDataLen)
|
| | | data = CommFunc.WriteString(data, self.FightPropertyDataLen, self.FightPropertyData)
|
| | | data = CommFunc.WriteBYTE(data, self.EquipCount)
|
| | | for i in range(self.EquipCount):
|
| | | data = CommFunc.WriteString(data, self.EquipList[i].GetLength(), self.EquipList[i].GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.VSOrder)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | PlayerLV:%d,
|
| | | FightPower:%d,
|
| | | FightPropertyDataLen:%d,
|
| | | FightPropertyData:%s,
|
| | | EquipCount:%d,
|
| | | EquipList:%s,
|
| | | VSOrder:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.PlayerLV,
|
| | | self.FightPower,
|
| | | self.FightPropertyDataLen,
|
| | | self.FightPropertyData,
|
| | | self.EquipCount,
|
| | | "...",
|
| | | self.VSOrder
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMGHighLadderChallenge=tagMGHighLadderChallenge()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGHighLadderChallenge.Head.Cmd,m_NAtagMGHighLadderChallenge.Head.SubCmd))] = m_NAtagMGHighLadderChallenge
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 36 天梯清除挑战CD#tagCMHighLadderClearCD
|
| | |
|
| | | class tagCMHighLadderClearCD(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x36
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x36
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHighLadderClearCD)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 36 天梯清除挑战CD//tagCMHighLadderClearCD:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHighLadderClearCD=tagCMHighLadderClearCD()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHighLadderClearCD.Cmd,m_NAtagCMHighLadderClearCD.SubCmd))] = m_NAtagCMHighLadderClearCD
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 35 查询天梯竞技场奖励#tagCMQueryHighLadderReward
|
| | |
|
| | | class tagCMQueryHighLadderReward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #0,查询 1,领取 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x35
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x35
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMQueryHighLadderReward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 35 查询天梯竞技场奖励//tagCMQueryHighLadderReward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryHighLadderReward=tagCMQueryHighLadderReward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryHighLadderReward.Cmd,m_NAtagCMQueryHighLadderReward.SubCmd))] = m_NAtagCMQueryHighLadderReward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 3B 请求领取补偿#tagCMRequestCompensation
|
| | |
|
| | | class tagCMRequestCompensation(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 37 天梯增加挑战次数#tagCMHighLadderAddCount
|
| | |
|
| | | class tagCMHighLadderAddCount(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x37
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x37
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHighLadderAddCount)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 37 天梯增加挑战次数//tagCMHighLadderAddCount:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHighLadderAddCount=tagCMHighLadderAddCount()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHighLadderAddCount.Cmd,m_NAtagCMHighLadderAddCount.SubCmd))] = m_NAtagCMHighLadderAddCount
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 27 坐骑提升 #tagCMHorseUp
|
| | |
|
| | | class tagCMHorseUp(Structure):
|
| | |
| | |
|
| | | m_NAtagCMPrayElixir=tagCMPrayElixir()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPrayElixir.Cmd,m_NAtagCMPrayElixir.SubCmd))] = m_NAtagCMPrayElixir
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 34 查询天梯竞技场状态#tagCMQueryHighLadderState
|
| | |
|
| | | class tagCMQueryHighLadderState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMQueryHighLadderState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 34 查询天梯竞技场状态//tagCMQueryHighLadderState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryHighLadderState=tagCMQueryHighLadderState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryHighLadderState.Cmd,m_NAtagCMQueryHighLadderState.SubCmd))] = m_NAtagCMQueryHighLadderState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A9 05 天梯竞技场每日奖励信息#tagGCHighLadderRewardInfo
|
| | |
|
| | | class tagGCHighLadderRewardInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("hadGot", c_ubyte), #是否已领取
|
| | | ("Order", c_ushort), #奖励排名
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA9
|
| | | self.SubCmd = 0x05
|
| | | 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 = 0xA9
|
| | | self.SubCmd = 0x05
|
| | | self.hadGot = 0
|
| | | self.Order = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCHighLadderRewardInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A9 05 天梯竞技场每日奖励信息//tagGCHighLadderRewardInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | hadGot:%d,
|
| | | Order:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.hadGot,
|
| | | self.Order
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCHighLadderRewardInfo=tagGCHighLadderRewardInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHighLadderRewardInfo.Cmd,m_NAtagGCHighLadderRewardInfo.SubCmd))] = m_NAtagGCHighLadderRewardInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A9 03 开服活动奖励数量刷新#tagGCOpenServerCampaignAwardCount
|
| | |
|
| | | class tagGCOpenServerCampaignAwardCount(Structure):
|
| | |
| | |
|
| | | m_NAtagMCFamilyRedPacketGoldLimit=tagMCFamilyRedPacketGoldLimit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyRedPacketGoldLimit.Cmd,m_NAtagMCFamilyRedPacketGoldLimit.SubCmd))] = m_NAtagMCFamilyRedPacketGoldLimit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 34 天梯竞技场状态#tagMCHighLadderState
|
| | |
|
| | | class tagMCHighLadderState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Count", c_ubyte), #已挑战次数
|
| | | ("MaxCount", c_ubyte), #最大次数
|
| | | ("CDTime", c_int), #累计冷却时间
|
| | | ("IsRelCD", c_ubyte), #是否正在真实冷却状态
|
| | | ("Currency", c_int), #积分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | self.Count = 0
|
| | | self.MaxCount = 0
|
| | | self.CDTime = 0
|
| | | self.IsRelCD = 0
|
| | | self.Currency = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHighLadderState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 34 天梯竞技场状态//tagMCHighLadderState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Count:%d,
|
| | | MaxCount:%d,
|
| | | CDTime:%d,
|
| | | IsRelCD:%d,
|
| | | Currency:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Count,
|
| | | self.MaxCount,
|
| | | self.CDTime,
|
| | | self.IsRelCD,
|
| | | self.Currency
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHighLadderState=tagMCHighLadderState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHighLadderState.Cmd,m_NAtagMCHighLadderState.SubCmd))] = m_NAtagMCHighLadderState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | # 清除开服活动相关排行榜
|
| | | for oscBillboardType in ShareDefine.Def_Campaign_Billboard_Dict.values():
|
| | | PlayerBillboard.ClearBillboardByIndex(oscBillboardType)
|
| | | |
| | | # 清除竞技场数据
|
| | | # GameWorld.GetHightLadderMgr().ClearAllPlayer()
|
| | | # HighLadder.Sync_HightLadderCanFightPlayer(curPlayer, curPlayer.GetPlayerID())
|
| | | # curPlayer.Sync_HightLadderTopPlayer(3)
|
| | |
|
| | | # 清除Rec
|
| | | delRecTypeList = []
|
| | |
| | | global GameWorldData
|
| | | return GameWorldData.GetBourseManager()
|
| | |
|
| | | ## 竞技场管理器
|
| | | # @param |
| | | # @return HightLadderMgr
|
| | | # @remarks 函数详细说明.
|
| | | def GetHightLadderMgr():
|
| | | global GameWorldData
|
| | | return GameWorldData.GetHighLadderManager()
|
| | |
|
| | | ## GM工具补偿管理器
|
| | | # @param
|
| | | # @return HightLadderMgr
|
| | |
| | | import PlayerGeTui
|
| | | #import PlayerManorWar
|
| | | import GameWorldBoss
|
| | | #import HighLadder
|
| | | import PlayerCompensation
|
| | | import ReadChConfig
|
| | | import EventReport
|
| | |
| | | GameWorld.Log("GameServer -> OnHour!")
|
| | | PlayerEventCounter.DoLogic_GameServer_OnHour(tick)
|
| | | GameWorld.GetGameWorld().OnHour(curTimeStr)
|
| | | #每小时更新天梯
|
| | | #HighLadder.OnHour()
|
| | | #设置存取数据库Key
|
| | | __SetWorldKey_SavePlayer(curTimeStr)
|
| | | #每小时清空宝物掉落
|
| | |
| | | # @remarks 函数详细说明.
|
| | | def OnDay(curTimeStr, tick):
|
| | | GameWorld.Log("GameServer -> OnDay!")
|
| | | #天梯竞技场,放在排行榜更新之前处理
|
| | | #HighLadder.OnDay()
|
| | | #排行榜拷贝昨日榜单
|
| | | PlayerBillboard.CopyBillboardOnDay()
|
| | | #开服活动,放在排行榜拷贝昨日榜更新后处理
|
| | |
| | | if checkMark not in ShareDefine.BillboardTypeList:
|
| | | continue
|
| | |
|
| | | if checkMark in [ShareDefine.Def_BT_HighLadder]:
|
| | | continue
|
| | | |
| | | billboard = GameWorld.GetBillboard().FindBillboard(checkMark)
|
| | | if not billboard:
|
| | | continue
|
| | |
| | | objBillboard = billboard.At(index)
|
| | | if curPlayer.GetID() == objBillboard.GetID():
|
| | | msgMark = notifyDict[order]
|
| | | break
|
| | | # # 竞技场
|
| | | # elif checkMark == "HighLadder":
|
| | | # highLadderOrder = HighLadder.GetPlayerOrder(curPlayer.GetID()) + 1
|
| | | # msgMark = notifyDict.get(highLadderOrder, "") |
| | | break |
| | |
|
| | | # 有可以广播的,马上广播,退出,不再检查
|
| | | if msgMark:
|
| | |
| | | #需要每天拷贝昨日榜单的排行榜类型字典
|
| | | Def_NeedCopyYesterday_Dict = {
|
| | | #昨日榜(拷贝) #今日榜(源数据)
|
| | | ShareDefine.Def_BT_HighLadder_Yester : ShareDefine.Def_BT_HighLadder,
|
| | | }
|
| | |
|
| | | def NoteOssBillboardInfoByDay():
|
| | |
| | | # if not curPlayer:
|
| | | # return
|
| | | # resultName = '%s' % PlayerFamilyStore.DoMapServerFamilyStore(curPlayer, eval(resultName), tick)
|
| | | |
| | | # 玩家天梯奖励
|
| | | if callName == "HighLadderReward":
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
|
| | | import HighLadder
|
| | | needResult, resultName = HighLadder.MapServer_HighLadderReward(curPlayer, eval(resultName))
|
| | | if not needResult:
|
| | | return
|
| | |
|
| | | srcPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
|
| | |
|
| | |
| | | # if curBillboard.FindByID(PlayerID):
|
| | | # return True
|
| | | #
|
| | | # #校验玩家竞技场是否进入排名
|
| | | # hightLadderMgr = GameWorld.GetHightLadderMgr()
|
| | | # hightLadderData = hightLadderMgr.FindPlayerData(PlayerID)
|
| | | # if hightLadderData:
|
| | | # if hightLadderData.GetOrder() < HighLadderLimitOrder:
|
| | | # return True
|
| | | # |
| | | # curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(PlayerID)
|
| | | # if curPlayer:
|
| | | # # 非普通成员需保存
|
| | |
| | | Def_BT_ZhuXianTower, #诛仙塔榜
|
| | | Def_BT_NewFCCostGold, #消费排行榜(新仙界盛典)
|
| | |
|
| | | Def_BT_HighLadder, #天梯竞技场排行
|
| | | Def_BT_HighLadder_Yester, #天梯竞技场昨日排行
|
| | | |
| | | Def_BT_Max, #排行榜最大类型
|
| | | ) = range(0, 26 + 2) |
| | | ) = range(0, 24 + 2) |
| | |
|
| | | #职业对应战力排行榜类型
|
| | | JobFightPowerBillboardDict = {
|
| | |
| | |
|
| | | #以下是旧的金钱类型
|
| | | TYPE_Price_Magic_Integral = 101 # 魔方寻宝积分
|
| | | TYPE_Price_HighLadder_Currency = 102 # 天梯竞技场积分
|
| | | TYPE_Price_HighLadder_Signet = 103 # 物品兑换(圣光晶石)
|
| | | TYPE_Price_GongXun = 105 # 功勋点
|
| | | TYPE_Price_ArrestPoint = 110 # 悬赏积分
|
| | |
|
| | | # 物品兑换
|
| | | TYPE_Price_ItemExchangeList = [TYPE_Price_HighLadder_Signet,
|
| | | ]
|
| | |
|
| | | # 自定义积分及通知字典 {货币类型:通知客户端刷新类型, ...} , 如果不通知的话刷新类型则配置 None
|
| | | TYPE_Price_CurrencyDict = {
|
| | |
| | | PacketSubCMD_4=0x04
|
| | | PacketCallFunc_4=OnGMGivePlayerBourseGains
|
| | |
|
| | | ;天梯竞技场
|
| | | [HighLadder]
|
| | | ScriptName = Player\HighLadderTube.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | | |
| | | PacketCMD_1=0x03
|
| | | PacketSubCMD_1=0x01
|
| | | PacketCallFunc_1=OnGMHighLadderChallengeReuslt
|
| | |
|
| | |
|
| | | ;GM补偿
|
| | | [Compensation]
|
| | | ScriptName = Player\PlayerCompensationTube
|
| | |
| | | PacketSubCMD_1=0x22
|
| | | PacketCallFunc_1=UpdatePlayerName
|
| | |
|
| | | ;天梯竞技场
|
| | | [HighLadder]
|
| | | ScriptName = Player\HighLadderTube
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 4
|
| | |
|
| | | PacketCMD_1=0xA5
|
| | | PacketSubCMD_1=0x34
|
| | | PacketCallFunc_1=OnQueryHighLadderState
|
| | |
|
| | | PacketCMD_2=0xA5
|
| | | PacketSubCMD_2=0x35
|
| | | PacketCallFunc_2=OnQueryHighLadderReward
|
| | |
|
| | | PacketCMD_3=0xA5
|
| | | PacketSubCMD_3=0x36
|
| | | PacketCallFunc_3=OnHighLadderClearCD
|
| | |
|
| | | PacketCMD_4=0xA5
|
| | | PacketSubCMD_4=0x37
|
| | | PacketCallFunc_4=OnHighLadderAddCount
|
| | |
|
| | |
|
| | | ;投资理财
|
| | | [GoldInvest]
|
| | |
| | | PacketCallFunc_1=OnPlayerRecaptureBourseItem
|
| | |
|
| | |
|
| | |
|
| | | ;天梯竞技场
|
| | | [HighLadder]
|
| | | ScriptName = Player\HighLadderTube.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 1
|
| | | |
| | | PacketCMD_1=0x1A
|
| | | PacketSubCMD_1=0x13
|
| | | PacketCallFunc_1=OnHightLadderChallenge
|
| | |
|
| | | ;任务
|
| | | [QuestLogic]
|
| | | ScriptName = Event\QuestLogic.py
|
| | |
| | | Def_PDict_MysticalShopGoods = "MysticalShopGoods_%s" # 神秘商店商品ID,索引
|
| | | Def_PDict_MysticalShopRefreshCnt = "MysticalShopRefreshCnt" # 神秘商店已手动刷新次数
|
| | | Def_PDict_MysticalShopLVRefreshCnt = "MysticalShopLVRefreshCnt" # 神秘商店等级段刷新次数
|
| | | Def_PDict_HighLadderFightCnt = "HighLadderFightCnt" #天梯每日挑战次数记录
|
| | | Def_PDict_HighLadderAddCnt = "HighLadderAddCnt" #天梯已购买次数
|
| | | Def_PDict_HighLadder_Currency = "HighLadderCurrency" #天梯积分
|
| | | Def_PDict_HighLadder_DayRewardGot = "HighLadderDayRewardGot" #天梯每日奖励是否已领取
|
| | | Def_PDict_HighLadder_CDTime = "HighLadderCDTime" #天梯冷却时间
|
| | | Def_PDict_HighLadder_CDBeginTime = "HighLadderCDBeginTime" #天梯冷却时间计时起点
|
| | | Def_PDict_HighLadder_IsRelCD = "HighLadderIsRelCD" #天梯是否进入真正挑战冷却
|
| | | Def_PDict_HighLadder_WinningStreak = "HighLadderWinningStreak" #天梯连胜场次
|
| | | Def_PDict_HighLadder_HistoryMaxOrder = "HighLadderMaxOrder" #天梯历史最高排名
|
| | | Def_PDict_FestivalLoginState = "FestivalLoginState_%s" # 节日登陆奖励状态_%s表示节日类型<按登陆天从低位起0-未领1-可领2-已领>
|
| | | Def_PDict_Currency = "PlayerCurrency_%s" # 自定义货币类型, 参数[自定义货币类型]
|
| | | Def_PDict_TJGSet = "TJGSet" # 脱机挂系统设定
|
| | |
| | | Def_Cost_FinishTruck, # 完成镖车
|
| | | Def_Cost_RefreshTimeShop, # 刷新神秘商店
|
| | | Def_Cost_OpenNoble, # 开通贵族
|
| | | Def_Cost_HighLadder, # 天梯竞技场
|
| | | Def_Cost_Reincarnation, # 转生
|
| | | Def_Cost_BuyStallItem, # 购买摆摊物品
|
| | | Def_Cost_Warehouse, # 仓库
|
| | |
| | | Def_Cost_Trade, # 交易
|
| | | Def_Cost_Rename, # 改名
|
| | | Def_Cost_SkillLvUp, # 技能升级
|
| | | ) = range(2000, 2000 + 60)
|
| | | ) = range(2000, 2000 + 59)
|
| | |
|
| | | Def_Cost_Reason_SonKey = "reason_name_son" # 消费点原因子类说明key
|
| | |
|
| | |
| | | Def_Cost_BourseBuy:"BourseBuy",
|
| | | Def_Cost_BourseCharge:"BourseCharge",
|
| | | Def_Cost_EquipWash:"EquipWash",
|
| | | Def_Cost_HighLadder:"HighLadder",
|
| | | Def_Cost_UseItem:"UseItem",
|
| | | Def_Cost_AddSignDay:"AddSignDay",
|
| | | Def_Cost_FBSweep:"FBSweep",
|
| | |
| | | Def_GiveMoney_Warehouse, # 仓库
|
| | | Def_GiveMoney_SellPackItem, # 出售背包物品
|
| | | Def_GiveMoney_CollectNPC, # 采集NPC
|
| | | Def_GiveMoney_HighLadder, # 天梯竞技场 20
|
| | | Def_GiveMoney_20,
|
| | | Def_GiveMoney_StallItem, # 摆摊
|
| | | Def_GiveMoney_Trade, # 交易
|
| | | Def_GiveMoney_Truck, # 运镖
|
| | |
| | | Def_GiveMoney_Warehouse:"Warehouse",
|
| | | Def_GiveMoney_SellPackItem:"SellPackItem",
|
| | | Def_GiveMoney_CollectNPC:"CollectNPC",
|
| | | Def_GiveMoney_HighLadder:"HighLadder",
|
| | | Def_GiveMoney_StallItem:"StallItem",
|
| | | Def_GiveMoney_Trade:"Trade",
|
| | | Def_GiveMoney_Truck:"Truck",
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #03 01 天梯竞技场玩家挑战结果同步#tagGMHighLadderChallengeReuslt
|
| | |
|
| | | class tagGMHighLadderChallengeReuslt(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)//玩家ID
|
| | | Result = 0 #(BYTE Result)//结果
|
| | | PlusInfoSize = 0 #(WORD PlusInfoSize)
|
| | | PlusInfo = "" #(String PlusInfo)//附带信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PlusInfoSize,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PlusInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusInfoSize)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x01
|
| | | self.PlayerID = 0
|
| | | self.Result = 0
|
| | | self.PlusInfoSize = 0
|
| | | self.PlusInfo = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.PlusInfo)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Result)
|
| | | data = CommFunc.WriteWORD(data, self.PlusInfoSize)
|
| | | data = CommFunc.WriteString(data, self.PlusInfoSize, self.PlusInfo)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerID:%d,
|
| | | Result:%d,
|
| | | PlusInfoSize:%d,
|
| | | PlusInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerID,
|
| | | self.Result,
|
| | | self.PlusInfoSize,
|
| | | self.PlusInfo
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGMHighLadderChallengeReuslt=tagGMHighLadderChallengeReuslt()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMHighLadderChallengeReuslt.Head.Cmd,m_NAtagGMHighLadderChallengeReuslt.Head.SubCmd))] = m_NAtagGMHighLadderChallengeReuslt
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #02 01 查询玩家是否可以添加交易所物品结果#tagGMCheckAddPlayerBourseItemResult
|
| | |
|
| | | class tagGMCheckAddPlayerBourseItemResult(Structure):
|
| | |
| | | PlusDataSize = 0 #(DWORD PlusDataSize)
|
| | | PlusData = "" #(String PlusData)//扩展记录
|
| | | IsLogouting = 0 #(BYTE IsLogouting)//本次是否为下线同步
|
| | | OffTime = 0 #(DWORD OffTime)// 下线时间戳
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize)
|
| | | self.IsLogouting,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.OffTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.PlusDataSize = 0
|
| | | self.PlusData = ""
|
| | | self.IsLogouting = 0
|
| | | self.OffTime = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 4
|
| | | length += len(self.PlusData)
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.PlusDataSize)
|
| | | data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData)
|
| | | data = CommFunc.WriteBYTE(data, self.IsLogouting)
|
| | | data = CommFunc.WriteDWORD(data, self.OffTime)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | ItemData:%s,
|
| | | PlusDataSize:%d,
|
| | | PlusData:%s,
|
| | | IsLogouting:%d,
|
| | | OffTime:%d
|
| | | IsLogouting:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.ItemData,
|
| | | self.PlusDataSize,
|
| | | self.PlusData,
|
| | | self.IsLogouting,
|
| | | self.OffTime
|
| | | self.IsLogouting
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | m_NAtagMGAddFamilyDetail=tagMGAddFamilyDetail()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGAddFamilyDetail.Cmd,m_NAtagMGAddFamilyDetail.SubCmd))] = m_NAtagMGAddFamilyDetail
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #03 02 天梯竞技场玩家发起挑战#tagMGHighLadderChallenge
|
| | |
|
| | | class tagHightLadderItemInfo(Structure):
|
| | | ItemTypeID = 0 #(DWORD ItemTypeID)//物品ID
|
| | | ItemPlaceType = 0 #(BYTE ItemPlaceType)//物品位置的背包类型
|
| | | ItemPlaceIndex = 0 #(BYTE ItemPlaceIndex)//物品所在的索引
|
| | | Count = 0 #(WORD Count)//单组数量
|
| | | ItemStarLV = 0 #(BYTE ItemStarLV)//装备星级
|
| | | IdentifyPar = 0 #(BYTE IdentifyPar)//鉴定参数
|
| | | CurDurg = 0 #(DWORD CurDurg)//当前耐久
|
| | | MaxDurg = 0 #(DWORD MaxDurg)//最大耐久
|
| | | CanPlaceStoneCount = 0 #(BYTE CanPlaceStoneCount)//可镶嵌宝石数0表示不可以镶嵌宝石
|
| | | ItemProperty = 0 #(BYTE ItemProperty)//装备五行
|
| | | SoulProperty = 0 #(WORD SoulProperty)//灵魂属性属性
|
| | | Maker = 0 #(DWORD Maker)//制作者ID
|
| | | MakerName = "" #(char MakerName[33])//制造者名字
|
| | | Stone1 = 0 #(DWORD Stone1)//镶嵌宝石1
|
| | | Stone2 = 0 #(DWORD Stone2)//镶嵌宝石
|
| | | Stone3 = 0 #(DWORD Stone3)//镶嵌宝石
|
| | | Stone4 = 0 #(DWORD Stone4)//镶嵌宝石
|
| | | Stone5 = 0 #(DWORD Stone5)//镶嵌宝石
|
| | | Stone6 = 0 #(DWORD Stone6)//镶嵌宝石
|
| | | Stone7 = 0 #(DWORD Stone7)//镶嵌宝石
|
| | | Stone8 = 0 #(DWORD Stone8)//镶嵌宝石
|
| | | Stone9 = 0 #(DWORD Stone9)//镶嵌宝石
|
| | | IsRenZhu = 0 #(BYTE IsRenZhu)//是否认主
|
| | | EquipDefenseValue = 0 #(DWORD EquipDefenseValue)//用于记录装备的防御值
|
| | | EquipMinAtkValue = 0 #(DWORD EquipMinAtkValue)//用于记录装备的最小伤害值
|
| | | EquipMaxAtkValue = 0 #(DWORD EquipMaxAtkValue)//用于记录装备的最大伤害值
|
| | | UserDataLen = 0 #(DWORD UserDataLen)
|
| | | UserData = "" #(String UserData)//自定义数据
|
| | | FitLV = 0 #(BYTE FitLV)//物品契合等级
|
| | | Proficiency = 0 #(DWORD Proficiency)//熟练度
|
| | | IsSuite = 0 #(BYTE IsSuite)//是否已经套装化
|
| | | BaseHP = 0 #(DWORD BaseHP)// HP基础值
|
| | | BaseMagicDef = 0 #(DWORD BaseMagicDef)//内防基础值
|
| | | MaxAddSkillCnt = 0 #(BYTE MaxAddSkillCnt)// 最大附魔次数
|
| | | PetID = 0 #(DWORD PetID)//装备该装备的宠物ID,为0则未装备
|
| | | EquipMagicDefValue = 0 #(DWORD EquipMagicDefValue)//装备内防值
|
| | | EquipMinMagicAtkValue = 0 #(DWORD EquipMinMagicAtkValue)//装备最小内攻
|
| | | EquipMaxMagicAtkValue = 0 #(DWORD EquipMaxMagicAtkValue)//装备最大内攻
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.ItemTypeID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ItemPlaceType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemPlaceIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ItemStarLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IdentifyPar,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CurDurg,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MaxDurg,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.CanPlaceStoneCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemProperty,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SoulProperty,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Maker,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MakerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.Stone1,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone2,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone3,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone4,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone5,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone6,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone7,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone8,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Stone9,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.IsRenZhu,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.EquipDefenseValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMinAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMaxAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.UserDataLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen)
|
| | | self.FitLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Proficiency,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.IsSuite,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.BaseHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.BaseMagicDef,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MaxAddSkillCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PetID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMagicDefValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMinMagicAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EquipMaxMagicAtkValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.ItemTypeID = 0
|
| | | self.ItemPlaceType = 0
|
| | | self.ItemPlaceIndex = 0
|
| | | self.Count = 0
|
| | | self.ItemStarLV = 0
|
| | | self.IdentifyPar = 0
|
| | | self.CurDurg = 0
|
| | | self.MaxDurg = 0
|
| | | self.CanPlaceStoneCount = 0
|
| | | self.ItemProperty = 0
|
| | | self.SoulProperty = 0
|
| | | self.Maker = 0
|
| | | self.MakerName = ""
|
| | | self.Stone1 = 0
|
| | | self.Stone2 = 0
|
| | | self.Stone3 = 0
|
| | | self.Stone4 = 0
|
| | | self.Stone5 = 0
|
| | | self.Stone6 = 0
|
| | | self.Stone7 = 0
|
| | | self.Stone8 = 0
|
| | | self.Stone9 = 0
|
| | | self.IsRenZhu = 0
|
| | | self.EquipDefenseValue = 0
|
| | | self.EquipMinAtkValue = 0
|
| | | self.EquipMaxAtkValue = 0
|
| | | self.UserDataLen = 0
|
| | | self.UserData = ""
|
| | | self.FitLV = 0
|
| | | self.Proficiency = 0
|
| | | self.IsSuite = 0
|
| | | self.BaseHP = 0
|
| | | self.BaseMagicDef = 0
|
| | | self.MaxAddSkillCnt = 0
|
| | | self.PetID = 0
|
| | | self.EquipMagicDefValue = 0
|
| | | self.EquipMinMagicAtkValue = 0
|
| | | self.EquipMaxMagicAtkValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 33
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += len(self.UserData)
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.ItemTypeID)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemPlaceType)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemPlaceIndex)
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemStarLV)
|
| | | data = CommFunc.WriteBYTE(data, self.IdentifyPar)
|
| | | data = CommFunc.WriteDWORD(data, self.CurDurg)
|
| | | data = CommFunc.WriteDWORD(data, self.MaxDurg)
|
| | | data = CommFunc.WriteBYTE(data, self.CanPlaceStoneCount)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemProperty)
|
| | | data = CommFunc.WriteWORD(data, self.SoulProperty)
|
| | | data = CommFunc.WriteDWORD(data, self.Maker)
|
| | | data = CommFunc.WriteString(data, 33, self.MakerName)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone1)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone2)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone3)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone4)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone5)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone6)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone7)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone8)
|
| | | data = CommFunc.WriteDWORD(data, self.Stone9)
|
| | | data = CommFunc.WriteBYTE(data, self.IsRenZhu)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipDefenseValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMinAtkValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMaxAtkValue)
|
| | | data = CommFunc.WriteDWORD(data, self.UserDataLen)
|
| | | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData)
|
| | | data = CommFunc.WriteBYTE(data, self.FitLV)
|
| | | data = CommFunc.WriteDWORD(data, self.Proficiency)
|
| | | data = CommFunc.WriteBYTE(data, self.IsSuite)
|
| | | data = CommFunc.WriteDWORD(data, self.BaseHP)
|
| | | data = CommFunc.WriteDWORD(data, self.BaseMagicDef)
|
| | | data = CommFunc.WriteBYTE(data, self.MaxAddSkillCnt)
|
| | | data = CommFunc.WriteDWORD(data, self.PetID)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMagicDefValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMinMagicAtkValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EquipMaxMagicAtkValue)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | ItemTypeID:%d,
|
| | | ItemPlaceType:%d,
|
| | | ItemPlaceIndex:%d,
|
| | | Count:%d,
|
| | | ItemStarLV:%d,
|
| | | IdentifyPar:%d,
|
| | | CurDurg:%d,
|
| | | MaxDurg:%d,
|
| | | CanPlaceStoneCount:%d,
|
| | | ItemProperty:%d,
|
| | | SoulProperty:%d,
|
| | | Maker:%d,
|
| | | MakerName:%s,
|
| | | Stone1:%d,
|
| | | Stone2:%d,
|
| | | Stone3:%d,
|
| | | Stone4:%d,
|
| | | Stone5:%d,
|
| | | Stone6:%d,
|
| | | Stone7:%d,
|
| | | Stone8:%d,
|
| | | Stone9:%d,
|
| | | IsRenZhu:%d,
|
| | | EquipDefenseValue:%d,
|
| | | EquipMinAtkValue:%d,
|
| | | EquipMaxAtkValue:%d,
|
| | | UserDataLen:%d,
|
| | | UserData:%s,
|
| | | FitLV:%d,
|
| | | Proficiency:%d,
|
| | | IsSuite:%d,
|
| | | BaseHP:%d,
|
| | | BaseMagicDef:%d,
|
| | | MaxAddSkillCnt:%d,
|
| | | PetID:%d,
|
| | | EquipMagicDefValue:%d,
|
| | | EquipMinMagicAtkValue:%d,
|
| | | EquipMaxMagicAtkValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemTypeID,
|
| | | self.ItemPlaceType,
|
| | | self.ItemPlaceIndex,
|
| | | self.Count,
|
| | | self.ItemStarLV,
|
| | | self.IdentifyPar,
|
| | | self.CurDurg,
|
| | | self.MaxDurg,
|
| | | self.CanPlaceStoneCount,
|
| | | self.ItemProperty,
|
| | | self.SoulProperty,
|
| | | self.Maker,
|
| | | self.MakerName,
|
| | | self.Stone1,
|
| | | self.Stone2,
|
| | | self.Stone3,
|
| | | self.Stone4,
|
| | | self.Stone5,
|
| | | self.Stone6,
|
| | | self.Stone7,
|
| | | self.Stone8,
|
| | | self.Stone9,
|
| | | self.IsRenZhu,
|
| | | self.EquipDefenseValue,
|
| | | self.EquipMinAtkValue,
|
| | | self.EquipMaxAtkValue,
|
| | | self.UserDataLen,
|
| | | self.UserData,
|
| | | self.FitLV,
|
| | | self.Proficiency,
|
| | | self.IsSuite,
|
| | | self.BaseHP,
|
| | | self.BaseMagicDef,
|
| | | self.MaxAddSkillCnt,
|
| | | self.PetID,
|
| | | self.EquipMagicDefValue,
|
| | | self.EquipMinMagicAtkValue,
|
| | | self.EquipMaxMagicAtkValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMGHighLadderChallenge(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)//玩家ID
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | PlayerLV = 0 #(WORD PlayerLV)
|
| | | FightPower = 0 #(DWORD FightPower)
|
| | | FightPropertyDataLen = 0 #(DWORD FightPropertyDataLen)
|
| | | FightPropertyData = "" #(String FightPropertyData)//Python自定义数据
|
| | | EquipCount = 0 #(BYTE EquipCount)
|
| | | EquipList = list() #(vector<tagHightLadderItemInfo> EquipList)//装备信息列表
|
| | | VSOrder = 0 #(WORD VSOrder)//要挑战的排位
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FightPropertyDataLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FightPropertyData,_pos = CommFunc.ReadString(_lpData, _pos,self.FightPropertyDataLen)
|
| | | self.EquipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.EquipCount):
|
| | | temEquipList = tagHightLadderItemInfo()
|
| | | _pos = temEquipList.ReadData(_lpData, _pos)
|
| | | self.EquipList.append(temEquipList)
|
| | | self.VSOrder,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0x03
|
| | | self.Head.SubCmd = 0x02
|
| | | self.PlayerID = 0
|
| | | self.PlayerName = ""
|
| | | self.PlayerLV = 0
|
| | | self.FightPower = 0
|
| | | self.FightPropertyDataLen = 0
|
| | | self.FightPropertyData = ""
|
| | | self.EquipCount = 0
|
| | | self.EquipList = list()
|
| | | self.VSOrder = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 33
|
| | | length += 2
|
| | | length += 4
|
| | | length += 4
|
| | | length += len(self.FightPropertyData)
|
| | | length += 1
|
| | | for i in range(self.EquipCount):
|
| | | length += self.EquipList[i].GetLength()
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | | data = CommFunc.WriteWORD(data, self.PlayerLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPropertyDataLen)
|
| | | data = CommFunc.WriteString(data, self.FightPropertyDataLen, self.FightPropertyData)
|
| | | data = CommFunc.WriteBYTE(data, self.EquipCount)
|
| | | for i in range(self.EquipCount):
|
| | | data = CommFunc.WriteString(data, self.EquipList[i].GetLength(), self.EquipList[i].GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.VSOrder)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | PlayerLV:%d,
|
| | | FightPower:%d,
|
| | | FightPropertyDataLen:%d,
|
| | | FightPropertyData:%s,
|
| | | EquipCount:%d,
|
| | | EquipList:%s,
|
| | | VSOrder:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.PlayerLV,
|
| | | self.FightPower,
|
| | | self.FightPropertyDataLen,
|
| | | self.FightPropertyData,
|
| | | self.EquipCount,
|
| | | "...",
|
| | | self.VSOrder
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMGHighLadderChallenge=tagMGHighLadderChallenge()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMGHighLadderChallenge.Head.Cmd,m_NAtagMGHighLadderChallenge.Head.SubCmd))] = m_NAtagMGHighLadderChallenge
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 36 天梯清除挑战CD#tagCMHighLadderClearCD
|
| | |
|
| | | class tagCMHighLadderClearCD(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x36
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x36
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHighLadderClearCD)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 36 天梯清除挑战CD//tagCMHighLadderClearCD:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHighLadderClearCD=tagCMHighLadderClearCD()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHighLadderClearCD.Cmd,m_NAtagCMHighLadderClearCD.SubCmd))] = m_NAtagCMHighLadderClearCD
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 35 查询天梯竞技场奖励#tagCMQueryHighLadderReward
|
| | |
|
| | | class tagCMQueryHighLadderReward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #0,查询 1,领取 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x35
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x35
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMQueryHighLadderReward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 35 查询天梯竞技场奖励//tagCMQueryHighLadderReward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryHighLadderReward=tagCMQueryHighLadderReward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryHighLadderReward.Cmd,m_NAtagCMQueryHighLadderReward.SubCmd))] = m_NAtagCMQueryHighLadderReward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 3B 请求领取补偿#tagCMRequestCompensation
|
| | |
|
| | | class tagCMRequestCompensation(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 37 天梯增加挑战次数#tagCMHighLadderAddCount
|
| | |
|
| | | class tagCMHighLadderAddCount(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x37
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x37
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMHighLadderAddCount)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 37 天梯增加挑战次数//tagCMHighLadderAddCount:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMHighLadderAddCount=tagCMHighLadderAddCount()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHighLadderAddCount.Cmd,m_NAtagCMHighLadderAddCount.SubCmd))] = m_NAtagCMHighLadderAddCount
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 27 坐骑提升 #tagCMHorseUp
|
| | |
|
| | | class tagCMHorseUp(Structure):
|
| | |
| | |
|
| | | m_NAtagCMPrayElixir=tagCMPrayElixir()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPrayElixir.Cmd,m_NAtagCMPrayElixir.SubCmd))] = m_NAtagCMPrayElixir
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 34 查询天梯竞技场状态#tagCMQueryHighLadderState
|
| | |
|
| | | class tagCMQueryHighLadderState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMQueryHighLadderState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 34 查询天梯竞技场状态//tagCMQueryHighLadderState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryHighLadderState=tagCMQueryHighLadderState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryHighLadderState.Cmd,m_NAtagCMQueryHighLadderState.SubCmd))] = m_NAtagCMQueryHighLadderState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A9 05 天梯竞技场每日奖励信息#tagGCHighLadderRewardInfo
|
| | |
|
| | | class tagGCHighLadderRewardInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("hadGot", c_ubyte), #是否已领取
|
| | | ("Order", c_ushort), #奖励排名
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA9
|
| | | self.SubCmd = 0x05
|
| | | 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 = 0xA9
|
| | | self.SubCmd = 0x05
|
| | | self.hadGot = 0
|
| | | self.Order = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCHighLadderRewardInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A9 05 天梯竞技场每日奖励信息//tagGCHighLadderRewardInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | hadGot:%d,
|
| | | Order:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.hadGot,
|
| | | self.Order
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCHighLadderRewardInfo=tagGCHighLadderRewardInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHighLadderRewardInfo.Cmd,m_NAtagGCHighLadderRewardInfo.SubCmd))] = m_NAtagGCHighLadderRewardInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A9 03 开服活动奖励数量刷新#tagGCOpenServerCampaignAwardCount
|
| | |
|
| | | class tagGCOpenServerCampaignAwardCount(Structure):
|
| | |
| | |
|
| | | m_NAtagMCFamilyRedPacketGoldLimit=tagMCFamilyRedPacketGoldLimit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyRedPacketGoldLimit.Cmd,m_NAtagMCFamilyRedPacketGoldLimit.SubCmd))] = m_NAtagMCFamilyRedPacketGoldLimit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 34 天梯竞技场状态#tagMCHighLadderState
|
| | |
|
| | | class tagMCHighLadderState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Count", c_ubyte), #已挑战次数
|
| | | ("MaxCount", c_ubyte), #最大次数
|
| | | ("CDTime", c_int), #累计冷却时间
|
| | | ("IsRelCD", c_ubyte), #是否正在真实冷却状态
|
| | | ("Currency", c_int), #积分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x34
|
| | | self.Count = 0
|
| | | self.MaxCount = 0
|
| | | self.CDTime = 0
|
| | | self.IsRelCD = 0
|
| | | self.Currency = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHighLadderState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A5 34 天梯竞技场状态//tagMCHighLadderState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Count:%d,
|
| | | MaxCount:%d,
|
| | | CDTime:%d,
|
| | | IsRelCD:%d,
|
| | | Currency:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Count,
|
| | | self.MaxCount,
|
| | | self.CDTime,
|
| | | self.IsRelCD,
|
| | | self.Currency
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHighLadderState=tagMCHighLadderState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHighLadderState.Cmd,m_NAtagMCHighLadderState.SubCmd))] = m_NAtagMCHighLadderState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | return petPack.GetCount() > 0
|
| | | return PlayerPet.GetPetDataItemByNPCID(curPlayer, checkPetID) != None
|
| | |
|
| | | ##竞技场是否达到多少名
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode 节点信息
|
| | | # @return 返回值, 是否判断成功
|
| | | # @remarks <Check_Jjcorder type="类型" value="值"/> |
| | | def ConditionType_Check_Jjcorder(curPlayer, curMission, curConditionNode):
|
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | maxOrder = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HighLadder_HistoryMaxOrder, 0,
|
| | | ChConfig.Def_PDictType_Default)
|
| | | |
| | | return QuestRunnerValue.GetEval(conditionType, maxOrder, conditionValue)
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##执行 扣除玩家镖车押金
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | # # 副本进入时间
|
| | | FBCommon.FBOnLogin(curPlayer)
|
| | | #
|
| | | # #天梯竞技场
|
| | | # HighLadderTube.OnLogin(curPlayer)
|
| | | # |
| | | # #世界等级
|
| | | PlayerWorldAverageLv.OnLogin(curPlayer)
|
| | | #
|
| | |
| | | import PlayerWorldAverageLv
|
| | | import GameLogic_ManorWar
|
| | | import PlayerActivity
|
| | | import HighLadderTube
|
| | | import FBCommon
|
| | | import PlayerViewCacheTube
|
| | | import PassiveBuffEffMng
|
| | |
| | | #---功能层防御值----
|
| | | def GetFuncDef(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % (ChConfig.TYPE_Calc_AttrDEF - 1))
|
| | | def SetFuncDef(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % (ChConfig.TYPE_Calc_AttrDEF - 1), value)
|
| | |
|
| | |
|
| | | ## 增加天梯竞技场积分
|
| | | # @param curPlayer 玩家实例
|
| | | # @return
|
| | | def AddHighLadderCurrency(curPlayer, addCount, isSysMsg=True, isRefresh=True):
|
| | | curCurrency = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HighLadder_Currency)
|
| | | curCurrency += addCount
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HighLadder_Currency, curCurrency)
|
| | | |
| | | if isSysMsg:
|
| | | #通知客户端得到金钱
|
| | | NotifyCode(curPlayer, "GetMoney", [ShareDefine.TYPE_Price_HighLadder_Currency, addCount])
|
| | | if isRefresh:
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | HighLadderTube.SendHighLadderState(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | | ## 用天梯竞技场积分付费
|
| | | # @param curPlayer 玩家实例
|
| | | # @return
|
| | | def PayHighLadderCurrency(curPlayer, payCount, isSysMsg=True, isRefresh=True):
|
| | | curCurrency = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HighLadder_Currency)
|
| | | if (curCurrency < payCount) or (payCount < 0):
|
| | | return False, curCurrency, curCurrency
|
| | | updCurrency = max(0, curCurrency - payCount)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HighLadder_Currency, updCurrency)
|
| | | if isSysMsg:
|
| | | #通知客户端失去点数
|
| | | NotifyCode(curPlayer, "LostMoney", [ShareDefine.TYPE_Price_HighLadder_Currency, payCount]) |
| | | if isRefresh:
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | HighLadderTube.SendHighLadderState(curPlayer, tick) |
| | | return True, curCurrency, updCurrency
|
| | |
|
| | | ## 计算功能背包物品属性
|
| | | # @param curPlayer 当前玩家
|
| | |
| | | import BuffSkill
|
| | | import EventShell
|
| | |
|
| | | import HighLadderTube
|
| | | import Operate_PlayerBuyZhenQi
|
| | |
|
| | |
|
| | |
| | | # @param tick
|
| | | # @return None
|
| | | def __NtfChangeInfo(curPlayer, tick):
|
| | | HighLadderTube.SendHighLadderState(curPlayer, tick)
|
| | | Operate_PlayerBuyZhenQi.Sync_NotifyDataChange(curPlayer)
|
| | | return
|
| | |
|
| | |
| | | Def_BT_ZhuXianTower, #诛仙塔榜
|
| | | Def_BT_NewFCCostGold, #消费排行榜(新仙界盛典)
|
| | |
|
| | | Def_BT_HighLadder, #天梯竞技场排行
|
| | | Def_BT_HighLadder_Yester, #天梯竞技场昨日排行
|
| | | |
| | | Def_BT_Max, #排行榜最大类型
|
| | | ) = range(0, 26 + 2) |
| | | ) = range(0, 24 + 2) |
| | |
|
| | | #职业对应战力排行榜类型
|
| | | JobFightPowerBillboardDict = {
|
| | |
| | |
|
| | | #以下是旧的金钱类型
|
| | | TYPE_Price_Magic_Integral = 101 # 魔方寻宝积分
|
| | | TYPE_Price_HighLadder_Currency = 102 # 天梯竞技场积分
|
| | | TYPE_Price_HighLadder_Signet = 103 # 物品兑换(圣光晶石)
|
| | | TYPE_Price_GongXun = 105 # 功勋点
|
| | | TYPE_Price_ArrestPoint = 110 # 悬赏积分
|
| | |
|
| | | # 物品兑换
|
| | | TYPE_Price_ItemExchangeList = [TYPE_Price_HighLadder_Signet,
|
| | | ]
|
| | |
|
| | | # 自定义积分及通知字典 {货币类型:通知客户端刷新类型, ...} , 如果不通知的话刷新类型则配置 None
|
| | | TYPE_Price_CurrencyDict = {
|