From 88a9eda1278acaa0b0f66b35e2319d59a3e38eca Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 29 八月 2025 16:03:35 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(修复主线战斗中重登时会自动重新开始战斗bug;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py |  166 ++++++-------------------------------------------------
 1 files changed, 18 insertions(+), 148 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 11ada8d..3e6b376 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -33,8 +33,6 @@
 import PetControl
 import OperControlManager
 import ShareDefine
-import PlayerAutoCheckOnline
-import PlayerGameWallow
 import NetPackCommon
 import ChPyNetSendPack
 import DataRecordPack
@@ -130,7 +128,6 @@
 import PlayerLove
 import GameObj
 import PlayerChangeJob
-import PlayerGuaji
 import PlayerFace
 import PlayerChatBox
 import PlayerXiangong
@@ -461,7 +458,7 @@
     InitPlayerPack(curPlayer)
     
     if GameWorld.IsCrossServer():
-        SkillCommon.PlayerLoginMergeServerSkillLogic(curPlayer, tick)
+        #SkillCommon.PlayerLoginMergeServerSkillLogic(curPlayer, tick)
         # 重置所有技能CD
         
         DoPlayerLoginInMap(curPlayer, tick)
@@ -469,7 +466,7 @@
         DataRecordPack.DR_PlayerLogin(curPlayer)
         EventReport.WriteEvent_login(curPlayer)
         #---玩家上线, 宠物逻辑处理---
-        PetControl.DoLogic_PetInfo_OnLogin(curPlayer, tick)
+        #PetControl.DoLogic_PetInfo_OnLogin(curPlayer, tick)
         return
     
     leaveServerSecond = PlayerControl.GetPlayerLeaveServerSecond(curPlayer)
@@ -494,18 +491,18 @@
     PlayerControl.UpdPlayerServerGroupID(curPlayer)
     
     #上线学习技能
-    SkillCommon.PlayerLoginCheckLearnSkill(curPlayer)
+    #SkillCommon.PlayerLoginCheckLearnSkill(curPlayer)
     
     #刷新技能CD
-    SkillCommon.PlayerLoginUpdateSkillCD(curPlayer, tick)
+    #SkillCommon.PlayerLoginUpdateSkillCD(curPlayer, tick)
     
     #通知玩家技能信息
-    __Sync_ClientSkill(curPlayer)
+    #__Sync_ClientSkill(curPlayer)
     #清除VIPbuff
     #BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_VIPExp_SkillTypeID, tick)
     
     #通知玩家的buff
-    __Sync_ClientBuff(curPlayer)
+    #__Sync_ClientBuff(curPlayer)
     
     #---刷新了玩家属性, 登陆只刷新一次,其他地方不用刷
     DoPlayerLoginInMap(curPlayer, tick)
@@ -522,9 +519,6 @@
     __DoMixServerFirstLogin(curPlayer)
     PlayerBillboard.BillboardOnLogin(curPlayer)
     
-    #上线时通知脱机挂时被击杀的离线时间
-    __Sync_PlayerOffline(curPlayer, tick)
-    
     #玩家扩展信息
     __SyncPlayerInfoEx(curPlayer)
     
@@ -532,16 +526,11 @@
     GiveDownloadPatchAward(curPlayer)
     
     #PK模式
-    SyncPKModel(curPlayer)
+    #SyncPKModel(curPlayer)
     
     #---玩家上线, 宠物逻辑处理---
-    PetControl.DoLogic_PetInfo_OnLogin(curPlayer, tick)
-    PlayerPet.OnPlayerPetLogin(curPlayer)
-    
-    #PlayerLoginNotify(curPlayer, tick)
-    
-    #防沉迷计算下线累积时间
-    PlayerGameWallow.Calc_Wallow_OfflineTime(curPlayer, tick)
+    #PetControl.DoLogic_PetInfo_OnLogin(curPlayer, tick)
+    #PlayerPet.OnPlayerPetLogin(curPlayer)
     
     # 通知等级奖励领取记录
     PlayerLVAward.Sync_LVAwardGetRecordInfo(curPlayer)
@@ -550,17 +539,17 @@
     # 首充/天天首充/充值豪礼
     PlayerGoldGift.OnLogin(curPlayer)
     
-#    #通知功能首次触发情况
+    #通知功能首次触发情况
     GameFuncComm.Sync_FuncOpenState(curPlayer)
-#    
-#    #通知客户端签到信息
+    
+    #通知客户端签到信息
     PlayerSignDay.SignDayOnLogin(curPlayer)
     
     #通知玩家死亡时间
-    PlayerControl.PlayerControl(curPlayer).NotifyPlayerDeadTime(curPlayer)
+    #PlayerControl.PlayerControl(curPlayer).NotifyPlayerDeadTime(curPlayer)
     
     #角色改名次数
-    UpdatePlayerName.Sync_UpdatePlayerNameCount(curPlayer)
+    #UpdatePlayerName.Sync_UpdatePlayerNameCount(curPlayer)
     
     # 坐骑相关通知
     PlayerHorse.PlayerHorseLogin(curPlayer)
@@ -580,7 +569,7 @@
     OpenServerCampaign.OnOpenServerCampaignLogin(curPlayer)
     
     # 采集NPC次数通知
-    NPCCommon.SyncCollNPCTime(curPlayer)
+    #NPCCommon.SyncCollNPCTime(curPlayer)
     
     # 每日活跃度
     PlayerActivity.OnLogin(curPlayer)
@@ -628,7 +617,7 @@
     PlayerControl.NotifyPlayerAllCurrency(curPlayer)
     PlayerControl.NotifyUseMoneyTotal(curPlayer)
     #通知基础属性
-    NotifyPlayerBasePoint(curPlayer)
+    #NotifyPlayerBasePoint(curPlayer)
     
     #跨服充值排行
     CrossActCTGBillboard.OnPlayerLogin(curPlayer)
@@ -670,9 +659,7 @@
     #PassiveBuffEffMng.OnLoginGFPassive(curPlayer)
     PlayerOnlinePrize.OnPlayerLogin(curPlayer)
     #装备分解
-    PlayerEquipDecompose.PlayerLogin(curPlayer)
-    #防沉迷
-    PlayerGameWallow.DoLogic_CheckWallow(curPlayer, tick)
+    #PlayerEquipDecompose.PlayerLogin(curPlayer)
     # 极品白拿
     PlayerFreeGoods.OnLogin(curPlayer)
     # BOSS复活活动
@@ -735,7 +722,7 @@
     SyncLittleHelper(curPlayer)
     PlayerFB.OnLogin(curPlayer)
     #技能专精信息
-    SkillShell.NotifyElementSkillInfo(curPlayer)
+    #SkillShell.NotifyElementSkillInfo(curPlayer)
     #Boss首杀
     GY_Query_BossFirstKill.OnPlayerLogin(curPlayer)
     #通天令
@@ -801,7 +788,6 @@
         PlayerTask.OnPlayerLogin(curPlayer)
         PlayerTree.OnPlayerLogin(curPlayer)
         PlayerMineArea.OnPlayerLogin(curPlayer)
-        PlayerGuaji.OnPlayerLogin(curPlayer)
         PlayerActFamilyGCZ.OnPlayerLogin(curPlayer)
         PlayerTalk.OnPlayerLogin(curPlayer)
         
@@ -952,51 +938,6 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_DeadTime, 0)
     return
 
-##玩家登陆, 相关活动通知
-#@param curPlayer 玩家实例
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 玩家登陆, 相关活动通知
-def PlayerLoginNotify(curPlayer, tick):
-    curTime = GameWorld.GetCurrentTime()
-    
-    #读取上线提示表
-    notifyByTimeSect = ReadChConfig.GetEvalChConfig('PlayerLoginNotify_TimeSect')     #某时间段内上线提示
-    notifyByDict = ReadChConfig.GetEvalChConfig('PlayerLoginNotify_Dict')             #根据字典值给提示
-    
-    #在规定时间段内上线给提示
-    DoNotifyByTimeSect(curPlayer, curTime, notifyByTimeSect)
-    #指定字典值内提示
-    DoNotifyByDict(curPlayer, notifyByDict)
-    return
-#---------------------------------------------------------------------
-##在活动规定时间段内上线给提示
-#@param curPlayer 玩家索引
-#@param curTime 传入时间
-#@param notifyInfo 提示信息
-#@return 返回值无意义
-#@remarks 在活动规定时间段内上线给提示
-def DoNotifyByTimeSect(curPlayer, curTime, notifyInfo):
-    for curNotify in notifyInfo:
-        #有时间段限制,验证时间段
-        if not GameWorld.IsAtActTime(curTime, curNotify[0]):
-            continue
-        
-        PlayerControl.NotifyCode(curPlayer, curNotify[1], curNotify[2])
-
-#---------------------------------------------------------------------
-##指定字典值内提示
-#@param curPlayer 玩家实例
-#@param notifyInfo 提示信息
-#@return 返回值无意义
-#@remarks 指定字典值内提示
-def DoNotifyByDict(curPlayer, notifyInfo):
-    gameWorld = GameWorld.GetGameWorld()
-    for curNotify in notifyInfo:
-        if gameWorld.GetGameWorldDictByKey(curNotify[0]) in curNotify[1]:
-            PlayerControl.NotifyCode(curPlayer, curNotify[2], curNotify[3])
-
-
 #---------------------------------------------------------------------
 ##通知背包详细信息
 #@param curPlayer 玩家实例
@@ -1087,54 +1028,6 @@
     clientPack.ObjID = curPlayer.GetID()
     clientPack.BuffType = 99 # 99代表清所有
     NetPackCommon.SendFakePack(curPlayer, clientPack)    
-    return
-
-#---------------------------------------------------------------------
-##上线时通知离线时间(离线挂机功能)
-# @param curPlayer 玩家实例
-# @param tick 时间戳
-# @return 返回值无意义
-# @remarks 上线时通知离线时间(离线挂机功能)
-def __Sync_PlayerOffline(curPlayer, tick):
-    #---等级限制---
-    if GameWorld.IsCrossServer():
-        return
-    
-#===============================================================================
-#    #---等级限制---
-#    lvLimit = ReadChConfig.GetEvalChConfig('OfflineSys_LVLimit')
-#    if curPlayer.GetLV() < lvLimit:
-#        return
-#    
-#    if GameWorld.IsCrossServer():
-#        return
-#    
-#    #当前离线时间(分)
-#    curOfflineMinutes = min(PlayerControl.GetPlayerLeaveServerMinute(curPlayer),
-#                            ChConfig.Def_UpperLimit_DWord)
-#    
-#    #防止服务器时间修改到过去得到负值
-#    if curOfflineMinutes < 0:
-#        GameWorld.ErrLog("Login Time Error, outTime: %s - loginTime :%s" % 
-#                         (curPlayer.GetLogoffTime(), GameWorld.GetCurrentDataTimeStr()),
-#                         curPlayer.GetPlayerID())
-#        curOfflineMinutes = 0
-#    
-#    #时间为分钟
-#    minTimeLimit, maxTimeLimit = ReadChConfig.GetEvalChConfig("OfflineSys_AllTimeUpperLimit")
-#    if curOfflineMinutes >= minTimeLimit:
-#        #总离线时间(分)
-#        allOfflineMinutes = min(curPlayer.GetOfflineMinutes() + curOfflineMinutes, maxTimeLimit)
-#        #记录离线总时间
-#        curPlayer.SetOfflineMinutes(int(allOfflineMinutes))
-#        GameWorld.DebugLog("设置离线奖励时间 %s,curOfflineMinutes=%s" % (allOfflineMinutes, curOfflineMinutes), curPlayer.GetPlayerID())
-#    else:
-#        GameWorld.DebugLog("离线时间过短,不计入离线奖励!curOfflineMinutes=%s" % curOfflineMinutes, curPlayer.GetPlayerID())
-#    
-#    #通知客户端离线时间
-# #    curPlayer.Syn_OfflineTimeRefresh(int(curOfflineMinutes))
-#    curPlayer.Syn_OfflineTimeQueryResult()
-#===============================================================================
     return
 
 #---------------------------------------------------------------------
@@ -3391,26 +3284,6 @@
     NetPackCommon.SendFakePack(curPlayer, awardReceiveState)
     return
 
-## 领取奖励表奖励
-#  @param None None
-#  @return None
-def ClientPlayerGetReward(index, clientData, tick):
-    playerManager = GameWorld.GetPlayerManager()
-    curPlayer = playerManager.GetPlayerByIndex(index)
-    
-    # 背包空间不足
-    if not ItemCommon.CheckPackHasSpace(curPlayer, IPY_GameWorld.rptItem):
-        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_676165", [IPY_GameWorld.rptItem])
-        return
-    
-    rewardType = clientData.RewardType
-    
-    #通知GameServer领取奖励
-    resultName = str(rewardType)
-    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, 'PlayerGetReward',
-                                                                  resultName, len(resultName))
-    return
-
 #//A5 04 玩家领取奖励 #tagCMPlayerGetReward
 #
 #struct    tagCMPlayerGetReward
@@ -3438,9 +3311,6 @@
     # 活跃放置奖励
     elif rewardType == ChConfig.Def_RewardType_ActivityPlace:
         PlayerActivity.GetActivityPlaceReward(curPlayer)
-    # 挂机奖励
-    elif rewardType == ChConfig.Def_RewardType_Guaji:
-        PlayerGuaji.OnGetGuajiAward(curPlayer, dataEx)
     # 仙树免费减时
     elif rewardType == ChConfig.Def_RewardType_TreeFreeTime:
         PlayerTree.FreeReduceTreeLVTime(curPlayer)

--
Gitblit v1.8.0