xdh
2019-04-19 b8205147a83828c471db21fc889b33d3221dbbb4
6457 【后端】【2.0】缥缈仙域开发单(任务接口修改)
2个文件已修改
28 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7145,8 +7145,9 @@
def DoType_Setfairydomain(curPlayer, curMission, curActionNode):
    ## 任务开启缥缈仙域 (做标记可寻访) <Setfairydomain/>
    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainState):
        #若已在寻访中则不可设置
        return
        #若已在寻访中则先结束寻访
        PlayerFairyDomain.EndFairyDomain(curPlayer)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 2)
    PlayerFairyDomain.NotifyVisitFairyDomainInfo(curPlayer)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -80,15 +80,8 @@
        if fairyDomainState != 1:
            GameWorld.DebugLog("    未开始寻访仙域, 无法结束")
            return
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 0)
        for i in xrange(maxEventCnt):
            fdEventID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventID % i)
            if fdEventID:
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventID % i, 0)
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventState % fdEventID, 0)
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, 0)
        EndFairyDomain(curPlayer)
        NotifyVisitFairyDomainInfo(curPlayer)
        return
    
@@ -182,6 +175,18 @@
    NotifyFairyAdventuresInfo(curPlayer)
    return
def EndFairyDomain(curPlayer):
    ##结束寻访
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 0)
    otherCntRateList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 2)
    maxEventCnt = max([info[1] for info in otherCntRateList]) + 1  #最大可出现事件个数
    for i in xrange(maxEventCnt):
        fdEventID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventID % i)
        if fdEventID:
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventID % i, 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventState % fdEventID, 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, 0)
    return
def __RandomFDEventByType(curPlayer, eventType, cnt):
    ##根据事件类型随机事件