| | |
| | | import PlayerZhanling
|
| | | import PlayerGoldRush
|
| | | import PlayerLLMJ
|
| | | import ItemCommon
|
| | | import PyGameData
|
| | | import DBDataMgr
|
| | | import CommFunc
|
| | |
|
| | | import time
|
| | |
| | | # 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()
|
| | | #curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | #if tick - curPlayer.GetDictByKey("QRtick") < 10000:
|
| | | # return
|
| | | #curPlayer.SetDict("QRtick", tick)
|
| | | #curPlayer.SendDBQueryRecharge() 不查了,由在线轮询触发即可
|
| | | return
|
| | |
|
| | | #// A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
|
| | |
| | | PlayerControl.SendMailByKey("ExchangeToPayCoin", [playerID], addItemList, paramList)
|
| | |
|
| | | if payOrderType != PayOrderType_PayCoin:
|
| | | serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | serverDay = DBDataMgr.GetEventTrigMgr().GetValue(ShareDefine.Def_ServerDay) + 1
|
| | | addDRDict.update({"coinType":ChConfig.CoinType_ExchangePayCoin, "PayCoin":[befPayCoin, aftPayCoin],
|
| | | "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay, "eventName":eventName})
|
| | | DataRecordPack.DR_CTGOK(curPlayer, addDRDict)
|
| | |
| | | cPlayerCoin.isAddBourseMoney = isAddBourseMoney
|
| | | return PlayerCoinToGold(curPlayer, cPlayerCoin, eventName)
|
| | |
|
| | | def OnDBPushRecharge(curPlayer, orderID, orderInfo, orderAmount):
|
| | | cPlayerCoin = CPY_PlayerCoinToGold()
|
| | | cPlayerCoin.useCoin = orderAmount
|
| | | cPlayerCoin.orderID = orderID
|
| | | cPlayerCoin.orderInfo = orderInfo
|
| | | cPlayerCoin.isAddBourseMoney = True
|
| | | GameWorld.Log("OnDBPushRecharge: useCoin=%s,orderInfo=%s,orderID=%s" % (cPlayerCoin.useCoin, cPlayerCoin.orderInfo, cPlayerCoin.orderID), curPlayer.GetPlayerID())
|
| | | return PlayerCoinToGold(curPlayer, cPlayerCoin, ChConfig.Def_GiveMoney_CoinToGold)
|
| | |
|
| | | ##特别说明:充值赠送点券都要计算到各个活动中
|
| | | ##玩家点卷兑换元宝.
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | orderInfo = chargeInfo.GetOrderInfo() # 商品编号
|
| | | orderID = chargeInfo.GetOrderID() #订单号,兑换成功后清除
|
| | | isAddBourseMoney = chargeInfo.GetIsAddBourseMoney()
|
| | | if orderID:
|
| | | curPlayer.SendDBFinishRecharge(orderID)
|
| | | |
| | | #if orderID:
|
| | | # curPlayer.SendDBFinishRecharge(orderID)
|
| | | |
| | | appID = chargeInfo.GetAppID()
|
| | | if not appID:
|
| | | appID = GameWorld.GetPlayerPlatform(curPlayer)
|
| | | if not appID:
|
| | | appID = GameWorld.GetAppIDByAccID(curPlayer.GetAccID())
|
| | | GameWorld.DebugLog("GetAppIDByAccID appID=%s" % appID)
|
| | | addDRDict = {"orderCoin":orderCoin, "orderInfo":orderInfo, "orderID":orderID,
|
| | | "isAddBourseMoney":isAddBourseMoney, "eventName":eventName, "appID":appID}
|
| | |
|
| | |
| | | recordID = ctgIpyData.GetRecordID() if ctgIpyData else 0
|
| | | Sync_CoinToGoldReport(curPlayer, orderID, orderCoin, recordID, orderInfo)
|
| | |
|
| | | curPlayer.SendDBQueryRecharge()
|
| | | #curPlayer.SendDBQueryRecharge() 不查了,由在线轮询触发即可
|
| | | return True
|
| | |
|
| | | def __GetCTGInfoByID(curPlayer, recordID, addDRDict):
|
| | |
| | |
|
| | | if ctgIpyData and ctgIpyData.GetPayType() == PayType_PayCoin:
|
| | | # 代币充值,仅给代币,不触发其他内容
|
| | | ctgID = ctgIpyData.GetRecordID()
|
| | | coinType = ChConfig.CoinType_PayCoin
|
| | | orderInfo = addDRDict.get("orderInfo", "")
|
| | | orderCoin = addDRDict.get("orderCoin", 0)
|
| | | payOrderType = addDRDict.get("payOrderType", PayOrderType_Default)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | moneyInfo = {}
|
| | | befPayCoin = PlayerControl.GetPayCoin(curPlayer)
|
| | | if addGold and moneyType == ShareDefine.TYPE_Price_PayCoin:
|
| | | drDict = {ChConfig.Def_Give_Reason_SonKey:orderInfo, "payOrderType":payOrderType, "orderInfo":orderInfo}
|
| | | PlayerControl.GiveMoney(curPlayer, moneyType, addGold, eventName, drDict)
|
| | | moneyInfo[moneyType] = addGold
|
| | | aftPayCoin = PlayerControl.GetPayCoin(curPlayer)
|
| | | # 三国版本充代币支持赠送元宝
|
| | | prizeMoneyType = IPY_GameWorld.TYPE_Price_Gold_Money
|
| | | if prizeGold > 0:
|
| | | PlayerControl.GiveMoney(curPlayer, prizeMoneyType, prizeGold, eventName, addDRDict, isGiveBourseMoney=isAddBourseMoney)
|
| | | moneyInfo[prizeMoneyType] = prizeGold
|
| | | |
| | | if moneyInfo:
|
| | | ItemControler.NotifyGiveAwardInfo(curPlayer, [], ChConfig.ItemGive_CTG, moneyInfo=moneyInfo, |
| | | dataEx={"orderInfo":orderInfo, "ctgID":ctgID})
|
| | |
|
| | | isRealMoney = True if addDRDict.get("orderID") else False # tqxbqy 真实订单充代币算真实充值
|
| | | if isRealMoney:
|
| | |
| | | ctgRealToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealToday) # 当日真实货币充值Coin数 ,不含后台充值- 今日
|
| | | ctgRealTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal) # 累计真实货币充值Coin数 ,不包后台充值 - 总计
|
| | | ctgRealFirstTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealFirstTime) # 首次真实货币充值时间戳
|
| | | serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | addDRDict.update({"coinType":coinType, "PayCoin":[befPayCoin, aftPayCoin], |
| | | serverDay = DBDataMgr.GetEventTrigMgr().GetValue(ShareDefine.Def_ServerDay) + 1
|
| | | addDRDict.update({"coinType":coinType, "PayCoin":[befPayCoin, aftPayCoin], "moneyInfo":moneyInfo,
|
| | | "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay, "eventName":eventName,
|
| | | "ctgRealToday":ctgRealToday, "ctgRealTotal":ctgRealTotal, "ctgRealFirstTime":GameWorld.ChangeTimeNumToStr(ctgRealFirstTime) if ctgRealFirstTime else ""})
|
| | | DataRecordPack.DR_CTGOK(curPlayer, addDRDict)
|
| | |
| | | PlayerTongTianLing.OnActiviteTTTByCTGID(curPlayer, ctgID)
|
| | | PlayerLLMJ.OnActiviteByCTGID(curPlayer, ctgID)
|
| | |
|
| | | serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | serverDay = DBDataMgr.GetEventTrigMgr().GetValue(ShareDefine.Def_ServerDay) + 1
|
| | | addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter], "todayCTGCoinTotal":todayCTGCoinTotal,
|
| | | "bourseMoney":[bourseMoneyBefore, bourseMoneyAfter], "addGold":addGold, "prizeGold":prizeGold, "giveItemList":giveItemList, "coinType":coinType,
|
| | | "coinExp":coinExp, "addVIPExp":addVIPExp, "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay,
|