xdh
2019-04-09 cd1fa79a477ebb9d02d7494ddd0819c361053f0b
6457 【后端】【2.0】缥缈仙域开发单(奇遇)
1个文件已修改
21 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -128,23 +128,23 @@
            randomList = __RandomFDEventByType(curPlayer, eventType, cnt)
            if not randomList:
                continue
            fdEventIDList += randomList
            
            if eventType == FDEventType0:
                #奇遇事件 随机档位数据
                openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
                for fdEventID in randomList:
                    ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':randomList[0]})
    for fdEventID in fdEventIDList:
        ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':fdEventID})
                    if not ipyData:
                        GameWorld.ErrLog('寻访仙域, 奇遇事件没有随机出对应档位 randomList=%s,openServerDay=%s' % (randomList, openServerDay))
            #GameWorld.ErrLog('寻访仙域, 奇遇事件没有随机出对应档位 randomList=%s,openServerDay=%s' % (randomList, openServerDay))
                        continue
                    conditionList = ipyData.GetCondition()
                    if not conditionList:
            fdEventIDList.remove(fdEventID)
                        continue
                    condition = random.choice(conditionList)
                    index = conditionList.index(condition)
                    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
                NotifyFairyAdventuresInfo(curPlayer)
            fdEventIDList += randomList
            
    if not fdEventIDList:
        GameWorld.Log('寻访仙域, 没有随机出事件!!')
@@ -165,6 +165,7 @@
    GameWorld.DebugLog('寻访仙域  随机结果 fdEventIDList=%s, visitCnt=%s' % (fdEventIDList, visitCnt))
    #֪ͨ
    NotifyVisitFairyDomainInfo(curPlayer, fdEventIDList)
    NotifyFairyAdventuresInfo(curPlayer)
    return
@@ -197,9 +198,15 @@
        GameWorld.Log('缥缈仙域事件状态设置错误,state=%s' % state)
        return
    curState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventState % fdeventID)
    if not curState:
        #没有该事件
        return
    if curState == state:
        return True
    if state == FDEventState_Visiting:
        if curState != FDEventState_CanVisit:
            GameWorld.Log('缥缈仙域事件状态设置错误,fdeventID=%s, state=%s, curState=%s' % (fdeventID, state, curState))
            GameWorld.DebugLog('缥缈仙域事件状态设置错误,fdeventID=%s, state=%s, curState=%s' % (fdeventID, state, curState))
            return
        ipyData = IpyGameDataPY.GetIpyGameData('FairyDomain', fdeventID)
        if not ipyData: