From 929aebd1119d3b28d6640460cbbe0c656f5b9528 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 28 十一月 2025 14:20:18 +0800
Subject: [PATCH] 16 卡牌服务端(去除砍价人次限制,由砍价表配置的人次上限决定;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py |  195 ++++++++++++++++--------------------------------
 1 files changed, 66 insertions(+), 129 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index 2fb7503..b44dfb8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -39,33 +39,27 @@
 import ChConfig
 import ChPyNetSendPack
 import NetPackCommon
-import PlayerVip
 import IpyGameDataPY
 import ShareDefine
 import PlayerFlashGiftbag
 import PlayerDailyGiftbag
-import PlayerFairyCeremony
-import PlayerNewFairyCeremony
 import PlayerGoldGift
 import PlayerActTotalRecharge
-import PlayerActGarbageSorting
 import PlayerActRechargeRebateGold
 import PlayerActFamilyCTGAssist
 import PlayerActManyDayRecharge
 import PlayerActSingleRecharge
 import PlayerActRechargePrize
-import PlayerFamilyRedPacket
 import CrossActCTGBillboard
 import CrossActAllRecharge
 import PlayerActGrowupBuy
-import OpenServerCampaign
-import PlayerFeastTravel
 import PlayerWeekParty
 import PlayerGoldInvest
 import PlayerActTurntable
 import PlayerTongTianLing
 import PlayerZhanling
-import PlayerMineArea
+import PlayerGoldRush
+import PlayerLLMJ
 import ItemCommon
 import PyGameData
 import CommFunc
@@ -101,10 +95,6 @@
 def OnLogin(curPlayer):
     if not DoResetCTGCountByTime(curPlayer):
         Sync_CoinToGoldCountInfo(curPlayer)
-    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState):
-        Sync_DayFreeGoldGiftState(curPlayer)
-    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_OnlineRechargeTHAward):
-        SyncOnlineRechargeTH(curPlayer)
     return
 
 def DoResetCTGCountByTime(curPlayer):
@@ -211,9 +201,6 @@
     if syncRecordIDList:
         Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)
         
-    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState):
-        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DayFreeGoldGiftState, 0)
-        Sync_DayFreeGoldGiftState(curPlayer)
     return
 
 def OnWeek(curPlayer):
@@ -244,6 +231,19 @@
         Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)
     return
 
+#// A8 06 查询充值结果 #tagCMQueryRecharge
+#
+#struct    tagCMQueryRecharge
+#{
+#    tagHead        Head;
+#};
+def OnQueryRecharge(index, packData, tick):
+    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    if tick - curPlayer.GetDictByKey("QRtick") < 10000:
+        return
+    curPlayer.SetDict("QRtick", tick)
+    curPlayer.SendDBQueryRecharge()
+    return
 
 #// A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
 #
@@ -569,42 +569,71 @@
             return
         addDRDict.update({"selectItemList":selectItemList})
         
-    totalBuyCountUpd = min(totalBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, totalBuyCountUpd)
-    addDRDict.update({"totalBuyCountUpd":totalBuyCountUpd})
-    
-    todayBuyCountUpd = min(todayBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, todayBuyCountUpd)
-    addDRDict.update({"todayBuyCountUpd":todayBuyCountUpd})
-    
-    weekBuyCountUpd = min(weekBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekCTGCount % recordID, weekBuyCountUpd)
-    addDRDict.update({"weekBuyCountUpd":weekBuyCountUpd})
-    
-    monthBuyCountUpd = min(monthBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MonthCTGCount % recordID, monthBuyCountUpd)
-    addDRDict.update({"monthBuyCountUpd":monthBuyCountUpd})
+    totalBuyCountUpd, todayBuyCountUpd, weekBuyCountUpd, monthBuyCountUpd = __addCTGIDBuyCnt(curPlayer, recordID)
+    addDRDict.update({"totalBuyCountUpd":totalBuyCountUpd, "todayBuyCountUpd":todayBuyCountUpd, "weekBuyCountUpd":weekBuyCountUpd, "monthBuyCountUpd":monthBuyCountUpd})
     
     giveItemList = []
     giveItemList += GetCTGGiveItemList(ipyData)
     giveItemList += selectItemList
     
-    payType = ipyData.GetPayType()
+    #payType = ipyData.GetPayType()
     moneyType = ipyData.GetMoneyType() # 获得货币类型
     addGold = ipyData.GetGainGold() # 获得货币数
     gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送货币数,首次充值赠送仙玉时,此仙玉不给
     firstGoldPrize = ipyData.GetFirstGoldPrize() # 首次充值赠送的仙玉
     prizeGold = firstGoldPrize if (not totalBuyCount and firstGoldPrize) else gainGoldPrize
     if moneyType == IPY_GameWorld.TYPE_Price_Gold_Money:
-        if payType in [PayType_Gold, PayType_GoldPlus] and PlayerGoldInvest.GetInvestState(curPlayer, ChConfig.InvestType_Life):
-            prizeGold = addGold # bt tqxbqy 版本,永久卡仙玉直充固定双倍
+        #if payType in [PayType_Gold, PayType_GoldPlus] and PlayerGoldInvest.GetInvestState(curPlayer, ChConfig.InvestType_Life):
+        #    prizeGold = addGold # bt tqxbqy 版本,永久卡仙玉直充固定双倍
         actPrizeGold = PlayerActRechargePrize.DoAddPlayerActRechargePrizeCount(curPlayer, recordID)
         if actPrizeGold:
             prizeGold += actPrizeGold
             addDRDict.update({"actRechargePrize":1})
             
-    Sync_CoinToGoldCountInfo(curPlayer, [recordID])
+    syncRecordIDList = [recordID]
+    # 打包购买 - 目前用于每日特惠,有需要可扩展为通用
+    if recordID == IpyGameDataPY.GetFuncCfg("DailyTehui", 2):
+        packItemDict = {}
+        packCTGIDDict = {}
+        dailyTehuiCTGIDList = IpyGameDataPY.GetFuncEvalCfg("DailyTehui", 1)
+        for ctgID in dailyTehuiCTGIDList:
+            ctgIpyData = IpyGameDataPY.GetIpyGameData("CTG", ctgID)
+            if not ctgIpyData:
+                continue
+            if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % ctgID):
+                continue
+            syncRecordIDList.append(ctgID)
+            ctgItemList = GetCTGGiveItemList(ctgIpyData)
+            packCTGIDDict[ctgID] = ctgItemList
+            for itemID, itemCount, _ in ctgItemList:
+                packItemDict[itemID] = packItemDict.get(itemID, 0) + itemCount
+            __addCTGIDBuyCnt(curPlayer, ctgID)
+        if packCTGIDDict:
+            GameWorld.Log("打包购买: recordID=%s,packCTGIDDict=%s" % (recordID, packCTGIDDict), curPlayer.GetPlayerID())
+            addDRDict.update({"packCTGIDDict":packCTGIDDict})
+        for itemID, itemCount in packItemDict.items():
+            giveItemList.append([itemID, itemCount, 0])
+            
+    Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)
     return moneyType, addGold, prizeGold, giveItemList, ipyData
+
+def __addCTGIDBuyCnt(curPlayer, recordID):
+    totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)
+    totalBuyCountUpd = min(totalBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, totalBuyCountUpd)
+    
+    todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % recordID)
+    todayBuyCountUpd = min(todayBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, todayBuyCountUpd)
+    
+    weekBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekCTGCount % recordID)
+    weekBuyCountUpd = min(weekBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekCTGCount % recordID, weekBuyCountUpd)
+    
+    monthBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MonthCTGCount % recordID)
+    monthBuyCountUpd = min(monthBuyCount + 1, ChConfig.Def_UpperLimit_DWord)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MonthCTGCount % recordID, monthBuyCountUpd)
+    return totalBuyCountUpd, todayBuyCountUpd, weekBuyCountUpd, monthBuyCountUpd
 
 def GetSelectItemListInfo(selectItemInfo, selectItemValue):
     errorInfo = ""
@@ -752,11 +781,9 @@
                                           dataEx={"orderInfo":orderInfo, "ctgID":ctgID})
     
     addVIPExp = coinExp
-    PlayerVip.AddVIPExp(curPlayer, addVIPExp)
     
     changeCoinPointBefore = curPlayer.GetChangeCoinPointTotal()
     curPlayer.SetChangeCoinPointTotal(min(changeCoinPointBefore + orderCoin, ChConfig.Def_UpperLimit_DWord), 0)
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 0)
     
     todayCTGCoinTotal = min(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCoinTotal) + orderCoin, ChConfig.Def_UpperLimit_DWord)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCoinTotal, todayCTGCoinTotal)
@@ -775,37 +802,26 @@
         #跨服全民充值
         CrossActAllRecharge.AddCTGRMB(curPlayer, orderCoin)
         PlayerActManyDayRecharge.AddManyDayRechargeValue(curPlayer, orderCoin) # 多日连充
-        #红包, 需要真实充值
-        PlayerFamilyRedPacket.OnPlayerRecharge(curPlayer, orderCoin)
         
     # 只算充仙玉的
     if coinType == ChConfig.CoinType_Gold:
         PlayerActRechargeRebateGold.AddRechargeRebateGoldRMB(curPlayer, addGold)
         
-    #仙界盛典-充值大礼
-    PlayerFairyCeremony.OnFCRecharge(curPlayer)
-    PlayerNewFairyCeremony.OnFCRecharge(curPlayer)
-    PlayerGoldGift.OnPlayerChargeGold(curPlayer)
     #累积充值X元
     PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin, coinType)
-    PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_CTG, addVIPExp, coinType) # 垃圾分类
     PlayerActSingleRecharge.UpdSingleRechargeValue(curPlayer, orderCoin, coinType) # 单笔累充
     PlayerActTurntable.OnPlayerRecharge(curPlayer, orderCoin, coinType) # 转盘
-    PlayerFairyCeremony.AddFCCTGRMB(curPlayer, orderCoin)
-    PlayerNewFairyCeremony.AddFCCostGold(curPlayer, orderCoin)
-    #开服活动
-    #OpenServerCampaign.AddOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_Recharge, orderCoin)
     PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Recharge, addVIPExp)
-    PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_CTGExp, addVIPExp)
     #投资
     if ctgIpyData:
         ctgID = ctgIpyData.GetRecordID()
-        PlayerActFamilyCTGAssist.OnPlayerCTG(curPlayer, ctgID)
+        #PlayerActFamilyCTGAssist.OnPlayerCTG(curPlayer, ctgID)
         PlayerGoldInvest.InvestByCTG(curPlayer, ctgID)
         PlayerGoldGift.OnGiftByCTGID(curPlayer, ctgID)
         PlayerZhanling.OnActiviteByCTGID(curPlayer, ctgID)
-        PlayerMineArea.OnMineTreasureByCTGID(curPlayer, ctgID)
+        PlayerGoldRush.OnGoldRushByCTGID(curPlayer, ctgID)
         PlayerTongTianLing.OnActiviteTTTByCTGID(curPlayer, ctgID)
+        PlayerLLMJ.OnActiviteByCTGID(curPlayer, ctgID)
         
     serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
     addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter], "todayCTGCoinTotal":todayCTGCoinTotal,
@@ -915,82 +931,3 @@
     countInfoPack.RecordCount = len(countInfoPack.CTGCountInfoList)
     NetPackCommon.SendFakePack(curPlayer, countInfoPack)
     return
-
-## ---------- 每日免费直购礼包 ----------------
-
-def OnGetDayFreeGoldGift(curPlayer):
-    ''' 领取每日免费直购礼包
-    '''
-    
-    isGet = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState)
-    if isGet:
-        #GameWorld.DebugLog("已经领取过每日免费直购礼包!")
-        return
-    
-    rewardItemList = IpyGameDataPY.GetFuncEvalCfg("DayFreeGoldGift", 1)
-    if not rewardItemList:
-        return
-    
-    needSpace = len(rewardItemList)
-    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
-    if needSpace > packSpace:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
-        return
-    
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DayFreeGoldGiftState, 1)
-    
-    # 给物品
-    isAuctionItem = False
-    for itemID, itemCount in rewardItemList:        
-        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
-        
-    # 通知客户端
-    Sync_DayFreeGoldGiftState(curPlayer)
-    return
-
-def Sync_DayFreeGoldGiftState(curPlayer):
-    clientPack = ChPyNetSendPack.tagMCDayFreeGoldGiftState()
-    clientPack.DayFreeGoldGiftState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState)
-    NetPackCommon.SendFakePack(curPlayer, clientPack)
-    return
-
-## ------------------------------------------
-## ---------- 创角在线充值特惠 ---------------
-
-def OnGetOnlineRechargeTH(curPlayer):
-    ## 领取创角在线充值特惠
-    awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_OnlineRechargeTHAward)
-    if awardState:
-        #GameWorld.DebugLog("已领取该奖励!")
-        return
-    
-    # 后端只验证是否有充值其中一个即可,不验证充值时间(充值同步到游戏服务器有时间差)
-    canGet = False
-    needCtgIDList = IpyGameDataPY.GetFuncEvalCfg("OnlineRechargeTH", 2)
-    for ctgID in needCtgIDList:
-        if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % ctgID):
-            canGet = True
-            break
-        
-    if not canGet:
-        return
-    
-    awardItemList = IpyGameDataPY.GetFuncEvalCfg("OnlineRechargeTH", 3)
-    if not ItemControler.CheckPackSpaceEnough(curPlayer, awardItemList):
-        return
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_OnlineRechargeTHAward, 1)
-    
-    for itemID, itemCount, isAuctionItem in awardItemList:
-        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], 
-                                     event=["OnlineRechargeTH", False, {}])
-        
-    SyncOnlineRechargeTH(curPlayer)
-    return
-
-def SyncOnlineRechargeTH(curPlayer):
-    clientPack = ChPyNetSendPack.tagMCOnlineRechargeTH()
-    clientPack.AwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_OnlineRechargeTHAward)
-    NetPackCommon.SendFakePack(curPlayer, clientPack)
-    return
-
-## ------------------------------------------
\ No newline at end of file

--
Gitblit v1.8.0