| | |
| | | FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV' # 鼓舞等级
|
| | | FBDict_IsOver = 'FBDict_IsOver' #是否已结算, 结算时的tick
|
| | | FBDict_IsReduceing = 'FBDict_IsReduceing' #是否掉血中
|
| | | FBPlayerDict_Rank = "FBPlayerDict_Rank" # 玩家排名
|
| | | FBDict_BossTotalHP = 'FBDict_BossTotalHP' #BOSS血量
|
| | | FBDict_LastHurtTick = 'FBDict_LastHurtTick' #上次伤害时间
|
| | | FBDict_IsEncourage = 'FBDict_IsEncourage' #是否鼓舞过
|
| | | FBDict_LastHPNotify = 'FBDict_LastHPNotify' #上一个血量广播
|
| | |
|
| | | (
|
| | | Def_BossTime, #BOSS时间
|
| | | Def_LeaveTime,#离开时间
|
| | | Def_BossTime, #BOSS时间
|
| | | Def_LeaveTime, #离开时间
|
| | | ) = range(2)
|
| | |
|
| | | #当前副本地图的状态
|
| | | (
|
| | | FB_Step_Open, # 副本开启
|
| | | FB_Step_Fighting, # 副本进行中
|
| | | FB_Step_Over, # 副本结束
|
| | | FB_Step_Close, # 副本关闭
|
| | | FB_Step_Open, # 副本开启
|
| | | FB_Step_Fighting, # 副本进行中
|
| | | FB_Step_Over, # 副本结束
|
| | | FB_Step_Close, # 副本关闭
|
| | | ) = range(4)
|
| | |
|
| | |
|
| | | def OnFBPlayerOnLogin(curPlayer):
|
| | |
|
| | |
| | | gameWorld.SetGameWorldDict(FBDict_StartTick, 0)
|
| | | gameWorld.SetGameWorldDict(FBDict_Speed, 0)
|
| | | gameWorld.SetGameWorldDict(FBDict_RemainHP, 0)
|
| | | |
| | | gameWorld.SetGameWorldDict(FBDict_IsReduceing, 0)
|
| | | gameWorld.SetPropertyID(0)
|
| | | PyGameData.g_allfamilyBossDict = {}
|
| | | return
|
| | |
| | | remainHPPer = min(1000000, remainHP * 1000000 / totalHP) if totalHP else 0
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | IsEncourage = GameWorld.GetGameFB().GetPlayerGameFBDictByKey(playerID, FBDict_IsEncourage)
|
| | | fbHelpDict = {"hurtInfo":hurtInfo, 'hpReduceSpeed':hpReduceSpeed,'IsEncourage':IsEncourage,
|
| | | fbHelpDict = {"hurtInfo":hurtInfo, 'hpReduceSpeed':hpReduceSpeed, 'IsEncourage':IsEncourage,
|
| | | 'remainHPPer':remainHPPer, 'isReduceing':isReduceing, 'myHurt':myHurt % ChConfig.Def_PerPointValue,
|
| | | 'myHurtEx':myHurt / ChConfig.Def_PerPointValue, 'myRank':myRank, 'myMenberCnt':myMenberCnt
|
| | | }
|
| | |
| | | GameWorldProcess.CloseFB(tick)
|
| | | FBCommon.SetFBStep(FB_Step_Close, tick)
|
| | | return
|
| | |
|
| | |
|
| | | elif fbStep == FB_Step_Fighting:
|
| | | startTick = gameWorld.GetGameWorldDictByKey(FBDict_StartTick)
|
| | |
| | |
|
| | | if isPass:
|
| | | worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | familyAuctionItemDict = {} #{仙盟ID:[[享受收益的成员ID, ...], [[拍品ID,总个数,拍品组数], ...]], ...}
|
| | | familyAuctionItemDict = {} #{仙盟ID:[[享受收益的成员ID, ...], [[拍品ID,总个数,拍品组数], ...]], ...}
|
| | | batchPlayerIDList, batchAddItemList, batchParamList, batchDetailList = [], [], [], []
|
| | | event=["AllFamilyBoss", False, {}]
|
| | | event = ["AllFamilyBoss", False, {}]
|
| | | needMemberCnt = IpyGameDataPY.GetFuncCfg('LeagueBOSSNumber1')
|
| | | for rank, hurtInfo in enumerate(playerHurtList, 1):
|
| | | familyID = hurtInfo[0]
|
| | | memberIDList = hurtInfo[1][2]
|
| | | memberCnt = len(memberIDList)
|
| | | familyAuctionItemList, menberItemList = __GetFamilyBossAward(rank, worldLV)
|
| | | GameWorld.Log('rank=%s,worldLV=%s,familyAuctionItemList=%s,menberItemList=%s,memberCnt=%s'%(rank, worldLV,familyAuctionItemList,menberItemList, memberCnt), familyID)
|
| | | GameWorld.Log('rank=%s,worldLV=%s,familyAuctionItemList=%s,menberItemList=%s,memberCnt=%s' % (rank, worldLV, familyAuctionItemList, menberItemList, memberCnt), familyID)
|
| | |
|
| | | overDict = {FBCommon.Over_rank:rank, 'memberCnt':len(memberIDList)}
|
| | | if memberCnt >= needMemberCnt and familyAuctionItemList:#仙盟拍品
|
| | | if memberCnt >= needMemberCnt and familyAuctionItemList: #仙盟拍品
|
| | | familyAuctionItemDict[familyID] = [memberIDList, familyAuctionItemList]
|
| | | overDict['AuctionItem'] = FBCommon.GetJsonItemList(familyAuctionItemList)
|
| | | if menberItemList: #成员奖励
|
| | | if menberItemList: #成员奖励
|
| | | overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList(menberItemList)
|
| | |
|
| | | mailPlayerIDList = []
|
| | |
| | | if batchPlayerIDList:
|
| | | PlayerControl.SendMailBatch("LeagueBOSS2", batchPlayerIDList, batchAddItemList, batchParamList, batchDetail=batchDetailList)
|
| | | if familyAuctionItemDict:
|
| | | GameWorld.Log('familyAuctionItemDict=%s'%familyAuctionItemDict)
|
| | | GameWorld.Log('familyAuctionItemDict=%s' % familyAuctionItemDict)
|
| | | PlayerAuctionHouse.DoAddFamilyAuctionItem(familyAuctionItemDict)
|
| | | else:
|
| | | playerCount = playerManager.GetPlayerCount()
|
| | |
| | | FBCommon.NotifyFBOver(member, ChConfig.Def_FBMapID_AllFamilyBoss, lineID, isPass)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def __GetFamilyBossAward(rank, worldLV):
|
| | | familyAuctionItemList, menberItemList = [], []
|
| | |
| | | continue
|
| | | awardRateList = ipyData.GetAward()
|
| | | if not awardRateList:
|
| | | GameWorld.ErrLog('仙盟Boss奖励表 未配置该奖励 rank=%s,worldLV=%s'%(rank, worldLV))
|
| | | GameWorld.ErrLog('仙盟Boss奖励表 未配置该奖励 rank=%s,worldLV=%s' % (rank, worldLV))
|
| | | return familyAuctionItemList, menberItemList
|
| | | for rate, itemInfo in awardRateList:
|
| | | if not GameWorld.CanHappen(rate, 10000):
|
| | | continue
|
| | | if len(itemInfo) != 3:
|
| | | GameWorld.ErrLog('仙盟Boss奖励表配置错误 itemInfo=%s'%itemInfo)
|
| | | GameWorld.ErrLog('仙盟Boss奖励表配置错误 itemInfo=%s' % itemInfo)
|
| | | continue
|
| | | if itemInfo[2]:
|
| | | familyAuctionItemList.append(itemInfo)
|
| | |
| | | gameFB = GameWorld.GetGameFB()
|
| | | isOver = gameFB.GetGameFBDictByKey(FBDict_IsOver)
|
| | |
|
| | | if not isOver and GetBossRemainHP(tick) == 0:
|
| | | |
| | | #结束 设置BOSS死亡
|
| | | FBCommon.ClearFBNPC()
|
| | | FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
|
| | | GameWorld.DebugLog('结束 设置BOSS死亡')
|
| | | if not isOver: |
| | | if GetBossRemainHP(tick) == 0:
|
| | | #结束 设置BOSS死亡
|
| | | FBCommon.ClearFBNPC()
|
| | | FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
|
| | | GameWorld.DebugLog('结束 设置BOSS死亡')
|
| | | |
| | | gameFB.SetGameFBDict(FBDict_IsOver, tick)
|
| | | |
| | | __DoLogicAllFamilyBossOver(1, tick)
|
| | | else:
|
| | | #血量广播
|
| | | needNotifyHPPerList = [50, 20]
|
| | | lastIndex = gameFB.GetGameFBDictByKey(FBDict_LastHPNotify)
|
| | | if lastIndex >= len(needNotifyHPPerList):
|
| | | return
|
| | | remainPer = GetBossRemainHPPer(tick)
|
| | | notifyHPPer = needNotifyHPPerList[lastIndex]
|
| | | if remainPer == notifyHPPer or remainPer - 1 == notifyHPPer:
|
| | | gameFB.SetGameFBDict(FBDict_LastHPNotify, lastIndex + 1)
|
| | | lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
|
| | | bossID = CurFBLineBOSSID(lineID)
|
| | | msgMark = 'AllianceBossHP1' if lineID == 0 else 'AllianceBossHP2'
|
| | | PlayerControl.WorldNotify(0, msgMark, [bossID, remainPer])
|
| | |
|
| | | gameFB.SetGameFBDict(FBDict_IsOver, tick)
|
| | | |
| | | __DoLogicAllFamilyBossOver(1, tick)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | |
| | | lastSpeed = gameWorld.GetGameWorldDictByKey(FBDict_Speed)
|
| | | remainHP = gameWorld.GetGameWorldDictByKey(FBDict_RemainHP)
|
| | | if not gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing):
|
| | | return remainHP
|
| | | return remainHP if startTick else __GetBossTotalHP()
|
| | | if not startTick:
|
| | | startTick = tick
|
| | | remainHP = __GetBossTotalHP()
|