|  |  |  | 
|---|
|  |  |  | import PlayerGeTui | 
|---|
|  |  |  | import IPY_GameServer | 
|---|
|  |  |  | import CrossBoss | 
|---|
|  |  |  | import PlayerFB | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import time | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if bossID <= 0: | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bossID, killPlayerName, hurtValue, isNotify, realMapID, dataMapID, copyMapID, killerIDList = msgList | 
|---|
|  |  |  | bossID, killPlayerName, hurtValue, isNotify, mapID, realMapID, copyMapID, killerIDList = msgList | 
|---|
|  |  |  | mapID = PlayerFB.GetRecordMapID(mapID) | 
|---|
|  |  |  | if GameWorld.IsCrossServer(): | 
|---|
|  |  |  | CrossBoss.DoCrossBossOnKilled(bossID, killPlayerName, realMapID, dataMapID, copyMapID, killerIDList) | 
|---|
|  |  |  | CrossBoss.DoCrossBossOnKilled(bossID, killPlayerName, mapID, realMapID, copyMapID, killerIDList) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | mapID = dataMapID | 
|---|
|  |  |  | isAddKillCnt = False | 
|---|
|  |  |  |  | 
|---|
|  |  |  | isMapNeedShunt = IsMapNeedBossShunt(mapID) | 
|---|
|  |  |  | 
|---|
|  |  |  | ## 世界boss状态变更 | 
|---|
|  |  |  | if len(msgList) <= 0: | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bossID, isAlive, dataMapID, realMapID, copyMapID = msgList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bossID, isAlive, mapID, realMapID, copyMapID = msgList | 
|---|
|  |  |  | mapID = PlayerFB.GetRecordMapID(mapID) | 
|---|
|  |  |  | if GameWorld.IsCrossServer(): | 
|---|
|  |  |  | CrossBoss.DoCrossBossStateChange(bossID, isAlive, dataMapID, realMapID, copyMapID) | 
|---|
|  |  |  | CrossBoss.DoCrossBossStateChange(bossID, isAlive, mapID, realMapID, copyMapID) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | mapID, lineID = dataMapID, copyMapID | 
|---|
|  |  |  | lineID = copyMapID | 
|---|
|  |  |  | GameWorld.Log("世界boss状态变更: mapID=%s,lineID=%s,bossID=%s,state=%s,tick=%s" % (mapID, lineID, bossID, isAlive, tick)) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if bossID <= 0: | 
|---|
|  |  |  | 
|---|
|  |  |  | def OnQueryBossInfo(index, clientData, tick): | 
|---|
|  |  |  | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) | 
|---|
|  |  |  | bossIDList = clientData.BossIDList | 
|---|
|  |  |  | Sync_BossInfo(curPlayer, bossIDList) | 
|---|
|  |  |  | if not bossIDList: | 
|---|
|  |  |  | Sync_BossInfo(curPlayer) | 
|---|
|  |  |  | CrossBoss.Sync_CrossBossInfo(curPlayer) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | bossID = bossIDList[0] | 
|---|
|  |  |  | ipyData = IpyGameDataPY.GetIpyGameData('BOSSInfo', bossID) | 
|---|
|  |  |  | if not ipyData: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | mapID = ipyData.GetMapID() | 
|---|
|  |  |  | if mapID in ChConfig.Def_CrossMapIDList: | 
|---|
|  |  |  | CrossBoss.Sync_CrossBossInfo(curPlayer, bossIDList) | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | Sync_BossInfo(curPlayer, bossIDList) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OnKillBossDropGoodItem(msgList, tick): | 
|---|
|  |  |  | # playerName, mapID, npcID, itemID, userData | 
|---|
|  |  |  | if len(msgList) != 8: | 
|---|
|  |  |  | if len(msgList) != 10: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | playerID, killerName, mapID, npcID, itemID, userData, weightValue, serverGroupID = msgList | 
|---|
|  |  |  | playerID, killerName, mapID, lineID, npcID, itemID, userData, weightValue, serverGroupID, playerLV = msgList | 
|---|
|  |  |  | GameWorld.DebugLog("击杀Boss掉落好物品: mapID=%s,npcID=%s,killerName=%s,itemID=%s, userData=%s, weightValue=%s, serverGroupID=%s" | 
|---|
|  |  |  | % (mapID, npcID, killerName, itemID, userData, weightValue, serverGroupID)) | 
|---|
|  |  |  | maxRecordCnt = IpyGameDataPY.GetFuncCfg('DropRecordNum') | 
|---|
|  |  |  | 
|---|
|  |  |  | # 同步到玩家对应子服 | 
|---|
|  |  |  | if not serverGroupID: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | zoneIpyData = CrossRealmPlayer.GetCrossCommZoneIpyDataByServerGroupID(serverGroupID) | 
|---|
|  |  |  | zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByServerGroupID(mapID, serverGroupID) | 
|---|
|  |  |  | if not zoneIpyData: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | serverGroupIDList = zoneIpyData.GetServerGroupIDList() | 
|---|
|  |  |  | 
|---|
|  |  |  | if commonList and commonList[0][0] != -1: | 
|---|
|  |  |  | recordList.Delete(commonList[0][0]) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | PlayerUniversalGameRec.MapServer_UniversalGameRec(None, recType, [mapID, npcID, itemID, playerID, weightValue], | 
|---|
|  |  |  | [killerName, "", userData]) | 
|---|
|  |  |  | PlayerUniversalGameRec.MapServer_UniversalGameRec(None, recType, [mapID*100+lineID, npcID, itemID, playerID, weightValue], | 
|---|
|  |  |  | [killerName, '%s|%s'%(serverGroupID, playerLV), userData]) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | msgList = [killerName, playerID, mapID, npcID, itemID, userData] | 
|---|
|  |  |  | msgList = [killerName, playerID, mapID, npcID, itemID, userData, serverGroupID, playerLV, lineID] | 
|---|
|  |  |  | PlayerControl.WorldNotify(0, 'DropRecord' , msgList) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def SetBossRefreshTime(bossid, killedTime): | 
|---|
|  |  |  | '''设置boss刷新时间''' | 
|---|
|  |  |  | ipyData = IpyGameDataPY.GetIpyGameData('BOSSInfo', bossid) | 
|---|
|  |  |  | ipyData = IpyGameDataPY.GetIpyGameDataNotLog('BOSSInfo', bossid) | 
|---|
|  |  |  | if not ipyData: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | onlineCnt = __GetBossOnlineHeroCnt(bossid)[0] | 
|---|