xdh
2019-01-28 c060aabfb4621e897f7b69d6e537fc3ccf59d860
2969 【BUG】【1.5.200】限时抢购,重新开服全服抢购次数会重置​
2个文件已修改
18 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -463,7 +463,10 @@
            elif actName == ShareDefine.OperationActionName_NewFairyCeremony:
                #重置仙界盛典
                PlayerNewFairyCeremony.ResetNewFairyCeremony()
            elif actName == ShareDefine.OperationActionName_FlashSale:
                #限时抢购重置购买次数 本次活动每场不能重复
                #dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
                PlayerStore.ResetFlashSaleBuyCnt(ipyData)
                
        if actName in ShareDefine.NeedWorldLVOperationActNameList:
            actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
@@ -494,10 +497,7 @@
        elif actName == ShareDefine.OperationActionName_RealmPoint:
            if isReload and ipyData:
                Sync_OperationAction_RealmPoint(ipyData)
        elif actName == ShareDefine.OperationActionName_FlashSale:
            if ipyData and preState != state:
                dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
                PlayerStore.ResetFlashSaleBuyCnt(ipyData, dayIndex, state)
                
        #通知Mapserver,设置字典
        #GameWorld.SendMapServerMsgEx(dictName, state) # 运营活动不单独通知活动状态,需与活动信息整合后一起通知
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py
@@ -95,16 +95,14 @@
    return
def ResetFlashSaleBuyCnt(ipyData, dayIndex, state):
def ResetFlashSaleBuyCnt(ipyData):
    #重置限时抢购商店全服购买次数
    if state == 0:
        return
    dayShopRangeDict = ipyData.GetShopTypeList()
    
    resetTypeList = []
    for shopTypeList in dayShopRangeDict.values():
        dayShopList = shopTypeList[dayIndex] if dayIndex < len(shopTypeList) else shopTypeList[-1]
        shopType = dayShopList[state-1] if state-1 < len(dayShopList) else dayShopList[-1]
        for dayShopList in shopTypeList:
            for shopType in dayShopList:
        if shopType not in resetTypeList:
            resetTypeList.append(shopType)
    if resetTypeList: