| | |
| | |
|
| | | def ActiveMagicWeaponByFB(curPlayer, mapID, lineID, passLV=0):
|
| | | ##通关副本激活法宝(人族、魔族法宝)
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'LineID':lineID, 'Level':passLV})
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'LineID':lineID, 'Level':passLV}, isLogNone=False)
|
| | | if ipyData:
|
| | | mwID = ipyData.GetMWID()
|
| | | GameWorld.Log('更新魔族副本关卡 mwID=%s,level=%s' % (mwID, passLV), curPlayer.GetID())
|
| | |
| | | sysMark = IpyGameDataPY.GetFuncEvalCfg('UnblockTreasure', 2, {}).get(mwID, 'UnblockTreasure')
|
| | | PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetName(), mwID])
|
| | | if mwID == IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 1):
|
| | | addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
|
| | | fabaoAddPoint = IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 2)
|
| | | curLV = curPlayer.GetLV()
|
| | | addFreePoint = 0
|
| | | for rangLVs, point in addPointDict.items():
|
| | | if curLV < rangLVs[0]:
|
| | | continue
|
| | | addFreePoint += fabaoAddPoint * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | | freePoint = curPlayer.GetFreePoint()
|
| | | updFreePoint = freePoint + addFreePoint
|
| | | curPlayer.SetFreePoint(updFreePoint)
|
| | | GameWorld.DebugLog("激活法宝增加自由属性点: freePoint=%s,addFreePoint=%s,curLV=%s,updFreePoint=%s" |
| | | % (freePoint, addFreePoint, curLV, updFreePoint))
|
| | | __DoFabaoAddPoint(curPlayer)
|
| | | |
| | |
|
| | | EventShell.EventRespons_MagicWeaponLV(curPlayer, mwID, mwLV)
|
| | | #通知客户端等级
|
| | |
| | | DataRecordPack.DR_MagicWeaponActive(curPlayer, mwID, mwLV)
|
| | | return True
|
| | |
|
| | | # 获得法宝加点
|
| | | def __DoFabaoAddPoint(curPlayer):
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_AddPoint):
|
| | | # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
|
| | | return
|
| | | addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
|
| | | fabaoAddPoint = PlayerControl.GetFabaoAddPoint(curPlayer)
|
| | |
|
| | | curLV = curPlayer.GetLV()
|
| | | addFreePoint = 0
|
| | | for rangLVs, point in addPointDict.items():
|
| | | if curLV < rangLVs[0]:
|
| | | continue
|
| | | addFreePoint += fabaoAddPoint * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | | freePoint = curPlayer.GetFreePoint()
|
| | | updFreePoint = freePoint + addFreePoint
|
| | | curPlayer.SetFreePoint(updFreePoint)
|
| | | GameWorld.DebugLog("获得法宝增加自由属性点: freePoint=%s,addFreePoint=%s,curLV=%s,updFreePoint=%s" |
| | | % (freePoint, addFreePoint, curLV, updFreePoint))
|
| | | |
| | | return
|
| | | def GetWMIpyData(mwID):return IpyGameDataPY.GetIpyGameData('Treasure', mwID)
|
| | |
|
| | |
|
| | |
| | | return
|
| | |
|
| | | def GetXBXZAwardProgress(curPlayer, mwID):
|
| | | ##获取仙宝寻主当前达到条件的个数
|
| | | ##获取仙宝寻主当前达到条件的个数(包含已领取的)
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID': mwID}, True, False)
|
| | | if not ipyDataList:
|
| | | return 0
|
| | | cnt = 0
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for ipyData in ipyDataList:
|
| | | if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
|
| | | cnt += 1
|
| | | continue
|
| | | curType = ipyData.GetType()
|
| | | conditionList = ipyData.GetCondition()
|
| | |
|