#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
#-------------------------------------------------------------------------------
|
#
|
##@package GM.Commands.ClearTeHui
|
#
|
# @todo:ÖØÖÃÌØ»Ý»î¶¯
|
# @author hxp
|
# @date 2014-06-21
|
# @version 1.3
|
#
|
# @change: "2014-09-28 17:30" hxp Ôö¼ÓÖØÖóäÖµÅÅÐÐÀۼƳäÖµ¼Ç¼
|
# @change: "2015-04-15 15:30" ljd Ôö¼ÓÏû·Ñ·µÀû
|
# @change: "2016-10-22 20:30" hxp Ö§³ÖÖØÖõ±Ç°ËùÓлÖеÄÉ̵깺Âò´ÎÊý
|
#
|
# ÏêϸÃèÊö: ÖØÖÃÌØ»Ý»î¶¯
|
#
|
#---------------------------------------------------------------------
|
#"""Version = 2016-10-22 20:30"""
|
#---------------------------------------------------------------------
|
|
import ShopItemManage
|
import ReadChConfig
|
import PlayerTeHui
|
import GameWorld
|
import ShareDefine
|
|
#---------------------------------------------------------------------
|
#È«¾Ö±äÁ¿
|
#---------------------------------------------------------------------
|
|
#---------------------------------------------------------------------
|
#Â߼ʵÏÖ
|
## GMÃüÁîÖ´ÐÐÈë¿Ú
|
# @param curPlayer µ±Ç°Íæ¼Ò
|
# @param msgList ²ÎÊýÁбí [npcID]
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def OnExec(curPlayer, msgList):
|
|
PlayerTeHui.ResetClassUPAwardRecord(curPlayer)
|
PlayerTeHui.ResetRechargeData(curPlayer)
|
PlayerTeHui.ResetRechargeRankData(curPlayer)
|
PlayerTeHui.ResetCostProfitInfo(curPlayer)
|
PlayerTeHui.ResetCostRankData(curPlayer)
|
|
curActionShopID = PlayerTeHui.GetCurActionShopID()
|
if curActionShopID > 0:
|
ShopItemManage.ClearShopItemBuyCnt(curActionShopID)
|
GameWorld.DebugAnswer(curPlayer, "ÖØÖÃÉ̵ê%s¹ºÂò´ÎÊý!" % curActionShopID)
|
|
# ÆäËûÉ̵êÖØÖôÎÊý
|
itemID = 0
|
itemShopIndex = 0
|
playerName = curPlayer.GetPlayerName()
|
|
BuyItemNotifyDict = eval(ReadChConfig.GetChConfig('BuyItemNotify'))
|
BuyItemIndexNotifyDict = eval(ReadChConfig.GetChConfig('BuyItemIndexNotify'))
|
shopIDList = BuyItemNotifyDict.keys() + BuyItemIndexNotifyDict.keys()
|
gameWorld = GameWorld.GetGameWorld()
|
for shopID in shopIDList:
|
if not gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ShopState % shopID):
|
continue
|
ShopItemManage.ClearPlayerShopItemBuyCnt(curPlayer, shopID)
|
ShopItemManage.Send_ShopItemAllBuyCntInfo(curPlayer, shopID, {})
|
GameWorld.DebugAnswer(curPlayer, "ÖØÖÃÉ̵ê%s¹ºÂò´ÎÊý!" % shopID)
|
|
return
|
|