| | |
| | | import ChPyNetSendPack
|
| | | import PlayerDBGSEvent
|
| | | import PlayerUniversalGameRec
|
| | | import PlayerCompensation
|
| | | import IpyGameDataPY
|
| | | import MergePlayer
|
| | | import PyGameDataStruct
|
| | |
| | | import CommFunc
|
| | | import PyGameData
|
| | | import PlayerGeTui
|
| | | import IPY_GameServer
|
| | |
|
| | | import time
|
| | |
|
| | |
|
| | |
| | | __SetIsAlive(bossID, isAlive)
|
| | | # 全服广播世界boss变更信息
|
| | | Sync_BossInfo(None, [bossID])
|
| | | |
| | | # 仙盟归属boss的重置
|
| | | if isAlive and bossID in PyGameData.g_familyOwnerBossInfo:
|
| | | PyGameData.g_familyOwnerBossInfo.pop(bossID)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | 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)
|
| | |
|
| | |
| | | if PlayerControl.GetIsTJG(curPlayer):
|
| | | return
|
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return |
| | | 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信息
|
| | | |
| | | #GameWorld.DebugLog("地图同步仙盟归属boss信息: %s" % msgInfo)
|
| | | if not isinstance(msgInfo, dict):
|
| | | return
|
| | | |
| | | PyGameData.g_familyOwnerBossInfo.update(msgInfo)
|
| | | #GameWorld.DebugLog(" PyGameData.g_familyOwnerBossInfo=%s" % PyGameData.g_familyOwnerBossInfo)
|
| | | return
|
| | |
|
| | | #// AC 04 查询仙盟抢Boss所有Boss当前进度 #tagCGQueryAllFamilyBossHurt
|
| | | #
|
| | | #struct tagCGQueryAllFamilyBossHurt
|
| | | #{
|
| | | # tagHead Head;
|
| | | #};
|
| | | def OnQueryAllFamilyBossHurt(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | |
| | | hurtPack = ChPyNetSendPack.tagGCAllFamilyBossHurtInfoList()
|
| | | hurtPack.NPCHurtInfo = []
|
| | | for npcID, hurtInfo in PyGameData.g_familyOwnerBossInfo.items():
|
| | | curHP, maxHP, firstFamilyID, firstFamilyName = hurtInfo
|
| | | hurtInfo = ChPyNetSendPack.tagGCFamilyBossHurtInfo()
|
| | | hurtInfo.NPCID = npcID
|
| | | hurtInfo.CurHP = curHP%ShareDefine.Def_PerPointValue
|
| | | hurtInfo.CurHPEx = curHP/ShareDefine.Def_PerPointValue
|
| | | hurtInfo.MaxHP = maxHP%ShareDefine.Def_PerPointValue
|
| | | hurtInfo.MaxHPEx = maxHP/ShareDefine.Def_PerPointValue
|
| | | hurtInfo.FamilyID = firstFamilyID
|
| | | hurtInfo.FamilyName = firstFamilyName
|
| | | hurtInfo.NameLen = len(hurtInfo.FamilyName)
|
| | | hurtPack.NPCHurtInfo.append(hurtInfo)
|
| | | hurtPack.NPCCount = len(hurtPack.NPCHurtInfo)
|
| | | NetPackCommon.SendFakePack(curPlayer, hurtPack)
|
| | | return
|
| | |
|
| | | #// AC 05 召集仙盟成员打boss #tagCGCallupFamilyMemberToBoss
|
| | | #
|
| | | #struct tagCGCallupFamilyMemberToBoss
|
| | | #{
|
| | | # tagHead Head;
|
| | | # DWORD NPCID;
|
| | | #};
|
| | | def OnCallupFamilyMemberToBoss(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | npcID = clientData.NPCID
|
| | | |
| | | curFamily = curPlayer.GetFamily()
|
| | | if curFamily == None:
|
| | | return
|
| | | curMember = curFamily.FindMember(playerID)
|
| | | if curMember == None:
|
| | | return
|
| | | if curMember.GetFamilyLV() == IPY_GameServer.fmlMember:
|
| | | GameWorld.DebugLog("普通成员无法召集!", playerID)
|
| | | return
|
| | | PlayerControl.FamilyNotify(curFamily.GetID(), "FairyGrabBossHelp", [npcID])
|
| | | return
|
| | |
|