From 950be2d9a3e3f87f1bb247f6b904de9669ba9126 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 31 八月 2021 18:51:45 +0800
Subject: [PATCH] 8921 【主干】【gt_1.101.1】【BT3】【bt3_1.100.1】【后端】H.活动-节日活动-垃圾分类(优化仙匣秘境初始化首层失败后的处理,重登后可尝试重新初始化)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
index d7e74b2..a10a9f0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
+++ b/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 []
--
Gitblit v1.8.0