From cd79d7a1f17d831aaefddc68b43479dacb1ab448 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 10 五月 2021 16:34:55 +0800
Subject: [PATCH] 5069 【BT2】【bt2_1.100.1】【主干】任务道具取消写死不可出售

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py |   62 +++++++++++++++++--------------
 1 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 811d666..df31452 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -25,7 +25,6 @@
 # @change: "2014-02-27 12:00" hxp 增加世界boss逻辑
 # @change: "2014-04-26 19:30" hxp 增加领地战活动
 # @change: "2014-06-21 15:20" hxp 增加特惠活动
-# @change: "2014-08-04 17:30" xmnathan 天梯每日更新
 # @change: "2014-08-15 17:00" xmnathan 修改OnDay函数内的执行顺序
 # @change: "2014-10-08 10:30" xmnathan add 定时清理过期补偿
 # @change: "2014-10-29 22:00" hxp MapServerInitOK增加扩展key状态通知
@@ -83,9 +82,7 @@
 import GameWorldAverageLv
 import PlayerDBOper
 import PlayerGeTui
-#import PlayerManorWar
 import GameWorldBoss
-#import HighLadder
 import PlayerCompensation
 import ReadChConfig
 import EventReport
@@ -93,15 +90,19 @@
 import CrossRealmPK
 import CrossRealmMsg
 import CrossRealmPlayer
+import CrossActionControl
 import PlayerFBHelpBattle
 import PlayerFamilyRedPacket
+import PlayerFairyDomain
 import IpyGameDataPY
 import PlayerFamilyParty
 import GameWorldFamilyWar
+import GameWorldArena
 import AuctionHouse
 import PlayerXMZZ
 import PlayerTeam
 import PyGameData
+import CrossBoss
 import ChPlayer
 #---------------------------------------------------------------------
 
@@ -118,8 +119,6 @@
     GameWorld.Log("GameServer -> OnHour!")
     PlayerEventCounter.DoLogic_GameServer_OnHour(tick)
     GameWorld.GetGameWorld().OnHour(curTimeStr)
-    #每小时更新天梯
-    #HighLadder.OnHour()
     #设置存取数据库Key
     __SetWorldKey_SavePlayer(curTimeStr)
     #每小时清空宝物掉落
@@ -128,6 +127,7 @@
     GameLogInfo.Set_Server_Hour()
     
     PlayerFamily.FamilyOnHour()
+    ChPlayer.CheckOnedayJobPlayerLoginoffTimeout()
     return
 
 ## 触发每日事件(参数 -> 当前时间)
@@ -137,8 +137,6 @@
 #  @remarks 函数详细说明.
 def OnDay(curTimeStr, tick):
     GameWorld.Log("GameServer -> OnDay!")
-    #天梯竞技场,放在排行榜更新之前处理
-    #HighLadder.OnDay()
     #排行榜拷贝昨日榜单
     PlayerBillboard.CopyBillboardOnDay()
     #开服活动,放在排行榜拷贝昨日榜更新后处理
@@ -168,7 +166,7 @@
     #GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ServerDay, openServerDay)
     #清理过期补偿
     PlayerCompensation.ClearUpTimeOutCompensation()
-    PlayerGeTui.ClearFMTGeTuiLimit()
+    #PlayerGeTui.ClearFMTGeTuiLimit()
     import PlayerBourse
     PlayerBourse.OverTimeItemsDeal()
     # 仙盟联赛
@@ -183,6 +181,8 @@
     
     #仙魔之争
     PlayerXMZZ.XMZZOndayEx()
+    #boss复活
+    GameWorldBoss.BossRebornOnDayEx()
     return
 
 ## 触发每周事件(参数 -> 当前时间)
@@ -298,8 +298,8 @@
     CrossRealmPK.OnPKMatchProcess(tick)
     
     GameWorldBoss.DoCheckWorldBossReborn(tick)
-    GameWorldBoss.ProcessBossGeTui(tick)
-    PlayerGeTui.ProcessNewGuyCallBackGeTui(tick)
+    #GameWorldBoss.ProcessBossGeTui(tick)
+    #PlayerGeTui.ProcessNewGuyCallBackGeTui(tick)
     #组队副本版本
     PlayerTeam.DoTeamProcess(tick)
     
@@ -307,7 +307,7 @@
     PlayerDBOper.PyDBProccess(tick)
     
     #拍卖行
-    AuctionHouse.OnAuctionItemTimeProcess(curTime)
+    AuctionHouse.OnAuctionItemTimeProcess(curTime, tick)
     
     #每整分钟处理一次
     curDateTime = datetime.datetime.today()
@@ -358,13 +358,15 @@
     GameWorldAverageLv.OpenWorldAverageLv()
     #倒计时离队处理
     PlayerTeam.DoCountdownLeaveTeamLogic(tick)
-    #副本助战
-    PlayerFBHelpBattle.OnMinuteProcess()
     #红包
     PlayerFamilyRedPacket.OnRedPacketMinuteProcess()
+    #拍卖行
+    AuctionHouse.OnAuctionItemMinuteProcess(tick)
     #每5分钟触发一次仙盟总战力更新
     if curMinute % 5 == 0:
         PlayerFamily.UpdFamilyTotalFightPower()
+        PlayerFamilyRedPacket.CheckDelRedpacketData()
+        
     return
 
 #---------------------------------------------------------------------
@@ -1205,6 +1207,8 @@
     GameWorld.GetGameWorld().SetDict(ChConfig.Def_WorldKey_IsGameWorldInit, int(time.time()))
     #初始化游戏时钟
     GameWorld.GetGameWorld().SetTickTypeCount(ChConfig.TYPE_Tick_Count)
+    #转移运营活动旧db记录key value 到 新记录
+    GameWorldActionControl.TransferOperationActDBKeyValue()
     #初始话开服时间、星期几
     initOpenServerTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_InitOpenServerTime)
     openServerWeekday = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OpenServerWeekday)
@@ -1237,8 +1241,12 @@
     ChPlayer.LoadPlayerLVData()
     #加载助战信息
     PlayerFBHelpBattle.OnServerStart()
+    #本服竞技场
+    GameWorldArena.OnServerStart()
     #跨服PK
     CrossRealmPK.OnGameServerInitOK()
+    #红包
+    PlayerFamilyRedPacket.OnServerStart()
     #世界boss被杀次数重置
     #GameWorldBoss.CheckResetBossKilledCntOnServerInit()
     
@@ -1256,6 +1264,7 @@
         GameWorld.Log("服务器启动成功: ServerGroupID=%s" % serverGroupID)
     GameWorld.GetGameWorld().SetDict(ChConfig.Def_WorldKey_GameWorldInitOK, 1)
     
+    AuctionHouse.OnGameServerInitOK()
     # 注意:跨服相关信息的调用需放在最后,不然可能导致服务器未启动功能或者功能未加载成功导致跨服服务器与子服之间的数据同步可能出现异常的情况
     CrossRealmMsg.OnGameServerInitOK()
     return
@@ -1314,7 +1323,8 @@
         universalRecMgr.Delete(recType)
         if recordCount:
             GameWorld.Log("DeleteRecData recType=%s, count=%s" % (recType, recordCount))
-            
+    CrossBoss.g_bossRecDataDict = {} # 需要清除,不然会导致跨服boss通用记录缓存对象错误
+    
     #清 家族
     familyList = []
     familyMgr = GameWorld.GetFamilyManager()
@@ -1405,8 +1415,6 @@
     
     # 仙盟联赛
     GameWorldFamilyWar.OnMapServerInitOK()
-    # 领地争夺战
-    #PlayerManorWar.OnMapServerInitOK()
     
     # 跨服服务器状态
     isCrossServerOpen = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
@@ -1415,13 +1423,16 @@
     
     # 跨服PK
     CrossRealmPK.OnMapServerInitOK()
+    # 本服竞技场
+    GameWorldArena.SendMapServerArenaInfo()
     
     SendAllMapGlobalDropInfo() # 全局掉落控制
     
     SendMapCommMapLinePlayerCount(True) # 同步一次普通地图线路人数信息
     #随机假仙盟
     PlayerFamily.RandomFakeFamily()
-    
+    #缥缈仙域
+    PlayerFairyDomain.OnMapServerInitOK()
     # 记录服务器是否正常开启完毕
     getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl") + "?Type=MapInit&MapCount=%s"%GameWorld.GetGameWorld().GetGameMapManager().GetCount()
     GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
@@ -1837,20 +1848,12 @@
     if mapServerPack.GetState() not in [0,1,2,3] and curMap.GetState() != mapServerPack.GetState():
         # 记录服务器是否正常开启完毕, 避免重复发送
         GameWorld.DebugLog("MapServer_RunningStateRefresh--_%s"%([mapServerPack.GetState(), curMap.GetState(), mapServerPack.GetMapID(), curMap.GetID()]))
-        SendGameError("MapError")
+        GameWorld.SendGameError("MapError")
         
     curMap.SetState(mapServerPack.GetState())
     curMap.SetRefreshTick(tick)
     
     return
-
-
-def SendGameError(state):
-    getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl")
-    groupID = ReadChConfig.GetPyMongoConfig("platform", "GroupID")
-    userDBName = ReadChConfig.GetPyMongoConfig("connect", "USER_DB_NAME")
-    getUrl = getUrl + "?Type=%s&groupID=%s&userDBName=%s"%(state, groupID, userDBName)
-    GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
     
 ## 刷新地图服务器状态, 如果1分钟没有状态回报, 刷新为消失状态
 #  @param tick 当前时间
@@ -1878,7 +1881,7 @@
         curMap.SetState(IPY_GameServer.mssNone)
         if not isSendMapClose:
             # 避免多地图发送过多邮件, 如关服的时候
-            SendGameError("MapDisconnect")   # 状态报告
+            GameWorld.SendGameError("MapDisconnect")   # 状态报告
             isSendMapClose = True
 
     return
@@ -1928,6 +1931,9 @@
     PlayerTeam.OnServerClose(tick)
     ChPlayer.SavePlayerLVData()
     PlayerFBHelpBattle.OnServerClose()
+    CrossActionControl.OnServerClose()
+    PlayerFamilyRedPacket.OnServerClose()
+    GameWorldArena.OnServerClose()
     GameWorld.Log("通知C++关服!")
     GameWorld.GetGameWorld().OnServerClose()
     
@@ -1935,6 +1941,6 @@
 def ChangeGameServerState(state):
     # 只接收大于等于mssPyError
     GameWorld.DebugLog("ChangeGameServerState:%s"%state)
-    SendGameError("GameServerError")
+    GameWorld.SendGameError("GameServerError")
     
     
\ No newline at end of file

--
Gitblit v1.8.0