From cfa0e7bcd6b5c6ee2551b58471310de677fc9e7f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 15 一月 2025 11:41:54 +0800
Subject: [PATCH] 10352 【BT】免费买断版本(修改永久卡激活逻辑)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py | 25 ++++++++++++++++++++++++-
2 files changed, 25 insertions(+), 2 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 7f16d68..938d482 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -746,7 +746,7 @@
# 功能统一以分存储记录,玩家字典不支持存小数
# 所有真实充值均有效的
- if coinType in [ChConfig.CoinType_Gold, ChConfig.CoinType_Buy]:
+ if coinType in [ChConfig.CoinType_Gold, ChConfig.CoinType_Buy, ChConfig.CoinType_UsePayCoin]:
#跨服充值排行活动
CrossActCTGBillboard.AddCTGRMB(curPlayer, orderCoin)
#跨服全民充值
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
index cdfc5ed..bf12033 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -128,8 +128,25 @@
# DWORD InvestGold; // 投资额度
#};
def OnGoldInvest(index, clientData, tick):
- ## 消耗仙玉投资的,暂废弃
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ investType = clientData.InvestType
+ InvestByRealCTG(curPlayer, investType)
return
+
+def InvestByRealCTG(curPlayer, investType):
+ ## 真实充值激活投资
+ needRealCTGCoinDict = IpyGameDataPY.GetFuncEvalCfg("InvestCost", 4, {})
+ if str(investType) not in needRealCTGCoinDict:
+ return
+ playerID = curPlayer.GetPlayerID()
+ realNeed = needRealCTGCoinDict[str(investType)]
+ realTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal)
+ if realTotal < realNeed:
+ GameWorld.DebugLog("真实充值额度不足,无法激活! investType=%s,realTotal=%s < %s"
+ % (investType, realTotal, realNeed), playerID)
+ return
+ __DoLogicInvest(curPlayer, investType)
+ return True
## 充值直购投资
def InvestByCTG(curPlayer, ctgID):
@@ -162,6 +179,12 @@
if redPacketID:
PlayerFamilyRedPacket.CreatRedPacketByID(curPlayer, redPacketID)
+ # 额外奖励物品
+ awardItemDict = IpyGameDataPY.GetFuncEvalCfg("InvestCost", 5, {})
+ if str(investType) in awardItemDict:
+ awardItemListEx = awardItemDict[str(investType)]
+ ItemControler.GivePlayerItemOrMail(curPlayer, awardItemListEx, event=["Invest", True, {"investType":investType}])
+
# 广播
PlayerControl.WorldNotify(0, "BuyInvest_%s" % investType, [curPlayer.GetName(), __GetTotalGetGold(investType)])
--
Gitblit v1.8.0