8886 【BT2】【后端】线下活动支持(增加单笔累充系统)
| | |
| | | struct tagActSingleRechargeAward
|
| | | {
|
| | | DWORD _TemplateID; //模板ID
|
| | | DWORD SingleRechargeValue; //单笔充值额度
|
| | | float SingleRechargeValue; //单笔充值额度
|
| | | BYTE AwardIndex; //返利奖励索引0~31,同个模板中不重复
|
| | | dict AwardItem; //返利物品信息列表 {职业:[(物品ID,个数,是否绑定),...]}
|
| | | char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
|
| | |
| | | OperationActionName_FeastWish = "ActFeastWish" # 节日祝福活动
|
| | | OperationActionName_FeastTravel = "ActFeastTravel" # 节日游历活动
|
| | | OperationActionName_ManyDayRecharge = "ActManyDayRecharge" # 多日连充活动
|
| | | OperationActionName_SingleRecharge = "ActSingleRecharge" # 单笔累充活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | |
| | | OperationActionName_WishingWell, OperationActionName_TotalRecharge,
|
| | | OperationActionName_WeekParty, OperationActionName_LoginAward,
|
| | | OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
|
| | | OperationActionName_DailyGiftbag, |
| | | OperationActionName_DailyGiftbag, OperationActionName_SingleRecharge,
|
| | | OperationActionName_CollectWords, OperationActionName_ManyDayRecharge,
|
| | | ] + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | |
| | | OperationActionName_CollectWords,
|
| | | OperationActionName_FeastLogin,
|
| | | OperationActionName_FeastWish, OperationActionName_FeastTravel,
|
| | | OperationActionName_ManyDayRecharge,
|
| | | OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
|
| | | ]
|
| | |
|
| | | #支持多活动分组编号的活动名
|
| | | MultiActNumOperationActNameList = [OperationActionName_TotalRecharge, OperationActionName_CollectWords,
|
| | | OperationActionName_FlashGiftbag, OperationActionName_CostRebate,
|
| | | OperationActionName_SpringSale, OperationActionName_FlashSale,
|
| | | OperationActionName_ManyDayRecharge,
|
| | | OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|
| | |
| | | Def_PDict_ManyDayRechargeWorldLV = "ManyDayRechargeWorldLV_%s" #玩家身上的活动世界等级,参数:(活动编号)
|
| | | Def_PDict_ManyDayRechargeValue = "ManyDayRechargeValue_%s_%s" # 每日累充总额,参数:(活动编号, 天索引)
|
| | | Def_PDict_ManyDayRechargeAward = "ManyDayRechargeAward_%s_%s" # 领奖记录,参数:(活动编号, key编号)
|
| | |
|
| | | #单笔累充活动
|
| | | Def_PDict_SingleRechargeID = "SingleRechargeID_%s" # 玩家身上的活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
|
| | | Def_PDict_SingleRechargeTemplateID = "SingleRechargeTempID_%s" # 玩家身上的活动模板ID,参数:(活动编号)
|
| | | Def_PDict_SingleRechargeWorldLV = "SingleRechargeWorldLV_%s" #玩家身上的活动世界等级,参数:(活动编号)
|
| | | Def_PDict_SingleRechargeValue = "SingleRechargeValue_%s" # 单笔最高累充,参数:(活动编号)
|
| | | Def_PDict_SingleRechargeAward = "SingleRechargeAward_%s" # 领奖记录,参数:(活动编号)
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | #开服活动,Def_PDictType_OpenServerCampaign
|
| | |
| | | Def_RewardType_DailyRecharge, #永久每日累充奖励39
|
| | | Def_RewardType_RechargeGold30, #1元送30倍充值券每日奖励40
|
| | | Def_RewardType_ManyDayRecharge, #多日连充41
|
| | | )= range(42)
|
| | | Def_RewardType_InfiniteMoney, #无限货币42
|
| | | Def_RewardType_SingleRecharge, #单笔累充 43
|
| | | )= range(44)
|
| | |
|
| | |
|
| | | #boss复活相关活动定义
|
| | |
| | |
|
| | | "ActSingleRechargeAward":(
|
| | | ("DWORD", "TemplateID", 1),
|
| | | ("DWORD", "SingleRechargeValue", 0),
|
| | | ("float", "SingleRechargeValue", 0),
|
| | | ("BYTE", "AwardIndex", 0),
|
| | | ("dict", "AwardItem", 0),
|
| | | ("char", "NotifyKey", 0),
|
| | |
| | | |
| | | def __init__(self): |
| | | self.TemplateID = 0
|
| | | self.SingleRechargeValue = 0
|
| | | self.SingleRechargeValue = 0.0
|
| | | self.AwardIndex = 0
|
| | | self.AwardItem = {}
|
| | | self.NotifyKey = "" |
| | |
| | | import PlayerActRechargePrize
|
| | | import PlayerActRechargeRebateGold
|
| | | import PlayerActManyDayRecharge
|
| | | import PlayerActSingleRecharge
|
| | | import PlayerSpringSale
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | |
| | | PlayerActLogin.OnLogin(curPlayer)
|
| | | # 多日连充活动
|
| | | PlayerActManyDayRecharge.OnPlayerLogin(curPlayer)
|
| | | # 单笔累充活动
|
| | | PlayerActSingleRecharge.OnPlayerLogin(curPlayer)
|
| | | # 仙界盛典活动
|
| | | PlayerFairyCeremony.OnLogin(curPlayer)
|
| | | # 新仙界盛典活动
|
| | |
| | | # 领取多日连充领取
|
| | | elif rewardType == ChConfig.Def_RewardType_ManyDayRecharge:
|
| | | PlayerActManyDayRecharge.OnGetManyDayRechargeAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取单笔累充领取
|
| | | elif rewardType == ChConfig.Def_RewardType_SingleRecharge:
|
| | | PlayerActSingleRecharge.OnGetSingleRechargeAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取boss复活活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_BossReborn:
|
| | | PlayerBossReborn.GetBossRebornActionAward(curPlayer, dataEx)
|
| | |
| | | import NetPackCommon
|
| | | import GameWorld
|
| | | import ChConfig
|
| | | import CommFunc
|
| | |
|
| | | def GetTemplateID(cfgID, dayIndex):
|
| | | if not cfgID or dayIndex == None:
|
| | |
| | | continue
|
| | |
|
| | | singleValue = ipyData.GetSingleRechargeValue()
|
| | | if curRechargeValue < singleValue:
|
| | | if curRechargeValue < CommFunc.RMBToCoin(singleValue):
|
| | | continue
|
| | | awardRecord |= pow(2, awardIndex)
|
| | |
|
| | |
| | | GameWorld.DebugLog("找不到该单笔累充活动档位索引奖励!actNum=%s,templateID=%s,awardIndex=%s" % (actNum, templateID, awardIndex), playerID)
|
| | | return
|
| | |
|
| | | singleValue = awardIpyData.GetSingleRechargeValue()
|
| | | singleValue = CommFunc.RMBToCoin(awardIpyData.GetSingleRechargeValue())
|
| | | curRechargeValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SingleRechargeValue % actNum)
|
| | |
|
| | | if curRechargeValue < singleValue:
|
| | |
| | |
|
| | | notifyKey = awardIpyData.GetNotifyKey()
|
| | | if notifyKey:
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), singleValue])
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), awardIpyData.GetSingleRechargeValue()])
|
| | |
|
| | | for itemID, itemCount, isAuctionItem in awardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["SingleRechargeAward", False, {}])
|
| | |
| | | for awardIpyData in ipyDataList:
|
| | | awardInfo = ChPyNetSendPack.tagMCActSingleRechargeAward()
|
| | | awardInfo.AwardIndex = awardIpyData.GetAwardIndex()
|
| | | awardInfo.SingleRechargeValue = awardIpyData.GetSingleRechargeValue()
|
| | | awardInfo.SingleRechargeValue = CommFunc.RMBToCoin(awardIpyData.GetSingleRechargeValue())
|
| | | awardInfo.AwardItem = []
|
| | | awardItemList = GameWorld.GetDictValueByRangeKey(awardIpyData.GetAwardItem(), actWorldLV, [])
|
| | | for itemID, itemCount, isBind in awardItemList:
|
| | |
| | | import PlayerActTotalRecharge
|
| | | import PlayerActRechargeRebateGold
|
| | | import PlayerActManyDayRecharge
|
| | | import PlayerActSingleRecharge
|
| | | import PlayerActRechargePrize
|
| | | import CrossActCTGBillboard
|
| | | import PlayerActGrowupBuy
|
| | |
| | | PlayerGoldGift.OnPlayerChargeGold(curPlayer)
|
| | | #累积充值X元
|
| | | PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin)
|
| | | PlayerActSingleRecharge.UpdSingleRechargeValue(curPlayer, orderCoin, coinType) # 单笔累充
|
| | | PlayerFairyCeremony.AddFCCTGRMB(curPlayer, orderCoin)
|
| | | PlayerNewFairyCeremony.AddFCCostGold(curPlayer, orderCoin)
|
| | | #开服活动
|
| | |
| | | OperationActionName_FeastWish = "ActFeastWish" # 节日祝福活动
|
| | | OperationActionName_FeastTravel = "ActFeastTravel" # 节日游历活动
|
| | | OperationActionName_ManyDayRecharge = "ActManyDayRecharge" # 多日连充活动
|
| | | OperationActionName_SingleRecharge = "ActSingleRecharge" # 单笔累充活动
|
| | | #节日活动类型列表 - 该类型无视开服天,日期到了就开启
|
| | | FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
|
| | | OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
|
| | |
| | | OperationActionName_WishingWell, OperationActionName_TotalRecharge,
|
| | | OperationActionName_WeekParty, OperationActionName_LoginAward,
|
| | | OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
|
| | | OperationActionName_DailyGiftbag, |
| | | OperationActionName_DailyGiftbag, OperationActionName_SingleRecharge,
|
| | | OperationActionName_CollectWords, OperationActionName_ManyDayRecharge,
|
| | | ] + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | |
| | | OperationActionName_CollectWords,
|
| | | OperationActionName_FeastLogin,
|
| | | OperationActionName_FeastWish, OperationActionName_FeastTravel,
|
| | | OperationActionName_ManyDayRecharge,
|
| | | OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
|
| | | ]
|
| | |
|
| | | #支持多活动分组编号的活动名
|
| | | MultiActNumOperationActNameList = [OperationActionName_TotalRecharge, OperationActionName_CollectWords,
|
| | | OperationActionName_FlashGiftbag, OperationActionName_CostRebate,
|
| | | OperationActionName_SpringSale, OperationActionName_FlashSale,
|
| | | OperationActionName_ManyDayRecharge,
|
| | | OperationActionName_ManyDayRecharge, OperationActionName_SingleRecharge,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|