From e4fc3ac2dea951d1345acb647cf9bc36142951e9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 12 二月 2026 11:41:47 +0800
Subject: [PATCH] 16 卡牌服务端(删除不需要的旧活动:成长必买、限时特惠、限时礼包、每日礼包、限时抢购、极品白拿、运势活动、天帝礼包、转盘、许愿池、幸运鉴宝;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 50 ++++++++++++++++++++------------------------------
1 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index 1ad87c8..b710702 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -16,7 +16,6 @@
#-------------------------------------------------------------------------------
import GameWorld
-import PlayerRune
import IPY_GameWorld
import IpyGameDataPY
import FormulaControl
@@ -25,7 +24,6 @@
import ItemControler
import NetPackCommon
import PlayerActLunhuidian
-import PlayerActYunshi
import PlayerActivity
import PlayerSuccess
import PlayerGoldInvest
@@ -128,8 +126,8 @@
def IsActTreasureType(curPlayer, treasureType):
## 是否活动中的寻宝类型
- if PlayerActYunshi.IsActTreasureType(curPlayer, treasureType):
- return True
+ #if PlayerActYunshi.IsActTreasureType(curPlayer, treasureType):
+ # return True
return False
#// A5 69 寻宝心愿物品选择 #tagCSTreasureWishSelect
@@ -428,9 +426,9 @@
if wishPubFreeCntDict:
outTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishLibOut % (treasureType, libID))
freeCnt = wishPubFreeCntDict.get(libIDStr, 0)
- canFreeOut = freeCnt - outTotal
- if canFreeOut > 0:
- canFreeOutWishLibDict[libID] = canFreeOut
+ canFreeOutPub = freeCnt - outTotal
+ if canFreeOutPub > 0:
+ canFreeOutWishLibDict[libID] = canFreeOutPub
for wishIndex in range(selectCnt):
wishID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishSelect % (treasureType, libIDStr, wishIndex))
@@ -443,24 +441,17 @@
# 非心愿物品
continue
+ if libID not in selectWishIDDict:
+ selectWishIDDict[libID] = []
+ selectWishIDList = selectWishIDDict[libID]
+ selectWishIDList.append(wishID)
+
# 公共次数
if wishPubFreeCntDict:
- useWishItemState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishUseItem % (treasureType, libID))
- if not useWishItemState:
- # 未启用该库心愿视为未选择
- continue
- if libID not in selectWishIDDict:
- selectWishIDDict[libID] = []
- selectWishIDList = selectWishIDDict[libID]
- selectWishIDList.append(wishID)
-
+ pass
+
# 独立次数
else:
- if libID not in selectWishIDDict:
- selectWishIDDict[libID] = []
- selectWishIDList = selectWishIDDict[libID]
- selectWishIDList.append(wishID)
-
outCntLimit = libItemIpyData.GetWishOutCnt()
outCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishOut % (treasureType, wishID))
canFreeOut = outCntLimit - outCnt
@@ -469,7 +460,8 @@
canFreeOutWishIDict[wishID] = canFreeOut
if wishLibSelect:
- GameWorld.DebugLog("本次可优先产出的心愿库物品: %s, 免费次数:%s" % (selectWishIDDict, canFreeOutWishLibDict), playerID)
+ GameWorld.DebugLog("当前心愿库选择的心愿ID列表: %s" % selectWishIDDict, playerID)
+ GameWorld.DebugLog("还可优先产出的心愿免费次数:%s" % canFreeOutWishLibDict, playerID)
# 单抽产出优先级: 幸运物品 > 必出 > 保底 > 普通
# 连抽没有优先级限制,只要满足条件即可产出
@@ -525,7 +517,7 @@
gridNum = GameWorld.GetResultByRandomList(curRateList)
if gridNum in luckyGridNumList and gridNum in getGridResult:
- GameWorld.DebugLog(" 幸运物品已经出过,不再重复产出! gridNum=%s in %s" % (gridNum, getGridResult))
+ GameWorld.DebugLog(" 幸运物品已经出过,不再重复产出重新随机! gridNum=%s in %s" % (gridNum, getGridResult), playerID)
continue
# 心愿库物品,检查心愿预产出
@@ -535,7 +527,7 @@
wishLibID = gridLibInfoDict[gridNumStr]
if wishPubFreeCntDict:
# 公共心愿默认均可正常产出,只是处理是否优先产出心愿
- __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict, wishPubFreeCntDict,
+ __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict,
preOutWishDict, canFreeOutWishLibDict, wishPubCardDict, wishCardItemLibDict)
#else:
# # 非公共的暂不支持,后续有需要再处理
@@ -757,6 +749,9 @@
# 通知前端
sendPack = ChPyNetSendPack.tagMCTreasureResult()
sendPack.Clear()
+ sendPack.TreasureType = treasureType
+ sendPack.TreasureIndex = treasureIndex
+ sendPack.CostType = costType
sendPack.AddMoneyType = addScoreType
sendPack.AddMoneyValue = addScore
sendPack.AddTreasureLuck = addLuck
@@ -767,7 +762,7 @@
Sync_TreasureInfo(curPlayer, [treasureType])
return
-def __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict, wishPubFreeCntDict, preOutWishDict,
+def __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict, preOutWishDict,
canFreeOutWishLibDict, wishPubCardDict, wishCardItemLibDict):
## 公共心愿产出预处理
@@ -843,11 +838,6 @@
return
if heroIpyData.GetRecruitBySelf() and not PlayerHero.GetHeroActivite(curPlayer, itemID):
GameWorld.DebugLog("武将未激活不产出! itemID=%s" % itemID, playerID)
- return
-
- elif itemData.GetType() == ChConfig.Def_ItemType_Rune:
- if not PlayerRune.GetIsOpenByRuneID(curPlayer, itemID):
- GameWorld.DebugLog("未解锁的符印不产出! itemID=%s" % itemID, playerID)
return
return True
--
Gitblit v1.8.0