From b8205147a83828c471db21fc889b33d3221dbbb4 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 19 四月 2019 11:50:46 +0800
Subject: [PATCH] 6457 【后端】【2.0】缥缈仙域开发单(任务接口修改)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 5 +++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py | 23 ++++++++++++++---------
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 13bf2af..3113398 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7145,8 +7145,9 @@
def DoType_Setfairydomain(curPlayer, curMission, curActionNode):
## 任务开启缥缈仙域 (做标记可寻访) <Setfairydomain/>
if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainState):
- #若已在寻访中则不可设置
- return
+ #若已在寻访中则先结束寻访
+ PlayerFairyDomain.EndFairyDomain(curPlayer)
+
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 2)
PlayerFairyDomain.NotifyVisitFairyDomainInfo(curPlayer)
return
\ No newline at end of file
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 67302b1..f04aebc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -80,15 +80,8 @@
if fairyDomainState != 1:
GameWorld.DebugLog(" 未开始寻访仙域, 无法结束")
return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 0)
-
- for i in xrange(maxEventCnt):
- fdEventID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventID % i)
- if fdEventID:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventID % i, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventState % fdEventID, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, 0)
-
+ EndFairyDomain(curPlayer)
+
NotifyVisitFairyDomainInfo(curPlayer)
return
@@ -182,6 +175,18 @@
NotifyFairyAdventuresInfo(curPlayer)
return
+def EndFairyDomain(curPlayer):
+ ##结束寻访
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 0)
+ otherCntRateList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 2)
+ maxEventCnt = max([info[1] for info in otherCntRateList]) + 1 #最大可出现事件个数
+ for i in xrange(maxEventCnt):
+ fdEventID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventID % i)
+ if fdEventID:
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventID % i, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainEventState % fdEventID, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, 0)
+ return
def __RandomFDEventByType(curPlayer, eventType, cnt):
##根据事件类型随机事件
--
Gitblit v1.8.0