| | |
| | | RunQuestEvent(curPlayer, "usemissionitem", missionID, Def_RunQuestType_RunAll)
|
| | | return
|
| | |
|
| | | def EventRespons_XBXZ(curPlayer, MWID):
|
| | | # 仙宝寻主领奖
|
| | | RunQuestEvent(curPlayer, "xbxz", MWID, Def_RunQuestType_Normal)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #================================================================================
|
| | |
| | | # @return None <Check_Historyactivity value="活跃度"/>
|
| | | def ConditionType_Check_Historyactivity(curPlayer, curMission, curActionNode):
|
| | | value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityHistoryPoint, 0) >= value |
| | | return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityHistoryPoint, 0) >= value
|
| | |
|
| | | ##设置仙宝寻主领奖进度
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Xbxz key="" mwid="法宝ID"/>
|
| | | def DoType_Set_Xbxz(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | mwID = GameWorld.ToIntDef(curActionNode.GetAttribute("mwid"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, PlayerMagicWeapon.GetXBXZAwardProgress(curPlayer, mwID))
|
| | | return
|
| | |
|
| | | ##仙宝寻主进度判断
|
| | | # @param None
|
| | | # @return None <Check_Xbxz value="数量" mwid="法宝ID"/>
|
| | | def ConditionType_Check_Xbxz(curPlayer, curMission, curActionNode):
|
| | | value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | mwID = GameWorld.ToIntDef(curActionNode.GetAttribute("mwid"), 0)
|
| | | return PlayerMagicWeapon.GetXBXZAwardProgress(curPlayer, mwID) >= value |
| | |
| | | #扣消耗
|
| | | ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, ChConfig.ItemDel_MagicWeapon)
|
| | | elif ipyDataList:
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID':mwID}, True, False)
|
| | | if not ipyDataList:
|
| | | return
|
| | | for ipyData in ipyDataList:
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
|
| | | return
|
| | |
| | | DoActiveMW(curPlayer, mwID)
|
| | | return
|
| | |
|
| | | def GetXBXZAwardProgress(curPlayer, mwID):
|
| | | # 获取仙宝寻主进度
|
| | | 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
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | |
|
| | |
| | | SyncXBXZAwardRecord(curPlayer, [index])
|
| | | #成就
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_XBXZ, 1, [ipyData.GetMWID()])
|
| | | EventShell.EventRespons_XBXZ(curPlayer, ipyData.GetMWID())
|
| | | GameWorld.DebugLog(' 仙宝寻主领奖OK, ID=%s, cnt=%s' % (index, cnt))
|
| | | return
|
| | |
|