From 30dd8ff93a00ada8262a35da0ede9c2088a7fd37 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 23 九月 2025 16:52:52 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(诸葛亮技能; 目标细分增加攻击力最高5; buff状态增加军令19;增加效果6006增加本次技能万分比验证职业;增加效果5015集火攻击军令目标;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py
index 59bae9f..8cb4ac3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py
@@ -95,25 +95,37 @@
     GameWorld.DebugLog("GM处理等级开启功能: openFuncID=%s,openFuncIDList=%s,needLV=%s" % (openFuncID, openFuncIDList, needLV), curPlayer.GetPlayerID())
     
     # 优先处理升级        
-    if needLV:
+    if needLV > 1:
         preLV = needLV - 1
         curPlayer.SetLV(preLV)
         PlayerControl.SetPlayerTotalExp(curPlayer, PlayerControl.GetTotalExpByPlayerLv(preLV))
         PlayerControl.PlayerControl(curPlayer).PlayerLvUp()
-
+        
+        # 获取等级需要的境界
+        ipyDataMgr = IpyGameDataPY.IPY_Data()
+        for index in range(ipyDataMgr.GetRealmCount()):
+            realmIpyData = ipyDataMgr.GetRealmByIndex(index)
+            if realmIpyData.GetLv() > needRealmLV:
+                needRealmLV = realmIpyData.GetLv()
+            if realmIpyData.GetLVMax() >= needLV:
+                break
+            
     GameWorld.DebugLog("GM处理境界开启功能: needRealmLV=%s" % needRealmLV, curPlayer.GetPlayerID())
     if needRealmLV:
-        curPlayer.SetOfficialRank(max(1, needRealmLV - 1))
+        curPlayer.SetOfficialRank(max(ChConfig.Def_InitOfficialRank, needRealmLV - 1))
         PlayerPrestigeSys.DoRealmLVUpLogic(curPlayer)
         
+    for limitMissionID in needMissionIDList:
+        if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_MissionFinish % limitMissionID):
+            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_MissionFinish % limitMissionID, 1)
+            
     GameWorld.DebugLog("GM处理任务开启功能: needMissionIDList=%s" % needMissionIDList, curPlayer.GetPlayerID())
     #最后强制触发一次
-    #if needMissionIDList:
-    GameFuncComm.DoFuncOpenLogic(curPlayer, needMissionIDList)
+    GameFuncComm.DoFuncOpenLogic(curPlayer)
     return
 
 def __GetOpenFuncLimit(curPlayer, openFuncIDList):
-    maxLV = PlayerControl.GetPlayerMaxLV(curPlayer)
+    maxLV = PlayerControl.GetOpenMaxLV()
     needLV = 0
     needRealmLV = 0
     needMissionIDList = []
@@ -143,7 +155,7 @@
     ## GM关闭功能
     if not closeFuncID:
         curPlayer.SetLV(1)
-        curPlayer.SetOfficialRank(1)
+        curPlayer.SetOfficialRank(ChConfig.Def_InitOfficialRank)
         
         for keyNum in xrange(8):
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch % keyNum, 0)
@@ -172,7 +184,7 @@
         
     limitRealmLV = ipyData.GetLimiRealmLV()
     if limitRealmLV and curPlayer.GetOfficialRank() >= limitRealmLV:
-        curPlayer.SetOfficialRank(max(1, limitRealmLV - 1))
+        curPlayer.SetOfficialRank(max(ChConfig.Def_InitOfficialRank, limitRealmLV - 1))
         
     limitMissionID = ipyData.GetLimitMissionID()
     if limitMissionID:

--
Gitblit v1.8.0