#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GM.Commands.ResetPack # # @todo:ÖØÖñ³°ü¹ºÂò # @author hxp # @date 2025-07-23 # @version 1.0 # # ÏêϸÃèÊö: ÖØÖñ³°ü¹ºÂò # #------------------------------------------------------------------------------- #"""Version = 2025-07-23 12:00""" #------------------------------------------------------------------------------- import GameWorld import PlayerControl import ItemCommon import ChConfig ## Ö´ÐÐÂß¼­ # @param curPlayer µ±Ç°Íæ¼Ò # @param cmdList ²ÎÊý # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def OnExec(curPlayer, cmdList): if len(cmdList) <= 0: GameWorld.DebugAnswer(curPlayer, "ResetPack ±³°üÀàÐÍ") return packType = cmdList[0] if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PackBuyCnt % packType): GameWorld.DebugAnswer(curPlayer, "±³°üδ¹ºÂò¹ý: %s" % packType) 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