xdh
2019-01-28 3abbce4e81bf7f359c1db9380a9569aaa0c3da76
5956 【后端】【1.5.200】限时抢购支持对应不同的世界等级
8个文件已修改
52 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -446,7 +446,7 @@
        
        dbOperationActIDKey = PlayerDBGSEvent.Def_OperationActID % actName
        curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
        if state >= 1 and curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
        if curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
            PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
            if actName in ShareDefine.NeedWorldLVOperationActNameList:
                #记录开启时世界等级
@@ -465,7 +465,7 @@
                PlayerNewFairyCeremony.ResetNewFairyCeremony()
            
                
        if state >= 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
        if actName in ShareDefine.NeedWorldLVOperationActNameList:
            actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
            sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV
        
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py
@@ -99,10 +99,16 @@
    #重置限时抢购商店全服购买次数
    if state == 0:
        return
    shopTypeList = ipyData.GetShopTypeList()
    dayShopList = shopTypeList[dayIndex] if dayIndex < len(shopTypeList) else shopTypeList[-1]
    shopType = dayShopList[state-1] if state-1 < len(dayShopList) else dayShopList[-1]
    DoResetStoreServerBuyCnt([shopType])
    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]
        if shopType not in resetTypeList:
            resetTypeList.append(shopType)
    if resetTypeList:
        DoResetStoreServerBuyCnt(resetTypeList)
    return
def SyncStoreServerBuyInfo(curPlayer, syncCntDict={}):
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -245,7 +245,8 @@
                           OperationActionName_NewFairyCeremony, ] \
                           + FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, OperationActionName_NewFairyCeremony]
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
                                   OperationActionName_NewFairyCeremony, OperationActionName_FlashSale]
#活动信息字典key定义
ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3646,7 +3646,9 @@
Def_Player_Dict_TrialTower_PassLV = "TrialTower_PassLV"  # 试炼之塔通关层数
Def_Player_Dict_TrialTower_LastDayPassLV = "Tower_LastDayPassLV"  # 试炼之塔昨日通关层数
#诛仙塔
Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV"  # 诛仙塔通关层数
Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV"  # 诛仙塔已通关层数
Def_Player_Dict_ZhuXianTowerLastFloor = "ZhuXianTowerLastFloor"  # 诛仙塔上次挑战层数
#古神禁地
Def_Player_Dict_GodArea_Anger = "GodArea_Anger"  # 古神禁地怒气值
Def_Player_Dict_GodArea_LastAddAngerTime = "GodArea_LastAddAngerTime"  # 古神禁地上一次增加怒气值的时间
@@ -5213,8 +5215,8 @@
Def_RewardType_ActLoginAwardAct, # 领取登录奖励活动奖励22
Def_RewardType_NewFairyCRecharge, # 新仙界盛典充值大礼23
Def_RewardType_NewFairyCParty, # 新仙界盛典全民来嗨24
Def_RewardType_FeastWeekPartyAct, # 领取周狂欢活动奖励25
Def_RewardType_FeastWeekPartyPoint, # 领取周狂欢积分奖励26
Def_RewardType_FeastWeekPartyAct, # 领取节日巡礼活动奖励25
Def_RewardType_FeastWeekPartyPoint, # 领取节日巡礼积分奖励26
)= range(27)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -422,7 +422,7 @@
        if not state:
            GameWorld.DebugLog("限时抢购非活动中!state=%s" % (state), curPlayer.GetPlayerID())
            return
        shopTypeList = PlayerFlashSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state)
        shopTypeList = PlayerFlashSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state, actInfo.get(ShareDefine.ActKey_WorldLV, 0))
        if not shopTypeList:
            return
        actShopType = shopTypeList[0]
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -5358,7 +5358,7 @@
        PlayerNewFairyCeremony.GetFCPartyAward(curPlayer, dataEx)
    # 领取节日巡礼活动奖励
    elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyAct:
        PlayerWeekParty.GetWeekPartyActionAward(curPlayer, dataEx, dataExStr)
        PlayerFeastWeekParty.GetFeastWeekPartyActionAward(curPlayer, dataEx, dataExStr)
    # 领取节日巡礼积分奖励
    elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyPoint:
        PlayerFeastWeekParty.GetFeastWeekPartyPointAward(curPlayer, dataEx, dataExStr)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py
@@ -28,13 +28,15 @@
import datetime
def GetShopTypeList(cfgID, dayIndex, state):
def GetShopTypeList(cfgID, dayIndex, state, woldLV):
    if cfgID == 0 or state == 0:
        return []
    ipyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
    if not ipyData:
        return []
    shopTypeList = ipyData.GetShopTypeList()
    shopTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetShopTypeList(), woldLV, [])
    if not shopTypeList:
        return []
    todayShopTypeList = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
    return [todayShopTypeList[state - 1] if state - 1 < len(todayShopTypeList) else todayShopTypeList[-1]]
@@ -65,6 +67,7 @@
    state = actInfo.get(ShareDefine.ActKey_State, 0)
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
    dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
    woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
    playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleID, 0, ChConfig.Def_PDictType_FlashSale)  # 玩家身上的活动ID
    playerActState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleState, 0, ChConfig.Def_PDictType_FlashSale)  # 玩家身上的活动State
    playerMailState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleMailState, 0, ChConfig.Def_PDictType_FlashSale)  # 玩家身上的活动提醒邮件状态
@@ -82,7 +85,7 @@
            GameWorld.DebugLog('    限时抢购活动重置!')
            curPlayer.ClearNomalDict(ChConfig.Def_PDictType_FlashSale)
        
        shopTypeList = GetShopTypeList(cfgID, dayIndex, state)
        shopTypeList = GetShopTypeList(cfgID, dayIndex, state, woldLV)
        if shopTypeList:
            FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleID, actID, ChConfig.Def_PDictType_FlashSale)
@@ -156,7 +159,8 @@
    flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
    if not flashSaleIpyData:
        return
    shopTypeList = flashSaleIpyData.GetShopTypeList()
    woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
    shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
    startTimeList = flashSaleIpyData.GetStartTimeList()
    endTimeList = flashSaleIpyData.GetEndTimeList()
    if len(startTimeList) != len(endTimeList):
@@ -247,11 +251,13 @@
    flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
    if not flashSaleIpyData:
        return
    woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
    packInfo = ChPyNetSendPack.tagMCFlashSaleAppointmentInfo()
    packInfo.GoodsList = []
    if goodsID == 0:
        packInfo.IsAll = 1
        shopTypeList = flashSaleIpyData.GetShopTypeList()
        shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
        for dayIndex, shopList in enumerate(shopTypeList):
            for timeIndex, shopType in enumerate(shopList):
                shopItemIpyDataList = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ShopType":shopType}, True, True)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -245,7 +245,8 @@
                           OperationActionName_NewFairyCeremony, ] \
                           + FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, OperationActionName_NewFairyCeremony]
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
                                   OperationActionName_NewFairyCeremony, OperationActionName_FlashSale]
#活动信息字典key定义
ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值