hxp
4 天以前 a7ab0247c7b8eff06ad104bee39bc035384ca43e
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
#!/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