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
#!/usr/bin/python
# -*- coding: GBK -*-
 
##@package ClearPlayerMirror
# ÇåÀíÍæ¼Ò¾µÏñ
 
 
import GameWorld
import PlayerControl
 
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param playerList ²ÎÊýÁбí [Íæ¼ÒID]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, playerList):
    playerID = 0
    if len(playerList) != 0:
        playerID = playerList[0]
    
    if playerID != 0:
        mirrorPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
        if mirrorPlayer:
            PlayerControl.DeleteMirror(mirrorPlayer)
        return
 
    ids = []
    playerManager = GameWorld.GetPlayerManager()
    for i in range(playerManager.OnlineCount()):
        mirrorPlayer = playerManager.OnlineAt(i)
        if not mirrorPlayer:
            continue
        
        ids.append(mirrorPlayer.GetID())
 
    for id in ids:
        mirrorPlayer = playerManager.FindPlayerByID(id)
        if not mirrorPlayer:
            continue
        PlayerControl.DeleteMirror(mirrorPlayer)
        
    return