#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package GameWorldLogic.FBProcess.GameLogic_Zhanchui
|
#
|
# @todo:°×¹ÇÓ¯Ò°/Õ½´¸Ãؾ³
|
# @author hxp
|
# @date 2025-09-30
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: °×¹ÇÓ¯Ò°/Õ½´¸Ãؾ³
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2025-09-30 10:30"""
|
#-------------------------------------------------------------------------------
|
|
import GameWorld
|
import ItemControler
|
import FBCommon
|
|
def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
|
## »ØºÏÕ½¶·ÇëÇó
|
|
if FBCommon.IsFBPass(curPlayer, mapID, funcLineID):
|
GameWorld.DebugLog("Òѹý¹ØµÄ²»Äܲ»Öظ´ÌôÕ½! mapID=%s,funcLineID=%s" % (mapID, funcLineID))
|
return
|
|
return True
|
|
def OnTurnFightOver(curPlayer, turnFight, mapID, funcLineID, overMsg):
|
## »ØºÏÕ½¶·½áÊø
|
|
if not curPlayer:
|
return
|
|
isWin = turnFight.isWin
|
|
if not isWin:
|
return
|
|
if FBCommon.IsFBPass(curPlayer, mapID, funcLineID):
|
GameWorld.DebugLog("Òѹý¹ØµÄ²»Öظ´»ñµÃ¹ý¹Ø½±Àø! mapID=%s,funcLineID=%s" % (mapID, funcLineID))
|
return
|
|
itemList = FBCommon.GetPassAwardList(mapID, funcLineID)
|
GameWorld.DebugLog("¹ý¹Ø½±Àø: mapID=%s,funcLineID=%s,itemList=%s" % (mapID, funcLineID, itemList))
|
# Ê×ͨ²»¿Û´ÎÊý
|
FBCommon.SetFBPass(curPlayer, mapID, funcLineID)
|
ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
|
overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
|
|
return
|
|
def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, dataEx):
|
## ¿É·ñɨµ´
|
|
return True
|
|
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))
|
|
ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
|
|
isPass = 1
|
overDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList), FBCommon.Over_isSweep:1}
|
FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
|
|
return True
|