From 5dfc9bf567fdf69a0ee8899c4966ce64b4cfe5ad Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 12 三月 2026 12:07:54 +0800
Subject: [PATCH] 547 【红颜系统】新增红颜-服务端(新增激活方式8-定军阁层;新增红颜特殊效果5-遣散/吞噬额外返还;统一A801、0320物品获得标记;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldAction.py | 35 +++++++++++++++++++----------------
1 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldAction.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldAction.py
index a972399..c0ce69b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldAction.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldAction.py
@@ -19,6 +19,7 @@
import DBDataMgr
import ShareDefine
import PlayerActLunhuidian
+import PlayerActHeroAppear
import IpyGameDataPY
import PlayerControl
import PyGameData
@@ -484,21 +485,14 @@
# 排除的服务器组ID列表
if serverIDListExcept:
- isExcept = False
- for serverIDInfo in serverIDListExcept:
- if GameWorld.CheckServerIDInList(serverID, serverIDInfo):
- isExcept = True
- break
- if isExcept:
+ if GameWorld.CheckServerIDInList(serverID, serverIDListExcept):
continue
if not serverIDList:
curServerActIpyDataList.append(ipyData)
else:
- for serverIDInfo in serverIDList:
- if GameWorld.CheckServerIDInList(serverID, serverIDInfo):
- curServerActIpyDataList.append(ipyData)
- break
+ if GameWorld.CheckServerIDInList(serverID, serverIDList):
+ curServerActIpyDataList.append(ipyData)
return curServerActIpyDataList
@@ -708,11 +702,16 @@
dbOperationActIDKey = ShareDefine.Def_OperationActID % (actName, actNum)
dbActID = dbEventMgr.GetValue(dbOperationActIDKey)
+ dbOperationActCfgIDKey = ShareDefine.Def_OperationActCfgID % (actName, actNum)
+ dbActCfgID = dbEventMgr.GetValue(dbOperationActCfgIDKey)
+
curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID, 0)
+ curCfgID = sendMapServerMsgDict.get(ShareDefine.ActKey_CfgID, 0)
#dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
if dbActID != curActID:
- GameWorld.Log(" dbActID变更: dbActID=%s,curActID=%s" % (dbActID, curActID))
+ GameWorld.Log(" dbActID变更: dbActID=%s,curActID=%s,dbActCfgID=%s,curCfgID=%s" % (dbActID, curActID, dbActCfgID, curCfgID))
dbEventMgr.SetValue(dbOperationActIDKey, curActID)
+ dbEventMgr.SetValue(dbOperationActCfgIDKey, curCfgID)
# 结束旧的
if dbActID:
@@ -729,15 +728,17 @@
#else:
# if actName == ShareDefine.OperationActionName_GarbageSorting:
# PlayerActGarbageSorting.OnActEnd(actNum)
-
+
+ if actName == ShareDefine.OperationActionName_HeroAppear:
+ PlayerActHeroAppear.OnActIDChange(actNum, ipyData, state, dbActCfgID)
+
else:
- GameWorld.Log(" dbActID不变: dbActID=%s,curActID=%s" % (dbActID, curActID))
+ GameWorld.Log(" dbActID不变: dbActID=%s,curActID=%s,dbActCfgID=%s" % (dbActID, curActID, dbActCfgID))
# 活动中刷新,每次都需要刷新的逻辑,包含重读配置等
if state:
- pass
- #if actName == ShareDefine.OperationActionName_Gubao:
- # PlayerActGubao.OnActInStateRefresh(actNum, ipyData)
+ if actName == ShareDefine.OperationActionName_HeroAppear:
+ PlayerActHeroAppear.OnActInStateRefresh(actNum, ipyData)
# 仅活动有配置参与时间段的会触发
if curActID and dbActID == curActID and preStateJoin != stateJoin:
@@ -776,6 +777,8 @@
GameWorld.Log("OperationActionRefresh: %s,actNum=%s,%s" % (actName, actNum, actInfo))
if actName == ShareDefine.OperationActionName_Lunhuidian:
PlayerActLunhuidian.RefreshActLunhuidianActionInfo(actNum)
+ elif actName == ShareDefine.OperationActionName_HeroAppear:
+ PlayerActHeroAppear.RefreshActHeroAppearActionInfo(actNum)
return
--
Gitblit v1.8.0