| | |
| | | import NPCCommon
|
| | | import ChConfig
|
| | | import ChItem
|
| | | import ItemControler
|
| | |
|
| | | FBDict_IsOver = 'FBDict_IsOver' #是否已结算, 结算时的tick
|
| | | FBDict_IsPlayerOver = 'IsPlayerOver_%s' #玩家是否已经结算掉落的,参数playerID
|
| | |
| | |
|
| | | return giveItemList
|
| | |
|
| | | ## 可否扫荡
|
| | | def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
|
| | | curState = PlayerFairyDomain.GetFairyDomainFBEventState(curPlayer, mapID, lineID)
|
| | | if curState not in [PlayerFairyDomain.FDEventState_CanVisit, PlayerFairyDomain.FDEventState_Visiting]:
|
| | | GameWorld.DebugLog("缥缈无法扫荡! 不存在该事件或无法进入! mapID=%s,lineID=%s,curState=%s" % (mapID, lineID, curState))
|
| | | return False
|
| | | return True
|
| | |
|
| | | ## 扫荡结果
|
| | | def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition("FairyDomain", {"MapID":mapID, "LineID":lineID})
|
| | | if not ipyData:
|
| | | return
|
| | | eventID = ipyData.GetID()
|
| | | PlayerFairyDomain.SetFairyDomainFBEventState(curPlayer, mapID, lineID, PlayerFairyDomain.FDEventState_Visited)
|
| | | |
| | | isOwner = True
|
| | | giveItemList = __GetDemonKingPrizeItemList(curPlayer, mapID, lineID, eventID, isOwner)
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList)
|
| | | |
| | | isPass = 1
|
| | | overDict = {FBCommon.Over_ownerID:playerID, FBCommon.Over_ownerName:curPlayer.GetPlayerName(), |
| | | FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(giveItemList), FBCommon.Over_isSweep:1}
|
| | | FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
|
| | | return
|
| | |
|