hch
2018-09-20 a8d160566fcad719e98b6ac1ad6354fb6ddb1dc5
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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GameWorldLogic.FBProcess.GameLogic_IceLode
#
# @todo:±ù¾§¿óÂö
# @author xdh
# @date 2017-9-14
# @version 1.0
#
# ÏêϸÃèÊö: ±ù¾§¿óÂö
#
#-------------------------------------------------------------------------------
#"""Version = 2017-09-14 15:30"""
#-------------------------------------------------------------------------------
 
import FBCommon
import GameWorld
import IPY_GameWorld
import NPCCustomRefresh
import GameWorldProcess
import PlayerControl
import ShareDefine
import IpyGameDataPY
import PyGameData
import ChConfig
import NPCCommon
import ItemCommon
import EventReport
 
import random
import math
 
#---¸±±¾ÅäÖöÔÓ¦keyÖµ---
(
Def_PrepareTime, # ¸±±¾×¼±¸Ê±¼ä(Ãë)
Def_FightTime, # ½øÐÐʱ¼ä(Ãë)
Def_PickTime, # Ê°È¡Ê±¼ä(Ãë)£¨°üº¬Í˳öʱ¼ä£©
Def_LeaveTime, # Í˳öʱ¼ä(Ãë)
) = range(4)
 
 
#---¸±±¾·ÖÏßÅäÖÃË÷ÒýÐÅÏ¢---
(
Def_RefreshMark, # Ë¢¹Ö±êʶµã
DL_NPCID, # NPCID
DL_TotalNPCCnt, # ÀÛ¼ÆË¢NPC×ܸöÊý
DL_ScreenMaxNPC, # Í¬Ê±´æÔÚNPCÊý
) = range(4)
 
 
#µ±Ç°¸±±¾µØÍ¼µÄ״̬
(
FB_Step_Open, # ¸±±¾¿ªÆô
FB_Step_Prepare, # ¸±±¾µÈ´ý
FB_Step_Fighting, # ¸±±¾½øÐÐÖÐ
FB_Step_PickItem, # Ê°È¡ÎïÆ·ÖÐ
FB_Step_Over, # ¸±±¾½áÊø
FB_Step_Close, # ¸±±¾¹Ø±Õ
) = range(6)
 
 
 
FBPlayerDict_TotalPoint = 'FBPlayerDict_TotalPoint'   # »ñµÃµÄ×ÜÅ­ÆøÖµ
FBPlayerDict_CostTime = 'FBPlayerDict_CostTime' #ͨ¹ØÊ±¼ä
FBPlayerDict_TotalExp = 'FBPlayerDict_TotalExp'   # »ñµÃµÄ×ܾ­Ñé
FBPlayerDict_TotalExpPoint = 'FBPlayerDict_TotalExpPoint'   # »ñµÃµÄ×ܾ­Ñéµã
 
 
 
 
##---»ñµÃ¸±±¾·ÖÏßÅäÖÃ---
#  @param None
#  @return ÅäÖÃÐÅÏ¢
def GetIceLodeNPCCfg():
    return FBCommon.GetFBLineRefreshNPC(GameWorld.GetMap().GetMapID())
 
def GetPointByNPCID(npcid):
    '''ͨ¹ýNPCID»ñÈ¡¶ÔÓ¦µÄ»ý·Ö'''
    npcPointDict = IpyGameDataPY.GetFuncEvalCfg('IceLodeNeedPoint', 2, {})
    
    return npcPointDict.get(npcid, 0)
 
 
## OnDay´¦Àí
#  @param curPlayer
#  @return None
def IceLodeOnDay(curPlayer):
 
    return
 
 
## ÊÇ·ñÄܹ»Í¨¹ý»î¶¯²éѯ½øÈë
#  @param curPlayer Íæ¼ÒʵÀý
#  @param mapID µØÍ¼ID
#  @param lineID Ïß·id
#  @param tick Ê±¼ä´Á
#  @return ²¼¶ûÖµ
def OnEnterFBEvent(curPlayer, mapID, lineID, tick):
    return True
 
 
 
##¸±±¾Íæ¼Ò½øÈëµã
# @param curPlayer Íæ¼ÒʵÀý
# @param mapID µØÍ¼ID
# @param lineId ·ÖÏßID
# @param ipyEnterPosInfo ¹¦ÄÜÏß·IPYÅäÖÃ×ø±êÐÅÏ¢
# @param tick Ê±¼ä´Á
# @return posX, posY, Ëæ»ú°ë¾¶(¿ÉÑ¡)
def OnGetFBEnterPos(curPlayer, mapID, lineId, ipyEnterPosInfo, tick):
    return ipyEnterPosInfo
 
 
##²éѯÊÇ·ñ¿ÉÒÔ½øÈëµØÍ¼
# @param ask:ÇëÇó½á¹¹Ìå(IPY_BMChangeMapAsk)
# @param tick:ʱ¼ä´Á
# @return IPY_GameWorld.cme Ã¶¾Ù
def OnChangeMapAsk(ask, tick):
    return IPY_GameWorld.cmeAccept
 
 
## ½ø¸±±¾
#  @param curPlayer
#  @param tick
#  @return None
def DoEnterFB(curPlayer, tick):
    playerID = curPlayer.GetPlayerID()
    GameWorld.DebugLog("DoEnterFB...", playerID)
    mapID = GameWorld.GetGameWorld().GetMapID()
    gameFB = GameWorld.GetGameFB()
    hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
    if not hadDelTicket:
        PyGameData.g_fbPickUpItemDict.pop(playerID, 0)
        GameWorld.DebugLog("DoEnterFB ¿Û³ýÈ볡ȯ£¬ÖØÖÃÐÅÏ¢£¡")
        delResult = FBCommon.DelFBEnterTicket(curPlayer, mapID)
        isOK = delResult[0]
        #hasBind = delResult[1]
        if not isOK:
            PlayerControl.PlayerLeaveFB(curPlayer)
            return
        FBCommon.SetHadDelTicket(curPlayer)
        FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_IceLode)
        FBCommon.SetFBStep(FB_Step_Prepare, tick)
        EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_IceLode, 0, ChConfig.CME_Log_Start)
 
    fbStep = gameFB.GetFBStep()
    if fbStep <= FB_Step_Prepare:
        mapID = GameWorld.GetMap().GetMapID()
        notify_tick = FBCommon.GetFBLineStepTime(mapID)[Def_PrepareTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
        curPlayer.Sync_TimeTick(IPY_GameWorld.tttAddUpTime, 0, max(notify_tick, 0), True)
        curPlayer.Sync_TimeTick(IPY_GameWorld.tttWaitStart, 0, max(notify_tick, 0), True)
        
    elif fbStep == FB_Step_Fighting:
        mapID = GameWorld.GetMap().GetMapID()
        notify_tick = FBCommon.GetFBLineStepTime(mapID)[Def_FightTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
        curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, max(notify_tick, 0), True)
    DoFBHelp(curPlayer, tick)
    return
 
##Íæ¼ÒÍ˳ö¸±±¾
# @param curPlayer Íæ¼ÒʵÀý
# @param tick Ê±¼ä´Á
# @return ÎÞÒâÒå
def DoExitFB(curPlayer, tick):
    
    return
 
##Íæ¼ÒÖ÷¶¯À뿪¸±±¾.
# @param curPlayer Íæ¼ÒʵÀý
# @param tick Ê±¼ä´Á
# @return ·µ»ØÖµÎÞÒâÒå
def DoPlayerLeaveFB(curPlayer, tick):
    return
 
 
def OnPickUpItem(curPlayer, curItem, tick):
    mapItemType = curItem.GetType()
    if mapItemType == ChConfig.Def_ItemType_Money:
        return
    playerID = curPlayer.GetID()
    isEquip = ItemCommon.CheckItemIsEquip(curItem)
    jsonItem = ItemCommon.GetJsonItem(curItem)
    if playerID in PyGameData.g_fbPickUpItemDict:
        if isEquip:
            PyGameData.g_fbPickUpItemDict[playerID].append(jsonItem)
        else:
            for itemInfo in PyGameData.g_fbPickUpItemDict[playerID]:
                if itemInfo["ItemID"] == jsonItem["ItemID"] and itemInfo.get("IsBind") == jsonItem.get("IsBind"):
                    itemInfo["Count"] = itemInfo.get("Count", 1)+ jsonItem.get("Count", 1)
    else:
        PyGameData.g_fbPickUpItemDict[playerID] = [jsonItem]
    
    isItemAllPickUp = (GameWorld.GetMapItemManager().GetMapItemCount() <= 1)
    if isItemAllPickUp and GameWorld.GetGameFB().GetFBStep() == FB_Step_PickItem:
        __DoIceLodeOver(True)
        
    
    #GameWorld.Log('PyGameData.g_fbPickUpItemDict=%s'%PyGameData.g_fbPickUpItemDict)
    return
 
 
## »ñµÃ¸±±¾°ïÖúÐÅÏ¢
#  @param curPlayer µ±Ç°Íæ¼Ò£¨±»Í¨Öª¶ÔÏó£©
#  @param tick µ±Ç°Ê±¼ä
#  @return None
def DoFBHelp(curPlayer, tick):
    gameFB = GameWorld.GetGameFB()
    
    # »ñµÃ¸±±¾ÐÅÏ¢
    totalPoint = gameFB.GetGameFBDictByKey(FBPlayerDict_TotalPoint)
  
    #¸±±¾°ïÖú
    helpDict = {FBCommon.Help_score:totalPoint}
    GameWorld.DebugLog("DoFBHelp %s" % str(helpDict))
    FBCommon.Notify_FBHelp(curPlayer, helpDict)
    return
 
 
##---¸±±¾×ÜÂß¼­¼ÆÊ±Æ÷---
# @param tick:ʱ¼ä´Á
# @return ÎÞÒâÒå
# @remarks ¸±±¾×ÜÂß¼­¼ÆÊ±Æ÷
def OnProcess(tick):
    fbStep = GameWorld.GetGameFB().GetFBStep()
    
    # ¸±±¾×¼±¸
    if fbStep == FB_Step_Prepare:
        __DoLogic_FB_Prepare(tick)    
    # ¸±±¾½øÐÐÖÐ
    elif fbStep == FB_Step_Fighting:
        __DoLogic_FB_Fighting(tick)
    # ¸±±¾Ê°È¡ÖÐ
    elif fbStep == FB_Step_PickItem:
        __DoLogic_FB_PickItem(tick)
    # ¸±±¾½áÊø
    elif fbStep == FB_Step_Over:
        __DoLogic_FB_Over(tick)
    
    return
 
## ¸±±¾×¼±¸Âß¼­
#  @param tick:ʱ¼ä´Á
#  @return ÎÞÒâÒå
def __DoLogic_FB_Prepare(tick):
    #gameFB = GameWorld.GetGameFB()
    mapID = GameWorld.GetMap().GetMapID()
    stepTimeCfg = FBCommon.GetFBLineStepTime(mapID)
    # ¼ä¸ôδµ½
    if tick - GameWorld.GetGameFB().GetFBStepTick() < stepTimeCfg[Def_PrepareTime] * 1000:
        return
    
    # ÉèÖÿªÊ¼Ë¢¹Ö
    npcCfg = GetIceLodeNPCCfg()
    for npcInfo in npcCfg:
        npcid = npcInfo[DL_NPCID]
        maxCnt = npcInfo[DL_ScreenMaxNPC]
        totalMaxCnt = npcInfo[DL_TotalNPCCnt]
        NPCCustomRefresh.SetNPCRefresh(npcInfo[Def_RefreshMark], [npcid], maxCnt, totalMaxCnt)
    NPCCustomRefresh.ProcessAllNPCRefresh(tick) # Á¢¼´³ö·¢Ò»´Î±êʶµãË¢ÐÂ
    
    # ¸±±¾¿ªÊ¼
    FBCommon.SetFBStep(FB_Step_Fighting, tick)
    FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttTowerTake, stepTimeCfg[Def_FightTime] * 1000)
    return
 
 
## ¸±±¾½øÐÐÖÐ
#  @param tick:ʱ¼ä´Á
#  @return ÎÞÒâÒå
def __DoLogic_FB_Fighting(tick):
    # ¼ä¸ôδµ½
    mapID = GameWorld.GetMap().GetMapID()
    if tick - GameWorld.GetGameFB().GetFBStepTick() < FBCommon.GetFBLineStepTime(mapID)[Def_FightTime] * 1000:
        return
    
    __DoIceLodeOver(False)
    return
 
## ¸±±¾Ê°È¡
#  @param tick:ʱ¼ä´Á
#  @return ÎÞÒâÒå
def __DoLogic_FB_PickItem(tick):
    # ¼ä¸ôδµ½
    mapID = GameWorld.GetMap().GetMapID()
    if tick - GameWorld.GetGameFB().GetFBStepTick() < FBCommon.GetFBLineStepTime(mapID)[Def_PickTime] * 1000:
        return
    
    #¸±±¾¹Ø±Õ
    GameWorldProcess.CloseFB(tick)
    FBCommon.SetFBStep(FB_Step_Close, tick)
    return
 
        
##¸±±¾¹Ø±ÕÖÐ
# @param tick:ʱ¼ä´Á
# @return ÎÞÒâÒå
# @remarks ¸±±¾¹Ø±ÕÖÐ
def __DoLogic_FB_Over(tick):
 
    # ¼ä¸ôδµ½
    mapID = GameWorld.GetMap().GetMapID()
    if tick - GameWorld.GetGameFB().GetFBStepTick() < FBCommon.GetFBLineStepTime(mapID)[Def_LeaveTime] * 1000:
        return
    
    #¸±±¾¹Ø±Õ
    GameWorldProcess.CloseFB(tick)
    FBCommon.SetFBStep(FB_Step_Close, tick)
    return
 
## »ñµÃ¾­Ñé
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param addExp »ñµÃµÄ¾­Ñé
#  @param expViewType ¾­ÑéÀàÐÍ
#  @return True or False
def OnGetExp(curPlayer, addExp, expViewType):
    
    if expViewType != ShareDefine.Def_ViewExpType_KillNPC:
        return
    
    playerID = curPlayer.GetID() 
    gameFB = GameWorld.GetGameFB()
    exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp)
    expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint)
    totalExp = expPoint * ChConfig.Def_PerPointValue + exp
    updTotalExp = totalExp + addExp
    updExp = updTotalExp % ChConfig.Def_PerPointValue
    updExpPoint = updTotalExp / ChConfig.Def_PerPointValue
    gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_TotalExp, updExp)
    gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_TotalExpPoint, updExpPoint)
    
    
    GameWorld.DebugLog("OnGetExp() totalExp=%s,addExp=%s,updTotalExp=%s" 
                       % (totalExp, addExp, updTotalExp), playerID)
    
    return
 
## ¼ì²éÊÇ·ñ¿É¹¥»÷£¬ Ö÷Åж¨²»¿É¹¥»÷µÄÇé¿ö£¬ÆäËûÂß¼­ÓÉÍâ²ã¾ö¶¨
#  @param attacker ¹¥»÷·½
#  @param defender ·ÀÊØ·½
#  @return bool
def CheckCanAttackTagObjInFB(attacker, defender):
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetFBStep() != FB_Step_Fighting:
        return False
    return True
 
## Ö´Ðи±±¾É±¹ÖÂß¼­
#  @param curPlayer É±¹ÖµÄÈË
#  @param curNPC ±»É±µÄ¹Ö
#  @param tick µ±Ç°Ê±¼ä
#  @return None
def DoFB_Player_KillNPC(curPlayer, curNPC, tick):
    gameFB = GameWorld.GetGameFB()
    npcid = curNPC.GetNPCID()
    addPoint = GetPointByNPCID(npcid)
    if not addPoint:
        return
    totalPoint = gameFB.GetGameFBDictByKey(FBPlayerDict_TotalPoint)
    maxPoint = IpyGameDataPY.GetFuncCfg('IceLodeNeedPoint')
    updPoint = min(totalPoint + addPoint, maxPoint)
    gameFB.SetGameFBDict(FBPlayerDict_TotalPoint, updPoint)
    
    if updPoint >= maxPoint:
        costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
        gameFB.SetGameFBDict(FBPlayerDict_CostTime, costTime)
        FBCommon.SetFBStep(FB_Step_PickItem, tick)
        mapID = GameWorld.GetMap().GetMapID()
        curPlayer.Sync_TimeTick(ChConfig.tttPickupItem, 0, FBCommon.GetFBLineStepTime(mapID)[Def_PickTime] * 1000, True)
        
        FBCommon.ClearFBNPC()
        npcCfg = GetIceLodeNPCCfg()
        for npcInfo in npcCfg:
            NPCCustomRefresh.CloseNPCRefresh(npcInfo[Def_RefreshMark], tick)
        
        #__DoIceLodeOver(True)
    
    DoFBHelp(curPlayer, tick)
    return
 
## ÊÇ·ñ¸±±¾¸´»î
#  @param None
#  @return ÊÇ·ñ¸±±¾¸´»î
def OnPlayerReborn():
    return True
 
## ¸±±¾½áÊø´¦Àí
def __DoIceLodeOver(isPass):
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetFBStep() == FB_Step_Over:
        return
    tick = GameWorld.GetGameWorld().GetTick()
    curPlayer = None
    playerManager = GameWorld.GetMapCopyPlayerManager()
    if playerManager.GetPlayerCount() > 0:
        curPlayer = playerManager.GetPlayerByIndex(0)
        
    if not curPlayer:
        GameWorldProcess.CloseFB(tick)
        return
    
    playerID = curPlayer.GetPlayerID()
    
    mapID = ChConfig.Def_FBMapID_IceLode
    hasPass = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, 0, False, [mapID])
    if isPass and not hasPass:
        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, 0, 1, False, [mapID])
        FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID) # Í¬²½ÐÅÏ¢
        
    # ¼Ç¼×îºóÒ»´ÎÊÖ´ò»ñµÃµÄ×ܾ­Ñé
    exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp)
    expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint)
    totalExp = expPoint * ChConfig.Def_PerPointValue + exp
    
    costTime = gameFB.GetGameFBDictByKey(FBPlayerDict_CostTime)
    if not costTime:
        costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
    jsonItemList = PyGameData.g_fbPickUpItemDict.get(playerID, [])
    
    # Í¨Öª½á¹û
    __SendIceLodeOverInfo(curPlayer, {FBCommon.Over_isPass:int(isPass),FBCommon.Over_exp:totalExp, FBCommon.Over_costTime:costTime, FBCommon.Over_itemInfo:jsonItemList})
    
    # ½øÈëÀ뿪½×¶Î
    FBCommon.SetFBStep(FB_Step_Over, tick)
    FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttLeaveMap, FBCommon.GetFBLineStepTime(mapID)[Def_LeaveTime] * 1000)
    
    # Çå¹Ö£¬¹Ø±ÕË¢¹Ö
    FBCommon.ClearFBNPC()
    npcCfg = GetIceLodeNPCCfg()
    for npcInfo in npcCfg:
        NPCCustomRefresh.CloseNPCRefresh(npcInfo[Def_RefreshMark], tick)
    
    return
 
## ·¢ËÍÌôÕ½½á¹ûÐÅÏ¢£¬É¨µ´½á¹ûͨÓÃ
def __SendIceLodeOverInfo(curPlayer, overDict):
    overDict[FBCommon.Over_dataMapID] = ChConfig.Def_FBMapID_IceLode
    GameWorld.DebugLog("__SendIceLodeOverInfo overDict=%s" % (str(overDict)), curPlayer.GetPlayerID())
    
    FBCommon.Notify_FB_Over(curPlayer, overDict)
    return
 
 
## ¸±±¾ÐÐΪ
#  @param curPlayer Íæ¼Ò
#  @param actionType ÐÐΪÀàÐÍ
#  @param actionInfo ÐÐΪÐÅÏ¢
#  @param tick µ±Ç°Ê±¼ä
#  @return None
def DoFBAction(curPlayer, actionType, actionInfo, tick):
    
    return
 
## ¿É·ñɨµ´
def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
    playerID = curPlayer.GetPlayerID()
    star = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, 0, False, [mapID])
    # ÊÇ·ñ¹ý¹Ø¹ý, É¨µ´ÐǼ¶ÏÞÖÆÔÝʱ¿Í»§¶ËÏÞÖÆ£¬ÕâÀïÖ»ÅжÏÊÇ·ñ¹ý¹Ø
    if star <= 0:
        GameWorld.DebugLog("IceLode µ±Ç°ËùÊôÏß·δ¹ý¹Ø¹ý£¬²»¿Éɨµ´£¡lineID=%s,star=%s" % (0, star), playerID)
        return False
    return True
 
## É¨µ´½á¹û
def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
    npcCountDict = {}
    iceLodeSweepDict = IpyGameDataPY.GetFuncEvalCfg('IceLodeSweep')
    for npcID, count in iceLodeSweepDict.items():
        npcCountDict[npcID] = count * sweepCnt
        
    exp_rate = PlayerControl.GetLimitExpRate(curPlayer, ChConfig.ExpRateLimitType_Sweep)
    jsonItemList, totalExp, totalMoney = NPCCommon.GiveKillNPCDropPrize(curPlayer, mapID, npcCountDict, exp_rate)
    GameWorld.DebugLog("ɨµ´½±Àø: ´ÎÊý=%s,totalExp=%s,totalMoney=%s,jsonItemList=%s" % (sweepCnt, totalExp, totalMoney, jsonItemList))
    overDict = {FBCommon.Over_isPass:1, FBCommon.Over_exp:totalExp, FBCommon.Over_isSweep:1, FBCommon.Over_itemInfo:jsonItemList}
    __SendIceLodeOverInfo(curPlayer, overDict)
    for _ in xrange(sweepCnt):
        EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_IceLode, 0, ChConfig.CME_Log_Start)
    return True