From a451e68aed69b3c936d4afe50a0cf3c43680e90c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 27 十月 2025 11:01:10 +0800
Subject: [PATCH] 302 【公会】BOSS讨伐-服务端(Taofa命令增加添加家成员讨伐数据)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ResetPack.py | 35 +++++++++++++----------------------
1 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ResetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ResetPack.py
index 936994e..603a3c2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ResetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ResetPack.py
@@ -2,26 +2,23 @@
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
-#-------------------------------------------------------------------------------
-#
##@package GM.Commands.ResetPack
#
# @todo:重置背包购买
# @author hxp
-# @date 2015-1-10
+# @date 2025-07-23
# @version 1.0
#
# 详细描述: 重置背包购买
#
-#---------------------------------------------------------------------
-"""Version = 2015-1-10 23:00"""
+#-------------------------------------------------------------------------------
+#"""Version = 2025-07-23 12:00"""
+#-------------------------------------------------------------------------------
-import IPY_GameWorld
-import PlayerControl
-import ChConfig
import GameWorld
-
-#---------------------------------------------------------------------
+import PlayerControl
+import ItemCommon
+import ChConfig
## 执行逻辑
# @param curPlayer 当前玩家
@@ -30,22 +27,16 @@
# @remarks 函数详细说明.
def OnExec(curPlayer, cmdList):
if len(cmdList) <= 0:
- GameWorld.DebugAnswer(curPlayer, "ResetPack 背包类型[5-仓库]")
+ GameWorld.DebugAnswer(curPlayer, "ResetPack 背包类型")
return
packType = cmdList[0]
- if packType not in ChConfig.Def_Type_CanBuyPack_PlayerDict.keys():
- GameWorld.DebugAnswer(curPlayer, "背包类型错误")
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PackBuyCnt % packType):
+ GameWorld.DebugAnswer(curPlayer, "背包未购买过: %s" % packType)
return
- keyName = ChConfig.Def_Type_CanBuyPack_PlayerDict[packType][ChConfig.Def_PlayerPackDict_Index_Key]
-
- if packType == IPY_GameWorld.rptWarehouse:
- PlayerControl.NomalDictSetProperty(curPlayer, keyName, 0)
- #仓库刷新
- PlayerControl.Init_Warehouse(curPlayer)
- else:
- return
-
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_PackBuyCnt % packType, 0)
+ PlayerControl.Init_PackCount(curPlayer, packType)
+ ItemCommon.SyncPackBuyCnt(curPlayer, packType)
GameWorld.DebugAnswer(curPlayer, "ResetPack OK")
return
--
Gitblit v1.8.0