hxp
2023-02-08 cb1d20b4aff8ca422a12a18f024a65b201687ec0
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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.ExitFB
#
# @todo:Í˳ö¸±±¾
# @author hxp
# @date 2017-10-25
# @version 1.0
#
# ÏêϸÃèÊö: Í˳ö¸±±¾
#
#-------------------------------------------------------------------------------
#"""Version = 2017-10-25 18:00"""
#-------------------------------------------------------------------------------
 
import GameWorld
import ChPlayer
import PlayerControl
import PlayerFB
import CrossRealmPlayer
 
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param paramList ²ÎÊýÁбí []
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, paramList):
    tick = GameWorld.GetGameWorld().GetTick()
    
    if GameWorld.IsCrossServer():
        CrossRealmPlayer.PlayerExitCrossServer(curPlayer)
        return
    
    if PlayerControl.GetCustomMapID(curPlayer):
        PlayerFB.DoExitCustomScene(curPlayer)
        return
    
    isAll = paramList[0] if paramList else 0
    if isAll:
        copyMapPlayerManager = GameWorld.GetMapCopyPlayerManager()
        for i in xrange(copyMapPlayerManager.GetPlayerCount()):
            player = copyMapPlayerManager.GetPlayerByIndex(i)
            if player == None or player.IsEmpty():
                continue
            ChPlayer.__Func_ExitFB(player, tick)
        return
    ChPlayer.__Func_ExitFB(curPlayer, tick)
    return