| | |
| | | import ChPyNetSendPack
|
| | | import PlayerDBGSEvent
|
| | | import PlayerUniversalGameRec
|
| | | import PlayerCompensation
|
| | | import IpyGameDataPY
|
| | | import MergePlayer
|
| | | import PyGameDataStruct
|
| | |
| | | import CommFunc
|
| | | import PyGameData
|
| | | import PlayerGeTui
|
| | | import time
|
| | | import IPY_GameServer
|
| | |
|
| | | import time
|
| | |
|
| | |
|
| | |
|
| | |
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornPoint, updPoint)
|
| | | if curPoint+addPoint >= totalPoint:
|
| | | #重生boss
|
| | | rebornCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt)
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt, rebornCnt+1)
|
| | | |
| | | killBossCntLimitDict = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 1, {})
|
| | | canRebornBossIDList = []
|
| | | for bidlist, bkey in killBossCntLimitDict.items():
|
| | | if bkey not in [0, 1]:
|
| | | if bkey not in [ShareDefine.Def_Boss_Func_World, ShareDefine.Def_Boss_Func_Home]:
|
| | | continue
|
| | | canRebornBossIDList += list(bidlist)
|
| | |
|
| | |
| | | def ResetBossRebornPoint():
|
| | | ## 重置boss复活点
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornPoint, 0)
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt, 0)
|
| | | |
| | | # 活动开启时设置参数 服务器人数
|
| | | lvLimit = IpyGameDataPY.GetFuncCfg('ServerActivePlayerCnt')
|
| | | yesterdayPlayerCnt = len([1 for lv in PyGameData.g_yesterdayPlayerLVDict.values() if lv >= lvLimit]) #参数昨日活跃人数
|
| | |
| | | if not totalPoint:
|
| | | totalPoint = SetBossRebornNeedPoint()
|
| | | packData.TotalPoint = totalPoint
|
| | | packData.RebornCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt)
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | if not curPlayer:
|
| | | for i in xrange(playerManager.GetActivePlayerCount()):
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | |
|
| | | ## -----------------------------------------------------------------------------------------------
|
| | |
|
| | | def MapServer_HorsePetRobBossHurtPlayer(msgInfo):
|
| | | ## 骑宠争夺boss伤血玩家同步
|
| | | GameWorld.Log("骑宠争夺boss伤血玩家同步: %s" % str(msgInfo))
|
| | | if not isinstance(msgInfo, list) and len(msgInfo) != 2:
|
| | | return
|
| | | |
| | | bossID, familyHurtPlayerIDListDict = msgInfo
|
| | | PyGameData.g_horsePetRobBossHurtPlayerIDInfo[bossID] = familyHurtPlayerIDListDict
|
| | | GameWorld.Log("伤血玩家汇总: %s" % PyGameData.g_horsePetRobBossHurtPlayerIDInfo)
|
| | | |
| | | # 判断是否都同步上来了
|
| | | horsePetRobBossIDList = IpyGameDataPY.GetFuncEvalCfg("FairyGrabBossID", 1)
|
| | | for needBossID in horsePetRobBossIDList:
|
| | | if needBossID not in PyGameData.g_horsePetRobBossHurtPlayerIDInfo:
|
| | | return
|
| | | |
| | | # 结算活动参与奖励
|
| | | joinAwardItemList = IpyGameDataPY.GetFuncEvalCfg("FairyGrabBossID", 2)
|
| | | joinPlayerIDList = []
|
| | | for familyHurtPlayerIDDict in PyGameData.g_horsePetRobBossHurtPlayerIDInfo.values():
|
| | | for playerIDList in familyHurtPlayerIDDict.values():
|
| | | for playerID in playerIDList:
|
| | | if playerID not in joinPlayerIDList:
|
| | | joinPlayerIDList.append(playerID)
|
| | | |
| | | GameWorld.Log("结算骑宠争夺参与奖玩家: joinPlayerIDList=%s" % joinPlayerIDList)
|
| | | PlayerCompensation.SendMailByKey("FairyGrabBossJoin", joinPlayerIDList, joinAwardItemList)
|
| | | PyGameData.g_horsePetRobBossHurtPlayerIDInfo = {}
|
| | | return
|
| | |
|
| | | def MapServer_FamilyOwnerBossInfo(msgInfo):
|
| | | ## 地图同步仙盟归属boss信息
|
| | |
|