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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.ClearFirstGold
#
# @todo:ÖØÖÃÊ׳ä
# @author hxp
# @date 2018-05-07
# @version 1.0
#
# ÏêϸÃèÊö: ÖØÖÃÊ׳ä
#
#-------------------------------------------------------------------------------
#"""Version = 2018-05-07 21:00"""
#-------------------------------------------------------------------------------
 
import ChConfig
import PlayerGoldGift
import PlayerControl
import IpyGameDataPY
import PlayerCoin
import PlayerActRechargePrize
import PyGameData
import ShareDefine
 
 
#Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param msgList ²ÎÊýÁбí [npcID]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, msgList):
    curPlayer.SetChangeCoinPointTotal(0, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GoldGiftFirstRecord, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldServerDay, 0)
    PlayerGoldGift.Sync_FirstGoldInfo(curPlayer)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftStartTime, 0)
    # ÖØÖóäÖµ´ÎÊýÐÅÏ¢
    syncRecordIDList = []
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for i in xrange(ipyDataMgr.GetCTGCount()):
        ipyData = ipyDataMgr.GetCTGByIndex(i)
        recordID = ipyData.GetRecordID()
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGSelectItemValue % recordID, 0)
        totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)
        todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % recordID)
        weekBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekCTGCount % recordID)
        monthBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MonthCTGCount % recordID)
        if not totalBuyCount and not todayBuyCount and not weekBuyCount and not monthBuyCount:
            continue
        syncRecordIDList.append(recordID)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekCTGCount % recordID, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MonthCTGCount % recordID, 0)
    if syncRecordIDList:
        PlayerCoin.Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)
        
    # ÖØÖóäÖµ·µÀû»î¶¯
    actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RechargePrize, {})
    if actInfo.get(ShareDefine.ActKey_State, 0):
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RechargePrizeID, 0)
        PlayerActRechargePrize.__CheckPlayerRechargePrizeAction(curPlayer)
        
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealToday, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealTotal, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealFirstTime, 0)
    return