From cc2207557c22a88475e28f6a05a416c0fa97e527 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 25 八月 2025 18:53:15 +0800
Subject: [PATCH] 1111 删除不需要内容;
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py | 40 ++++++++--------------------------------
1 files changed, 8 insertions(+), 32 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 e0bec23..59bae9f 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
@@ -18,7 +18,6 @@
import GameWorld
import PlayerControl
import PlayerPrestigeSys
-import PlayerMagicWeapon
import IpyGameDataPY
import GameFuncComm
import ChConfig
@@ -88,12 +87,10 @@
openFuncIDList = [openFuncID]
if openFuncIDList:
- needLV, needMagicWeaponIDList, needRealmLV, needMissionIDList = __GetOpenFuncLimit(openFuncIDList)
- if needMagicWeaponIDList:
- openFuncIDList.append(ShareDefine.GameFuncID_MagicWeapon)
+ needLV, needRealmLV, needMissionIDList = __GetOpenFuncLimit(curPlayer, openFuncIDList)
if needRealmLV:
openFuncIDList.append(ShareDefine.GameFuncID_Official)
- needLV, needMagicWeaponIDList, needRealmLV, needMissionIDList = __GetOpenFuncLimit(openFuncIDList)
+ needLV, needRealmLV, needMissionIDList = __GetOpenFuncLimit(curPlayer, openFuncIDList)
GameWorld.DebugLog("GM处理等级开启功能: openFuncID=%s,openFuncIDList=%s,needLV=%s" % (openFuncID, openFuncIDList, needLV), curPlayer.GetPlayerID())
@@ -103,14 +100,7 @@
curPlayer.SetLV(preLV)
PlayerControl.SetPlayerTotalExp(curPlayer, PlayerControl.GetTotalExpByPlayerLv(preLV))
PlayerControl.PlayerControl(curPlayer).PlayerLvUp()
-
- GameWorld.DebugLog("GM处理法宝开启功能: needMagicWeaponIDList=%s" % needMagicWeaponIDList, curPlayer.GetPlayerID())
- for mwIDKey in needMagicWeaponIDList:
- mwID, mwLV = mwIDKey/100, mwIDKey%100
- for lv in xrange(mwLV+1):
- PlayerMagicWeapon.DoActiveMW(curPlayer, mwID, lv)
-
-
+
GameWorld.DebugLog("GM处理境界开启功能: needRealmLV=%s" % needRealmLV, curPlayer.GetPlayerID())
if needRealmLV:
curPlayer.SetOfficialRank(max(1, needRealmLV - 1))
@@ -122,12 +112,11 @@
GameFuncComm.DoFuncOpenLogic(curPlayer, needMissionIDList)
return
-def __GetOpenFuncLimit(openFuncIDList):
- maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV")
+def __GetOpenFuncLimit(curPlayer, openFuncIDList):
+ maxLV = PlayerControl.GetPlayerMaxLV(curPlayer)
needLV = 0
needRealmLV = 0
needMissionIDList = []
- needMagicWeaponIDList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
funcOpenLVCount = ipyDataMgr.GetFuncOpenLVCount()
@@ -141,10 +130,6 @@
if limitLV and limitLV <= maxLV and needLV < limitLV:
needLV = limitLV
- limitMagicWeaponID = ipyData.GetLimitMagicWeapon()
- if limitMagicWeaponID and limitMagicWeaponID not in needMagicWeaponIDList:
- needMagicWeaponIDList.append(limitMagicWeaponID)
-
limitRealmLV = ipyData.GetLimiRealmLV()
if limitRealmLV and needRealmLV < limitRealmLV:
needRealmLV = limitRealmLV
@@ -152,23 +137,19 @@
limitMissionID = ipyData.GetLimitMissionID()
if limitMissionID and limitMissionID not in needMissionIDList:
needMissionIDList.append(limitMissionID)
- return needLV, needMagicWeaponIDList, needRealmLV, needMissionIDList
+ return needLV, needRealmLV, needMissionIDList
def DoGMCloseFunc(curPlayer, closeFuncID):
## GM关闭功能
if not closeFuncID:
curPlayer.SetLV(1)
curPlayer.SetOfficialRank(1)
- ipyDataMgr = IpyGameDataPY.IPY_Data()
- for i in xrange(ipyDataMgr.GetTreasureCount()):
- ipyData = ipyDataMgr.GetTreasureByIndex(i)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MagicWeaponLV % ipyData.GetID(), 0)
-
+
for keyNum in xrange(8):
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch % keyNum, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_GameFuncAwardState % keyNum, 0)
- needLV, needMagicWeaponIDList, needRealmLV, needMissionIDList = __GetOpenFuncLimit([])
+ needLV, needRealmLV, needMissionIDList = __GetOpenFuncLimit(curPlayer, [])
for missionID in needMissionIDList:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_MissionFinish % missionID, 0)
@@ -192,11 +173,6 @@
limitRealmLV = ipyData.GetLimiRealmLV()
if limitRealmLV and curPlayer.GetOfficialRank() >= limitRealmLV:
curPlayer.SetOfficialRank(max(1, limitRealmLV - 1))
-
- limitMagicWeaponID = ipyData.GetLimitMagicWeapon()
- if limitMagicWeaponID:
- mwID = limitMagicWeaponID / 100
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MagicWeaponLV % mwID, 0)
limitMissionID = ipyData.GetLimitMissionID()
if limitMissionID:
--
Gitblit v1.8.0