From dc6851f299dd8f3c21f4d92ac8d1ece077479a3d Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 12 七月 2019 14:00:41 +0800
Subject: [PATCH] 8029 子 【主干】仙界盛典 / 【后端】【主干】仙界盛典活跃事件

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 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 3cf84f1..c28a957 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -26,7 +26,7 @@
 import PlayerControl
 import IpyGameDataPY
 import PlayerActivity
-import ItemControler
+import PlayerWeekParty
 import ItemCommon
 import PyGameData
 import EventShell
@@ -136,7 +136,7 @@
         GameWorld.DebugLog("    正在寻访仙域中!请先退出寻访")
         return
     costPoint = IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint', 2)
-    if not PlayerActivity.CostActivityPoint(curPlayer, costPoint):
+    if not PlayerActivity.CostActivityPoint(curPlayer, costPoint, True):
         GameWorld.DebugLog("    寻访仙域需要活跃点不足!costPoint=%s"%costPoint)
         return
 
@@ -154,7 +154,7 @@
         for eventType, rate in singleEventRateDict.items():
             if GameWorld.CanHappen(rate):
                 fdEventTypeDict[eventType] = 1
-        
+
         otherCnt = GameWorld.GetResultByRandomList(otherCntRateList, 0)
         if otherCnt:
             otherEventRateList = copy.deepcopy(IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 3))
@@ -185,6 +185,12 @@
         #更新全服出现次数
         msgStr = str(fdEventIDList)
         GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'AddFairyDomainEvent', msgStr, len(msgStr))
+    if not fdEventIDList:
+        fdEventIDList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 5)
+        GameWorld.Log('寻访仙域, 没有随机出事件,使用默认事件!! playerLV=%s,visitCnt=%s,默认fdEventIDList=%s'%(curPlayer.GetLV(), visitCnt, fdEventIDList), curPlayer.GetID())
+        if not fdEventIDList:
+            return
+    PlayerActivity.CostActivityPoint(curPlayer, costPoint)
     #奇遇事件 随机档位数据
     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
     for fdEventID in fdEventIDList:
@@ -201,11 +207,7 @@
             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
-    
+
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainVisitCnt, min(visitCnt + 1, ChConfig.Def_UpperLimit_DWord))
     #设置事件
     for i in xrange(maxEventCnt):
@@ -224,6 +226,7 @@
     NotifyFairyAdventuresInfo(curPlayer)
 
     PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_FairyDomain, 1)
+    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_FairyDomain, 1)
     return
 
 

--
Gitblit v1.8.0