hxp
2025-06-03 4cdd576855c6e22d986ece4b18f7c80d82cefe38
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package Player.PlayerFairyCeremony
#
# @todo:ÏɽçÊ¢µä
# @author xdh
# @date 2018-07-23 16:50
# @version 1.0
#
#
# ÏêϸÃèÊö: ÏɽçÊ¢µä
#
#---------------------------------------------------------------------
"""Version = 2018-07-23 16:50"""
#---------------------------------------------------------------------
import IPY_GameWorld
import GameWorld
import ChConfig
import IpyGameDataPY
import PlayerControl
import ItemControler
import ChPyNetSendPack
import NetPackCommon
import ShareDefine
import PyGameData
import ItemCommon
import PlayerBillboard
 
(
Def_FC_Recharge, #³äÖµ´óÀñ
Def_FC_Fireworks, #ÑÌ»¨
Def_FC_Party, #È«ÃñÀ´àË
Def_FC_RechargeRank, #¾ø°æ½µÁÙ
) = range(1, 5)
 
 
def OnLogin(curPlayer):
    isReset = __CheckPlayerFairyCeremonyAction(curPlayer)
    if not isReset:
        actCostRebateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FairyCeremony, {})
        # »î¶¯ÖÐͬ²½»î¶¯ÐÅÏ¢
        if actCostRebateInfo.get(ShareDefine.ActKey_State):
            SyncFCRechargeInfo(curPlayer)
            SyncFCPartyInfo(curPlayer)
    return
 
def RefreshOperationAction_FairyCeremony():
    playerManager = GameWorld.GetPlayerManager()
    for i in xrange(playerManager.GetPlayerCount()):
        curPlayer = playerManager.GetPlayerByIndex(i)
        if not GameWorld.IsNormalPlayer(curPlayer):
            continue
        __CheckPlayerFairyCeremonyAction(curPlayer)
    return
 
 
def __CheckPlayerFairyCeremonyAction(curPlayer):
    ## ¼ì²éÍæ¼ÒÏɽçÊ¢µä»î¶¯Êý¾ÝÐÅÏ¢
    playerID = curPlayer.GetPlayerID()
    
    actFairyCeremonyInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FairyCeremony, {})
    FairyCeremonyID = actFairyCeremonyInfo.get(ShareDefine.ActKey_ID, 0)
    state = actFairyCeremonyInfo.get(ShareDefine.ActKey_State, 0)
    
    playerFairyCeremonyID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyCeremonyID) # Íæ¼ÒÉíÉϵĻID
    
    # »î¶¯ID ÏàͬµÄ»°²»´¦Àí
    if FairyCeremonyID == playerFairyCeremonyID:
        #GameWorld.DebugLog("ÏɽçÊ¢µä»î¶¯ID²»±ä£¬²»´¦Àí£¡", curPlayer.GetPlayerID())
        return
    ctgRMBTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCoinTotal) / 100
    actWorldLV = actFairyCeremonyInfo.get(ShareDefine.ActKey_WorldLV, 0)
    playerFCWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCActionWorldLV)
    GameWorld.DebugLog("ÏɽçÊ¢µäÖØÖÃ! FairyCeremonyID=%s,playerCostRebateID=%s,state=%s,ActWorldLV=%s,playerFCWorldLV=%s,ctgRMBTotal=%s" 
                       % (FairyCeremonyID, playerFairyCeremonyID, state, actWorldLV, playerFCWorldLV, ctgRMBTotal), playerID)
    
    # Î´ÁìÈ¡µÄ½±ÀøÓʼþ·¢·Å
    __SendFairyCeremonyMail(curPlayer, playerFCWorldLV)
    
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyCeremonyID, FairyCeremonyID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCActionWorldLV, actWorldLV)
    #ÖØÖóäÖµ´óÀñ¼Ç¼
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCRechargeState, 0)
    #ÖØÖÃÈ«ÃñÀ´àË
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyCurPoint, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyAwardRecord, 0)
    for actid in ChConfig.PeoplePartyActIDList:
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyCurCnt % actid, 0)
    SyncFCPartyInfo(curPlayer)
    #ÖØÖÃÒѳäÖµRMB¼°ÑÌ»¨Ïà¹Ø
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCCTGRMBTotal, ctgRMBTotal)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCFireworksBuyCount, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCFireworksScore, 0)
    SyncFCRechargeInfo(curPlayer)
    return True
 
def __SendFairyCeremonyMail(curPlayer, playerFCWorldLV):
    # Î´ÁìÈ¡µÄ½±ÀøÓʼþ·¢·Å
    #³äÖµ´óÀñ
    playerID = curPlayer.GetID()
    playerName = curPlayer.GetName()
    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCRechargeState) == 1:
        worldLvNum = __GetFCWorldLVIndex(curPlayer, Def_FC_Recharge)
        awardInfoDict = IpyGameDataPY.GetFuncEvalCfg('CeremonyRecharge', 1, {})
        if str(worldLvNum) not in awardInfoDict:
            GameWorld.ErrLog('    Óʼþ·¢·Å³äÖµ´óÀñ½±Àø CeremonyRecharge Î´ÅäÖý±Àø worldLvNum=%s' % worldLvNum)
        else:
            awardList = awardInfoDict[str(worldLvNum)]
            PlayerControl.SendMailByKey('CeremonyPayPack', [playerID], awardList, [playerName])
    #È«ÃñÀ´àË
    worldLvNum = __GetFCWorldLVIndex(curPlayer, Def_FC_Party)
    curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurPoint)
    awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyAwardRecord)
    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('AllPeoplePartyAward', {'WorldLvNum':worldLvNum}, True)
    if not ipyDataList:
        GameWorld.ErrLog('    Óʼþ·¢·ÅÈ«ÃñÀ´à˽±Àø AllPeoplePartyAward Î´ÅäÖÃÊÀ½çµÈ¼¶µµ WorldLvNum=%s' % worldLvNum)
        return
    
    partyAwardList = []
    for ipyData in ipyDataList:
        index = ipyData.GetIndex()
        if awardRecord & pow(2, index):
            continue
        needPoint = ipyData.GetNeedPoint()
        if curPoint < needPoint:
            continue
        awardInfoDict = ipyData.GetAward()
        job = curPlayer.GetJob()
        if str(job) not in awardInfoDict:
            GameWorld.ErrLog('    Óʼþ·¢·ÅÈ«ÃñÀ´à˽±Àø AllPeoplePartyAward Î´ÅäÖÃÖ°Òµ½±Àø job=%s' % job)
            continue
        awardList = awardInfoDict[str(job)]
        partyAwardList += awardList
    if partyAwardList:
        PlayerControl.SendMailByKey('CeremonyHaiPoint', [playerID], partyAwardList, [playerName])
    return
 
def __IsAtFCAction():
    ##ÊÇ·ñÔÚÏɽçÊ¢µä»î¶¯ÖÐ
    actBossRebornInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FairyCeremony, {})
    state = actBossRebornInfo.get(ShareDefine.ActKey_State, 0)
    return state == 1
 
def __GetFCWorldLVIndex(curPlayer, fcType):
    #»ñÈ¡»î¶¯ÊÀ½çµÈ¼¶µµ
    playerFCWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCActionWorldLV)
    fcWorldlvDict = IpyGameDataPY.GetFuncEvalCfg('CeremonyWorldLv', 1, {})
    if str(fcType) not in fcWorldlvDict:
        return 0
    worldLVIndex = 0
    worldlvList = fcWorldlvDict[str(fcType)]
    for index, lvinfo in enumerate(worldlvList):
        minlv, maxlv = lvinfo
        if minlv <= playerFCWorldLV <= maxlv:
            worldLVIndex = index
            break
    return worldLVIndex
 
#################³äÖµ´óÀñ##############################
def OnFCRecharge(curPlayer):
    if not __IsAtFCAction():
        return
    curState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCRechargeState)
    if curState != 0:
        return
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCRechargeState, 1)
    SyncFCRechargeInfo(curPlayer)
    return
 
def GetFCRechargeAward(curPlayer):
    ## ÁìÈ¡³äÖµ´óÀñ½±Àø
    curState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCRechargeState)
    if curState != 1:
        return
    worldLvNum = __GetFCWorldLVIndex(curPlayer, Def_FC_Recharge)
    awardInfoDict = IpyGameDataPY.GetFuncEvalCfg('CeremonyRecharge', 1, {})
    if str(worldLvNum) not in awardInfoDict:
        GameWorld.ErrLog('    ÁìÈ¡³äÖµ´óÀñ½±Àø CeremonyRecharge Î´ÅäÖý±Àø worldLvNum=%s' % worldLvNum)
        return
    awardList = awardInfoDict[str(worldLvNum)]
    # ¼ì²é±³°ü
    needSpace = len(awardList)
    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
    if needSpace > packSpace:
        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
        return
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCRechargeState, 2)
    for itemID, itemCnt, isBind in awardList:
        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
    
    SyncFCRechargeInfo(curPlayer)
    
    PlayerControl.WorldNotify(0, 'CeremonyRecharge', [curPlayer.GetName()])
    return
 
 
def SyncFCRechargeInfo(curPlayer):
    ## Í¨Öª³äÖµ´óÀñ»î¶¯×´Ì¬
    packData = ChPyNetSendPack.tagMCXJSDRecharge()
    packData.State = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCRechargeState)
    packData.CTGTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCCTGRMBTotal)
    packData.FireworksBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCFireworksBuyCount)
    packData.FirewordsScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCFireworksScore)
    NetPackCommon.SendFakePack(curPlayer, packData)
    return
 
#################È«ÃñÀ´àË##############################
def AddFCPartyActionCnt(curPlayer, actionID, addCnt=1):
    ##Ôö¼ÓÈ«ÃñÀ´àËÍê³É´ÎÊý
    if not __IsAtFCAction():
        return
    ipyData = IpyGameDataPY.GetIpyGameData('AllPeopleParty', actionID)
    if not ipyData:
        return
    maxCnt = ipyData.GetTotalTimes()
    curCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurCnt % actionID)
    if curCnt >= maxCnt:
        return
    newCnt = min(maxCnt, curCnt + addCnt)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyCurCnt % actionID, newCnt)
    singlePoint = ipyData.GetAddPoint()
    addPoint = (newCnt - curCnt) * singlePoint
    curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurPoint)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyCurPoint, curPoint + addPoint)
    PlayerControl.NotifyCode(curPlayer, "AddFCPartyPoint", [addPoint])
    SyncFCPartyInfo(curPlayer, [actionID])
    return
 
def AddFCPartyPoint(curPlayer, addPoint):
    ## Ö±½ÓÔö¼Óà˵ã
    curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurPoint)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyCurPoint, curPoint + addPoint)
    PlayerControl.NotifyCode(curPlayer, "AddFCPartyPoint", [addPoint])
    SyncFCPartyInfo(curPlayer)
    return
 
def GetFCPartyAward(curPlayer, index):
    ## È«ÃñÀ´àËÁì½±
    worldLvNum = __GetFCWorldLVIndex(curPlayer, Def_FC_Party)
    
    ipyData = IpyGameDataPY.GetIpyGameData('AllPeoplePartyAward', worldLvNum, index)
    if not ipyData:
        return
    
    curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurPoint)
    if curPoint < ipyData.GetNeedPoint():
        GameWorld.DebugLog('    È«ÃñÀ´àËÁì½±, µãÊý²»×ã%s,  worldLvNum=%s, index=%s' % (ipyData.GetNeedPoint(), worldLvNum, index), curPlayer.GetID())
        return
    awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyAwardRecord)
    awardMark = pow(2, index)
    if awardRecord & awardMark:
        GameWorld.DebugLog('    È«ÃñÀ´àËÁì½±, ÒÑÁì½±,  worldLvNum=%s, index=%s' % (worldLvNum, index), curPlayer.GetID())
        return
    awardInfoDict = ipyData.GetAward()
    job = curPlayer.GetJob()
    if str(job) not in awardInfoDict:
        return
    awardList = awardInfoDict[str(job)]
    # ¼ì²é±³°ü
    needSpace = len(awardList)
    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
    if needSpace > packSpace:
        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
        return
    #¸üмǼ
    awardRecord |= awardMark
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCPartyAwardRecord, awardRecord)
    for itemID, itemCnt, isBind in awardList:
        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
    #֪ͨ
    SyncFCPartyInfo(curPlayer, isGetAward=True)
    return
 
 
def SyncFCPartyInfo(curPlayer, actIDList=[], isGetAward=False):
    ##֪ͨȫÃñÀ´àËÐÅÏ¢
    packData = ChPyNetSendPack.tagMCAllPeoplePartyInfo()
    packData.Clear()
    packData.CurPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurPoint)
    packData.AwardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyAwardRecord)
    if not isGetAward:
        packData.BuyCountList = []
        for actID in ChConfig.PeoplePartyActIDList:
            if actIDList and actID not in actIDList:
                continue
            finishInfo = ChPyNetSendPack.tagMCAllPeoplePartyCount()
            finishInfo.ActID = actID
            finishInfo.CurTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCPartyCurCnt % actID)
            packData.BuyCountList.append(finishInfo)
        packData.Count = len(packData.BuyCountList)
    
    NetPackCommon.SendFakePack(curPlayer, packData)
    return
 
#################¾ø°æ½µÁÙ##############################
 
def AddFCCTGRMB(curPlayer, ctgRMB):
    ## ³äÖµXÔª
    if ctgRMB <= 0:
        return
    if not __IsAtFCAction():
        return
    curRMBTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCCTGRMBTotal)
    updRMBTotal = curRMBTotal + ctgRMB
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCCTGRMBTotal, updRMBTotal)
    GameWorld.Log("¸üÐÂÏɽçÊ¢µä³äÖµRMBÖµ: curRMBTotal=%s,ctgRMB=%s,updRMBTotal=%s" 
                  % (curRMBTotal, ctgRMB, updRMBTotal), curPlayer.GetPlayerID())
    SyncFCRechargeInfo(curPlayer)
    return
 
def OnBuyFireworks(curPlayer, itemIndex, clientBuyCount):
    ## ¹ºÂòÑÌ»¨
    if not __IsAtFCAction():
        return
    
    fireworksDict = IpyGameDataPY.GetFuncEvalCfg('CeremonyFireParty', 1, {})
    worldLvNum = __GetFCWorldLVIndex(curPlayer, Def_FC_Fireworks)
    canBuyIDList = fireworksDict.get(str(worldLvNum), []) #[ÆÕͨÑÌ»¨, ¸ß¼¶ÑÌ»¨]
    if itemIndex not in canBuyIDList:
        return
    fireworksIndex = canBuyIDList.index(itemIndex)
    AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_Fireworks, clientBuyCount)
    if fireworksIndex == 1:
        fireworksBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCFireworksBuyCount) + clientBuyCount
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCFireworksBuyCount, fireworksBuyCount)
        GameWorld.DebugLog("¸üÐÂÍæ¼Ò¸ß¼¶ÑÌ»¨ÒѹºÂò´ÎÊý: clientBuyCount=%s,fireworksBuyCount=%s" 
                           % (clientBuyCount, fireworksBuyCount), curPlayer.GetPlayerID())
        
    fireworksScoreList = IpyGameDataPY.GetFuncEvalCfg('CeremonyFireParty', 2) # [ÆÕͨÑÌ»¨»ý·Ö, ¸ß¼¶ÑÌ»¨»ý·Ö]
    addScore = fireworksScoreList[fireworksIndex] * clientBuyCount
    curFireworksScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCFireworksScore)
    updFireworksScore = curFireworksScore + addScore
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FCFireworksScore, updFireworksScore)
    
    billboardNeedScore = IpyGameDataPY.GetFuncCfg('CeremonyFireParty', 4)
    if updFireworksScore >= billboardNeedScore:
        #¸üÐÂÅÅÐаñ
        GameWorld.DebugLog("Íæ¼Ò¾ø°æ½µÁÙ»ý·ÖÅÅÐиüÐÂ: itemIndex=%s,clientBuyCount=%s,curFireworksScore=%s,addScore=%s,updFireworksScore=%s" 
                           % (itemIndex, clientBuyCount, curFireworksScore, addScore, updFireworksScore), curPlayer.GetPlayerID())
        PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_FCCostGold, updFireworksScore)
    else:
        GameWorld.DebugLog("Íæ¼Ò¾ø°æ½µÁÙÑÌ»¨»ý·Ö²»×㣬ÎÞ·¨Éϰñ! updFireworksScore=%s < billboardNeedScore=%s" 
                           % (updFireworksScore, billboardNeedScore), curPlayer.GetPlayerID())
        
    SyncFCRechargeInfo(curPlayer) 
    return
 
#################ÑÌ»¨¿ñ»¶##############################
def IsCanBuyFireworks(curPlayer, itemIndex, clientBuyCount):
    ##µ±Ç°ÊÇ·ñ¿ÉÒÔÂòÑÌ»¨
    if not __IsAtFCAction():
        GameWorld.Log('    ÑÌ»¨¿ñ»¶ÂòÑÌ»¨ »î¶¯Î´¿ªÆô, ÎÞ·¨¹ºÂò')
        return False
    fireworksDict = IpyGameDataPY.GetFuncEvalCfg('CeremonyFireParty', 1, {})
    worldLvNum = __GetFCWorldLVIndex(curPlayer, Def_FC_Fireworks)
    canBuyIDList = fireworksDict.get(str(worldLvNum), []) #[ÆÕͨÑÌ»¨, ¸ß¼¶ÑÌ»¨]
    if itemIndex not in canBuyIDList:
        GameWorld.Log('    ÑÌ»¨¿ñ»¶ÂòÑÌ»¨ µ±Ç°¿ÉÒÔÂòÑÌ»¨Îª %s, ÎÞ·¨¹ºÂò %s,worldLvNum=%s'%(canBuyIDList, itemIndex,worldLvNum), curPlayer.GetID())
        return False
    #¸ß¼¶ÑÌ»¨ÐèÒªÅжϳäÖµµÄ×ܶî
    buyOneNeedRMB = IpyGameDataPY.GetFuncCfg('CeremonyFireParty', 3) # ¹ºÂòÒ»¸ö¸ß¼¶ÑÌ»¨ËùÐè³äÖµRMBÖµ£¬µ¥Î»XÔª
    if itemIndex == canBuyIDList[-1] and buyOneNeedRMB:
        curRMBTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCCTGRMBTotal)
        fireworksBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FCFireworksBuyCount)
        totalCanBuyCount = curRMBTotal / buyOneNeedRMB
        if (fireworksBuyCount + clientBuyCount) > totalCanBuyCount:
            GameWorld.Log('    ÑÌ»¨¿ñ»¶ÂòÑÌ»¨  ¸ß¼¶ÑÌ»¨ËùÐèÖØÖÃRMB²»×ã, ÎÞ·¨¹ºÂò! curRMBTotal=%s,totalCanBuyCount=%s < fireworksBuyCount=%s + clientBuyCount=%s' 
                          % (curRMBTotal, totalCanBuyCount, fireworksBuyCount, clientBuyCount), curPlayer.GetID())
            return False
    return True