| | |
| | | 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('寻访仙域, 没有随机出事件!!')
|
| | |
| | | GameWorld.DebugLog('寻访仙域 随机结果 fdEventIDList=%s, visitCnt=%s' % (fdEventIDList, visitCnt))
|
| | | #֪ͨ
|
| | | NotifyVisitFairyDomainInfo(curPlayer, fdEventIDList)
|
| | | NotifyFairyAdventuresInfo(curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | 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:
|