From 8068ba5ca1ea2aef5908e2e42604be27d6ffcf3c Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 06 六月 2019 15:53:19 +0800
Subject: [PATCH] 7152 【后端】每次炼制灵根丹数量随机1-2

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
index ed59550..366af91 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
@@ -36,10 +36,12 @@
     if not msgList:
         GameWorld.DebugAnswer(curPlayer, "AddFairyEvent 事件ID")
         return
-    fdEventIDList = msgList
+    maxEventCnt = PlayerFairyDomain.GetMaxEventCnt()  # 最大可出现事件个数
+    if len(msgList) > maxEventCnt:
+        GameWorld.DebugAnswer(curPlayer, "最大事件数量 %s"%maxEventCnt)
+    fdEventIDList = msgList[:maxEventCnt]
     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
-    otherCntRateList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 2)
-    maxEventCnt = max([info[1] for info in otherCntRateList]) + 1  #最大可出现事件个数
+
     for i in xrange(maxEventCnt):
         prefdEventID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainEventID % i)
         if prefdEventID:

--
Gitblit v1.8.0