| | |
| | | elif ipyDataList:
|
| | | for ipyData in ipyDataList:
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
|
| | | GameWorld.DebugLog("未领取该仙宝寻主奖励,无法激活! ID=%s" % ipyData.GetID())
|
| | | return
|
| | | elif mwID == 101: #定海神针特殊 可直接获得
|
| | | FBCommon.Notify_FB_Over(curPlayer, {FBCommon.Over_dataMapID:ChConfig.Def_FBMapID_MagicWeapon,FBCommon.Over_isPass:1})
|
| | |
| | | return
|
| | | DoActiveMW(curPlayer, 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()
|
| | | |
| | | if curType == 1:
|
| | | #穿戴X阶X颜色是否套装X部位装备
|
| | | for classlv, color, suite, place in conditionList:
|
| | | equipIpyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap',classlv,place)
|
| | | if not equipIpyData:
|
| | | continue
|
| | | gridIndex = equipIpyData.GetGridIndex()
|
| | | curEquip = playerEquip.GetAt(gridIndex)
|
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | curItemColor = curEquip.GetItemColor()
|
| | | curIsSuite = curEquip.GetSuiteID()
|
| | | if curItemColor >= color and curIsSuite >= suite:
|
| | | cnt += 1
|
| | | break
|
| | | else:
|
| | | continue
|
| | | return cnt
|
| | |
|
| | | # ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID': mwID}, True, False)
|
| | | # cnt = 0
|
| | | # if ipyDataList:
|
| | | # for ipyData in ipyDataList:
|
| | | # if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
|
| | | # cnt += 1
|
| | | # return cnt
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnGetXBXZAward(curPlayer, index):
|
| | | ##仙宝寻主领奖
|
| | |
| | | cnt = 1
|
| | | break
|
| | |
|
| | | #2 穿戴X件X价X品质装备 件数 x阶|x品质
|
| | | elif curType == 2:
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | classLV, color = conditionList
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
|
| | | if ipyDataList:
|
| | | for iData in ipyDataList:
|
| | | gridIndex = iData.GetGridIndex()
|
| | | curEquip = playerEquip.GetAt(gridIndex)
|
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | curItemColor = curEquip.GetItemColor()
|
| | | if curItemColor >= color:
|
| | | cnt += 1
|
| | | |
| | | #3 X阶装备总强化等级 强化等级 x阶
|
| | | elif curType == 3:
|
| | | classLV = conditionList[0]
|
| | | customAttrDictPlus = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Plus)[2]
|
| | | classPlusLVDict = customAttrDictPlus.get("classPlusLVDict", {})
|
| | | #GameWorld.DebugLog(" curType=%s,classLV=%s,classPlusLVDict=%s" % (curType, classLV, classPlusLVDict))
|
| | | if classLV not in classPlusLVDict:
|
| | | return
|
| | | cnt = classPlusLVDict[classLV]
|
| | | |
| | | #4 X阶装备总升星等级 升星等级 x阶
|
| | | elif curType == 4:
|
| | | classLV = conditionList[0]
|
| | | customAttrDictStar = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Star)[2]
|
| | | classStarLVDict = customAttrDictStar.get("classStarLVDict", {})
|
| | | #GameWorld.DebugLog(" curType=%s,classLV=%s,classStarLVDict=%s" % (curType, classLV, classStarLVDict))
|
| | | if classLV not in classStarLVDict:
|
| | | return
|
| | | cnt = classStarLVDict[classLV]
|
| | | |
| | | #5 X阶装备总洗炼等级 洗炼等级 x阶
|
| | | elif curType == 5:
|
| | | classLV = conditionList[0]
|
| | | customAttrDictWash = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wash)[2]
|
| | | classWashLVDict = customAttrDictWash.get("classWashLVDict", {})
|
| | | #GameWorld.DebugLog(" curType=%s,classLV=%s,classWashLVDict=%s" % (curType, classLV, classWashLVDict))
|
| | | if classLV not in classWashLVDict:
|
| | | return
|
| | | cnt = classWashLVDict[classLV]
|
| | | |
| | | #6 X阶装备总宝石等级 宝石等级 x阶
|
| | | elif curType == 6:
|
| | | classLV = conditionList[0]
|
| | | customAttrDictStone = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Stone)[2]
|
| | | classStoneLVDict = customAttrDictStone.get("classStoneLVDict", {})
|
| | | #GameWorld.DebugLog(" curType=%s,classLV=%s,classStoneLVDict=%s" % (curType, classLV, classStoneLVDict))
|
| | | if classLV not in classStoneLVDict:
|
| | | return
|
| | | cnt = classStoneLVDict[classLV]
|
| | | |
| | | #7 坐骑达到X阶 阶 无
|
| | | elif curType == 7:
|
| | | cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserLV)
|
| | | |
| | | #8 天星塔达到X层 层 无
|
| | | elif curType == 8:
|
| | | cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
|
| | | |
| | | #9 符印塔达到X层 层 无
|
| | | elif curType == 9:
|
| | | cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
|
| | | |
| | | #10 击杀X只BOSS 只数 boss归类索引
|
| | | elif curType == 10:
|
| | | bossIndex = conditionList[0]
|
| | | cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntTotal % bossIndex)
|
| | | |
| | | #11 神兵达到X级 等级 x类型
|
| | | elif curType == 11:
|
| | | gwType = conditionList[0]
|
| | | cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % gwType)
|
| | | |
| | | #12 玩家等级达到X级 等级 无
|
| | | elif curType == 12:
|
| | | cnt = curPlayer.GetLV()
|
| | | |
| | | #13 获得法宝XXX 个数 法宝ID
|
| | | elif curType == 13:
|
| | | mwID = conditionList[0]
|
| | | cnt = 1 if GetIsActiveMagicWeapon(curPlayer, mwID) else 0
|
| | | |
| | | #14 境界达到XXX 境界 无
|
| | | elif curType == 14:
|
| | | cnt = curPlayer.GetOfficialRank()
|
| | | |
| | | else:
|
| | | return
|
| | | |
| | | GameWorld.DebugLog("仙宝寻主领奖 ID=%s,curType=%s,cnt=%s,GetNeedCnt=%s" % (index, curType, cnt, ipyData.GetNeedCnt()))
|
| | | if cnt < ipyData.GetNeedCnt():
|
| | | GameWorld.DebugLog(' 仙宝寻主领奖 , 条件不满足 ID=%s, cnt=%s,NeedCnt=%s' % (index, cnt, ipyData.GetNeedCnt()))
|
| | | return
|