hxp
2025-06-12 edc3910a9d090e5df4deb2dbc37709a740375938
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/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