From 4d91a243d50d39d07071f48f8c8ff7b3209eb58e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 13 十二月 2021 15:47:12 +0800
Subject: [PATCH] 9265 【BT5】【后端】53、新增幸运云购(主干 BTGM等级限制购买次数改为VIP等级限制)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py                 |    4 +++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py                  |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyCloudBuy.py |    8 ++++----
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
index 3ce42f3..d4a30f2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
@@ -110,8 +110,10 @@
                     continue
                 inputList[i] = value
                 
-            callFunc(curPlayer, inputList)
+            isSendGameServer = callFunc(curPlayer, inputList)
             DR_UseGMCMD(curPlayer, inputStr)
+            if isSendGameServer:
+                curPlayer.GameServer_GMCmd(inputStr)
             return
         
         # GameObj 的 Get、Set函数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index ed1bd2b..57ac0d1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -1708,6 +1708,9 @@
     timeStr = time.strftime(timeFormat, time.localtime(timeNum))
     return datetime.datetime.strptime(timeStr, timeFormat)
 
+def ChangeStrToDatetime(timeStr, timeFormat=ChConfig.TYPE_Time_Format):
+    return datetime.datetime.strptime(timeStr, timeFormat)
+
 def CheckTimeIsSameServerDayEx(checkTime):
     '''判断指定time值与当天时间对比是否为游戏内的同一天;特殊时间点过天后才算不同天
     该函数一般用于判断某个功能记录的版本天是否与当天时间是同一天的逻辑
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyCloudBuy.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyCloudBuy.py
index 0a98100..c586014 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyCloudBuy.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyCloudBuy.py
@@ -100,12 +100,12 @@
                            % (crossServerDateTime, unLimitHour, unLimitMinute))
     else:
         hadBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LuckyCloudBuy_BuyCount)
-        curGMLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_BTGMLV)
+        vipLV = curPlayer.GetVIPLv()
         gmLVLimitBuyCountList = IpyGameDataPY.GetFuncEvalCfg("LuckyCloudBuyCost", 2)
-        maxBuyCount = gmLVLimitBuyCountList[curGMLV] if len(gmLVLimitBuyCountList) > curGMLV else gmLVLimitBuyCountList[-1]
+        maxBuyCount = gmLVLimitBuyCountList[vipLV] if len(gmLVLimitBuyCountList) > vipLV else gmLVLimitBuyCountList[-1]
         if hadBuyCount + buyCount > maxBuyCount:
-            GameWorld.DebugLog("幸运云购购买次数限制! hadBuyCount=%s,buyCount=%s,curGMLV=%s,maxBuyCount=%s,crossServerDateTime=%s" 
-                               % (hadBuyCount, buyCount, curGMLV, maxBuyCount, crossServerDateTime))
+            GameWorld.DebugLog("幸运云购购买次数限制! hadBuyCount=%s,buyCount=%s,vipLV=%s,maxBuyCount=%s,crossServerDateTime=%s" 
+                               % (hadBuyCount, buyCount, vipLV, maxBuyCount, crossServerDateTime))
             return
         
     buyCountCostMoneyDict = IpyGameDataPY.GetFuncEvalCfg("LuckyCloudBuyCost", 1, {})

--
Gitblit v1.8.0