8921 【主干】【gt_1.101.1】【BT3】【bt3_1.100.1】【后端】H.活动-节日活动-垃圾分类(优化仙匣秘境初始化首层失败后的处理,重登后可尝试重新初始化)
1个文件已修改
16 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
@@ -62,6 +62,13 @@
    # 活动ID 相同的话不处理
    if actID == playerActID:
        GameWorld.DebugLog("仙匣秘境活动ID不变,不处理!actNum=%s,actID=%s" % (actNum, actID), playerID)
        layerInfoValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum)
        layerNum = layerInfoValue % 100
        if state and layerNum <= 0:
            GameWorld.Log("仙匣秘境活动中但首层奖池未刷新初始化,尝试刷新!actNum=%s,actID=%s" % (actNum, actID), playerID)
            __InitFirstLayerData(curPlayer, actNum, actInfo)
        return
    
    actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
@@ -73,6 +80,15 @@
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJWorldLV % actNum, actWorldLV)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJAwardLayerInfo % actNum, 0)
    
    __InitFirstLayerData(curPlayer, actNum, actInfo)
    return True
def __InitFirstLayerData(curPlayer, actNum, actInfo):
    ## 初始化首层数据
    state = actInfo.get(ShareDefine.ActKey_State, 0)
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
    ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID) if cfgID else None
    templateID = ipyData.GetTemplateID() if ipyData else 0
    awardIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActXianXiaMJAward", templateID) if templateID else []