From 2cbf9aac044d14c2ee5233bfe247b6f57d89a602 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 13 十月 2022 16:32:39 +0800
Subject: [PATCH] 9719 【越南】【BT7】【主干】跨服全民充值(修复未启动跨服服务器或没有跨服全民充值活动时玩家登录可能导致本服报错bug)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossLuckyCloudBuy.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossLuckyCloudBuy.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossLuckyCloudBuy.py
index d06a113..abc019c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossLuckyCloudBuy.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossLuckyCloudBuy.py
@@ -435,9 +435,16 @@
     lotteryRecList = PyGameData.g_luckyCloudBuyLotteryDict.get(zoneID, [])
     lastLotteryRec = None if not lotteryRecList else lotteryRecList[-1]
     if lastLotteryRec and not lastLotteryRec.lotteryNum:
-        GameWorld.Log("幸运云购重置,当前轮次未开奖,直接开奖! cfgID=%s,zoneID=%s" % (lastLotteryRec.cfgID, zoneID))
-        startNewLottery = DoLuckyCloudBuyLottery(lastLotteryRec, True, "Reset")
-    
+        buyRecList = PyGameData.g_luckyCloudBuyNumDict.get(zoneID, [])
+        if buyRecList:
+            GameWorld.Log("幸运云购重置,当前轮次未开奖,直接开奖! cfgID=%s,zoneID=%s" % (lastLotteryRec.cfgID, zoneID))
+            startNewLottery = DoLuckyCloudBuyLottery(lastLotteryRec, True, "Reset")
+        else:
+            GameWorld.Log("幸运云购重置,当前轮次无购买记录,不开奖! cfgID=%s,zoneID=%s,%s" % (lastLotteryRec.cfgID, zoneID, lastLotteryRec.GetString()))
+            popLotteryRec = lotteryRecList.pop(-1)
+            if popLotteryRec:
+                GameWorld.Log("移除无效轮次信息 %s" % popLotteryRec.GetString())
+                
     if state and not startNewLottery:
         GameWorld.Log("幸运云购重置,当前没有未开奖的轮次,直接开启新一轮! cfgID=%s,zoneID=%s" % (cfgID, zoneID))
         DoStartNewRoundLuckyCloudBuy(cfgID, 1)
@@ -903,6 +910,7 @@
     clientPack.ZoneID = zoneID
     clientPack.StartDate = ipyDataInfo.get("StartDate", "")
     clientPack.EndtDate = ipyDataInfo.get("EndDate", "")
+    clientPack.LVLimit = ipyDataInfo.get("LVLimit", 0)
     clientPack.RoundID = lotteryRec.idTime
     clientPack.RoundNum = lotteryRec.roundNum
     clientPack.SuperItemID = superItemID

--
Gitblit v1.8.0