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