10215 10213 【越南】【主干】【港台】【砍树】古宝升星效果与古宝共鸣(去除古宝共鸣手动激活流程)
| | |
| | | struct tagGubaoResonanceAttr
|
| | | {
|
| | | WORD _ResonanceID; //共鸣ID
|
| | | BYTE _ResonanceStar; //共鸣星级
|
| | | BYTE ResonanceStar; //共鸣星级
|
| | | list ResonanceAttrIDList; //共鸣总属性ID列表
|
| | | list ResonanceAttrValueList; //共鸣总属性值列表
|
| | | };
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 15 古宝共鸣激活 #tagCMGubaoResonanceActivate
|
| | |
|
| | | class tagCMGubaoResonanceActivate(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ResonanceID", c_ushort), # 共鸣ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x15
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x15
|
| | | self.ResonanceID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGubaoResonanceActivate)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 15 古宝共鸣激活 //tagCMGubaoResonanceActivate:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ResonanceID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ResonanceID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGubaoResonanceActivate=tagCMGubaoResonanceActivate()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGubaoResonanceActivate.Cmd,m_NAtagCMGubaoResonanceActivate.SubCmd))] = m_NAtagCMGubaoResonanceActivate
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 17 古宝升星 #tagCMGubaoStarUp
|
| | |
|
| | | class tagCMGubaoStarUp(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 CF 古宝共鸣信息 #tagMCGubaoResonanceInfo
|
| | |
|
| | | class tagMCGubaoResonance(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ResonanceID", c_ushort), # 共鸣ID
|
| | | ("ResonanceStar", c_ubyte), # 已激活共鸣星级
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ResonanceID = 0
|
| | | self.ResonanceStar = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGubaoResonance)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 CF 古宝共鸣信息 //tagMCGubaoResonanceInfo:
|
| | | ResonanceID:%d,
|
| | | ResonanceStar:%d
|
| | | '''\
|
| | | %(
|
| | | self.ResonanceID,
|
| | | self.ResonanceStar
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGubaoResonanceInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | ResonanceInfoList = list() #(vector<tagMCGubaoResonance> ResonanceInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCF
|
| | | 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):
|
| | | temResonanceInfoList = tagMCGubaoResonance()
|
| | | _pos = temResonanceInfoList.ReadData(_lpData, _pos)
|
| | | self.ResonanceInfoList.append(temResonanceInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCF
|
| | | self.Count = 0
|
| | | self.ResonanceInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.ResonanceInfoList[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.ResonanceInfoList[i].GetLength(), self.ResonanceInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ResonanceInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGubaoResonanceInfo=tagMCGubaoResonanceInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoResonanceInfo.Head.Cmd,m_NAtagMCGubaoResonanceInfo.Head.SubCmd))] = m_NAtagMCGubaoResonanceInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 28 历史累积充值奖励领取记录 #tagMCHistoryReChargeAwardRecord
|
| | |
|
| | | class tagMCHistoryReChargeAwardRecord(Structure):
|
| | |
| | | Writer = hxp
|
| | | Releaser = hxp
|
| | | RegType = 0
|
| | | RegisterPackCount = 4
|
| | | RegisterPackCount = 3
|
| | |
|
| | | PacketCMD_1=0xB2
|
| | | PacketSubCMD_1=0x16
|
| | |
| | | PacketCMD_3=0xB2
|
| | | PacketSubCMD_3=0x18
|
| | | PacketCallFunc_3=OnGubaoLVUp
|
| | |
|
| | | PacketCMD_4=0xB2
|
| | | PacketSubCMD_4=0x15
|
| | | PacketCallFunc_4=OnGubaoResonanceActivate
|
| | |
|
| | | ;神通
|
| | | [PlayerShentong]
|
| | |
| | | Def_PDict_GubaoLVInfo = "GubaoLVInfo_%s" # 古宝等级信息,参数(古宝ID),等级*100+星级
|
| | | Def_PDict_GubaoItemEffValue = "GubaoItemEffValue_%s_%s" # 古宝效果物品进度,参数(古宝ID, 效果类型)
|
| | | Def_PDict_GubaoPiece = "GubaoPiece_%s" # 古宝碎片数,参数(古宝ID)
|
| | | Def_PDict_GubaoResonanceStar = "GubaoResonanceStar_%s" # 古宝共鸣,参数(共鸣ID)
|
| | |
|
| | | #神通
|
| | | Def_PDict_ShentongLVInfo = "ShentongLVInfo_%s" # 神通等级信息,参数(神通ID),阶级*100+等级
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 15 古宝共鸣激活 #tagCMGubaoResonanceActivate
|
| | |
|
| | | class tagCMGubaoResonanceActivate(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ResonanceID", c_ushort), # 共鸣ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x15
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x15
|
| | | self.ResonanceID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGubaoResonanceActivate)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 15 古宝共鸣激活 //tagCMGubaoResonanceActivate:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ResonanceID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ResonanceID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGubaoResonanceActivate=tagCMGubaoResonanceActivate()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGubaoResonanceActivate.Cmd,m_NAtagCMGubaoResonanceActivate.SubCmd))] = m_NAtagCMGubaoResonanceActivate
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 17 古宝升星 #tagCMGubaoStarUp
|
| | |
|
| | | class tagCMGubaoStarUp(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 CF 古宝共鸣信息 #tagMCGubaoResonanceInfo
|
| | |
|
| | | class tagMCGubaoResonance(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ResonanceID", c_ushort), # 共鸣ID
|
| | | ("ResonanceStar", c_ubyte), # 已激活共鸣星级
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ResonanceID = 0
|
| | | self.ResonanceStar = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGubaoResonance)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 CF 古宝共鸣信息 //tagMCGubaoResonanceInfo:
|
| | | ResonanceID:%d,
|
| | | ResonanceStar:%d
|
| | | '''\
|
| | | %(
|
| | | self.ResonanceID,
|
| | | self.ResonanceStar
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGubaoResonanceInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | ResonanceInfoList = list() #(vector<tagMCGubaoResonance> ResonanceInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCF
|
| | | 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):
|
| | | temResonanceInfoList = tagMCGubaoResonance()
|
| | | _pos = temResonanceInfoList.ReadData(_lpData, _pos)
|
| | | self.ResonanceInfoList.append(temResonanceInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCF
|
| | | self.Count = 0
|
| | | self.ResonanceInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.ResonanceInfoList[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.ResonanceInfoList[i].GetLength(), self.ResonanceInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ResonanceInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGubaoResonanceInfo=tagMCGubaoResonanceInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoResonanceInfo.Head.Cmd,m_NAtagMCGubaoResonanceInfo.Head.SubCmd))] = m_NAtagMCGubaoResonanceInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 28 历史累积充值奖励领取记录 #tagMCHistoryReChargeAwardRecord
|
| | |
|
| | | class tagMCHistoryReChargeAwardRecord(Structure):
|
| | |
| | | GameWorld.DebugAnswer(curPlayer, "重置古宝: Gubao 0") |
| | | GameWorld.DebugAnswer(curPlayer, "设置古宝: Gubao 古宝ID 等级 星级") |
| | | GameWorld.DebugAnswer(curPlayer, "设置效果: Gubao e 古宝ID 效果类型 进度值") |
| | | GameWorld.DebugAnswer(curPlayer, "设置共鸣: Gubao r 共鸣ID 共鸣星级") |
| | | return |
| | | |
| | | gubaoIDList = [] |
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GubaoItemEffValue % (gubaoID, effType), 0) |
| | | |
| | | PlayerGubao.Sync_GubaoItemEffInfo(curPlayer, force=True) |
| | | |
| | | resonanceIDList = [] |
| | | for index in range(ipyDataMgr.GetGubaoResonanceCount()): |
| | | ipyData = ipyDataMgr.GetGubaoResonanceByIndex(index) |
| | | resonanceID = ipyData.GetResonanceID() |
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GubaoResonanceStar % resonanceID): |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GubaoResonanceStar % resonanceID, 0) |
| | | resonanceIDList.append(resonanceID) |
| | | PlayerGubao.Sync_GubaoResonanceInfo(curPlayer, resonanceIDList) |
| | | |
| | | GameWorld.DebugAnswer(curPlayer, "重置古宝OK") |
| | | |
| | | elif value1 == "r": |
| | | resonanceID = msgList[1] if len(msgList) > 1 else 0 |
| | | resonanceStar = msgList[2] if len(msgList) > 2 else 0 |
| | | if resonanceStar != 0: |
| | | ipyData = IpyGameDataPY.GetIpyGameData("GubaoResonanceAttr", resonanceID, resonanceStar) |
| | | if not ipyData: |
| | | GameWorld.DebugAnswer(curPlayer, "不存在该古宝共鸣!ID=%s,star=%s" % (resonanceID, resonanceStar)) |
| | | return |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GubaoResonanceStar % resonanceID, resonanceStar) |
| | | PlayerGubao.Sync_GubaoResonanceInfo(curPlayer, [resonanceID]) |
| | | |
| | | elif len(msgList) == 3: |
| | | gubaoID, lv, star = msgList |
| | | ipyData = IpyGameDataPY.GetIpyGameData("Gubao", gubaoID) |
| | |
| | |
|
| | | "GubaoResonanceAttr":(
|
| | | ("WORD", "ResonanceID", 1),
|
| | | ("BYTE", "ResonanceStar", 1),
|
| | | ("BYTE", "ResonanceStar", 0),
|
| | | ("list", "ResonanceAttrIDList", 0),
|
| | | ("list", "ResonanceAttrValueList", 0),
|
| | | ),
|
| | |
| | | Sync_GubaoInfo(curPlayer)
|
| | | Sync_GubaoItemEffInfo(curPlayer)
|
| | | Sync_GubaoPieceInfo(curPlayer)
|
| | | Sync_GubaoResonanceInfo(curPlayer)
|
| | | return
|
| | |
|
| | | def AddGubaoPiece(curPlayer, gubaoID, addCount, useItemID):
|
| | |
| | | GameWorld.DebugLog("转化古宝功能所需物品: needItemList=%s,realNeedItemList=%s,needPieceInfo=%s"
|
| | | % (needItemList, realNeedItemList, needPieceInfo), curPlayer.GetPlayerID())
|
| | | return needPieceInfo, realNeedItemList
|
| | |
|
| | | #// B2 15 古宝共鸣激活 #tagCMGubaoResonanceActivate
|
| | | #
|
| | | #struct tagCMGubaoResonanceActivate
|
| | | #{
|
| | | # tagHead Head;
|
| | | # WORD ResonanceID; |
| | | #};
|
| | | def OnGubaoResonanceActivate(index, curPackData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | resonanceID = curPackData.ResonanceID
|
| | | |
| | | ipyData = IpyGameDataPY.GetIpyGameData("GubaoResonance", resonanceID)
|
| | | if not ipyData:
|
| | | return
|
| | | gubaoIDList = ipyData.GetGubaoIDList()
|
| | | attrIpyDataList = IpyGameDataPY.GetIpyGameDataByCondition("GubaoResonanceAttr", {"ResonanceID":resonanceID}, True)
|
| | | if not attrIpyDataList:
|
| | | return
|
| | | nextStar = resonanceStar = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GubaoResonanceStar % resonanceID)
|
| | | |
| | | for attrIpyData in attrIpyDataList:
|
| | | star = attrIpyData.GetResonanceStar()
|
| | | if star > nextStar:
|
| | | nextStar = star
|
| | | break
|
| | | |
| | | if nextStar <= resonanceStar:
|
| | | GameWorld.DebugLog("古宝共鸣没有下一星级了! resonanceID=%s,resonanceStar=%s" % (resonanceID, resonanceStar), playerID)
|
| | | return
|
| | | |
| | | for gubaoID in gubaoIDList:
|
| | | _, star = GetGubaoLVInfo(curPlayer, gubaoID)
|
| | | if star < nextStar:
|
| | | GameWorld.DebugLog("古宝未达到共鸣星级,无法激活共鸣! gubaoID=%s,star=%s < %s" % (gubaoID, star, nextStar), playerID)
|
| | | return
|
| | | |
| | | GameWorld.DebugLog("古宝共鸣星级激活! resonanceID=%s,nextStar=%s" % (resonanceID, nextStar), playerID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GubaoResonanceStar % resonanceID, nextStar)
|
| | | RefreshGubaoAttr(curPlayer)
|
| | | Sync_GubaoResonanceInfo(curPlayer, [resonanceID])
|
| | | return
|
| | |
|
| | | #// B2 16 古宝激活 #tagCMGubaoActivate
|
| | | #
|
| | |
| | | for index in range(ipyDataMgr.GetGubaoResonanceCount()):
|
| | | ipyData = ipyDataMgr.GetGubaoResonanceByIndex(index)
|
| | | resonanceID = ipyData.GetResonanceID()
|
| | | resonanceStar = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GubaoResonanceStar % resonanceID)
|
| | | if not resonanceStar:
|
| | | gubaoIDList = ipyData.GetGubaoIDList()
|
| | | if not gubaoIDList:
|
| | | continue
|
| | | resonanceAttrIpyData = IpyGameDataPY.GetIpyGameData("GubaoResonanceAttr", resonanceID, resonanceStar)
|
| | | |
| | | gubaoStarDict = {}
|
| | | for gubaoID in gubaoIDList:
|
| | | _, star = GetGubaoLVInfo(curPlayer, gubaoID)
|
| | | gubaoStarDict[gubaoID] = star
|
| | | minStar = min(gubaoStarDict.values()) # 共鸣星级,取组合中最低古宝星级
|
| | | if not minStar:
|
| | | #GameWorld.DebugLog("共鸣组合存在古宝未激活! resonanceID=%s,gubaoStarDict=%s" % (resonanceID, gubaoStarDict))
|
| | | continue
|
| | | |
| | | attrIpyDataList = IpyGameDataPY.GetIpyGameDataList("GubaoResonanceAttr", resonanceID)
|
| | | if not attrIpyDataList:
|
| | | continue
|
| | | |
| | | resonanceAttrIpyData = None
|
| | | for attrIpyData in attrIpyDataList:
|
| | | resonanceStar = attrIpyData.GetResonanceStar()
|
| | | if resonanceStar > minStar:
|
| | | break
|
| | | resonanceAttrIpyData = attrIpyData
|
| | | |
| | | if not resonanceAttrIpyData:
|
| | | #GameWorld.DebugLog("没有古宝共鸣属性! resonanceID=%s,minStar=%s" % (resonanceID, minStar))
|
| | | continue
|
| | | |
| | | #GameWorld.DebugLog("古宝共鸣: resonanceID=%s,resonanceStar=%s,gubaoStarDict=%s" % (resonanceID, resonanceAttrIpyData.GetResonanceStar(), gubaoStarDict))
|
| | | resonanceAttrIDList = resonanceAttrIpyData.GetResonanceAttrIDList()
|
| | | resonanceAttrValueList = resonanceAttrIpyData.GetResonanceAttrValueList()
|
| | | for i, attrID in enumerate(resonanceAttrIDList):
|
| | |
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListResonance)
|
| | |
|
| | | # 保存计算值
|
| | | GameWorld.DebugLog("古宝属性: %s" % allAttrList)
|
| | | #GameWorld.DebugLog("古宝属性: %s" % allAttrList)
|
| | | #GameWorld.DebugLog("古宝共鸣属性: %s" % allAttrListResonance)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Gubao, allAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_GubaoResonance, allAttrListResonance)
|
| | |
| | | clientPack = ChPyNetSendPack.tagMCGubaoInfo()
|
| | | clientPack.GubaoInfoList = gubaoInfoList
|
| | | clientPack.Count = len(clientPack.GubaoInfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | def Sync_GubaoResonanceInfo(curPlayer, resonanceIDList=None):
|
| | | if resonanceIDList == None:
|
| | | syncIDList = []
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in range(ipyDataMgr.GetGubaoResonanceCount()):
|
| | | ipyData = ipyDataMgr.GetGubaoResonanceByIndex(index)
|
| | | syncIDList.append(ipyData.GetResonanceID())
|
| | | else:
|
| | | syncIDList = resonanceIDList
|
| | | |
| | | resonanceInfoList = []
|
| | | for resonanceID in syncIDList:
|
| | | resonanceStar = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GubaoResonanceStar % resonanceID)
|
| | | if not resonanceStar and resonanceIDList == None:
|
| | | # 没有指定时只同步激活的
|
| | | continue
|
| | | resonanceInfo = ChPyNetSendPack.tagMCGubaoResonance()
|
| | | resonanceInfo.ResonanceID = resonanceID
|
| | | resonanceInfo.ResonanceStar = resonanceStar
|
| | | resonanceInfoList.append(resonanceInfo)
|
| | | |
| | | if not resonanceInfoList:
|
| | | return
|
| | | |
| | | clientPack = ChPyNetSendPack.tagMCGubaoResonanceInfo()
|
| | | clientPack.ResonanceInfoList = resonanceInfoList
|
| | | clientPack.Count = len(clientPack.ResonanceInfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|