hxp
2024-03-11 f96a3209627ab49c24d0cf7b2a08e848dd0afb35
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