From 1dd273126494e6f8ffd7a994b637f45ad1128191 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 03 十二月 2025 19:55:27 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(战报改为存储B430包Buffer;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py |   35 ++++++++++++++++-------------------
 1 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
index 482b25c..8af5d3d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
@@ -31,9 +31,8 @@
 import PlayerActBuyCountGift
 import PlayerActLoginNew
 import PlayerActTask
-import IPY_GameWorld
-import ItemCommon
 import ItemControler
+import PlayerTravel
 import PlayerHorse
 import PlayerArena
 import PlayerTask
@@ -45,11 +44,12 @@
                      ShareDefine.GameFuncID_Arena:lambda curObj:PlayerArena.DoArenaOpen(curObj),
                      ShareDefine.GameFuncID_Shop:lambda curObj:FunctionNPCCommon.DoShopOpen(curObj),
                      ShareDefine.GameFuncID_Horse:lambda curObj:PlayerHorse.DoHorseOpen(curObj),
+                     ShareDefine.GameFuncID_Travel:lambda curObj:PlayerTravel.DoTravelOpen(curObj),
                      }
 
 def GetFuncOpenLVIpyData(funcID): return IpyGameDataPY.GetIpyGameData("FuncOpenLV", funcID)
 
-def DoFuncOpenLogic(curPlayer):
+def DoFuncOpenLogic(curPlayer, checkServerDay=True):
     '''执行触发功能开启逻辑
     @param finishMissionIDList: 完成的任务ID列表
     '''
@@ -87,7 +87,11 @@
             continue
         
         limitOpenDay = ipyData.GetLimitOpenDay()
-        if limitOpenDay and serverDay < limitOpenDay:
+        if limitOpenDay and serverDay < limitOpenDay and checkServerDay:
+            continue
+        
+        limitManLevel = ipyData.GetLimitManLevel()
+        if limitManLevel and PlayerControl.GetMainLevelPassValue(curPlayer) < limitManLevel:
             continue
         
         # 先更新值再处理开启逻辑,不能可能导致在功能开启逻辑中再开启功能引发的递归死循环
@@ -128,29 +132,22 @@
 
 def GetFuncOpenAward(curPlayer, funcID):
     ## 领取功能开启奖励
-    ipyData = IpyGameDataPY.GetIpyGameData('FunctionForecast', funcID)
+    ipyData = IpyGameDataPY.GetIpyGameData("FuncOpenLV", funcID)
     if not ipyData:
         return
     getState = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncAwardState, funcID)
     if getState:
+        GameWorld.DebugLog("功能开启奖励已领取! funcID=%s" % funcID)
         return
-    awardDict = ipyData.GetAward()
-    job = curPlayer.GetJob()
-    itemList = awardDict.get(str(job))
+    openState = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch, funcID)
+    if not openState:
+        GameWorld.DebugLog("功能未开启无法领取! funcID=%s" % funcID)
+        return
+    itemList = ipyData.GetAwardList()
     if not itemList:
         return
-    # 检查背包
-    needSpace = len(itemList)
-    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
-    if needSpace > packSpace:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
-        return
     GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncAwardState, funcID, 1)
-    
-    # 给物品
-    for itemID, itemCount in itemList:
-        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
-    ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "FuncOpenAward")
+    ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["FuncOpenAward", False, {}])
     Sync_FuncOpenState(curPlayer, [funcID])
     return
     

--
Gitblit v1.8.0