| | |
| | | # 功能统一以分存储记录,玩家字典不支持存小数
|
| | |
|
| | | # 所有真实充值均有效的
|
| | | 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)
|
| | | #跨服全民充值
|
| | |
| | | # 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):
|
| | |
| | | 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)])
|
| | |
|
| | |
| | | ## 增加境界任务值
|
| | | if taskType not in NeedTaskValueTypeList:
|
| | | return
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | return
|
| | | realmLV = curPlayer.GetOfficialRank()
|
| | | taskIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("RealmLVUPTask", realmLV)
|
| | | if not taskIpyDataList:
|