6307 【后端】【2.0】多套装备开发单(删除旧套装)
| | |
| | | BYTE IsNotify; //是否广播
|
| | | };
|
| | |
|
| | | //套装合成表
|
| | |
|
| | | struct tagEquipSuitCompound
|
| | | {
|
| | | BYTE _SuiteType; //套装类型
|
| | | BYTE _EquipPlace; //装备部位
|
| | | WORD _SuiteLV; //套装等级
|
| | | BYTE _Job; //ְҵ
|
| | | list CostItemID; //材料ID
|
| | | list CostItemCnt; //材料数量
|
| | | };
|
| | |
|
| | | //羽翼精炼属性表
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 17 套装合成#tagCMSuitCompose
|
| | |
|
| | | class tagCMSuitCompose(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("SuiteType", c_ubyte), # 套装类型 1普通 2强化
|
| | | ("EquipPlace", c_ubyte), # 装备位置
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | self.SuiteType = 0
|
| | | self.EquipPlace = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSuitCompose)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A3 17 套装合成//tagCMSuitCompose:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | SuiteType:%d,
|
| | | EquipPlace:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.SuiteType,
|
| | | self.EquipPlace
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSuitCompose=tagCMSuitCompose()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSuitCompose.Cmd,m_NAtagCMSuitCompose.SubCmd))] = m_NAtagCMSuitCompose
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 08 套装拆解 #tagCMSuiteDecompose
|
| | |
|
| | | class tagCMSuiteDecompose(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("EquipPlace", c_ubyte), #部位索引
|
| | | ("SuiteType", c_ubyte), #套装类型 0代表全部类型
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x08
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x08
|
| | | self.EquipPlace = 0
|
| | | self.SuiteType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSuiteDecompose)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 08 套装拆解 //tagCMSuiteDecompose:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | EquipPlace:%d,
|
| | | SuiteType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.EquipPlace,
|
| | | self.SuiteType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSuiteDecompose=tagCMSuiteDecompose()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSuiteDecompose.Cmd,m_NAtagCMSuiteDecompose.SubCmd))] = m_NAtagCMSuiteDecompose
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 20 将魔方背包中的物品转移到人物背包中 #tagCMMagicItemPutInItemPack
|
| | |
|
| | | class tagCMMagicItemPutInItemPack(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo
|
| | |
|
| | | class tagMCEquipPartSuiteLV(Structure):
|
| | | EquipIndex = 0 #(BYTE EquipIndex)
|
| | | Len = 0 #(WORD Len)//长度
|
| | | SuiteLVInfo = "" #(String SuiteLVInfo)//{套装类型:等级}
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.EquipIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.SuiteLVInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.EquipIndex = 0
|
| | | self.Len = 0
|
| | | self.SuiteLVInfo = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.SuiteLVInfo)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.EquipIndex)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.SuiteLVInfo)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | EquipIndex:%d,
|
| | | Len:%d,
|
| | | SuiteLVInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.EquipIndex,
|
| | | self.Len,
|
| | | self.SuiteLVInfo
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCEquipPartSuiteLVInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | InfoList = list() #(vector<tagMCEquipPartSuiteLV> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temInfoList = tagMCEquipPartSuiteLV()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x09
|
| | | self.Count = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCEquipPartSuiteLVInfo=tagMCEquipPartSuiteLVInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartSuiteLVInfo.Head.Cmd,m_NAtagMCEquipPartSuiteLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartSuiteLVInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 BB 装备位洗练属性信息 #tagMCEquipPartXLAttrInfo
|
| | |
|
| | | class tagMCEquipPartXLAttrValue(Structure):
|
| | |
| | | PacketSubCMD_3 = 0x23
|
| | | PacketCallFunc_3 = DoRealmLVUp
|
| | |
|
| | | ;套装合成
|
| | | [EquipSuitCompose]
|
| | | ScriptName = Event\EventSrc\Operate_EquipSuitCompose.py
|
| | | Writer = xmnathan
|
| | | Releaser = xmnathan
|
| | | RegType = 0
|
| | | RegisterPackCount = 2
|
| | |
|
| | | PacketCMD_1 = 0xA3
|
| | | PacketSubCMD_1 = 0x17
|
| | | PacketCallFunc_1 = OnEquipSuitCompose
|
| | |
|
| | | PacketCMD_2 = 0xA3
|
| | | PacketSubCMD_2 = 0x08
|
| | | PacketCallFunc_2 = OnDecomposeSuite
|
| | |
|
| | | ;累计登陆礼
|
| | | [PlayerLoginDayAward]
|
| | | ScriptName = Player\PlayerLoginDayAward.py
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 17 套装合成#tagCMSuitCompose
|
| | |
|
| | | class tagCMSuitCompose(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("SuiteType", c_ubyte), # 套装类型 1普通 2强化
|
| | | ("EquipPlace", c_ubyte), # 装备位置
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | self.SuiteType = 0
|
| | | self.EquipPlace = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSuitCompose)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A3 17 套装合成//tagCMSuitCompose:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | SuiteType:%d,
|
| | | EquipPlace:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.SuiteType,
|
| | | self.EquipPlace
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSuitCompose=tagCMSuitCompose()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSuitCompose.Cmd,m_NAtagCMSuitCompose.SubCmd))] = m_NAtagCMSuitCompose
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 08 套装拆解 #tagCMSuiteDecompose
|
| | |
|
| | | class tagCMSuiteDecompose(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("EquipPlace", c_ubyte), #部位索引
|
| | | ("SuiteType", c_ubyte), #套装类型 0代表全部类型
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x08
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x08
|
| | | self.EquipPlace = 0
|
| | | self.SuiteType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSuiteDecompose)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 08 套装拆解 //tagCMSuiteDecompose:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | EquipPlace:%d,
|
| | | SuiteType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.EquipPlace,
|
| | | self.SuiteType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSuiteDecompose=tagCMSuiteDecompose()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSuiteDecompose.Cmd,m_NAtagCMSuiteDecompose.SubCmd))] = m_NAtagCMSuiteDecompose
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 20 将魔方背包中的物品转移到人物背包中 #tagCMMagicItemPutInItemPack
|
| | |
|
| | | class tagCMMagicItemPutInItemPack(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo
|
| | |
|
| | | class tagMCEquipPartSuiteLV(Structure):
|
| | | EquipIndex = 0 #(BYTE EquipIndex)
|
| | | Len = 0 #(WORD Len)//长度
|
| | | SuiteLVInfo = "" #(String SuiteLVInfo)//{套装类型:等级}
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.EquipIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.SuiteLVInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.EquipIndex = 0
|
| | | self.Len = 0
|
| | | self.SuiteLVInfo = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.SuiteLVInfo)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.EquipIndex)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.SuiteLVInfo)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | EquipIndex:%d,
|
| | | Len:%d,
|
| | | SuiteLVInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.EquipIndex,
|
| | | self.Len,
|
| | | self.SuiteLVInfo
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCEquipPartSuiteLVInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | InfoList = list() #(vector<tagMCEquipPartSuiteLV> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temInfoList = tagMCEquipPartSuiteLV()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x09
|
| | | self.Count = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCEquipPartSuiteLVInfo=tagMCEquipPartSuiteLVInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartSuiteLVInfo.Head.Cmd,m_NAtagMCEquipPartSuiteLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartSuiteLVInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 BB 装备位洗练属性信息 #tagMCEquipPartXLAttrInfo
|
| | |
|
| | | class tagMCEquipPartXLAttrValue(Structure):
|
| | |
| | | totallv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerHorse.GetHorseSumLV(curPlayer) >= totallv
|
| | |
|
| | | ##2阶强化防具套装件数
|
| | | # @param None
|
| | | # @return None <Suitplus value="cnt"/>
|
| | | def ConditionType_Suitplus(curPlayer, curMission, curActionNode):
|
| | | needCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | |
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | groupCnt = 0 #2阶强化防具套装件数
|
| | | for groupType, equipIndexList in equipSuitTypeDict.items():
|
| | | for i in equipIndexList:
|
| | | suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
|
| | | for suiteType, lv in suiteInfo.items():
|
| | | if lv >= 2 and int(groupType) == 1 and suiteType == 2:
|
| | | groupCnt +=1
|
| | | return groupCnt >= needCnt
|
| | |
|
| | |
|
| | | ##法宝激活个数
|
| | | # @param None
|
| | |
| | | ("BYTE", "IsNotify", 0),
|
| | | ),
|
| | |
|
| | | "EquipSuitCompound":(
|
| | | ("BYTE", "SuiteType", 1),
|
| | | ("BYTE", "EquipPlace", 1),
|
| | | ("WORD", "SuiteLV", 1),
|
| | | ("BYTE", "Job", 1),
|
| | | ("list", "CostItemID", 0),
|
| | | ("list", "CostItemCnt", 0),
|
| | | ),
|
| | |
|
| | | "WingRefineAttr":(
|
| | | ("BYTE", "WingClassLV", 1),
|
| | | ("dict", "AttrInfo", 0),
|
| | |
| | | def GetAttrInfo(self): return self.AttrInfo # 属性
|
| | | def GetSkillID(self): return self.SkillID # 技能ID
|
| | | def GetIsNotify(self): return self.IsNotify # 是否广播 |
| | | |
| | | # 套装合成表 |
| | | class IPY_EquipSuitCompound(): |
| | | |
| | | def __init__(self): |
| | | self.SuiteType = 0
|
| | | self.EquipPlace = 0
|
| | | self.SuiteLV = 0
|
| | | self.Job = 0
|
| | | self.CostItemID = []
|
| | | self.CostItemCnt = [] |
| | | return |
| | | |
| | | def GetSuiteType(self): return self.SuiteType # 套装类型
|
| | | def GetEquipPlace(self): return self.EquipPlace # 装备部位
|
| | | def GetSuiteLV(self): return self.SuiteLV # 套装等级
|
| | | def GetJob(self): return self.Job # ְҵ
|
| | | def GetCostItemID(self): return self.CostItemID # 材料ID
|
| | | def GetCostItemCnt(self): return self.CostItemCnt # 材料数量 |
| | | |
| | | # 羽翼精炼属性表 |
| | | class IPY_WingRefineAttr(): |
| | |
| | | self.ipyNPCStrengthenLen = len(self.ipyNPCStrengthenCache)
|
| | | self.ipyEquipSuitAttrCache = self.__LoadFileData("EquipSuitAttr", IPY_EquipSuitAttr)
|
| | | self.ipyEquipSuitAttrLen = len(self.ipyEquipSuitAttrCache)
|
| | | self.ipyEquipSuitCompoundCache = self.__LoadFileData("EquipSuitCompound", IPY_EquipSuitCompound)
|
| | | self.ipyEquipSuitCompoundLen = len(self.ipyEquipSuitCompoundCache)
|
| | | self.ipyWingRefineAttrCache = self.__LoadFileData("WingRefineAttr", IPY_WingRefineAttr)
|
| | | self.ipyWingRefineAttrLen = len(self.ipyWingRefineAttrCache)
|
| | | self.ipyWingRefineExpCache = self.__LoadFileData("WingRefineExp", IPY_WingRefineExp)
|
| | |
| | | def GetNPCStrengthenByIndex(self, index): return self.ipyNPCStrengthenCache[index]
|
| | | def GetEquipSuitAttrCount(self): return self.ipyEquipSuitAttrLen
|
| | | def GetEquipSuitAttrByIndex(self, index): return self.ipyEquipSuitAttrCache[index]
|
| | | def GetEquipSuitCompoundCount(self): return self.ipyEquipSuitCompoundLen
|
| | | def GetEquipSuitCompoundByIndex(self, index): return self.ipyEquipSuitCompoundCache[index]
|
| | | def GetWingRefineAttrCount(self): return self.ipyWingRefineAttrLen
|
| | | def GetWingRefineAttrByIndex(self, index): return self.ipyWingRefineAttrCache[index]
|
| | | def GetWingRefineExpCount(self): return self.ipyWingRefineExpLen
|
| | |
| | | import IpyGameDataPY
|
| | | import PlayerWing
|
| | | import Operate_EquipStone
|
| | | import Operate_EquipSuitCompose
|
| | | import PassiveBuffEffMng
|
| | | import SkillCommon
|
| | | import PlayerMagicWeapon
|
| | |
| | |
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | curEquip = equipPack.GetAt(equipPackIndex)
|
| | | #SetEquipItemSuiteLVInfo(curPlayer, packEquipIndex, curEquip)
|
| | |
|
| | | if curEquip.GetUserAttr(ShareDefine.Def_IudetCreateTime) == 0:
|
| | | curEquip.SetUserAttr(ShareDefine.Def_IudetCreateTime, int(time.time()))
|
| | | #---换装成功---
|
| | |
| | | playControl.RefreshPlayerAttrState()
|
| | | return True
|
| | |
|
| | |
|
| | | def SetEquipItemSuiteLVInfo(curPlayer, equipIndex, curItem):
|
| | | # 设置部位套装信息
|
| | | if not curItem or curItem.IsEmpty():
|
| | | return
|
| | | |
| | | isSuitePart = False
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | for equipIndexList in equipSuitTypeDict.values():
|
| | | if equipIndex in equipIndexList:
|
| | | isSuitePart = True
|
| | | break
|
| | | |
| | | if not isSuitePart:
|
| | | return
|
| | | |
| | | suiteLVList = GetEquipPartSuiteLVList(curPlayer, equipIndex, curItem)
|
| | | attrCount = curItem.GetUserAttrCount(ShareDefine.Def_IudetPartSuiteLV)
|
| | | |
| | | if suiteLVList and len(suiteLVList) == attrCount:
|
| | | for i, suiteLV in enumerate(suiteLVList):
|
| | | if curItem.GetUserAttrByIndex(ShareDefine.Def_IudetPartSuiteLV, i) != suiteLV:
|
| | | curItem.UpdataUserAttrByIndex(ShareDefine.Def_IudetPartSuiteLV, i, suiteLV)
|
| | | else:
|
| | | if attrCount:
|
| | | curItem.ClearUserAttr(ShareDefine.Def_IudetPartSuiteLV)
|
| | | for suiteLV in suiteLVList:
|
| | | curItem.AddUserAttr(ShareDefine.Def_IudetPartSuiteLV, suiteLV)
|
| | | return
|
| | |
|
| | |
|
| | | ## 刷新装备对人物属性的改变
|
| | |
| | | return plusTypeDict.get(equipPlace, -1)
|
| | |
|
| | |
|
| | | def SetEquipPartSuiteLV(curPlayer, index, suiteType, suiteLV):
|
| | | #设置公共部位套装等级
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartSuiteLV % (index, suiteType), suiteLV)
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | SetEquipItemSuiteLVInfo(curPlayer, index, equipPack.GetAt(index))
|
| | | return
|
| | |
|
| | |
|
| | | def GetEquipPartSuiteLV(curPlayer, index, suiteType):
|
| | | #获取公共部位套装等级
|
| | | return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartSuiteLV % (index, suiteType))
|
| | |
|
| | |
|
| | | def GetEquipPartSuiteGroupType(curPlayer, equipIndex):
|
| | | #获取公共部位套装组合类型
|
| | | findGroupType = 0
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | for groupType, indexList in equipSuitTypeDict.items():
|
| | | if equipIndex in indexList:
|
| | | findGroupType = int(groupType)
|
| | | break
|
| | | return findGroupType
|
| | |
|
| | |
|
| | | # 获取满套装化的最低阶数,如5件套,4件5级,1件3级,则返回3
|
| | | def GetEquipSuitsLVByType(curPlayer, suitType, groupType):
|
| | | suiteLV = 999
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | if groupType not in equipSuitTypeDict:
|
| | | return 0
|
| | | maxCnt = len(equipSuitTypeDict[groupType])
|
| | | cnt = 0
|
| | | for equipPlace in equipSuitTypeDict[groupType]:
|
| | | curSuiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suitType)
|
| | | if curSuiteLV > 0:
|
| | | cnt += 1
|
| | | suiteLV = min(curSuiteLV, suiteLV)
|
| | | |
| | | if cnt != maxCnt:
|
| | | return 0
|
| | | return 0 if suiteLV == 999 else suiteLV
|
| | | return 0
|
| | | # suiteLV = 999
|
| | | # equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | # if groupType not in equipSuitTypeDict:
|
| | | # return 0
|
| | | # maxCnt = len(equipSuitTypeDict[groupType])
|
| | | # cnt = 0
|
| | | # for equipPlace in equipSuitTypeDict[groupType]:
|
| | | # curSuiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suitType)
|
| | | # if curSuiteLV > 0:
|
| | | # cnt += 1
|
| | | # suiteLV = min(curSuiteLV, suiteLV)
|
| | | # |
| | | # if cnt != maxCnt:
|
| | | # return 0
|
| | | # return 0 if suiteLV == 999 else suiteLV
|
| | |
|
| | |
|
| | | ## 通知公共部位套装等级
|
| | | def NotifyEquipPartSuiteLV(curPlayer, index=None):
|
| | | ePartSuitePack = ChPyNetSendPack.tagMCEquipPartSuiteLVInfo()
|
| | | ePartSuitePack.Clear()
|
| | | ePartSuitePack.InfoList = []
|
| | | |
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | for equipIndexList in equipSuitTypeDict.values():
|
| | | for i in equipIndexList:
|
| | | if index != None and index != i:
|
| | | continue
|
| | | ePartSuiteInfo = ChPyNetSendPack.tagMCEquipPartSuiteLV()
|
| | | ePartSuiteInfo.Clear()
|
| | | ePartSuiteInfo.EquipIndex = i
|
| | | suiteInfo = GetSuiteInfoByPlace(curPlayer, i)
|
| | | ePartSuiteInfo.SuiteLVInfo = json.dumps(suiteInfo, ensure_ascii=False)
|
| | | ePartSuiteInfo.Len = len(ePartSuiteInfo.SuiteLVInfo)
|
| | | ePartSuitePack.InfoList.append(ePartSuiteInfo)
|
| | | |
| | | ePartSuitePack.Count = len(ePartSuitePack.InfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, ePartSuitePack)
|
| | | return
|
| | |
|
| | |
|
| | | def GetSuiteInfoByPlace(curPlayer, equipPlace, curEquip=None):
|
| | | suiteInfo = {} #{套装类型:等级}
|
| | | groupType = GetEquipPartSuiteGroupType(curPlayer, equipPlace)
|
| | | maxSuiteType = IpyGameDataPY.GetFuncCfg('EquipSuitColorStar', 2)
|
| | | for suiteType in range(1, maxSuiteType + 1):
|
| | | suiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suiteType)
|
| | | if suiteLV:
|
| | | if curEquip:
|
| | | maxSuiteLV = Operate_EquipSuitCompose.GetEquipCanDoMaxSuiteLV(curPlayer, curEquip, suiteType, groupType)
|
| | | suiteLV = min(suiteLV, maxSuiteLV)
|
| | | suiteInfo[suiteType] = suiteLV
|
| | | return suiteInfo
|
| | |
|
| | |
|
| | | def GetEquipPartSuiteLVList(curPlayer, equipPlace, curEquip=None):
|
| | | ## 部位套装等级列表
|
| | | groupType = GetEquipPartSuiteGroupType(curPlayer, equipPlace)
|
| | | |
| | | suiteLVList = []
|
| | | maxSuiteType = IpyGameDataPY.GetFuncCfg('EquipSuitColorStar', 2)
|
| | | for suiteType in xrange(1, maxSuiteType + 1):
|
| | | suiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suiteType)
|
| | | if curEquip and suiteLV:
|
| | | maxSuiteLV = Operate_EquipSuitCompose.GetEquipCanDoMaxSuiteLV(curPlayer, curEquip, suiteType, groupType)
|
| | | suiteLV = min(suiteLV, maxSuiteLV)
|
| | | |
| | | suiteLVList.append(suiteLV)
|
| | | return suiteLVList
|
| | |
|
| | |
|
| | | def SetEquipPartStar(curPlayer, equipPackindex, star):
|
| | |
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import Operate_EquipStone
|
| | | import Operate_EquipSuitCompose
|
| | | import IpyGameDataPY
|
| | | import DataRecordPack
|
| | | import EventShell
|
| | |
| | | PlayerSuccess.DoEquipSuccessLogic(curPlayer)
|
| | | #换装宝石处理
|
| | | Operate_EquipStone.DoMoveEquipStone(curPlayer, equipPackIndex)
|
| | | #套装降级处理
|
| | | #Operate_EquipSuitCompose.CheckEquipSuitReduce(curPlayer, packEquipIndex)
|
| | | EventShell.EventRespons_EquipStar(curPlayer)
|
| | | dataDict = {'dotype':'EquipItem', 'desItemID':desItemID, 'desUserData':desUserData,'srcItemID':srcItemID,'srcUserData':srcUserData}
|
| | | DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipChange, dataDict)
|
| | |
| | | if not DragItem(curPlayer, IPY_GameWorld.rptEquip, equipIndex, IPY_GameWorld.rptItem, packIndex, curEquipCount):
|
| | | return
|
| | | self.RefreshStartEquipCount()
|
| | | #套装降级处理
|
| | | #Operate_EquipSuitCompose.CheckEquipSuitReduce(curPlayer, equipIndex)
|
| | | EventShell.EventRespons_EquipStar(curPlayer)
|
| | | dataDict = {'dotype':'UnEquipItem', 'equipID':equipID, 'userData':userData}
|
| | | DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipChange, dataDict)
|
| | |
| | | ChEquip.NotifyEquipPartStar(curPlayer)
|
| | | Operate_EquipWash.OnEquipWashLogin(curPlayer)
|
| | | #通知套装信息
|
| | | #ChEquip.NotifyEquipPartSuiteLV(curPlayer)
|
| | | #ChEquip.SyncAllEquipAttrActiveInfo(curPlayer)
|
| | | #装备位宝石镶嵌通知
|
| | | Operate_EquipStone.OnLogin(curPlayer)
|
| | |
| | | # #全身装备X星
|
| | | # cnt = ChEquip.GetTotalEquipStars(curPlayer)
|
| | |
|
| | | elif curType == 4:
|
| | | #X阶普通、强化套装
|
| | | suiteCntDict = {}
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for equipIndex in xrange(playerEquip.GetCount()):
|
| | | curEquip = playerEquip.GetAt(equipIndex)
|
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, equipIndex, curEquip)
|
| | | for suitelv, suiteType in conditionList:
|
| | | if suiteInfo.get(suiteType, 0) >= suitelv:
|
| | | suiteCntDict[suiteType] = suiteCntDict.get(suiteType, 0)+1
|
| | | cnt = max(suiteCntDict.values()) if suiteCntDict else 0
|
| | | # elif curType == 4:
|
| | | # #X阶普通、强化套装
|
| | | # suiteCntDict = {}
|
| | | # playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | # for equipIndex in xrange(playerEquip.GetCount()):
|
| | | # curEquip = playerEquip.GetAt(equipIndex)
|
| | | # if curEquip.IsEmpty():
|
| | | # continue
|
| | | # suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, equipIndex, curEquip)
|
| | | # for suitelv, suiteType in conditionList:
|
| | | # if suiteInfo.get(suiteType, 0) >= suitelv:
|
| | | # suiteCntDict[suiteType] = suiteCntDict.get(suiteType, 0)+1
|
| | | # cnt = max(suiteCntDict.values()) if suiteCntDict else 0
|
| | |
|
| | | else:
|
| | | return
|
| | |
| | | import PlayerRune
|
| | | import Operate_EquipStone
|
| | | import Operate_EquipWash
|
| | | import Operate_EquipSuitCompose
|
| | | import PlayerFeastRedPacket
|
| | | import PlayerDogz
|
| | | import QuestCommon
|
| | |
| | | #法宝数据
|
| | | curPlayerPlusDict["MagicWeapon"] = __GetMagicWeaponInfo(curPlayer)
|
| | |
|
| | | #部位套装数据
|
| | | curPlayerPlusDict["EquipPartSuite"] = __GetEquipPartSuiteInfo(curPlayer)
|
| | | #魂石、丹药使用个数
|
| | | curPlayerPlusDict["Fruit"] = PlayerAttrFruit.GetAttrFruitEatCntDict(curPlayer)
|
| | |
|
| | |
| | | stoneInfoList.append({"Place":place, "LV":washLV, "Value":valueList})
|
| | | return stoneInfoList
|
| | |
|
| | |
|
| | | ## 公共部位套装等级信息{部位索引:{套装类型:套装等级,..}, ...}
|
| | | def __GetEquipPartSuiteInfo(curPlayer):
|
| | | suiteInfoDict = {}
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | for equipIndexList in equipSuitTypeDict.values():
|
| | | for i in equipIndexList:
|
| | | suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
|
| | | if suiteInfo:
|
| | | suiteInfoDict[i] = suiteInfo
|
| | | return suiteInfoDict
|
| | |
|
| | | ## 灵宠信息
|
| | | def __GetPetInfo(curPlayer):
|