xdh
2019-05-31 c781de652a5b0a3356bdc2bbd6351411495d2a2f
6501 仙宝寻主任务接口
3个文件已修改
43 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1991,6 +1991,11 @@
    RunQuestEvent(curPlayer, "usemissionitem", missionID, Def_RunQuestType_RunAll)
    return
def EventRespons_XBXZ(curPlayer, MWID):
    # 仙宝寻主领奖
    RunQuestEvent(curPlayer, "xbxz", MWID, Def_RunQuestType_Normal)
    return
#---------------------------------------------------------------------
#================================================================================
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7372,4 +7372,27 @@
# @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
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -332,9 +332,6 @@
        #扣消耗
        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
@@ -346,6 +343,15 @@
    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
#-------------------------------------------------------------------------------
@@ -408,6 +414,7 @@
    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