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