8710 【开发】【主干】【BT2】根据世界等级配置奖励(每日礼包奖励支持按世界等级配置);
| | |
| | | if not isReload and preState == state:
|
| | | #已经是这个状态了
|
| | | continue
|
| | | GameWorld.Log("运营活动变更: actName=%s,preState=%s,state=%s,dictName=%s" % (actName, preState, state, dictName))
|
| | | #更新字典值
|
| | | gameWorld.SetDict(dictName, state)
|
| | | sendMapServerMsgDict = mapServerInfoDict.get(actName, {})
|
| | |
| | | curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
|
| | | dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | if curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
|
| | | GameWorld.Log(" dbActID变更,dbActID=%s,curActID=%s" % (PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey), curActID))
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | #记录开启时世界等级
|
| | | worldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName, worldLV)
|
| | | GameWorld.Log(" 记录活动开启时世界等级: worldLV=%s" % (worldLV))
|
| | |
|
| | | #此处为活动开启时
|
| | | if actName == ShareDefine.OperationActionName_BossReborn:
|
| | |
| | | #限时抢购重置购买次数 本次活动每场不能重复
|
| | | #dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | PlayerStore.ResetFlashSaleBuyCnt(ipyData)
|
| | | else:
|
| | | GameWorld.Log(" dbActID不变或无活动: dbActID=%s,curActID=%s" % (PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey), curActID))
|
| | |
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
|
| | | sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV
|
| | | GameWorld.Log(" 活动开始时世界等级: actWorldLV=%s" % (actWorldLV))
|
| | |
|
| | | if actName == ShareDefine.OperationActionName_ExpRate:
|
| | | if isReload and ipyData:
|
| | |
| | | sendMapServerMsgDict[ShareDefine.ActKey_State] = state
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_OperationActionInfo % actName, sendMapServerMsgDict)
|
| | |
|
| | | GameWorld.Log("运营活动变更: actName=%s,preState=%s,state=%s,dictName=%s, %s" % (actName, preState, state, dictName, sendMapServerMsgDict))
|
| | | GameWorld.Log(" sendMapServerMsgDict: %s" % (sendMapServerMsgDict))
|
| | | return
|
| | |
|
| | | def Sync_OperationAction_ExpRate(ipyData, curPlayer=None):
|
| | |
| | | OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
|
| | | OperationActionName_BossReborn, OperationActionName_TotalRecharge, OperationActionName_TotalRecharge2,
|
| | | OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
|
| | | OperationActionName_SpringSale, OperationActionName_LuckyTreasure]
|
| | | OperationActionName_SpringSale, OperationActionName_LuckyTreasure,
|
| | | OperationActionName_DailyGiftbag,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|
| | | CrossActName_CTGBillboard = "CrossActCTGBillboard" # 充值排行榜
|
| | |
| | | DataRecordPack.DR_CTGError(curPlayer, "DailyGiftbag giftbagType=%s giftbagID=%s can not found!"
|
| | | % (giftbagType, giftbagID), addDRDict)
|
| | | return
|
| | | |
| | | giftItemList = __GetJobItemList(giftbagIpyData.GetGiftItemList(), curPlayer.GetJob())
|
| | | actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | giftItemList = __GetJobItemList(giftbagIpyData.GetGiftItemList(), curPlayer.GetJob(), actWorldLV)
|
| | | addDRDict.update({"giftbagType":giftbagType, "giftbagID":giftbagID, "giftItemList":giftItemList})
|
| | | buyCountLimit = giftbagIpyData.GetBuyCountLimit()
|
| | | buyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyGiftbagBuyCount % giftbagID)
|
| | |
| | | OnPlayerOrderDailyGiftbag(curPlayer, giftbagID, addDRDict, False)
|
| | | return
|
| | |
|
| | | def __GetJobItemList(itemList, job):
|
| | | def __GetJobItemList(giftItemInfo, job, worldLV):
|
| | | jobItemList = []
|
| | | if isinstance(giftItemInfo, dict):
|
| | | itemList = GameWorld.GetDictValueByRangeKey(giftItemInfo, worldLV, [])
|
| | | else:
|
| | | itemList = giftItemInfo
|
| | | for itemID, itemCnt, isBind in itemList:
|
| | | if type(itemID) == int:
|
| | | jobItemList.append([itemID, itemCnt, isBind])
|
| | |
| | | if not giftbagIpyDataList:
|
| | | return
|
| | |
|
| | | actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | # 取玩家APPID,混服使用
|
| | | appID = GameWorld.GetPlayerPlatform(curPlayer)
|
| | |
|
| | |
| | | giftBag.BuyCountLimit = giftIpyData.GetBuyCountLimit()
|
| | | giftBag.RMB = 0 if not orderIpyData else CommFunc.RMBToCoin(orderIpyData.GetPayRMBNum())
|
| | | giftBag.ItemInfo = []
|
| | | for itemID, itemCount, isBind in __GetJobItemList(giftIpyData.GetGiftItemList(), curPlayer.GetJob()):
|
| | | for itemID, itemCount, isBind in __GetJobItemList(giftIpyData.GetGiftItemList(), curPlayer.GetJob(), actWorldLV):
|
| | | item = ChPyNetSendPack.tagMCDailyGiftbagItem()
|
| | | item.ItemID = itemID
|
| | | item.ItemCount = itemCount
|
| | |
| | | OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
|
| | | OperationActionName_BossReborn, OperationActionName_TotalRecharge, OperationActionName_TotalRecharge2,
|
| | | OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
|
| | | OperationActionName_SpringSale, OperationActionName_LuckyTreasure]
|
| | | OperationActionName_SpringSale, OperationActionName_LuckyTreasure,
|
| | | OperationActionName_DailyGiftbag,
|
| | | ]
|
| | |
|
| | | #跨服运营活动表名定义
|
| | | CrossActName_CTGBillboard = "CrossActCTGBillboard" # 充值排行榜
|