| | |
| | | import SkillShell
|
| | | import EventReport
|
| | | import SkillCommon
|
| | | import PlayerWeekParty
|
| | |
|
| | | import random
|
| | | import time
|
| | |
| | | FB_Step_Over, # 副本结束
|
| | | ) = range(3)
|
| | |
|
| | | def OnLogin(curPlayer):
|
| | | OnElderBattlefieldFBResult(curPlayer, True)
|
| | | def OnFBPlayerOnLogin(curPlayer):
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | if mapID != ChConfig.Def_FBMapID_ElderBattlefield:
|
| | | OnElderBattlefieldFBResult(curPlayer, True)
|
| | | return
|
| | |
|
| | | def OnElderBattlefieldStateChange(state, tick):
|
| | |
| | | GameWorld.GetGameWorld().SetGameWorldDict(FBPlayerDict_TotalExp % playerID, 0)
|
| | | GameWorld.GetGameWorld().SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, 0)
|
| | | EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_ElderBattlefield, 0, ChConfig.CME_Log_Start)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_ElderBattlefield, 1)
|
| | | else:
|
| | | rebornBuffLV = GameWorld.GetGameFB().GetPlayerGameFBDictByKey(playerID, FBPlayerDict_RebornBuffLV)
|
| | | __DoAddRebornBuff(curPlayer, rebornBuffLV, tick)
|
| | |
| | |
|
| | | def OnElderBattlefieldFBResult(curPlayer, isLogin=False):
|
| | | # 玩家处理上古战场结算信息
|
| | | curStage = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ElderBattlefieldStage, 0)
|
| | | if not curStage:
|
| | | return
|
| | | GameWorld.DebugLog(' 玩家处理上古战场结算信息 , isLogin=%s' % isLogin, curPlayer.GetPlayerID())
|
| | | lineID = 0 #GameWorld.GetGameWorld().GetPropertyID() -1
|
| | | fbRewardDict = FBCommon.GetFBLineReward(ChConfig.Def_FBMapID_ElderBattlefield, lineID)
|
| | |
|
| | | curStage = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ElderBattlefieldStage, 0)
|
| | | |
| | | itemList = fbRewardDict.get(curStage, [])
|
| | | succIDList = PlayerSuccess.GetCanGetAwardSuccByType(curPlayer, [ShareDefine.SuccType_ElderBattlefieldKill, ShareDefine.SuccType_ElderBattlefieldConKill])
|
| | | succAwardDict = PlayerSuccess.GiveSuccAward(curPlayer, succIDList, False)
|
| | |
| | | PlayerControl.SendMailByKey("ElderBattlefieldMail" if mapID == ChConfig.Def_FBMapID_ElderBattlefield else 'ElderBattlefieldMail2', [curPlayer.GetPlayerID()], rewardItemList)
|
| | | else:
|
| | | for itemID, itemCnt, isBind in rewardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem], event=["ElderBattlefield", False, {}])
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem], event=["ElderBattlefield", False, {}])
|
| | |
|
| | | overDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList), FBCommon.Over_succItemInfo:FBCommon.GetJsonItemList(succAwardDict.items())}
|
| | | FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_ElderBattlefield, lineID, 1, overDict)
|