| | |
| | | addAttr[int(attid)] = attnum * totalSignNum
|
| | | GameWorld.AddDictValue(allAttrDict, addAttr)
|
| | | #王者法宝属性
|
| | | kingAwardMark = 1
|
| | | kingMWIpyData = IpyGameDataPY.GetIpyGameDataNotLog('MagicWeaponOfKing', magicWeaponID, kingAwardMark)
|
| | | seasonID = IpyGameDataPY.GetFuncEvalCfg('MagicWeaponOfKing', 1, {}).get(magicWeaponID, 0)
|
| | | kingAwardLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_SeasonAwardLV % seasonID)
|
| | | kingMWIpyData = IpyGameDataPY.GetIpyGameDataNotLog('MagicWeaponOfKing', magicWeaponID, kingAwardLV)
|
| | | if kingMWIpyData and GetIsWearMagicWeapon(curPlayer, magicWeaponID):
|
| | | attrDict = kingMWIpyData.GetAddAttr()
|
| | | GameWorld.AddDictValue(allAttrDict, attrDict)
|
| | |
| | | curUpExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponUpExp % mwID)
|
| | | state = GetIsClickMagicWeapon(curPlayer, mwID)
|
| | | FBPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % mwID)
|
| | | if not mwLv and not curUpExp and not state and not FBPassLV:
|
| | | isWear = GetIsWearMagicWeapon(curPlayer, mwID)
|
| | | if not mwLv and not curUpExp and not state and not FBPassLV and not isWear:
|
| | | continue
|
| | | pack = ChPyNetSendPack.tagMCMagicWeaponInfo()
|
| | | pack.MWID = mwID
|
| | |
| | | pack.Exp = curUpExp
|
| | | pack.State = state
|
| | | pack.FBPassLV = FBPassLV
|
| | | pack.IsWear = isWear
|
| | | sendPack.InfoList.append(pack)
|
| | | sendPack.Count = len(sendPack.InfoList)
|
| | | if sendPack.Count:
|
| | |
| | | mwID = clientData.MWID
|
| | | if not GetIsActiveMagicWeapon(curPlayer, mwID):
|
| | | return
|
| | | |
| | | SetMagicWeaponWearState(curPlayer, mwID, clientData.State)
|
| | | isWear = clientData.State
|
| | | if isWear:
|
| | | maxCnt = IpyGameDataPY.GetFuncCfg('MagicWeaponOfKing', 2)
|
| | | hasWearCnt = 0
|
| | | for mid in IpyGameDataPY.GetFuncEvalCfg('MagicWeaponOfKing', 1, {}):
|
| | | if hasWearCnt >= maxCnt:
|
| | | return
|
| | | if GetIsWearMagicWeapon(curPlayer, mid):
|
| | | hasWearCnt +=1
|
| | | |
| | | SetMagicWeaponWearState(curPlayer, mwID, isWear)
|
| | | Sycn_MagicWeaponLV(curPlayer, mwID)
|
| | | return
|
| | |
|
| | | def GetIsWearMagicWeapon(curPlayer, mwID):
|
| | | #获取法宝是否佩戴
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID % 100, True, [mwID / 100])
|
| | | return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID % 100, True, [mwID / 100])
|
| | |
|
| | | def SetMagicWeaponWearState(curPlayer, mwID, state):
|
| | | #设置法宝是否佩戴
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsClick, mwID % 100, state, True, [mwID / 100])
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID % 100, state, True, [mwID / 100])
|
| | | return
|
| | |
|
| | | #// A5 12 激活法宝之魂 #tagCMActiveMWSoul
|