From cd1fa79a477ebb9d02d7494ddd0819c361053f0b Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 09 四月 2019 16:36:12 +0800
Subject: [PATCH] 6457 【后端】【2.0】缥缈仙域开发单(奇遇)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py | 45 ++++++++++++++++++++++++++-------------------
1 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
index 04f2f37..9712f5f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -127,25 +127,25 @@
for eventType, cnt in fdEventTypeDict.items():
randomList = __RandomFDEventByType(curPlayer, eventType, cnt)
if not randomList:
- continue
-
- 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]})
- if not ipyData:
- GameWorld.ErrLog('寻访仙域, 奇遇事件没有随机出对应档位 randomList=%s,openServerDay=%s' % (randomList, openServerDay))
- continue
- conditionList = ipyData.GetCondition()
- if not conditionList:
- continue
- condition = random.choice(conditionList)
- index = conditionList.index(condition)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
- NotifyFairyAdventuresInfo(curPlayer)
+ continue
fdEventIDList += randomList
-
+
+ #奇遇事件 随机档位数据
+ openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
+ for fdEventID in fdEventIDList:
+ ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':fdEventID})
+ if not ipyData:
+ #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)
+
+
if not fdEventIDList:
GameWorld.Log('寻访仙域, 没有随机出事件!!')
return
@@ -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:
--
Gitblit v1.8.0