#!/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
|
|