|  |  | 
 |  |  | FDEventState_Visited,  #已拜访3
 | 
 |  |  | ) = range(4)
 | 
 |  |  | 
 | 
 |  |  | #1-等级奇遇 2-境界奇遇 3-战力奇遇 4-气运奇遇
 | 
 |  |  | AdventuresTypeList = (
 | 
 |  |  | AdventuresType1,
 | 
 |  |  | AdventuresType2,
 | 
 |  |  | AdventuresType3,
 | 
 |  |  | AdventuresType4,
 | 
 |  |  | ) = range(1, 5)
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | def OnLogin(curPlayer):
 | 
 |  |  |     NotifyVisitFairyDomainInfo(curPlayer)
 | 
 |  |  | 
 |  |  |     #奇遇事件 随机档位数据
 | 
 |  |  |     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
 | 
 |  |  |     for fdEventID in fdEventIDList:
 | 
 |  |  |         if fdEventID not in AdventuresTypeList:
 | 
 |  |  |             continue
 | 
 |  |  |         ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':fdEventID})
 | 
 |  |  |         if not ipyData:
 | 
 |  |  |             #GameWorld.ErrLog('寻访仙域, 奇遇事件没有随机出对应档位 randomList=%s,openServerDay=%s' % (randomList, openServerDay))
 | 
 |  |  | 
 |  |  |         condition = random.choice(conditionList)
 | 
 |  |  |         index = conditionList.index(condition)
 | 
 |  |  |         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
 | 
 |  |  | 
 | 
 |  |  |     
 | 
 |  |  |     if not fdEventIDList:
 | 
 |  |  |         GameWorld.Log('寻访仙域, 没有随机出事件!!')
 | 
 |  |  | 
 |  |  |             return
 | 
 |  |  |         EventShell.EventRespons_FairyDomain(curPlayer)
 | 
 |  |  |     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventState % fdeventID, state)
 | 
 |  |  |     NotifyVisitFairyDomainInfo(curPlayer, [fdeventID])
 | 
 |  |  |     NotifyVisitFairyDomainInfo(curPlayer, [fdeventID], 0)
 | 
 |  |  |     return True
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | def NotifyVisitFairyDomainInfo(curPlayer, fdEventList=[]):
 | 
 |  |  |     isAll = 0
 | 
 |  |  | def NotifyVisitFairyDomainInfo(curPlayer, fdEventList=[], isAll=1):
 | 
 |  |  |     if not fdEventList:
 | 
 |  |  |         isAll = 1
 | 
 |  |  |         otherCntRateList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 2)
 | 
 |  |  |         maxEventCnt = max([info[1] for info in otherCntRateList]) + 1  #最大可出现事件个数
 | 
 |  |  |         for i in xrange(maxEventCnt):
 | 
 |  |  | 
 |  |  |         giveItemList = GetFairyAppointAward(curPlayer, fdeventID)
 | 
 |  |  |         if not giveItemList:
 | 
 |  |  |             #1-等级奇遇 2-境界奇遇 3-战力奇遇 4-气运奇遇
 | 
 |  |  |             if fdeventID == 1:
 | 
 |  |  |             if fdeventID == AdventuresType1:
 | 
 |  |  |                 curData = curPlayer.GetLV()
 | 
 |  |  |             elif fdeventID == 2:
 | 
 |  |  |             elif fdeventID == AdventuresType2:
 | 
 |  |  |                 curData = curPlayer.GetOfficialRank()
 | 
 |  |  |             elif fdeventID == 3:
 | 
 |  |  |             elif fdeventID == AdventuresType3:
 | 
 |  |  |                 curData = curPlayer.GetFightPower()
 | 
 |  |  |             elif fdeventID == 4:
 | 
 |  |  |             elif fdeventID == AdventuresType4:
 | 
 |  |  |                 curData = curPlayer.GetLuckValue()
 | 
 |  |  |             else:
 | 
 |  |  |                 return
 |