From 701ebec9f6cca57f0ccffc0239cf9d8e25722eb0 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 12 四月 2019 14:23:38 +0800
Subject: [PATCH] 6457 【后端】【2.0】缥缈仙域开发单(通知修改)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py | 35 +++++++++++++++++++++--------------
1 files changed, 21 insertions(+), 14 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 dcfd19e..6a26e61 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -47,6 +47,14 @@
FDEventState_Visited, #已拜访3
) = range(4)
+#1-等级奇遇 2-境界奇遇 3-战力奇遇 4-气运奇遇
+AdventuresTypeList = (
+AdventuresType1,
+AdventuresType2,
+AdventuresType3,
+AdventuresType4,
+) = range(1, 5)
+
def OnLogin(curPlayer):
NotifyVisitFairyDomainInfo(curPlayer)
@@ -66,7 +74,7 @@
otherCntRateList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 2)
maxEventCnt = max([info[1] for info in otherCntRateList]) + 1 #最大可出现事件个数
- fairyDomainState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainState) #是否寻访中 0未寻访 1寻访中 2任务标记可寻访
+ fairyDomainState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainState) #是否寻访中 0未寻访 1寻访中 2任务标记可寻访
if clientData.Type == 1: #结束寻访
if fairyDomainState != 1:
GameWorld.DebugLog(" 未开始寻访仙域, 无法结束")
@@ -100,7 +108,7 @@
#随机事件 重置事件状态
visitCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainVisitCnt)
- appointIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog('FairyDomainAppoint', visitCnt+1)
+ appointIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog('FairyDomainAppoint', visitCnt + 1)
if appointIpyDataList:
fdEventIDList = []
for appointIpyData in appointIpyDataList:
@@ -137,6 +145,8 @@
#奇遇事件 随机档位数据
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))
@@ -148,7 +158,6 @@
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('寻访仙域, 没有随机出事件!!')
@@ -187,7 +196,7 @@
#丹炉等级不足
continue
lvLimit = ipyData.GetNeedLV()
- if lvLimit and not (lvLimit[0]<=curLV<=lvLimit[1]):
+ if lvLimit and not (lvLimit[0] <= curLV <= lvLimit[1]):
#等级范围不满足
continue
@@ -232,14 +241,12 @@
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):
@@ -283,7 +290,7 @@
conditionList = ipyData.GetCondition()
index = adventuresdata % 100
if IpyGameDataPY.GetIpyGameDataByCondition('FairyDomainAppoint', {'Cnt':visitCnt, 'EventID':fdEventID}, False, False):
- condition = 0 #定制的条件为0
+ condition = 0 #定制的条件为0
else:
condition = conditionList[index] if index < len(conditionList) else 0
adventuresdata = ChPyNetSendPack.tagMCFairyAdventuresData()
@@ -319,13 +326,13 @@
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
@@ -351,4 +358,4 @@
ipyData = IpyGameDataPY.GetIpyGameDataByCondition('FairyDomainAppoint', {'Cnt':visitCnt, 'EventID':fdEventID}, False, False)
if not ipyData:
return
- return ipyData.GetAward()
\ No newline at end of file
+ return ipyData.GetAward()
--
Gitblit v1.8.0