| | |
| | | import ItemCommon
|
| | | import FormulaControl
|
| | | import NPCCustomRefresh
|
| | | import PlayerWeekParty
|
| | | import PlayerSuccess
|
| | | import PyGameData
|
| | | import EventReport
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XMZZLastStartTime, curtime)
|
| | | #FBCommon.SetFBStep(FB_Step_Prepare, tick)
|
| | | #PrepareXMZZPK(curPlayer, tick)
|
| | | |
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_XMZZ, 1)
|
| | | msgInfo = str([1]) # 是否刚开始
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, 'XMZZStartFight', msgInfo, len(msgInfo))
|
| | | curPlayer.SetHP(curPlayer.GetMaxHP())
|
| | |
| | | curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, remainTime * 1000, True)
|
| | | DoFBHelp(curPlayer, tick)
|
| | | # fbStep = gameFB.GetFBStep()
|
| | | PlayerControl.DelLimitSuperBuff(curPlayer, tick)
|
| | | return
|
| | |
|
| | | ##---副本总逻辑计时器---
|
| | |
| | | fbStep = GameWorld.GetGameFB().GetFBStep()
|
| | |
|
| | | # # 副本准备
|
| | | # if fbStep == FB_Step_Prepare:
|
| | | if fbStep == FB_Step_Prepare:
|
| | | ResetPos(tick)
|
| | | |
| | | # PrepareXMZZPK(tick)
|
| | | # # 副本进行中
|
| | | if fbStep == FB_Step_Fighting:
|
| | |
| | | # __DoLogic_FB_Over(tick)
|
| | |
|
| | |
|
| | | return
|
| | |
|
| | | def ResetPos(tick):
|
| | | if tick - GameWorld.GetGameFB().GetFBStepTick() < 1 * 1000:
|
| | | return
|
| | | FBCommon.SetFBStep(FB_Step_Fighting, tick)
|
| | | curPlayer = FBCommon.GetCurSingleFBPlayer()
|
| | | if curPlayer:
|
| | | __ResetPos(curPlayer)
|
| | | return
|
| | |
|
| | | def __ChcekFBOver(tick):
|
| | |
| | | #===============================================================================================
|
| | | FBCommon.SetFBStep(FB_Step_Prepare, tick)
|
| | | #重置坐标
|
| | | __ResetPos(curPlayer)
|
| | | #__ResetPos(curPlayer)
|
| | |
|
| | | FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttWaitStart, __GetFightTime()[Def_PrepareTime] * 1000)
|
| | | FBCommon.SetFBStep(FB_Step_Fighting, tick)
|
| | | #FBCommon.SetFBStep(FB_Step_Fighting, tick)
|
| | |
|
| | | if not vsPlayerInfo:
|
| | | return
|
| | |
| | | # @return 返回值无意义
|
| | | # @remarks 玩家主动离开副本.
|
| | | def DoPlayerDead(curPlayer):
|
| | | if GameWorld.GetGameFB().GetFBStep() != FB_Step_Fighting:
|
| | | return
|
| | | # if GameWorld.GetGameFB().GetFBStep() != FB_Step_Fighting:
|
| | | # return
|
| | |
|
| | | HPPer = __GetHPPer(curPlayer)
|
| | | __SendPKResult(curPlayer, 0, 1, HPPer)
|
| | |
| | | prizeItemList = winCntAwardDict[str(prizeEx)]
|
| | | # 给物品 [奖励物品id,个数,是否绑定]
|
| | | for itemID, itemCnt, isBind in prizeItemList:
|
| | | if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind,
|
| | | [IPY_GameWorld.rptItem], True, showSysInfo=True):
|
| | | if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem]):
|
| | |
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | GameWorld.ErrLog("OnGetXMZZPrizeResult(), give item itemid:%s,count:%s" % (itemID, itemCnt), playerID)
|
| | |
| | | lastStartTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XMZZLastStartTime)
|
| | | curTime = int(time.time())
|
| | | costTime = (curTime-lastStartTime)*1000
|
| | | overDict = {FBCommon.Over_score:addScore, FBCommon.Over_extrScore:updExtraScore,
|
| | | overDict = {FBCommon.Over_score:updScore, FBCommon.Over_extrScore:updExtraScore,
|
| | | FBCommon.Over_extraExp:updExtraExp, FBCommon.Over_extraExpPoint:updExtraExpPoint,
|
| | | FBCommon.Over_exp:exp, FBCommon.Over_expPoint:expPoint, FBCommon.Over_costTime:costTime,
|
| | | FBCommon.Over_exp:updExp, FBCommon.Over_expPoint:updExpPoint, FBCommon.Over_costTime:costTime,
|
| | | 'conWinCnt':conWinCnt}
|
| | | FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_XMZZ, 0, isWin, overDict)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XMZZLastStartTime, 0)
|