hxp
2023-02-08 cb1d20b4aff8ca422a12a18f024a65b201687ec0
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.ClearFreeGoods
#
# @todo:ÖØÖü«Æ·°×ÄÃ
# @author xdh
# @date 2018-07-11
# @version 1.0
#
# ÏêϸÃèÊö: ÖØÖü«Æ·°×ÄÃ
#
#---------------------------------------------------------------------
"""Version = 2018-07-11 11:30"""
 
import PlayerControl
import time
import ChConfig
import GameWorld
import IpyGameDataPY
import PlayerFreeGoods
#---------------------------------------------------------------------
#Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param list ²ÎÊýÁбí [npcID]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, list):
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FreeGoodsOpenTime, int(time.time()))
    for i in xrange(IpyGameDataPY.IPY_Data().GetFreeGoodsCount()):
        ipyData = IpyGameDataPY.IPY_Data().GetFreeGoodsByIndex(i)
        goodsID = ipyData.GetID()
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FreeGoodsBuyState % goodsID, 0)
    
    GameWorld.DebugAnswer(curPlayer, "ÖØÖü«Æ·°×Äóɹ¦£¡")
    PlayerFreeGoods.Sync_FreeGoodsInfo(curPlayer)
    return