From f96a3209627ab49c24d0cf7b2a08e848dd0afb35 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 11 三月 2024 11:53:42 +0800
Subject: [PATCH] 10142 【主干】【越南】【港台】【砍树】通天令激活修改

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py         |    2 ++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTongTianLing.py |   20 ++++++++------------
 2 files changed, 10 insertions(+), 12 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 b965f5c..1c51289 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -62,6 +62,7 @@
 import PlayerWeekParty
 import PlayerGoldInvest
 import PlayerActTurntable
+import PlayerTongTianLing
 import PlayerZhanling
 import ItemCommon
 import PyGameData
@@ -691,6 +692,7 @@
         PlayerGoldInvest.InvestByCTG(curPlayer, ctgID)
         PlayerGoldGift.OnGiftByCTGID(curPlayer, ctgID)
         PlayerZhanling.OnActiviteByCTGID(curPlayer, ctgID)
+        PlayerTongTianLing.OnActiviteTTTByCTGID(curPlayer, ctgID)
         
     serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
     addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter], "todayCTGCoinTotal":todayCTGCoinTotal,
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTongTianLing.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTongTianLing.py
index 7aef977..bc100e3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTongTianLing.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTongTianLing.py
@@ -367,22 +367,18 @@
 #    tagHead        Head;
 #};
 def OnBuyTongTianLing(index, clientData, tick):
-    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    # 废弃,改为充值激活
+    return
+
+def OnActiviteTTTByCTGID(curPlayer, ctgID):
+    ctgIDList = IpyGameDataPY.GetFuncEvalCfg("TongTianLing", 5)
+    if ctgID not in ctgIDList:
+        return
+    
     playerID = curPlayer.GetPlayerID()
     ttLV, ttState = GetTongTianLingLVInfo(curPlayer)
     if ttState:
         GameWorld.DebugLog("通天令已经购买过了!", playerID)
-        return
-    
-    costMoneyInfo = IpyGameDataPY.GetFuncEvalCfg("TongTianLing", 2)
-    if len(costMoneyInfo) != 2:
-        return
-    costMoneyType, costMoneyValue = costMoneyInfo
-    if not costMoneyType or not costMoneyValue:
-        return
-    
-    infoDict = {ChConfig.Def_Cost_Reason_SonKey:"BuyTongTianLing", "ttLV":ttLV}
-    if not PlayerControl.PayMoney(curPlayer, costMoneyType, costMoneyValue, ChConfig.Def_Cost_TongTianLing, infoDict):
         return
     
     ttState = 1

--
Gitblit v1.8.0