6374 【后端】【2.0】删除无用功能代码、封包、配置(法宝之魂)
| | |
| | | DWORD PowerEx; //额外固定战力
|
| | | };
|
| | |
|
| | | //法宝特权表
|
| | |
|
| | | struct tagTreasurePrivilege
|
| | | {
|
| | | DWORD _PrivilegeID; //特权ID
|
| | | eval EffectValue; //特殊效果
|
| | | DWORD SingleValue; //进度
|
| | | DWORD MaxValue; //最大进度
|
| | | dict AddAttr; //属性
|
| | | list ItemAward; //物品奖励
|
| | | list SuccessList; //需要完成成就
|
| | | };
|
| | |
|
| | | //连续签到奖励表
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 12 激活法宝之魂 #tagCMActiveMWSoul
|
| | |
|
| | | class tagCMActiveMWSoul(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ID", c_ubyte), #编号
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x12
|
| | | 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 = 0x12
|
| | | self.ID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMActiveMWSoul)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 12 激活法宝之魂 //tagCMActiveMWSoul:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMActiveMWSoul=tagCMActiveMWSoul()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActiveMWSoul.Cmd,m_NAtagCMActiveMWSoul.SubCmd))] = m_NAtagCMActiveMWSoul
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 49 大师天赋技能加点 #tagCMAddMasterSkillPoint
|
| | |
|
| | | class tagCMMasterSkillPoint(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 53 法宝特权数据 #tagMCMWPrivilegeDataInfo
|
| | |
|
| | | class tagMCMWPrivilegeData(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("PriID", c_int), # 特权ID
|
| | | ("State", c_ubyte), #激活状态
|
| | | ("CurValue", c_int), #当前总进度
|
| | | ("GotValue", c_int), #已领取进度
|
| | | ("ItemAwardState", 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.PriID = 0
|
| | | self.State = 0
|
| | | self.CurValue = 0
|
| | | self.GotValue = 0
|
| | | self.ItemAwardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCMWPrivilegeData)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 53 法宝特权数据 //tagMCMWPrivilegeDataInfo:
|
| | | PriID:%d,
|
| | | State:%d,
|
| | | CurValue:%d,
|
| | | GotValue:%d,
|
| | | ItemAwardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.PriID,
|
| | | self.State,
|
| | | self.CurValue,
|
| | | self.GotValue,
|
| | | self.ItemAwardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCMWPrivilegeDataInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | InfoList = list() #(vector<tagMCMWPrivilegeData> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x53
|
| | | 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 = tagMCMWPrivilegeData()
|
| | | _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 = 0x53
|
| | | 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_NAtagMCMWPrivilegeDataInfo=tagMCMWPrivilegeDataInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMWPrivilegeDataInfo.Head.Cmd,m_NAtagMCMWPrivilegeDataInfo.Head.SubCmd))] = m_NAtagMCMWPrivilegeDataInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 26 NPCID已采集次数信息 #tagMCNPCIDCollectionCntInfo
|
| | |
|
| | | class tagMCNPCIDCollectionCnt(Structure):
|
| | |
| | | Def_MFPType_MagicWeapon3, # 仙族法宝 17
|
| | | Def_MFPType_PetSoul, # 灵宠魂石 18
|
| | | Def_MFPType_HorseSoul, # 坐骑魂石 19
|
| | | Def_MFPType_MagicWeaponSoul, # 法宝之魂 20
|
| | | Def_MFPType_MagicWeaponSoul, # 法宝之魂 20 - 废弃
|
| | | Def_MFPType_Dogz, # 神兽 21
|
| | | Def_MFPType_GatherSoul, # 聚魂 22
|
| | | Def_MFPType_MagicWeapon4, # 王者法宝 23
|
| | |
| | | Writer = xdh
|
| | | Releaser = xdh
|
| | | RegType = 0
|
| | | RegisterPackCount = 5
|
| | | RegisterPackCount = 4
|
| | |
|
| | | PacketCMD_1=0xA5
|
| | | PacketSubCMD_1=0x12
|
| | | PacketCallFunc_1=OnActiveMWSoul
|
| | | PacketSubCMD_1=0x1D
|
| | | PacketCallFunc_1=OnWearMagicWeapon
|
| | |
|
| | | PacketCMD_2=0xA5
|
| | | PacketSubCMD_2=0x1D
|
| | | PacketCallFunc_2=OnWearMagicWeapon
|
| | | PacketSubCMD_2=0x0E
|
| | | PacketCallFunc_2=OnOpenMagicWeapon
|
| | |
|
| | | PacketCMD_3=0xA5
|
| | | PacketSubCMD_3=0x0E
|
| | | PacketCallFunc_3=OnOpenMagicWeapon
|
| | | PacketSubCMD_3=0x15
|
| | | PacketCallFunc_3=OnMagicWeaponUp
|
| | |
|
| | | PacketCMD_4=0xA5
|
| | | PacketSubCMD_4=0x15
|
| | | PacketCallFunc_4=OnMagicWeaponUp
|
| | |
|
| | | PacketCMD_5=0xA5
|
| | | PacketSubCMD_5=0x16
|
| | | PacketCallFunc_5=SaveMagicWeaponState
|
| | | PacketSubCMD_4=0x16
|
| | | PacketCallFunc_4=SaveMagicWeaponState
|
| | |
|
| | | ;副本
|
| | | [FBCommon]
|
| | |
| | |
|
| | | #法宝
|
| | | Def_PDict_MagicWeaponExp = "MagicWeaponExp_%s" #法宝经验 参数法宝ID
|
| | | Def_PDict_MagicWeaponIsActive = "MagicWeaponIsActive_%s_%s" #法宝激活状态 参数(法宝类型, key编号)
|
| | | Def_PDict_MagicWeaponIsClick = "MagicWeaponIsClick_%s_%s" #法宝点击状态 参数(法宝类型, key编号)
|
| | | Def_PDict_MagicWeaponIsWear = "MagicWeaponIsWear_%s_%s" #法宝佩戴状态 参数(法宝类型, key编号)
|
| | | Def_PDict_MagicWeaponRefineLV = "MagicWeaponRefineLV_%s" #法宝精炼等级 参数法宝ID
|
| | | Def_PDict_MagicWeaponIsActive = "MagicWeaponIsActive_%s" #法宝激活状态 参数法宝ID
|
| | | Def_PDict_MagicWeaponIsClick = "MagicWeaponIsClick_%s" #法宝点击状态 参数法宝ID
|
| | | Def_PDict_MagicWeaponIsWear = "MagicWeaponIsWear_%s" #法宝佩戴状态 参数法宝ID
|
| | | Def_PDict_XBXZAwardRecord = "XBXZAwardRecord_%s" #仙宝寻主领奖记录 参数ID
|
| | | Def_PDict_MagicWeaponLV = "MagicWeaponLV_%s" #法宝等级 参数法宝ID
|
| | | Def_PDict_MagicWeaponUpExp = "MagicWeaponUpExp_%s" #法宝升级经验 参数法宝ID
|
| | | Def_PDict_MWSoulCurValue = "MWSoulCurValue_%s" #法宝特权当前进度 参数特权ID
|
| | | Def_PDict_MWSoulGotValue = "MWSoulGotValue_%s" #法宝特权已领取进度 参数特权ID
|
| | | Def_PDict_MWSoulGotItemState = "MWSoulGotItemState_%s" #法宝特权领取物品奖励状态 参数特权ID
|
| | | Def_PDict_MWSoulActiveState = "MWSoulActiveState_%s" #法宝之魂激活状态 参数(key编号)
|
| | | Def_PDict_MWFBPassLevel = "MWFBPassLevel_%s" #法宝副本通关关卡 参数(法宝ID)
|
| | | #炼丹炉
|
| | | Def_PDict_AlchemyLV = "AlchemyLV" #炼丹等级
|
| | |
| | | Def_CalcAttrFunc_PetSkill, # 宠物技能属性 31
|
| | | Def_CalcAttrFunc_StoveYao, # 炼丹炉丹药 32
|
| | | Def_CalcAttrFunc_PetSign, # 宠物签到 33
|
| | | Def_CalcAttrFunc_MagicWeaponSoul, # 法宝之魂属性34
|
| | | Def_CalcAttrFunc_MagicWeaponSoul, # 法宝之魂属性34- 废弃
|
| | | Def_CalcAttrFunc_Dogz, # 神兽35
|
| | | Def_CalcAttrFunc_DogzBattleSkill, # 助战神兽技能36
|
| | | Def_CalcAttrFunc_DogzEquip, # 神兽装备37
|
| | |
| | | Def_RewardType_XBXZ, # 仙宝寻主奖励6
|
| | | Def_RewardType_DayRealmPoint, # 每日任务修行点奖励7
|
| | | Def_RewardType_GoldGiftFirst, # 首充礼包奖励8
|
| | | Def_RewardType_MWSoulAward, # 法宝之魂奖励9
|
| | | Def_RewardType_MWSoulAward, # 法宝之魂奖励9 -废弃
|
| | | Def_RewardType_FreeGoods, # 极品白拿10
|
| | | Def_RewardType_CostRebate, # 消费返利11
|
| | | Def_RewardType_BossReborn, # BOSS复活12
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 12 激活法宝之魂 #tagCMActiveMWSoul
|
| | |
|
| | | class tagCMActiveMWSoul(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ID", c_ubyte), #编号
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x12
|
| | | 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 = 0x12
|
| | | self.ID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMActiveMWSoul)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 12 激活法宝之魂 //tagCMActiveMWSoul:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMActiveMWSoul=tagCMActiveMWSoul()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActiveMWSoul.Cmd,m_NAtagCMActiveMWSoul.SubCmd))] = m_NAtagCMActiveMWSoul
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 49 大师天赋技能加点 #tagCMAddMasterSkillPoint
|
| | |
|
| | | class tagCMMasterSkillPoint(Structure):
|
| | |
| | | RunQuestEvent(curPlayer, "realmup", realmlv, Def_RunQuestType_RunAll)
|
| | | return
|
| | |
|
| | | def EventRespons_MWSoulActive(curPlayer, soulid):
|
| | | #法宝之魂激活
|
| | | RunQuestEvent(curPlayer, "mwsoulactive", soulid, Def_RunQuestType_RunAll)
|
| | | return
|
| | |
|
| | | def EventRespons_PassQueenRelecs(curPlayer, lineID, grade):
|
| | | #X级通关X层娲皇遗迹
|
| | |
| | | realmlv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return curPlayer.GetOfficialRank() >= realmlv
|
| | |
|
| | | ##法宝之魂是否激活
|
| | | # @param None
|
| | | # @return None <Mwsoul value="id"/>
|
| | | def ConditionType_Mwsoul(curPlayer, curMission, curActionNode):
|
| | | soulID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return bool(PlayerMagicWeapon.GetIsActiveMWSoul(curPlayer, soulID))
|
| | |
|
| | | ##X级通关X层娲皇遗迹
|
| | | # @param None
|
| | |
| | | ShareDefine.Def_MFPType_MagicWeapon4:"王者法宝",
|
| | | ShareDefine.Def_MFPType_PetSoul:"宠魂",
|
| | | ShareDefine.Def_MFPType_HorseSoul:"骑魂",
|
| | | ShareDefine.Def_MFPType_MagicWeaponSoul:"法宝之魂",
|
| | | ShareDefine.Def_MFPType_Dogz:"神兽",
|
| | | ShareDefine.Def_MFPType_Coat:"ʱװ",
|
| | | ShareDefine.Def_MFPType_Other:"其他",
|
| | |
| | | ChConfig.Def_CalcAttrFunc_PetSkill:"宠物技能属性",
|
| | | ChConfig.Def_CalcAttrFunc_StoveYao:"炼丹炉丹药",
|
| | | ChConfig.Def_CalcAttrFunc_PetSign:"宠物签到",
|
| | | ChConfig.Def_CalcAttrFunc_MagicWeaponSoul:"法宝之魂",
|
| | | ChConfig.Def_CalcAttrFunc_Dogz:"神兽",
|
| | | ChConfig.Def_CalcAttrFunc_Coat:"ʱװ",
|
| | | }
|
| | |
| | | if rank == 1 and lineID >= 4:
|
| | | EventShell.EventRespons_SealDemon(curPlayer)
|
| | |
|
| | | PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_SealDemonAddAttr, addCnt, True)
|
| | | |
| | | PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_FMT, addCnt)
|
| | | PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_FMT, addCnt)
|
| | | PlayerNewFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_FMT, addCnt)
|
| | |
| | | ("DWORD", "PowerEx", 0),
|
| | | ),
|
| | |
|
| | | "TreasurePrivilege":(
|
| | | ("DWORD", "PrivilegeID", 1),
|
| | | ("eval", "EffectValue", 0),
|
| | | ("DWORD", "SingleValue", 0),
|
| | | ("DWORD", "MaxValue", 0),
|
| | | ("dict", "AddAttr", 0),
|
| | | ("list", "ItemAward", 0),
|
| | | ("list", "SuccessList", 0),
|
| | | ),
|
| | |
|
| | | "ContineSignAward":(
|
| | | ("BYTE", "ContineDay", 1),
|
| | | ("list", "ItemID", 0),
|
| | |
| | | def GetActiveSoulID(self): return self.ActiveSoulID # 激活魂ID
|
| | | def GetPowerEx(self): return self.PowerEx # 额外固定战力 |
| | | |
| | | # 法宝特权表 |
| | | class IPY_TreasurePrivilege(): |
| | | |
| | | def __init__(self): |
| | | self.PrivilegeID = 0
|
| | | self.EffectValue = 0
|
| | | self.SingleValue = 0
|
| | | self.MaxValue = 0
|
| | | self.AddAttr = {}
|
| | | self.ItemAward = []
|
| | | self.SuccessList = [] |
| | | return |
| | | |
| | | def GetPrivilegeID(self): return self.PrivilegeID # 特权ID
|
| | | def GetEffectValue(self): return self.EffectValue # 特殊效果
|
| | | def GetSingleValue(self): return self.SingleValue # 进度
|
| | | def GetMaxValue(self): return self.MaxValue # 最大进度
|
| | | def GetAddAttr(self): return self.AddAttr # 属性
|
| | | def GetItemAward(self): return self.ItemAward # 物品奖励
|
| | | def GetSuccessList(self): return self.SuccessList # 需要完成成就 |
| | | |
| | | # 连续签到奖励表 |
| | | class IPY_ContineSignAward(): |
| | | |
| | |
| | | self.ipyTreasureLen = len(self.ipyTreasureCache)
|
| | | self.ipyTreasureUpCache = self.__LoadFileData("TreasureUp", IPY_TreasureUp)
|
| | | self.ipyTreasureUpLen = len(self.ipyTreasureUpCache)
|
| | | self.ipyTreasurePrivilegeCache = self.__LoadFileData("TreasurePrivilege", IPY_TreasurePrivilege)
|
| | | self.ipyTreasurePrivilegeLen = len(self.ipyTreasurePrivilegeCache)
|
| | | self.ipyContineSignAwardCache = self.__LoadFileData("ContineSignAward", IPY_ContineSignAward)
|
| | | self.ipyContineSignAwardLen = len(self.ipyContineSignAwardCache)
|
| | | self.ipySignAwardCache = self.__LoadFileData("SignAward", IPY_SignAward)
|
| | |
| | | def GetTreasureByIndex(self, index): return self.ipyTreasureCache[index]
|
| | | def GetTreasureUpCount(self): return self.ipyTreasureUpLen
|
| | | def GetTreasureUpByIndex(self, index): return self.ipyTreasureUpCache[index]
|
| | | def GetTreasurePrivilegeCount(self): return self.ipyTreasurePrivilegeLen
|
| | | def GetTreasurePrivilegeByIndex(self, index): return self.ipyTreasurePrivilegeCache[index]
|
| | | def GetContineSignAwardCount(self): return self.ipyContineSignAwardLen
|
| | | def GetContineSignAwardByIndex(self, index): return self.ipyContineSignAwardCache[index]
|
| | | def GetSignAwardCount(self): return self.ipySignAwardLen
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, key, activeCnt)
|
| | |
|
| | | SyncAllEquipAttrActiveInfo(curPlayer, activeType)
|
| | | if activeType == 0:
|
| | | PlayerMagicWeapon.CalcMagicWeaponSoulAttr(curPlayer)
|
| | | |
| | | #注意: 需要传装备阶触发刷属性,暂屏蔽,功能修改时再处理
|
| | | #else:
|
| | | # RefreshPlayerEquipAttribute(curPlayer)
|
| | |
| | | # 首充礼包奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_GoldGiftFirst:
|
| | | PlayerGoldGift.GetPlayerGoldGiftFirst(curPlayer)
|
| | | # 领取法宝之魂奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_MWSoulAward:
|
| | | PlayerMagicWeapon.GetMWSoulAward(curPlayer, dataEx)
|
| | | # 领取极品白拿
|
| | | elif rewardType == ChConfig.Def_RewardType_FreeGoods:
|
| | | PlayerFreeGoods.OnGetFreeGoods(curPlayer, dataEx)
|
| | |
| | | PlayerPet.CalcPetItemAddPlayerAttr(curPlayer)
|
| | | PlayerRune.RefreshRuneAttr(curPlayer)
|
| | | PlayerMagicWeapon.CalcMagicWeaponAttr(curPlayer)
|
| | | PlayerMagicWeapon.CalcMagicWeaponSoulAttr(curPlayer)
|
| | | PlayerSuccess.CalcSuccessAttr(curPlayer)
|
| | | PlayerVip.CalcVIPAttr(curPlayer)
|
| | | PlayerRefineStove.CalcStoveAttr(curPlayer)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Horser_LV%horseID, updateClassLV, ChConfig.Def_PDictType_Horse)
|
| | | #EventReport.WriteEvent_custom_mission_log(curPlayer, ChConfig.CME_Class_Horse, ChConfig.CME_Log_End, 1, cmeInfoEx=str(updateClassLV))
|
| | | sumLV = GetHorseSumLV(curPlayer)
|
| | | PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Horse, sumLV)
|
| | |
|
| | | # 刷属性,更新排行榜
|
| | | RefreshHorseAttr(curPlayer)
|
| | |
| | | # 记录开服活动马匹阶级
|
| | | sumLV = GetHorseSumLV(curPlayer)
|
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_HorseLV, sumLV)
|
| | | PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Horse, sumLV)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Horse, horseID, False)
|
| | |
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | |
| | |
|
| | | g_succInfoDict = {}
|
| | | g_potentialsSkillDict = {}
|
| | |
|
| | |
|
| | | ##登录处理
|
| | | # @param curPlayer 玩家
|
| | | # @return None
|
| | |
| | | NotifyMagicWeapon(curPlayer, True)
|
| | | SyncXBXZAwardRecord(curPlayer)
|
| | | Sycn_MagicWeaponLV(curPlayer)
|
| | | Sycn_MWPrivilegeData(curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | def OnDay(curPlayer):
|
| | | #重置法宝之魂每日领取记录
|
| | | for privilege in ChConfig.MWPrivilegeList:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotItemState % privilege, 0)
|
| | | Sycn_MWPrivilegeData(curPlayer, isForce=True)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def DoMagicWeaponOpen(curPlayer):
|
| | | ## 法宝功能开启 激活第一个法宝
|
| | |
| | | # NotifyMagicWeapon(curPlayer)
|
| | | return True
|
| | |
|
| | |
|
| | | def GetIsActiveMagicWeapon(curPlayer, mwID, lv=0):
|
| | | #获取法宝是否激活
|
| | | #通过玩家字典值可直接判断是否已经激活,这里可不验证法宝ID是否存在,即使传入不存在的也是返回未激活
|
| | |
| | | if lv:
|
| | | curMWLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponLV % mwID)
|
| | | return curMWLV >= lv
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsActive, mwID % 100, True, [mwID / 100])
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsActive, mwID, True)
|
| | |
|
| | |
|
| | | def SetMagicWeaponActiveState(curPlayer, mwID, isActive=True):
|
| | | #设置法宝激活状态
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsActive, mwID % 100, isActive, True, [mwID / 100])
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsActive, mwID, isActive, True)
|
| | | return
|
| | |
|
| | |
|
| | | def ActiveMagicWeapon(curPlayer, succID):
|
| | | ##激活法宝
|
| | |
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def DoActiveMW(curPlayer, mwID, mwLV=0):
|
| | | if not GetWMIpyData(mwID):
|
| | | return
|
| | |
| | | SetMagicWeaponActiveState(curPlayer, mwID)
|
| | | #֪ͨ
|
| | | NotifyMagicWeapon(curPlayer)
|
| | | |
| | |
|
| | | if mwID in IpyGameDataPY.GetFuncEvalCfg('UnblockTreasure'):
|
| | | PlayerControl.NotifyCode(curPlayer, 'UnblockTreasure', [curPlayer.GetName(), mwID])
|
| | |
| | | DoActiveMW(curPlayer, activeMWID)
|
| | |
|
| | | #激活魂
|
| | | activeSoulID = upIpyData.GetActiveSoulID()
|
| | | if activeSoulID:
|
| | | __DoActiveMWSoul(curPlayer, activeSoulID, False)
|
| | | # activeSoulID = upIpyData.GetActiveSoulID()
|
| | | # if activeSoulID:
|
| | | # __DoActiveMWSoul(curPlayer, activeSoulID, False)
|
| | |
|
| | | CalcMagicWeaponAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | |
| | | DataRecordPack.DR_MagicWeaponActive(curPlayer, mwID, mwLV)
|
| | | return True
|
| | |
|
| | |
|
| | | def GetWMIpyData(mwID):return IpyGameDataPY.GetIpyGameData('Treasure', mwID)
|
| | |
|
| | |
|
| | | def GetNeedSuccIDByMWID(mwID, ipyData=None):
|
| | | ##获取法宝ID开启需要完成的成就ID
|
| | |
| | | return []
|
| | | succIDList = list(ipyData.GetSuccID())
|
| | | return succIDList
|
| | |
|
| | |
|
| | | def GetMWIDBySuccID(succID):
|
| | | global g_succInfoDict
|
| | |
| | | g_succInfoDict[succid] = mwID
|
| | | return g_succInfoDict.get(succID)
|
| | |
|
| | |
|
| | | def GetMWActiveCntTotal(curPlayer):
|
| | | ## 获取激活的法宝总个数
|
| | | activeCnt = 0
|
| | |
| | | if GetIsActiveMagicWeapon(curPlayer, magicWeaponID):
|
| | | activeCnt += 1
|
| | | return activeCnt
|
| | |
|
| | |
|
| | | def GetMWActiveCntByType(curPlayer, mwType):
|
| | | ## 根据法宝类型获取已激活数量
|
| | |
| | | if isActive:
|
| | | activeCnt += 1
|
| | | return activeCnt
|
| | |
|
| | |
|
| | | ## 给技能
|
| | | # @param curPlayer
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | |
|
| | |
|
| | | ##--------------------------------------------------------------------------------------------------
|
| | | def GetMWRefineIpyData(treasureID, treasureLV):
|
| | | #获取法宝等级信息
|
| | | return IpyGameDataPY.GetIpyGameDataNotLog("TreasureRefine", treasureID, treasureLV)
|
| | |
|
| | |
|
| | | def CalcMagicWeaponAttr(curPlayer):
|
| | | ## 计算法宝属性
|
| | |
| | | # if not isActive:
|
| | | # continue
|
| | | allAttrDict = {}
|
| | | #=======================================================================
|
| | | # #铸炼属性
|
| | | # mwRefineLv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponRefineLV % magicWeaponID)
|
| | | # refineipyData = GetMWRefineIpyData(magicWeaponID, mwRefineLv)
|
| | | # if refineipyData: |
| | | # attrDict = refineipyData.GetTreasureAttr()
|
| | | # GameWorld.AddDictValue(allAttrDict, attrDict)
|
| | | #=======================================================================
|
| | | |
| | | treasureType = treasureIpyData.GetTreasureType()
|
| | | if isActive:
|
| | | mfpType = mwTypeMfpTypeDict.get(treasureType, ShareDefine.Def_MFPType_Role)
|
| | |
| | | GameWorld.AddDictValue(allAttrDict, attrDict)
|
| | |
|
| | | fbpasslv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % magicWeaponID)
|
| | | #老号已激活的魔族法宝没有关卡属性,直接设置满关卡
|
| | | if isActive and not fbpasslv:
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'MWID':magicWeaponID}, True, False)
|
| | | if ipyDataList:
|
| | | maxLevel = ipyDataList[-1].GetLevel()
|
| | | fbpasslv = maxLevel
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWFBPassLevel % magicWeaponID, maxLevel)
|
| | | GameWorld.Log('老号已激活的魔族法宝没有关卡属性,直接设置满关卡 magicWeaponID=%s,maxLevel=%s'%(magicWeaponID, maxLevel), curPlayer.GetID())
|
| | | if fbpasslv: #副本关卡属性
|
| | | fbipyData = IpyGameDataPY.GetIpyGameData('MagicWeaponFB', magicWeaponID, fbpasslv)
|
| | | if fbipyData:
|
| | |
| | | for effID, value in attrDict.items():
|
| | | effID = int(effID)
|
| | | allAttrDict[effID] = allAttrDict.get(effID, 0) + value
|
| | | |
| | |
|
| | | for effID, value in allAttrDict.items():
|
| | | if treasureType == 1:
|
| | |
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
|
| | | return
|
| | |
|
| | | |
| | | DoActiveMW(curPlayer, mwID)
|
| | | return
|
| | |
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnGetXBXZAward(curPlayer, index):
|
| | | ##仙宝寻主领奖
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, succFARPack)
|
| | | return
|
| | |
|
| | |
|
| | | #-------------------------------------------------------------------------------
|
| | | #// A5 15 提升法宝等级 #tagCMMagicWeaponUp
|
| | | #
|
| | |
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def AddMagicWeaponUpExp(curPlayer, mwID, addExp):
|
| | | #增加法宝升级经验
|
| | | GameWorld.DebugLog('增加法宝升级经验 mwID=%s,addExp=%s'%(mwID, addExp))
|
| | |
| | | if mwType == 1:
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_MagicWeapon)
|
| | | return
|
| | |
|
| | |
|
| | | def Sycn_MagicWeaponLV(curPlayer, mwID= -1):
|
| | | #通知法宝等级信息
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | | def GetMagicWeaponPrivilege(curPlayer, privilege):
|
| | | #法宝等级权限
|
| | | if not GetIsActiveMWSoul(curPlayer, privilege):
|
| | | return 0
|
| | | privilegeIpyData = IpyGameDataPY.GetIpyGameDataNotLog('TreasurePrivilege', privilege)
|
| | | if not privilegeIpyData:
|
| | | return 0
|
| | | return privilegeIpyData
|
| | |
|
| | | def GetMagicWeaponPrivilegeAttr(curPlayer, privilege):
|
| | | #获取法宝特权增加的属性
|
| | | addAttr = {}
|
| | | privilegeIpyData = IpyGameDataPY.GetIpyGameDataNotLog('TreasurePrivilege', privilege)
|
| | | if not privilegeIpyData:
|
| | | return addAttr
|
| | | attrInfo = privilegeIpyData.GetAddAttr()
|
| | | if not attrInfo:
|
| | | attrInfo = {}
|
| | | singleValue = privilegeIpyData.GetSingleValue()
|
| | | |
| | | if privilege == ChConfig.MWPrivilege_EquipPlus:
|
| | | #强化加成
|
| | | #境界改版,废弃
|
| | | pass
|
| | | else: |
| | | multiple = 1 #倍数
|
| | | if singleValue:
|
| | | gotValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotValue % privilege)
|
| | | maxValue = privilegeIpyData.GetMaxValue()
|
| | | if maxValue:
|
| | | gotValue = min(maxValue, gotValue)
|
| | | multiple = gotValue/singleValue
|
| | | for attid, attnum in attrInfo.items():
|
| | | addAttr[int(attid)] = attnum * multiple
|
| | | |
| | | GameWorld.DebugLog(' 获取法宝特权增加的属性 privilege=%s,addAttr=%s' % (privilege,addAttr), curPlayer.GetID())
|
| | | return addAttr
|
| | |
|
| | | def SetMWPrivilegeData(curPlayer, privilege, data, isAdd=False):
|
| | | ##设置法宝特权相关数据
|
| | | privilegeIpyData = IpyGameDataPY.GetIpyGameDataNotLog('TreasurePrivilege', privilege)
|
| | | if not privilegeIpyData:
|
| | | return
|
| | | curGotValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotValue % privilege)
|
| | | singleValue = privilegeIpyData.GetSingleValue()
|
| | | if singleValue and curGotValue % singleValue:
|
| | | fixGotValue = curGotValue/singleValue*singleValue
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotValue % privilege, fixGotValue)
|
| | | GameWorld.Log('玩家法宝之魂已领的数据不是单次进度的倍数,修复! privilege=%s,curGotValue=%s, fixGotValue=%s'%(privilege, curGotValue, fixGotValue))
|
| | | |
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulCurValue % privilege)
|
| | | newData = curValue + data if isAdd else data
|
| | | maxValue = privilegeIpyData.GetMaxValue()
|
| | | if maxValue:
|
| | | newData = min(maxValue, newData)
|
| | | if curValue != newData:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulCurValue % privilege, newData)
|
| | |
|
| | | Sycn_MWPrivilegeData(curPlayer, privilege)
|
| | | GameWorld.Log(' privilege=%s,data=%s,curValue=%s,newData=%s'%(privilege, data,curValue,newData))
|
| | | return
|
| | |
|
| | | def GetMWSoulAward(curPlayer, privilege):
|
| | | #领取法宝之魂奖励
|
| | | ipyData = GetMagicWeaponPrivilege(curPlayer, privilege)
|
| | | if not ipyData:
|
| | | GameWorld.DebugLog('领取法宝之魂奖励,对应法宝之魂未激活,或未配置 privilege=%s'%privilege)
|
| | | return
|
| | | singleValue = ipyData.GetSingleValue()
|
| | | maxValue = ipyData.GetMaxValue()
|
| | | if singleValue:
|
| | | #达到进度则可领取属性
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulCurValue % privilege)
|
| | | gotValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotValue % privilege)
|
| | | if gotValue >= curValue:
|
| | | return
|
| | | canGetCnt = (curValue - gotValue) / singleValue
|
| | | if canGetCnt <= 0 and maxValue and curValue >= maxValue:
|
| | | canGetCnt = 1 #已达到次数上限,最后一次不管是否满足都让领(一般是因为配置错误或者变更导致)
|
| | | if canGetCnt <= 0:
|
| | | return
|
| | | updGotCnt = min(maxValue, gotValue+canGetCnt*singleValue) if maxValue else gotValue+canGetCnt*singleValue
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotValue % privilege, updGotCnt)
|
| | | CalcMagicWeaponSoulAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | |
| | | |
| | | itemList = ipyData.GetItemAward()
|
| | | if itemList:
|
| | | #每日物品奖励
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotItemState % privilege):
|
| | | GameWorld.Log(' 领取法宝之魂奖励 今日已领取 privilege=%s'%privilege)
|
| | | return
|
| | | needSpace = len(itemList)
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
|
| | | if needSpace > packSpace:
|
| | | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_676165", [IPY_GameWorld.rptItem])
|
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotItemState % privilege, 1)
|
| | | for itemid, cnt, isBind in itemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, int(itemid), int(cnt), 0, [IPY_GameWorld.rptItem], event=["MWSoulAward", False, {"privilege":privilege}])
|
| | | |
| | | #֪ͨ
|
| | | Sycn_MWPrivilegeData(curPlayer, privilege)
|
| | | return
|
| | |
|
| | | def Sycn_MWPrivilegeData(curPlayer, privilegeID= -1, isForce=False):
|
| | | #通知法宝特权信息
|
| | | if privilegeID == -1:
|
| | | needCalList = ChConfig.MWPrivilegeList
|
| | | else:
|
| | | needCalList = [privilegeID]
|
| | | sendPack = ChPyNetSendPack.tagMCMWPrivilegeDataInfo()
|
| | | sendPack.InfoList = []
|
| | | for priID in needCalList:
|
| | | pack = ChPyNetSendPack.tagMCMWPrivilegeData()
|
| | | pack.CurValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulCurValue % priID)
|
| | | pack.GotValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotValue % priID)
|
| | | pack.ItemAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWSoulGotItemState % priID)
|
| | | pack.State = GetIsActiveMWSoul(curPlayer, priID)
|
| | | if not isForce and max([pack.CurValue, pack.GotValue, pack.ItemAwardState, pack.State]) == 0:
|
| | | continue
|
| | | pack.PriID = priID
|
| | | sendPack.InfoList.append(pack)
|
| | | sendPack.Count = len(sendPack.InfoList)
|
| | | if sendPack.Count:
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | | #// A5 16 法宝状态记录 #tagCMMagicWeaponState
|
| | | #
|
| | |
| | | Sycn_MagicWeaponLV(curPlayer, mwID)
|
| | | return
|
| | |
|
| | |
|
| | | def GetIsClickMagicWeapon(curPlayer, mwID):
|
| | | #获取法宝是否点击认主
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID % 100, True, [mwID / 100])
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID, True)
|
| | |
|
| | |
|
| | | def SetMagicWeaponClickState(curPlayer, mwID, state=1):
|
| | | #设置法宝是否点击认主状态
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID % 100, state, True, [mwID / 100])
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID, state, True)
|
| | | return
|
| | |
|
| | |
|
| | | #// A5 1D 法宝佩戴 #tagCMWearMagicWeapon
|
| | | #
|
| | |
| | | Sycn_MagicWeaponLV(curPlayer, mwID)
|
| | | return
|
| | |
|
| | |
|
| | | def GetIsWearMagicWeapon(curPlayer, mwID):
|
| | | #获取法宝是否佩戴
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID % 100, True, [mwID / 100])
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID, True)
|
| | |
|
| | |
|
| | | def SetMagicWeaponWearState(curPlayer, mwID, state):
|
| | | #设置法宝是否佩戴
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID % 100, state, True, [mwID / 100])
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID, state, True)
|
| | | return
|
| | |
|
| | | #// A5 12 激活法宝之魂 #tagCMActiveMWSoul
|
| | | #
|
| | | #struct tagCMActiveMWSoul
|
| | | #
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE ID; //编号
|
| | | #};
|
| | | def OnActiveMWSoul(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | soulID = clientData.ID
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('TreasurePrivilege', soulID)
|
| | | if not ipyData:
|
| | | return
|
| | | if GetIsActiveMWSoul(curPlayer, soulID):
|
| | | GameWorld.Log(' 该法宝之魂已经激活!! soulID=%s'%soulID)
|
| | | return
|
| | | #检查成就
|
| | | succList = ipyData.GetSuccessList()
|
| | | for succID in succList:
|
| | | if not PlayerSuccess.GetSuccHasGot(curPlayer, succID):
|
| | | GameWorld.DebugLog(' 激活法宝之魂 成就未完成 soulID=%s,succID=%s'%(soulID, succID))
|
| | | return
|
| | | |
| | | __DoActiveMWSoul(curPlayer, soulID)
|
| | | return
|
| | |
|
| | | def __DoActiveMWSoul(curPlayer, soulID, isRefreshAttr=True):
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MWSoulActiveState, soulID, 1, True)
|
| | | #任务
|
| | | EventShell.EventRespons_MWSoulActive(curPlayer, soulID)
|
| | | |
| | | CalcMagicWeaponSoulAttr(curPlayer)
|
| | | if isRefreshAttr:
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | |
| | | #֪ͨ
|
| | | Sycn_MWPrivilegeData(curPlayer, soulID)
|
| | | return
|
| | |
|
| | |
|
| | | def GetIsActiveMWSoul(curPlayer, soulID):
|
| | | #获取法宝之魂是否已激活
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MWSoulActiveState, soulID)
|
| | |
|
| | | def CalcMagicWeaponSoulAttr(curPlayer):
|
| | | #法宝之魂属性刷新
|
| | | allAttrList = [{} for _ in range(4)]
|
| | | allAttrDict = {}
|
| | | ipyMgr = IpyGameDataPY.IPY_Data()
|
| | | for i in xrange(ipyMgr.GetTreasurePrivilegeCount()):
|
| | | ipyData = ipyMgr.GetTreasurePrivilegeByIndex(i)
|
| | | soulID = ipyData.GetPrivilegeID()
|
| | | if not GetIsActiveMWSoul(curPlayer, soulID):
|
| | | continue
|
| | | attrDict = GetMagicWeaponPrivilegeAttr(curPlayer, soulID)
|
| | | GameWorld.AddDictValue(allAttrDict, attrDict)
|
| | | |
| | | for attrID, attrValue in allAttrDict.items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_MagicWeaponSoul, allAttrList)
|
| | | return
|
| | |
|
| | | def UptateMWFBPasslv(curPlayer, mwID, passLV):
|
| | | GameWorld.Log('更新关卡 mwID=%s,level=%s'%(mwID, passLV), curPlayer.GetID())
|
| | |
| | | if not ItemControler.PlayerItemControler(curPlayer).PutInItem(petPackIndex, newPetItem):
|
| | | return
|
| | |
|
| | | PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Pet, len(GetActivePetID(curPlayer)))
|
| | | ItemCommon.ReduceItem(curPlayer, itemPack, itemList, needItemCnt, False, ChConfig.ItemDel_Pet)
|
| | |
|
| | | EventShell.EventRespons_OnActivatePet(curPlayer, petNPCID)
|
| | |
| | |
|
| | | if not ItemControler.PlayerItemControler(curPlayer).PutInItem(petPackIndex, newPetItem):
|
| | | return
|
| | | PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Pet, len(GetActivePetID(curPlayer)))
|
| | | SetPetSkillFightPower(curPlayer) # 技能战力重算
|
| | | petItemIndex = GetPetDataItemIndexByNPCID(curPlayer, petNPCID)
|
| | | DoChangePetState(curPlayer, petItemIndex, ShareDefine.Def_PetState_Fight)
|
| | |
| | | totalMJ = 0
|
| | | packIndex = ShareDefine.rptRune
|
| | | placeList = xrange(ItemCommon.GetVPackCnt(packIndex)) if (isAll or clientData.QualityCnt > 0) else clientData.PlaceIndexList
|
| | | wmpIpyData = PlayerMagicWeapon.GetMagicWeaponPrivilege(curPlayer, ChConfig.MWPrivilege_RuneDecompose)
|
| | | addPer = int(wmpIpyData.GetEffectValue()) if wmpIpyData else 0
|
| | | addPer = 0
|
| | | for place in placeList:
|
| | | RuneData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_VPackItem % (packIndex, place))
|
| | | if not RuneData:
|
| | |
| | | Def_MFPType_MagicWeapon3, # 仙族法宝 17
|
| | | Def_MFPType_PetSoul, # 灵宠魂石 18
|
| | | Def_MFPType_HorseSoul, # 坐骑魂石 19
|
| | | Def_MFPType_MagicWeaponSoul, # 法宝之魂 20
|
| | | Def_MFPType_MagicWeaponSoul, # 法宝之魂 20 - 废弃
|
| | | Def_MFPType_Dogz, # 神兽 21
|
| | | Def_MFPType_GatherSoul, # 聚魂 22
|
| | | Def_MFPType_MagicWeapon4, # 王者法宝 23
|