| | |
| | | import ShareDefine
|
| | | import PlayerActivity
|
| | | import NPCCustomRefresh
|
| | | import ItemControler
|
| | | import PlayerWeekParty
|
| | | import EventReport
|
| | | import NPCCommon
|
| | | import GameObj
|
| | |
| | | if not hadDelTicket:
|
| | | FBCommon.SetHadDelTicket(curPlayer)
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_HorsePetBoss, 1)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_HorsePetBoss, 1)
|
| | | EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_HorsePetBoss, 0, ChConfig.CME_Log_Start)
|
| | | EventShell.EventRespons_HorsePetBoss(curPlayer)
|
| | | if fbStep == FB_Step_Open:
|
| | |
| | | if not playerHurtList:
|
| | | GameWorld.Log(' __DoLogicHorsePetBossOver, 伤害榜上没有人!!lineID=%s'%lineID)
|
| | | return
|
| | | |
| | | event = ["HorsePetBoss", False, {}]
|
| | | bossID = CurFBLineBOSSID(lineID)
|
| | | #event = ["HorsePetBoss", False, {}]
|
| | | batchPlayerIDList, batchAddItemList, batchParamList, batchDetailList = [], [], [], []
|
| | | playerManager = GameWorld.GetMapCopyPlayerManager()
|
| | | worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | |
| | | auctionItemList, itemList = __GetHorsePetBossAward(lineID, rank, worldLV)
|
| | | else:
|
| | | auctionItemList, itemList = [], []
|
| | | GameWorld.Log('auctionItemList=%s,itemList=%s'%(auctionItemList, itemList))
|
| | | GameWorld.Log('auctionItemList=%s,itemList=%s, rank=%s'%(auctionItemList, itemList, rank), playerID)
|
| | | giveItemList = auctionItemList+itemList
|
| | | player = playerManager.FindPlayerByID(playerID)
|
| | | if player:
|
| | |
| | | if itemList:
|
| | | overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList(itemList)
|
| | | if giveItemList:
|
| | | NPCCommon.DoVirtualItemDrop(player, giveItemList, dropPosX, dropPosY)
|
| | | |
| | | ItemControler.GivePlayerItemOrMail(player, giveItemList, 'QCBOSS1', event)
|
| | | NPCCommon.DoGiveItemByVirtualDrop(player, giveItemList, bossID, dropPosX, dropPosY, mailTypeKey='QCBOSS1')
|
| | |
|
| | | player.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
|
| | | FBCommon.NotifyFBOver(player, ChConfig.Def_FBMapID_HorsePetBoss, lineID, isPass, overDict)
|
| | | elif giveItemList:
|
| | |
| | | if len(itemInfo) != 3:
|
| | | GameWorld.ErrLog('骑宠Boss奖励表 配置错误 itemInfo=%s' % itemInfo)
|
| | | continue
|
| | | if not itemInfo[0]:
|
| | | continue
|
| | | if itemInfo[2]:
|
| | | auctionItemList.append(itemInfo)
|
| | | else:
|
| | | itemList.append(itemInfo)
|
| | |
|
| | | for doCnt, awardPieRateList in awardPieRateDict.items():
|
| | | for _ in xrange(doCnt):
|
| | | resultItem = GameWorld.GetResultByRandomList(awardPieRateList)
|
| | | if len(resultItem) != 3:
|
| | | GameWorld.ErrLog('骑宠Boss奖励表配置错误 itemInfo=%s' % resultItem)
|
| | | continue
|
| | | if resultItem[2]:
|
| | | auctionItemList.append(resultItem)
|
| | | else:
|
| | | itemList.append(resultItem)
|
| | | for awardPieRateList in awardPieRateDict:
|
| | | resultItem = GameWorld.GetResultByRandomList(awardPieRateList)
|
| | | if len(resultItem) != 3:
|
| | | GameWorld.ErrLog('骑宠Boss奖励表配置错误 itemInfo=%s' % resultItem)
|
| | | continue
|
| | | if not resultItem[0]:
|
| | | continue
|
| | | if resultItem[2]:
|
| | | auctionItemList.append(resultItem)
|
| | | else:
|
| | | itemList.append(resultItem)
|
| | | return auctionItemList, itemList
|
| | |
|
| | |
|