hxp
2019-08-09 b8db02d69c95fa1f94e304ab6a7714c54517a9e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.Bossall
#
# @todo:¸´»îËùÓÐboss
# @author hxp
# @date 2018-06-19
# @version 1.0
#
# ÏêϸÃèÊö: ¸´»îËùÓÐboss
#
#-------------------------------------------------------------------------------
#"""Version = 2018-06-19 11:00"""
#-------------------------------------------------------------------------------
import PyGameData
import GameWorldBoss
import GameWorld
import time
import CrossBoss
 
## Ö´ÐÐÂß¼­
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param gmList []
#  @return None
def OnExec(curPlayer, gmList):
    bossIDList = __Bossall()
    GameWorld.DebugAnswer(curPlayer, "ÖØÉúboss:%s" % bossIDList)
    return
 
def OnMergeServerExec(cmdMsgList, tick):
    bossIDList = __Bossall()
    GameWorld.DebugLog("ÖØÉúboss:%s" % bossIDList)
    return
 
def OnGetMergeParam(curPlayer):
    return []
 
def __Bossall():
    isCrossServer = GameWorld.IsCrossServer()
    bossIDList = []
    for bossInfo in PyGameData.g_sortBOSSRefreshList:
        bossID = bossInfo[0]
        if isCrossServer:
            zoneID = bossInfo[3]
            isAlive = CrossBoss.__GetCrossBossIsAlive(zoneID, bossID)
        else:
            isAlive = GameWorldBoss.__GetIsAlive(bossID)            
        if isAlive:
            continue
        bossInfo[1] = 0
        bossInfo[2] = 0
        bossIDList.append(bossID)
    curTime = int(time.time())
    PyGameData.g_sortBOSSRefreshList.sort(key=lambda asd:max(0, asd[2] - (curTime - asd[1])))
    return bossIDList