| | |
| | |
|
| | | import GameWorld
|
| | | import ItemControler
|
| | | import PlayerBeauty
|
| | | import FBCommon
|
| | |
|
| | | def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
|
| | |
| | | def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, dataEx, askRet):
|
| | | ## 扫荡结果,次数消耗已在外层处理扣除
|
| | |
|
| | | itemList = FBCommon.GetSweepAwardList(mapID, lineID, sweepCnt)
|
| | | GameWorld.DebugLog("白骨盈野扫荡: mapID=%s,lineID=%s,sweepCnt=%s" % (mapID, lineID, sweepCnt))
|
| | | itemList = []
|
| | | itemList += FBCommon.GetSweepAwardList(mapID, lineID, sweepCnt)
|
| | | GameWorld.DebugLog("白骨盈野扫荡: mapID=%s,lineID=%s,sweepCnt=%s,itemList=%s" % (mapID, lineID, sweepCnt, itemList))
|
| | |
|
| | | addPer = PlayerBeauty.GetBeautyEffInfo(curPlayer, PlayerBeauty.EffType_FBZhanchuiAwardPer)[0] # 扫荡奖励百分比
|
| | | if addPer:
|
| | | GameWorld.DebugLog("红颜额外增加扫荡奖励百分比: %s, itemList=%s" % (addPer, itemList))
|
| | | itemListEx = []
|
| | | for itemInfo in itemList:
|
| | | itemID = itemInfo[0]
|
| | | itemCount = itemInfo[1]
|
| | | addCount = int(itemCount * addPer / 100.0)
|
| | | if addCount > 0:
|
| | | itemListEx.append([itemID, addCount, 1]) # 标记是红颜效果额外获得的
|
| | | itemList += itemListEx
|
| | | GameWorld.DebugLog("itemListEx=%s,itemList=%s" % (itemListEx, itemList))
|
| | | |
| | | ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
|
| | |
|
| | | isPass = 1
|
| | | overDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList), FBCommon.Over_isSweep:1}
|
| | | jsonItemList = []
|
| | | for itemInfo in itemList:
|
| | | itemID = itemInfo[0]
|
| | | itemCount = itemInfo[1]
|
| | | itemDict = {"ItemID":itemInfo[0], "Count":itemInfo[1]}
|
| | | if len(itemInfo) > 2:
|
| | | itemDict['BeautyEx'] = itemInfo[2]
|
| | | jsonItemList.append(itemDict)
|
| | | overDict = {FBCommon.Over_itemInfo:jsonItemList, FBCommon.Over_isSweep:1}
|
| | | FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
|
| | |
|
| | | return True
|